Skip to content

Commit

Permalink
put security disclaimer in README
Browse files Browse the repository at this point in the history
  • Loading branch information
FauconFan committed Sep 8, 2024
1 parent d1fef67 commit e40bf7e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ You also have to activate the preprocessor, put this in your `book.toml` file:
[preprocessor.cmdrun]
```

> :warning: This preprocessor presents a security risk, as arbitrary commands can be run. Be careful with the commands you run.
> To list all the commands that will be run within an mdbook, you can run the following command:
> ```sh
> grep -r '<!-- cmdrun' . | sed 's/.*<!-- cmdrun \(.*\) -->.*/\1/'
> ``````
## How to
Let's say we have these two files:
Expand Down
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
//! [preprocessor.cmdrun]
//! ```
//!
//! > :warning: This preprocessor presents a security risk, as arbitrary commands can be run. Be careful with the commands you run.
//! > To list all the commands that will be run within an mdbook, you can run the following command:
//! > ```sh
//! > grep -r '<!-- cmdrun' . | sed 's/.*<!-- cmdrun \(.*\) -->.*/\1/'
//! > ``````
//!
//!
//! # How to
//!
//! Let's say we have these two files:
Expand Down

0 comments on commit e40bf7e

Please sign in to comment.