Skip to content

Commit e40bf7e

Browse files
committed
put security disclaimer in README
1 parent d1fef67 commit e40bf7e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ You also have to activate the preprocessor, put this in your `book.toml` file:
1616
[preprocessor.cmdrun]
1717
```
1818

19+
> :warning: This preprocessor presents a security risk, as arbitrary commands can be run. Be careful with the commands you run.
20+
> To list all the commands that will be run within an mdbook, you can run the following command:
21+
> ```sh
22+
> grep -r '<!-- cmdrun' . | sed 's/.*<!-- cmdrun \(.*\) -->.*/\1/'
23+
> ``````
24+
25+
1926
## How to
2027
2128
Let's say we have these two files:

src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
//! [preprocessor.cmdrun]
1212
//! ```
1313
//!
14+
//! > :warning: This preprocessor presents a security risk, as arbitrary commands can be run. Be careful with the commands you run.
15+
//! > To list all the commands that will be run within an mdbook, you can run the following command:
16+
//! > ```sh
17+
//! > grep -r '<!-- cmdrun' . | sed 's/.*<!-- cmdrun \(.*\) -->.*/\1/'
18+
//! > ``````
19+
//!
20+
//!
1421
//! # How to
1522
//!
1623
//! Let's say we have these two files:

0 commit comments

Comments
 (0)