Skip to content

CodeQL: catch native-image content cleared after guard - #837

Merged
GraciousGazelles merged 5 commits into
mainfrom
repair/w11999-codeql-clear-after-guard-20260909
Sep 9, 2026
Merged

GraciousGazelles merged 5 commits into
mainfrom
repair/w11999-codeql-clear-after-guard-20260909

Conversation

@GraciousGazelles

Copy link
Copy Markdown
Collaborator

Summary

  • detect a response content collection cleared after the native-image guard and before a successful return
  • add bounded positive and safe near-miss fixtures
  • preserve existing production query suite and workflow configuration

Validation

  • Baseline hosted query tests at 7134b30: the new clear-after-guard mutant was missed; existing findings shifted only because the fixture gained 34 lines.
  • Candidate hosted query tests and production CodeQL analysis are required on the final head.

Scope is limited to the existing Rust computer-use CodeQL query and NativeVisualResponseFlow fixture contract.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the CodeQL query for verifying visual computer-use responses by detecting destructive clear() operations on the response's content_items collection after a guard has run. It updates the cfgNodeBetween predicate to handle general mutations, introduces predicates to identify and track clear() calls, and adds corresponding test cases. Feedback suggests improving the robustness of the responseContentItemsClear predicate by using localValueFlow to track the receiver of the clear() call, which would allow detecting cases where the collection is aliased before being cleared.

@GraciousGazelles
GraciousGazelles added this pull request to the merge queue Sep 9, 2026
Merged via the queue into main with commit 52bdd4c Sep 9, 2026
83 checks passed
@GraciousGazelles
GraciousGazelles deleted the repair/w11999-codeql-clear-after-guard-20260909 branch September 9, 2026 03:56
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.

1 participant