Skip to content

Commit

Permalink
docs(exec): minor wording changes on security doc (#951)
Browse files Browse the repository at this point in the history
This is a follow-up to #950, to emphasize the message.
  • Loading branch information
nfischer committed Jun 26, 2019
1 parent 68c3822 commit 7aa8ce4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -340,10 +340,10 @@ Not seeing the behavior you want? `exec()` runs everything through `sh`
by default (or `cmd.exe` on Windows), which differs from `bash`. If you
need bash-specific behavior, try out the `{shell: 'path/to/bash'}` option.

**Note:** as `shell.exec()` executes an arbitrary string in the system
shell, it is **critical** to properly sanitize user input to avoid command
execution. For more context, consult the [Security
guidelines](https://github.com/shelljs/shelljs/wiki/Security-guidelines).
**Security note:** as `shell.exec()` executes an arbitrary string in the
system shell, it is **critical** to properly sanitize user input to avoid
**command injection**. For more context, consult the [Security
Guidelines](https://github.com/shelljs/shelljs/wiki/Security-guidelines).


### find(path [, path ...])
Expand Down
8 changes: 4 additions & 4 deletions src/exec.js
Expand Up @@ -178,10 +178,10 @@ function execAsync(cmd, opts, pipe, callback) {
//@ by default (or `cmd.exe` on Windows), which differs from `bash`. If you
//@ need bash-specific behavior, try out the `{shell: 'path/to/bash'}` option.
//@
//@ **Note:** as `shell.exec()` executes an arbitrary string in the system
//@ shell, it is **critical** to properly sanitize user input to avoid command
//@ execution. For more context, consult the [Security
//@ guidelines](https://github.com/shelljs/shelljs/wiki/Security-guidelines).
//@ **Security note:** as `shell.exec()` executes an arbitrary string in the
//@ system shell, it is **critical** to properly sanitize user input to avoid
//@ **command injection**. For more context, consult the [Security
//@ Guidelines](https://github.com/shelljs/shelljs/wiki/Security-guidelines).
function _exec(command, options, callback) {
options = options || {};
if (!command) common.error('must specify command');
Expand Down

0 comments on commit 7aa8ce4

Please sign in to comment.