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

Swift: Diff-informed queries: phase 3 (non-trivial locations)#20082

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 merge4 commits intogithub:main
base:main
Choose a base branch
Loading
fromd10c:d10c/diff-informed-phase-3-swift

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.

@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 15:17
@CopilotCopilotAI review requested due to automatic review settingsJuly 17, 2025 15:17
@d10cd10c requested a review froma team as acode ownerJuly 17, 2025 15:17
@d10cd10c requested a review frommichaelnebelJuly 17, 2025 15:17
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 Swift security queries that select non-trivial locations (other than dataflow source or sink). The changes add location override predicates to handle cases where queries select locations that need special handling for diff-informed analysis.

  • AddsobserveDiffInformedIncrementalMode() predicate to four security query modules
  • ImplementsgetASelectedSinkLocation() predicate for queries that can support diff-informed mode
  • Disables diff-informed mode for queries with location selection complexities

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

FileDescription
UnsafeWebViewFetchQuery.qllDisables diff-informed mode due to secondary location use in select
InsecureTLSQuery.qllDisables diff-informed mode due to Swift nodes with problematic locations
CleartextStoragePreferencesQuery.qllEnables diff-informed mode with custom sink location handling
CleartextStorageDatabaseQuery.qllEnables diff-informed mode with custom sink location handling


predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) {
Copy link
Preview

CopilotAIJul 17, 2025

Choose a reason for hiding this comment

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

The logic ingetASelectedSinkLocation is duplicated across CleartextStoragePreferencesQuery.qll and CleartextStorageDatabaseQuery.qll. Consider extracting this common pattern into a shared utility predicate to improve maintainability.

Copilot uses AI. Check for mistakes.

@d10cd10c requested a review fromgeoffw0July 18, 2025 13:11
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

@geoffw0geoffw0Awaiting requested review from geoffw0

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

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

Successfully merging this pull request may close these issues.

1 participant
@d10c

[8]ページ先頭

©2009-2025 Movatter.jp