Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Go: Diff-informed queries: phase 3 (non-trivial locations)#20075

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
d10c wants to merge15 commits intogithub:main
base:main
Choose a base branch
Loading
fromd10c:d10c/diff-informed-phase-3-go

Conversation

d10c
Copy link
Contributor

This PR enables diff-informed mode on queries that select a location other than dataflow source or sink. This entails adding a non-trivial location override that returns the locations that are actually selected.

Prior work includes PRs like#19663,#19759, and#19817. This PR uses the same patch script as those PRs to find candidate queries to convert to diff-enabled. This is the final step in mass-enabling diff-informed queries on all the languages.

Commit-by-commit reviewing is recommended.

I have split the commits that add/modify tests from the ones that enable/disable diff-informed queries.
If the commit modifies a .qll file, in the commit message I've included links to the queries that depend on that .qll for easier reviewing.
Feel free to delegate parts of the review to others who may be more specialized in certain languages.

d10c added15 commitsJuly 17, 2025 11:46
@d10cd10c added the no-change-note-requiredThis PR does not need a change note labelJul 17, 2025
@d10cd10c marked this pull request as ready for reviewJuly 17, 2025 13:55
@CopilotCopilotAI review requested due to automatic review settingsJuly 17, 2025 13:55
@d10cd10c requested a review froma team as acode ownerJuly 17, 2025 13:55
@d10cd10c requested a review frommichaelnebelJuly 17, 2025 13:55
Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables diff-informed mode on Go CodeQL queries that select non-trivial locations (beyond simple dataflow source/sink locations). It adds location override predicates to help the diff-informed analysis focus on the actual locations being reported.

  • AddsobserveDiffInformedIncrementalMode() predicate to enable diff-informed mode
  • ImplementsgetASelectedSourceLocation() andgetASelectedSinkLocation() predicates to specify custom location overrides
  • Disables diff-informed mode for secondary configurations that can't accurately override locations

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
go/ql/src/experimental/CWE-918/SSRF.qllEnables diff-informed mode with custom sink location override for SSRF detection
go/ql/src/experimental/CWE-840/ConditionalBypass.qlDisables diff-informed mode due to secondary config usage
go/ql/src/experimental/CWE-807/SensitiveConditionBypass.qllEnables diff-informed mode with comparison expression location override
go/ql/src/experimental/CWE-1004/AuthCookie.qllEnables diff-informed mode for cookie authentication queries
go/ql/src/Security/CWE-601/BadRedirectCheck.qlEnables diff-informed mode with source and check location overrides
go/ql/src/Security/CWE-322/InsecureHostKeyCallback.qlEnables diff-informed mode for host key callback analysis
go/ql/src/InconsistentCode/UnhandledCloseWritableHandle.qlEnables diff-informed mode with file handle location override
go/ql/lib/semmle/go/security/SafeUrlFlow.qllDisables diff-informed mode for secondary configuration
go/ql/lib/semmle/go/security/RequestForgery.qllEnables diff-informed mode with sink location override
go/ql/lib/semmle/go/security/ReflectedXss.qllEnables diff-informed mode with XSS sink location override
go/ql/lib/semmle/go/security/InsecureRandomness.qllDisables diff-informed mode due to secondary flowPath usage
go/ql/lib/semmle/go/security/IncorrectIntegerConversionLib.qllEnables diff-informed mode with successor location override
go/ql/lib/semmle/go/security/HardcodedCredentials.qllEnables diff-informed mode for hardcoded credentials detection
go/ql/lib/semmle/go/security/ExternalAPIs.qllEnables diff-informed mode for external API analysis
go/ql/lib/semmle/go/security/CommandInjection.qllEnables diff-informed mode for command injection detection
go/ql/lib/semmle/go/security/AllocationSizeOverflow.qllEnables diff-informed mode with allocation size location override

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@michaelnebelmichaelnebelAwaiting requested review from michaelnebel

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
Gono-change-note-requiredThis PR does not need a change note
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@d10c

[8]ページ先頭

©2009-2025 Movatter.jp