Skip to content

Unified: Compromise on remote sources - #23283

Open
geoffw0 wants to merge 2 commits into
github:mainfrom
geoffw0:sourcecompromise
Open

geoffw0 wants to merge 2 commits into
github:mainfrom
geoffw0:sourcecompromise

Conversation

@geoffw0

@geoffw0 geoffw0 commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Replace Models::isSource(node, _) with Models::isSource(node, "remote") (i.e. only match remote sources, not any kind of sources) in four unified queries. This is not actually what we want - we want to select active taint sources - but we can't do that until we've ported threat modelling. It is, however, an adequate temporary solution and better than _.

(honestly I'd leave this alone, but Copilot keeps bugging me about it any time I touch code remotely related to this)

@geoffw0
geoffw0 requested a review from a team as a code owner November 27, 2026 13:18
@geoffw0 geoffw0 added no-change-note-required This PR does not need a change note Unified labels Nov 27, 2026
Copilot AI adaptive review requested due to automatic review settings November 27, 2026 13:18

Copilot AI 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.

🟢 Approval recommended

No active review issues are reported for the change limiting the four security queries to remote sources.

No open issues 🎉

What changed in this PR

This PR narrows source selection in four unified security queries to remote sources as a temporary compromise until threat-model support enables active-source selection.

Changes:

  • Replace Models::isSource(node, _) with Models::isSource(node, "remote") in all four queries.
  • Leave sink selection and other query logic unchanged.
File Description
unified/​ql/​src/​queries/​security/​CWE-943/​PredicateInjection.ql Restricts predicate-injection sources to remote input.
unified/​ql/​src/​queries/​security/​CWE-134/​UncontrolledFormatString.ql Restricts format-string sources to remote input.
unified/​ql/​src/​queries/​security/​CWE-094/​UnsafeJsEval.ql Restricts unsafe JavaScript evaluation sources to remote input.
unified/​ql/​src/​queries/​security/​CWE-089/​SqlInjection.ql Restricts SQL-injection sources to remote input.

Review effort: Balanced (adaptive)

This branch has not been deployed

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

Labels

no-change-note-required This PR does not need a change note Unified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants