Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IAST Security Controls - Node.js #28258

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CarlesDD
Copy link
Contributor

What does this PR do? What is the motivation?

Updates IAST security controls documentation with Node.js information:

  • Compatibility requirements
  • Examples

Merge instructions

Merge readiness:

  • Ready for merge

Merge queue is enabled in this repo. To have it automatically merged after it receives the required reviews, create the PR (from a branch that follows the <yourname>/description naming convention) and then add the following PR comment:

/merge

Additional notes

Copy link
Contributor

Preview links (active after the build_preview check completes)

Modified Files

@CarlesDD CarlesDD marked this pull request as ready for review March 19, 2025 20:13
@CarlesDD CarlesDD requested a review from a team as a code owner March 19, 2025 20:13
@urseberry urseberry self-assigned this Mar 19, 2025
`INPUT_VALIDATOR:COMMAND_INJECTION:bar/foo/custom_input_validator.js:validators.validate`

#### Security control method from a transitive dependency
As long as the `node_modules` folder is present in the file path of a security control definition, all files whose file path ends with that path are evaluated as such.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain this line in more words? I'm having trouble understanding it. In particular, what do you mean by "ends with that path?"

Is the sentence telling people how to make sure all of their security controls, including ones from transitive dependencies, are evaluated?

Copy link
Member

Choose a reason for hiding this comment

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

From what I understand this sentence is explaining our internal implementation of the security control path finding algorithm. Instead we should probably explain the implications of this implementation:

Suggested change
As long as the `node_modules` folder is present in the file path of a security control definition, all files whose file path ends with that path are evaluated as such.
Because of npm's flat dependency structure, it is not possible to differentiate between a direct dependency and a transitive dependency. This means if one dependency is [defined in a security control, not sure how to word that], all instances of that dependency (direct or transitive), will be affected.

Copy link
Contributor Author

@CarlesDD CarlesDD Mar 20, 2025

Choose a reason for hiding this comment

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

Thanks @simon-id. I've adjusted your suggestion and committed the changes.

@urseberry could you check it?

Copy link
Member

Choose a reason for hiding this comment

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

lgtm

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.

3 participants