Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7bf34f0
Actions/OutputClobberingQuery
d10c Oct 8, 2025
8d6c9bc
Actions/RequestForgeryQuery
d10c Oct 8, 2025
56f5a71
Actions/SecretExfiltrationQuery
d10c Oct 8, 2025
7cf0f5d
Actions/CompositeActionsSinks
d10c Oct 8, 2025
05a0121
Actions/CompositeActionsSources
d10c Oct 8, 2025
e96296b
Actions/CompositeActionsSummaries
d10c Oct 8, 2025
053d439
Actions/ReusableWorkflowsSinks
d10c Oct 8, 2025
feaaeff
Actions/ReusableWorkflowsSources
d10c Oct 8, 2025
ba9e3ba
Actions/ReusableWorkflowsSummaries
d10c Oct 8, 2025
74573b6
C++/WordexpTainted
d10c Oct 8, 2025
2da99db
C#/DontInstallRootCert
d10c Oct 8, 2025
abe696d
Go/PamAuthBypass: disable due to secondary flow
d10c Oct 8, 2025
87ce654
Go/DivideByZero
d10c Oct 8, 2025
bddc43b
Go/InsufficientKeySize
d10c Oct 8, 2025
fb32d0d
Java/ArbitraryApkInstallationQuery
d10c Oct 8, 2025
02a0eef
Java/ArithmeticTainted
d10c Oct 8, 2025
e5c8d6e
Java/ArithmeticUncontrolledQuery
d10c Oct 8, 2025
3ee393b
Java/BrokenCryptoAlgorithmQuery
d10c Oct 8, 2025
9667b41
Java/CommandLineQuery
d10c Oct 9, 2025
1623ce2
Java/ConditionalBypass
d10c Oct 9, 2025
be2c824
Java/ImproperValidationOfArrayConstructionCodeSpecifiedQuery
d10c Oct 9, 2025
e152b9b
Java/ImproperValidationOfArrayConstructionFlow
d10c Oct 9, 2025
3d59f5b
Java/MaybeBrokenCryptoAlgorithmQuery
d10c Oct 9, 2025
216393f
Java/NumericCastTaintedQuery
d10c Oct 9, 2025
1edc6b7
Java/TaintedEnvironmentVariableQuery
d10c Oct 9, 2025
b1073dd
Java/TaintedPermissionsCheckQuery
d10c Oct 9, 2025
1f1ec97
Java/TempDirLocalInformationDisclosureQuery
d10c Oct 9, 2025
de517ae
Java/UnsafeDeserializationQuery
d10c Oct 9, 2025
694bae3
Java/WebviewDebugEnabledQuery
d10c Oct 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ private module OutputClobberingConfig implements DataFlow::ConfigSig {
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node sink) { none() }
}

/** Tracks flow of unsafe user input that is used to construct and evaluate an environment variable. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ private module RequestForgeryConfig implements DataFlow::ConfigSig {
predicate isSink(DataFlow::Node sink) { sink instanceof RequestForgerySink }

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node sink) { none() }
}

/** Tracks flow of unsafe user input that is used to construct and evaluate a system command. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ private module SecretExfiltrationConfig implements DataFlow::ConfigSig {
predicate isSink(DataFlow::Node sink) { sink instanceof SecretExfiltrationSink }

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node sink) { none() }
}

/** Tracks flow of unsafe user input that is used in a context where it may lead to a secret exfiltration. */
Expand Down
2 changes: 0 additions & 2 deletions actions/ql/src/Models/CompositeActionsSinks.ql
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ private module MyConfig implements DataFlow::ConfigSig {
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node sink) { none() }
}

module MyFlow = TaintTracking::Global<MyConfig>;
Expand Down
2 changes: 0 additions & 2 deletions actions/ql/src/Models/CompositeActionsSources.ql
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ private module MyConfig implements DataFlow::ConfigSig {
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node sink) { none() }
}

module MyFlow = TaintTracking::Global<MyConfig>;
Expand Down
2 changes: 0 additions & 2 deletions actions/ql/src/Models/CompositeActionsSummaries.ql
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ private module MyConfig implements DataFlow::ConfigSig {
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node sink) { none() }
}

module MyFlow = TaintTracking::Global<MyConfig>;
Expand Down
2 changes: 0 additions & 2 deletions actions/ql/src/Models/ReusableWorkflowsSinks.ql
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ private module MyConfig implements DataFlow::ConfigSig {
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node sink) { none() }
}

module MyFlow = TaintTracking::Global<MyConfig>;
Expand Down
2 changes: 0 additions & 2 deletions actions/ql/src/Models/ReusableWorkflowsSources.ql
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ private module MyConfig implements DataFlow::ConfigSig {
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node sink) { none() }
}

module MyFlow = TaintTracking::Global<MyConfig>;
Expand Down
2 changes: 0 additions & 2 deletions actions/ql/src/Models/ReusableWorkflowsSummaries.ql
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ private module MyConfig implements DataFlow::ConfigSig {
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node sink) { none() }
}

module MyFlow = TaintTracking::Global<MyConfig>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ module WordexpTaintConfig implements DataFlow::ConfigSig {
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node source) { none() }
}

module WordexpTaint = TaintTracking::Global<WordexpTaintConfig>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ module AddCertToRootStoreConfig implements DataFlow::ConfigSig {
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node sink) { none() }
}

module AddCertToRootStore = DataFlow::Global<AddCertToRootStoreConfig>;
Expand Down
2 changes: 0 additions & 2 deletions go/ql/src/Security/CWE-326/InsufficientKeySize.ql
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ module Config implements DataFlow::ConfigSig {
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node sink) { none() }
}

/**
Expand Down
12 changes: 6 additions & 6 deletions go/ql/src/experimental/CWE-285/PamAuthBypass.ql
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ module PamStartToAcctMgmtConfig implements DataFlow::ConfigSig {
exists(PamAcctMgmt p | p.getACall().getReceiver() = sink)
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) { none() }
predicate observeDiffInformedIncrementalMode() {
none() // used as secondary flow
}
}

module PamStartToAcctMgmtFlow = TaintTracking::Global<PamStartToAcctMgmtConfig>;
Expand All @@ -60,9 +60,9 @@ module PamStartToAuthenticateConfig implements DataFlow::ConfigSig {
exists(PamAuthenticate p | p.getACall().getReceiver() = sink)
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) { none() }
predicate observeDiffInformedIncrementalMode() {
none() // uses secondary flow
}
}

module PamStartToAuthenticateFlow = TaintTracking::Global<PamStartToAuthenticateConfig>;
Expand Down
2 changes: 0 additions & 2 deletions go/ql/src/experimental/CWE-369/DivideByZero.ql
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ module Config implements DataFlow::ConfigSig {
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node sink) { none() }
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ module ApkInstallationConfig implements DataFlow::ConfigSig {
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node sink) { none() }
}

module ApkInstallationFlow = DataFlow::Global<ApkInstallationConfig>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ module ArithmeticOverflowConfig implements DataFlow::ConfigSig {
}

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
exists(ArithExpr exp | result = exp.getLocation() | overflowSink(exp, sink.asExpr()))
}
}
Expand All @@ -43,6 +45,8 @@ module ArithmeticUnderflowConfig implements DataFlow::ConfigSig {
}

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
exists(ArithExpr exp | result = exp.getLocation() | underflowSink(exp, sink.asExpr()))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ module ArithmeticUncontrolledOverflowConfig implements DataFlow::ConfigSig {
}

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
exists(ArithExpr exp | result = exp.getLocation() | overflowSink(exp, sink.asExpr()))
}
}
Expand All @@ -46,6 +48,8 @@ module ArithmeticUncontrolledUnderflowConfig implements DataFlow::ConfigSig {
}

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
exists(ArithExpr exp | result = exp.getLocation() | underflowSink(exp, sink.asExpr()))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ module InsecureCryptoConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
exists(CryptoAlgoSpec c | sink.asExpr() = c.getAlgoSpec() | result = c.getLocation())
}
}
Expand Down
6 changes: 4 additions & 2 deletions java/ql/lib/semmle/code/java/security/CommandLineQuery.qll
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ module InputToArgumentToExecFlowConfig implements DataFlow::ConfigSig {
// only to prevent overlapping results between two queries.
predicate observeDiffInformedIncrementalMode() { any() }

// All queries use the argument as the primary location and do not use the
// sink as an associated location.
// ExecTainted.ql queries use the argument as the primary location;
// ExecUnescaped.ql does not (used to prevent overlapping results).
Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
exists(Expr argument | argumentToExec(argument, sink) | result = argument.getLocation())
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ module ConditionalBypassFlowConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
exists(MethodCall m, Expr e | result = [m, e].getLocation() |
conditionControlsMethod(m, e) and
sink.asExpr() = e
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ module BoundedFlowSourceConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
exists(ArrayCreationExpr arrayCreation, CheckableArrayAccess arrayAccess |
result = [arrayCreation, arrayAccess.getIndexExpr()].getLocation() and
arrayAccess.canThrowOutOfBoundsDueToEmptyArray(sink.asExpr(), arrayCreation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ module ImproperValidationOfArrayConstructionConfig implements DataFlow::ConfigSi
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
exists(ArrayCreationExpr arrayCreation, CheckableArrayAccess arrayAccess |
result = [arrayCreation, arrayAccess.getIndexExpr()].getLocation() and
arrayAccess.canThrowOutOfBoundsDueToEmptyArray(sink.asExpr(), arrayCreation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ module InsecureCryptoConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(CryptoAlgoSpec c | result = c.getLocation() | sink.asExpr() = c.getAlgoSpec())
exists(CryptoAlgoSpec c | result = sink.getLocation() or result = c.getLocation() |
sink.asExpr() = c.getAlgoSpec()
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ module NumericCastFlowConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(NumericNarrowingCastExpr cast |
cast.getExpr() = sink.asExpr() and
exists(NumericNarrowingCastExpr cast | cast.getExpr() = sink.asExpr() |
result = sink.getLocation()
or
result = cast.getLocation()
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ module ExecTaintedEnvironmentConfig implements DataFlow::ConfigSig {
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node source) { none() }
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ module TaintedPermissionsCheckFlowConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(PermissionsConstruction p |
sink.asExpr() = p.getInput() and
exists(PermissionsConstruction p | sink.asExpr() = p.getInput() |
result = sink.getLocation()
or
result = p.getLocation()
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ module TempDirSystemGetPropertyToCreateConfig implements DataFlow::ConfigSig {
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) { none() }
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ private module UnsafeDeserializationConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
result = sink.(UnsafeDeserializationSink).getMethodCall().getLocation()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ module WebviewDebugEnabledConfig implements DataFlow::ConfigSig {
}

predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node source) {
// This module is only used in `WebviewDebuggingEnabled.ql`, which doesn't
// select the source in any "$@" column.
none()
}
}

/**
Expand Down