Skip to content

Conversation

@karmakri
Copy link
Contributor

Description of changes:

Add compliant and noncompliant examples of javascript/code-injection@v1.0.

const allowedParameters = ['-n', '-c']

// Compliant: validating user-supplied datas before passing them into the shell command.
if ( allowedCommands.indexOf(command) != -1 && allowedParameters.indexOf(parameter) != -1 && !isNaN(lines)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you fix indentation:
if (allowedCommands.indexOf(command) != -1)
Note no tailing space after (

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants