Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go: Refactor queries to use ThreatModelFlowSource instead of RemoteFlowSource #16709

Conversation

egregius313
Copy link
Contributor

@egregius313 egregius313 commented Jun 8, 2024

Follow up of #16697. This refactors queries to use ThreatModelFlowSource instead of RemoteFlowSource in their definitions of isSource.

Since the Go libraries currently do not have any local sources as far as I can tell, this should not be a breaking change.

@egregius313 egregius313 force-pushed the egregius313/go/df/threat-models/refactor-queries branch from b4d4f82 to 2d2eff7 Compare June 8, 2024 19:16
@egregius313 egregius313 marked this pull request as ready for review June 8, 2024 19:41
@egregius313 egregius313 requested a review from a team as a code owner June 8, 2024 19:41
owen-mc
owen-mc previously approved these changes Jun 11, 2024
---
category: minorAnalysis
---
* The `Customizations` libraries for several queries, as well as queries which do not have `Customizations` libraries, have been modified to use `ThreatModelFlowSource` to define their `isSource` predicates instead of `RemoteFlowSource`. This means these queries will now respect threat model configurations.
Copy link
Contributor

Choose a reason for hiding this comment

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

  • I don't think it's worth distinguishing between queries with customization libraries and those without. Most users won't know the difference, and those that do can easily verify that both have been updated.
  • I think it's worth explaining briefly that ThreatModelFlowSource will be the same as RemoteFlowSource except when the query is run in the presence of a specified threat model.

@owen-mc
Copy link
Contributor

owen-mc commented Jun 11, 2024

You should probably do a DCA run before merging as well.

@egregius313 egregius313 force-pushed the egregius313/go/df/threat-models/refactor-queries branch from dad4b1e to 05f7356 Compare June 17, 2024 15:02
@egregius313 egregius313 requested a review from owen-mc June 17, 2024 15:07
@egregius313 egregius313 force-pushed the egregius313/go/df/threat-models/refactor-queries branch from 05f7356 to bdf36e3 Compare June 17, 2024 15:36
owen-mc
owen-mc previously approved these changes Jun 18, 2024
Copy link
Contributor

@owen-mc owen-mc left a comment

Choose a reason for hiding this comment

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

Looks great!

@egregius313 egregius313 dismissed owen-mc’s stale review June 18, 2024 16:25

The merge-base changed after approval.

@egregius313 egregius313 force-pushed the egregius313/go/df/threat-models/refactor-queries branch from bdf36e3 to 5bbd003 Compare June 18, 2024 16:27
@egregius313 egregius313 merged commit 7adfa6b into github:main Jun 18, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants