-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Diff-informed queries: phase 3 (non-trivial locations) #19957
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
base: main
Are you sure you want to change the base?
Conversation
ff3a4b9
to
95fe462
Compare
@@ -3,6 +3,7 @@ | |||
private import codeql.actions.dataflow.ExternalFlow | |||
private import codeql.actions.security.ArtifactPoisoningQuery | |||
private import codeql.actions.security.UntrustedCheckoutQuery | |||
private import codeql.actions.security.ControlChecks |
Check warning
Code scanning / CodeQL
Redundant import Warning
codeql.actions.security.ArtifactPoisoningQuery
aff62c2
to
6d0ae3a
Compare
c871f5e
to
276c7f0
Compare
result = source.getLocation() | ||
or | ||
exists(DataFlow::Node node | result = node.getLocation() | | ||
sensitiveAssignment(node, _, _) | ||
or | ||
hardcodedPrivateKey(node, _) | ||
) |
Check warning
Code scanning / CodeQL
Var only used in one side of disjunct. Warning
variable source
result = sink.getLocation() | ||
or | ||
exists(DataFlow::Node node | result = node.getLocation() | | ||
sensitiveAssignment(_, node, _) | ||
or | ||
hardcodedPrivateKey(node, _) | ||
) |
Check warning
Code scanning / CodeQL
Var only used in one side of disjunct. Warning
variable sink
cb2db2f
to
c70036d
Compare
exists(QueryInjectionSink query, Expr uncontrolled | | ||
result = [query.getLocation(), uncontrolled.getLocation()] and | ||
builtFromUncontrolledConcat(query.asExpr(), uncontrolled) | ||
) | ||
or | ||
result = sink.getLocation() |
Check warning
Code scanning / CodeQL
Var only used in one side of disjunct. Warning
variable sink
result = source.getLocation() | ||
or | ||
result = any(MethodCallInsecureFileCreation m).getLocation() |
Check warning
Code scanning / CodeQL
Var only used in one side of disjunct. Warning
variable source
unsafeTrust instanceof RabbitMQEnableHostnameVerificationNotSet | ||
or | ||
sink.asExpr() = unsafeTrust |
Check warning
Code scanning / CodeQL
Var only used in one side of disjunct. Warning
variable sink
c70036d
to
08c4cc2
Compare
call.getArgument(1).getValue().toInt() != 0 and | ||
call.getArgument(2) instanceof NullValue | ||
or | ||
sink.asExpr() = call.getArgument(2) |
Check warning
Code scanning / CodeQL
Var only used in one side of disjunct. Warning
variable sink
08c4cc2
to
857b583
Compare
That said, the test is useless; to get a result, I need a comparison against remote input.
857b583
to
3e3e856
Compare
This PR enables diff-informed mode on queries that select a location other than dataflow source or sink.
I start with automatically generated stubs and then handle each TODO item in its own commit.