Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
592dd00
Actions/OutputClobberingQuery
d10c Oct 8, 2025
74a45e2
Actions/RequestForgeryQuery
d10c Oct 8, 2025
df236f4
Actions/SecretExfiltrationQuery
d10c Oct 8, 2025
fb7e2d3
Actions/CompositeActionsSinks
d10c Oct 8, 2025
a58ed0f
Actions/CompositeActionsSources
d10c Oct 8, 2025
eb4e825
Actions/CompositeActionsSummaries
d10c Oct 8, 2025
ff65adf
Actions/ReusableWorkflowsSinks
d10c Oct 8, 2025
f45a679
Actions/ReusableWorkflowsSources
d10c Oct 8, 2025
359e85c
Actions/ReusableWorkflowsSummaries
d10c Oct 8, 2025
2340712
C++/WordexpTainted
d10c Oct 8, 2025
6ba4a69
C#/DontInstallRootCert
d10c Oct 8, 2025
67516e7
Go/DivideByZero
d10c Oct 8, 2025
a01aeb8
Go/InsufficientKeySize
d10c Oct 8, 2025
a782efc
Java/ArbitraryApkInstallationQuery
d10c Oct 8, 2025
0f880fe
Java/ArithmeticTainted
d10c Oct 8, 2025
abab2a1
Java/ArithmeticUncontrolledQuery
d10c Oct 8, 2025
f8255e9
Java/BrokenCryptoAlgorithmQuery
d10c Oct 8, 2025
507888b
Java/CommandLineQuery
d10c Oct 9, 2025
12ef9ca
Java/ConditionalBypass
d10c Oct 9, 2025
a9ee098
Java/ImproperValidationOfArrayConstructionCodeSpecifiedQuery
d10c Oct 9, 2025
7bd2588
Java/ImproperValidationOfArrayConstructionFlow
d10c Oct 9, 2025
91d8621
Java/MaybeBrokenCryptoAlgorithmQuery
d10c Oct 9, 2025
ad77299
Java/NumericCastTaintedQuery
d10c Oct 9, 2025
b3d73a0
Java/TaintedEnvironmentVariableQuery
d10c Oct 9, 2025
6e8b90e
Java/TaintedPermissionsCheckQuery
d10c Oct 9, 2025
39affc6
Java/TempDirLocalInformationDisclosureQuery
d10c Oct 9, 2025
e5ea133
Java/UnsafeDeserializationQuery
d10c Oct 9, 2025
6f40435
Java/WebviewDebugEnabledQuery
d10c Oct 9, 2025
33763a5
JS/CommandInjectionQuery
d10c Oct 10, 2025
ebdc0e2
JS/IndirectCommandInjectionQuery
d10c Oct 14, 2025
b50ec58
JS/ShellCommandInjectionFromEnvironmentQuery
d10c Oct 14, 2025
48cf9b7
JS/PolynomialReDoSQuery
d10c Oct 14, 2025
9bb8013
JS/SSRF
d10c Oct 14, 2025
796bd19
Python/PolynomialReDoSQuery
d10c Oct 14, 2025
29f30fd
Python/ServerSideRequestForgeryQuery
d10c Oct 14, 2025
60194a5
Python/UnsafeUnpackQuery
d10c Oct 14, 2025
47bad73
Python/UnsafeUsageOfClientSideEncryptionVersion
d10c Oct 14, 2025
62e83c6
Python/CorsBypass
d10c Oct 14, 2025
9604f75
Python/LdapInsecureAuth
d10c Oct 14, 2025
a19d669
Ruby/PolynomialReDoSQuery
d10c Oct 14, 2025
9fc4ee0
Ruby/ManuallyCheckHttpVerb
d10c Oct 14, 2025
b2f16a0
Ruby/WeakParams
d10c Oct 14, 2025
615a816
Ruby/WeakFilePermissions
d10c Oct 14, 2025
a362113
Shared: update qldoc
d10c Oct 14, 2025
da192f6
Swift/CleartextStorageDatabaseQuery
d10c Oct 14, 2025
54d328d
Swift/CleartextStoragePreferencesQuery
d10c Oct 14, 2025
1b34990
Swift/ConstantPasswordQuery
d10c Oct 14, 2025
b86174c
Swift/InsufficientHashIterationsQuery
d10c Oct 14, 2025
49f7bd7
Swift/StaticInitializationVectorQuery
d10c Oct 14, 2025
e3f7db3
Swift/StringLengthConflationQuery
d10c Oct 14, 2025
616c9f3
Swift/UnsafeJsEvalQuery
d10c Oct 14, 2025
9144f52
Swift/UnsafeUnpackQuery
d10c Oct 14, 2025
34de68f
Actions/ArtifactPoisoningQuery
d10c Oct 15, 2025
852ba96
Actions/EnvPathInjectionQuery
d10c Oct 15, 2025
109d8ec
Actions/EnvVarInjectionQuery
d10c Oct 15, 2025
203f705
Actions/ArgumentInjectionQuery
d10c Oct 15, 2025
62043cf
Actions/CodeInjectionQuery
d10c Oct 15, 2025
a918a9c
C++/ConstantSizeArrayOffByOne
d10c Oct 15, 2025
9840a56
C++/ExecTainted
d10c Oct 15, 2025
08608a3
C++/OverflowDestination
d10c Oct 15, 2025
9a543d6
C++/UnboundedWrite
d10c Oct 15, 2025
8b30d0a
C++/NonConstantFormat
d10c Oct 15, 2025
5f3be3d
C++/CleartextSqliteDatabase
d10c Oct 15, 2025
09ffb00
C++/AuthenticationBypass
d10c Oct 15, 2025
8249f16
C++/CleartextBufferWrite
d10c Oct 15, 2025
6c26d18
C++/CleartextFileWrite
d10c Oct 15, 2025
ef1f2d7
C++/CleartextTransmission
d10c Oct 15, 2025
9c0e749
C++/DecompressionBombs
d10c Oct 15, 2025
f405581
C++/ArithmeticUncontrolled
d10c Oct 15, 2025
83dea99
C++/TaintedAllocationSize
d10c Oct 15, 2025
2c2fe92
C++/UseOfHttp
d10c Oct 15, 2025
0d532d0
Go/UnhandledCloseWritableHandle
d10c Oct 15, 2025
c9ece38
Go/SSRF
d10c Oct 15, 2025
cc571b3
Rust/AccessAfterLifetime
d10c Oct 15, 2025
ed26f00
Rust/InsecureCookie
d10c Oct 15, 2025
e344396
C++/SqlTainted
d10c Oct 15, 2025
4b1adc8
Constrain location overrides to actual sources/sinks
d10c Oct 16, 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 @@ -100,8 +100,6 @@ private module ArgumentInjectionConfig implements DataFlow::ConfigSig {

predicate observeDiffInformedIncrementalMode() { any() }

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

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,6 @@ private module ArtifactPoisoningConfig implements DataFlow::ConfigSig {

predicate observeDiffInformedIncrementalMode() { any() }

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

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ private module CodeInjectionConfig implements DataFlow::ConfigSig {

predicate observeDiffInformedIncrementalMode() { any() }

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

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ private module EnvPathInjectionConfig implements DataFlow::ConfigSig {

predicate observeDiffInformedIncrementalMode() { any() }

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

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ private module EnvVarInjectionConfig implements DataFlow::ConfigSig {

predicate observeDiffInformedIncrementalMode() { any() }

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

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,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
4 changes: 1 addition & 3 deletions cpp/ql/src/Critical/OverflowDestination.ql
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,8 @@ module OverflowDestinationConfig implements DataFlow::ConfigSig {

predicate observeDiffInformedIncrementalMode() { any() }

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

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(FunctionCall fc | result = fc.getLocation() |
exists(FunctionCall fc | result = [fc.getLocation(), sink.getLocation()] |
sourceSized(fc, sink.asIndirectConvertedExpr())
)
}
Expand Down
8 changes: 3 additions & 5 deletions cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,10 @@ module NonConstFlowConfig implements DataFlow::ConfigSig {

predicate observeDiffInformedIncrementalMode() { any() }

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

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
exists(FormattingFunctionCall call, Expr formatString | result = call.getLocation() |
exists(FormattingFunctionCall call, Expr formatString |
result = [call.getLocation(), sink.getLocation()]
|
isSinkImpl(sink, formatString) and
call.getArgument(call.getFormatParameterIndex()) = formatString
)
Expand Down
2 changes: 1 addition & 1 deletion cpp/ql/src/Security/CWE/CWE-078/ExecTainted.ql
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ module ExecTaintConfig implements DataFlow::StateConfigSig {

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(DataFlow::Node concatResult, Expr command, ExecState state |
result = [concatResult.getLocation(), command.getLocation()] and
result = [concatResult.getLocation(), command.getLocation(), sink.getLocation()] and
isSink(sink, state) and
isSinkImpl(sink, command, _) and
concatResult = state.getOutgoingNode()
Expand Down
4 changes: 3 additions & 1 deletion cpp/ql/src/Security/CWE/CWE-089/SqlTainted.ql
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ module SqlTaintedConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(Expr taintedArg | result = taintedArg.getLocation() | taintedArg = asSinkExpr(sink))
exists(Expr taintedArg | result = [taintedArg.getLocation(), sink.getLocation()] |
taintedArg = asSinkExpr(sink)
)
}
}

Expand Down
2 changes: 1 addition & 1 deletion cpp/ql/src/Security/CWE/CWE-120/UnboundedWrite.ql
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ module Config implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(BufferWrite bw | result = bw.getLocation() | isSink(sink, bw, _))
exists(BufferWrite bw | result = [bw.getLocation(), sink.getLocation()] | isSink(sink, bw, _))
}
}

Expand Down
3 changes: 2 additions & 1 deletion cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ module UncontrolledArithConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node source) {
result = getExpr(source).getLocation()
isSource(source) and
result = [getExpr(source).getLocation(), source.getLocation()]
}
}

Expand Down
2 changes: 1 addition & 1 deletion cpp/ql/src/Security/CWE/CWE-190/TaintedAllocationSize.ql
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ module TaintedAllocationSizeConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(Expr alloc | result = alloc.getLocation() | allocSink(alloc, sink))
exists(Expr alloc | result = [alloc.getLocation(), sink.getLocation()] | allocSink(alloc, sink))
}
}

Expand Down
4 changes: 3 additions & 1 deletion cpp/ql/src/Security/CWE/CWE-290/AuthenticationBypass.ql
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ module Config implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(Expr condition | result = condition.getLocation() | isSink(sink, condition))
exists(Expr condition | result = [condition.getLocation(), sink.getLocation()] |
isSink(sink, condition)
)
}
}

Expand Down
4 changes: 3 additions & 1 deletion cpp/ql/src/Security/CWE/CWE-311/CleartextBufferWrite.ql
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ module ToBufferConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(SensitiveBufferWrite w | result = w.getLocation() | isSinkImpl(sink, w))
exists(SensitiveBufferWrite w | result = [w.getLocation(), sink.getLocation()] |
isSinkImpl(sink, w)
)
}
}

Expand Down
6 changes: 4 additions & 2 deletions cpp/ql/src/Security/CWE/CWE-311/CleartextFileWrite.ql
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ module FromSensitiveConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node sourceNode) {
exists(SensitiveExpr source | result = source.getLocation() | isSourceImpl(sourceNode, source))
exists(SensitiveExpr source | result = [source.getLocation(), sourceNode.getLocation()] |
isSourceImpl(sourceNode, source)
)
}

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(FileWrite w | result = w.getLocation() | isSinkImpl(sink, w, _))
exists(FileWrite w | result = [w.getLocation(), sink.getLocation()] | isSinkImpl(sink, w, _))
}
}

Expand Down
4 changes: 3 additions & 1 deletion cpp/ql/src/Security/CWE/CWE-311/CleartextTransmission.ql
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ module FromSensitiveConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(NetworkSendRecv networkSendRecv | result = networkSendRecv.getLocation() |
exists(NetworkSendRecv networkSendRecv |
result = [networkSendRecv.getLocation(), sink.getLocation()]
|
isSinkSendRecv(sink, networkSendRecv)
)
}
Expand Down
4 changes: 2 additions & 2 deletions cpp/ql/src/Security/CWE/CWE-313/CleartextSqliteDatabase.ql
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ module FromSensitiveConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node source) {
exists(SensitiveExpr sensitive | result = sensitive.getLocation() |
exists(SensitiveExpr sensitive | result = [sensitive.getLocation(), source.getLocation()] |
isSourceImpl(source, sensitive)
)
}

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(SqliteFunctionCall sqliteCall | result = sqliteCall.getLocation() |
exists(SqliteFunctionCall sqliteCall | result = [sqliteCall.getLocation(), sink.getLocation()] |
isSinkImpl(sink, sqliteCall, _)
)
}
Expand Down
5 changes: 2 additions & 3 deletions cpp/ql/src/Security/CWE/CWE-319/UseOfHttp.ql
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,9 @@ module HttpStringToUrlOpenConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node source) {
result = source.asIndirectExpr().getLocation()
isSource(source) and
result = [source.asIndirectExpr().getLocation(), source.getLocation()]
}

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

module HttpStringToUrlOpen = TaintTracking::Global<HttpStringToUrlOpenConfig>;
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 @@ -187,12 +187,14 @@ module ArrayAddressToDerefConfig implements DataFlow::StateConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node source) {
exists(Variable v | result = v.getLocation() | isSourceImpl(source, v))
exists(Variable v | result = v.getLocation() or result = source.getLocation() |
isSourceImpl(source, v)
)
}

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(PointerArithmeticInstruction pai, Instruction deref |
result = [pai, deref].getLocation() and
result = [[pai, deref].getLocation(), sink.getLocation()] and
isInvalidPointerDerefSink2(sink, deref, _) and
isSink(sink, ArrayAddressToDerefConfig::TOverflowArithmetic(pai))
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ module DecompressionTaintConfig implements DataFlow::ConfigSig {

predicate observeDiffInformedIncrementalMode() { any() }

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

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(FunctionCall fc | result = [sink.getLocation(), fc.getLocation()] | isSink(fc, sink))
}
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
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ module UnhandledFileCloseConfig implements DataFlow::ConfigSig {
predicate observeDiffInformedIncrementalMode() { any() }

Location getASelectedSourceLocation(DataFlow::Node source) {
exists(DataFlow::CallNode openCall | result = openCall.getLocation() |
exists(DataFlow::CallNode openCall | result = [openCall.getLocation(), source.getLocation()] |
isWritableFileHandle(source, openCall)
Comment on lines +135 to 136
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

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

[nitpick] Using a list expression [openCall.getLocation(), source.getLocation()] for result assignment is unconventional. Consider using separate or branches for better readability and consistency with other files in this PR.

Suggested change
exists(DataFlow::CallNode openCall | result = [openCall.getLocation(), source.getLocation()] |
isWritableFileHandle(source, openCall)
exists(DataFlow::CallNode openCall |
isWritableFileHandle(source, openCall) and
(result = openCall.getLocation() or result = source.getLocation())

Copilot uses AI. Check for mistakes.

)
}
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
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
4 changes: 2 additions & 2 deletions go/ql/src/experimental/CWE-918/SSRF.qll
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ module ServerSideRequestForgery {

predicate observeDiffInformedIncrementalMode() { any() }

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

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.(Sink).getLocation()
or
result = sink.(Sink).getARequest().getLocation()
}
}
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,7 +19,9 @@ module ArithmeticOverflowConfig implements DataFlow::ConfigSig {
}

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(ArithExpr exp | result = exp.getLocation() | overflowSink(exp, sink.asExpr()))
exists(ArithExpr exp | result = [exp.getLocation(), sink.getLocation()] |
overflowSink(exp, sink.asExpr())
)
}
}

Expand All @@ -43,7 +45,9 @@ module ArithmeticUnderflowConfig implements DataFlow::ConfigSig {
}

Location getASelectedSinkLocation(DataFlow::Node sink) {
exists(ArithExpr exp | result = exp.getLocation() | underflowSink(exp, sink.asExpr()))
exists(ArithExpr exp | result = [exp.getLocation(), sink.getLocation()] |
underflowSink(exp, sink.asExpr())
)
}
}

Expand Down
Loading
Loading