Skip to content

[Query Fix - githubsecuritylab/rust/iron-response-xss] - report flows that pass a call that has no target - #271

Closed
felickz wants to merge 1 commit into
mainfrom
copilot/rustiron-response-xss-unresolved-prelude-again
Closed

felickz wants to merge 1 commit into
mainfrom
copilot/rustiron-response-xss-unresolved-prelude-again

Conversation

@felickz

@felickz felickz commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

PR 267 contains the fix against rust/iron-response-xss-unresolved-prelude. No code changes were made to this main-based branch.

The Iron query assumed that rust/xss would report a flow whenever the request source and resolved response body were both modelled. If a method on the path had no target, only Iron could follow it, so neither query reported the body.

  • Duplicate suppression: Leave a resolved body to rust/xss only when its analysis reaches the same argument from the same source. Match the full argument location rather than node identity: the model creates a distinct sink node, including for format!(...) arguments. The request-parameter filter is unchanged.
  • Regression: In a registered handler, shout() has no target but Response::with resolves:
    let res = req.url.path();
    let loud = res.shout();
    Ok(Response::with(loud))
  • Local evidence: With CodeQL 2.27.5, Iron alerts went from 19 to 20. loud on line 173 was the only new alert. Only its path and two model rows were added; standard XSS and glob-call results were unchanged. All four focused tests passed without --learn, as did formatting and compilation with warnings as errors.
  • Cost: Checking reachability runs a second global taint analysis.

Copilot AI balanced review requested due to automatic review settings November 26, 2026 05:51

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.

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

Copilot AI linked an issue Nov 26, 2026 that may be closed by this pull request
@felickz felickz changed the title [WIP] Fix XSS report flows in IronResponseXss.ql [Query Fix - githubsecuritylab/rust/iron-response-xss] - report flows that pass a call that has no target Nov 26, 2026
@felickz felickz closed this Nov 26, 2026
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.

Rust Iron XSS: report flows that pass a call that has no target

3 participants