Skip to content

JS: Model Sails Action2 inputs as remote sources - #22142

Open
theinfosecguy wants to merge 3 commits into
github:mainfrom
theinfosecguy:js-sails-action2-inputs
Open

JS: Model Sails Action2 inputs as remote sources#22142
theinfosecguy wants to merge 3 commits into
github:mainfrom
theinfosecguy:js-sails-action2-inputs

Conversation

@theinfosecguy

Copy link
Copy Markdown

Fixes #21773.

This adds a Sails Action2 controller model for bulk-exported action objects under api/controllers. Declared inputs property reads from the action fn parameter are treated as server request parameters, while helper-shaped modules outside controllers and undeclared input reads are not modeled.

Validation:

  • codeql test run javascript/ql/test/library-tests/frameworks/Sails javascript/ql/test/query-tests/Security/CWE-022/TaintedPath --search-path=/Users/keshavmalik/Documents/codeql --threads=0
  • git diff --check

Comment thread javascript/ql/test/library-tests/frameworks/Sails/tests.ql Fixed
@theinfosecguy
theinfosecguy force-pushed the js-sails-action2-inputs branch from 5c68227 to a06a72c Compare July 9, 2026 11:04
@asgerf asgerf added the no-change-note-required This PR does not need a change note label Jul 27, 2026

@asgerf asgerf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR! Looks reasonable, just need to make some imports private before merging.

Comment thread javascript/ql/lib/semmle/javascript/frameworks/Sails.qll Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation JS no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Javascript: js/path-injection misses Sails Action2 request-derived inputs

3 participants