Skip to content

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

Draft
wants to merge 37 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
cecb2df
Actions: patch-generated stubs
d10c Jul 2, 2025
02b0156
Actions: ArgumentInjection
d10c Jul 3, 2025
0e4f565
Actions: ArtifactPoisoning
d10c Jul 3, 2025
0f50b38
Actions: CodeInjection
d10c Jul 3, 2025
6e5c7f7
Actions: CommandInjection
d10c Jul 3, 2025
826541d
Actions: EnvPathInjection
d10c Jul 3, 2025
26eaa9a
Actions: EnvVarInjection
d10c Jul 3, 2025
91a8128
C++: patch-generated stubs
d10c Jul 2, 2025
42c06fc
C#: patch-generated stubs
d10c Jul 2, 2025
84f648f
C#: ConditinalBypass
d10c Jul 4, 2025
7d9e3fc
C#: ExternalAPIsQuery/UntrustedDataToExternalAPI
d10c Jul 4, 2025
4a87d5f
C#: UnsafeDeserialization
d10c Jul 4, 2025
f65f863
C#: HardcodedConnectionString
d10c Jul 4, 2025
7d6beb3
Go: patch-generated stubs
d10c Jul 2, 2025
6c32f26
Java: patch-generated stubs
d10c Jul 2, 2025
aeba0f5
JS: patch-generated stubs
d10c Jul 2, 2025
1750624
JS: IndirectCommandInjection
d10c Jul 4, 2025
4dfcd97
JS: NosqlInjection, SqlInjection
d10c Jul 4, 2025
5ddc508
JS: ShellCommandInjection
d10c Jul 4, 2025
1d35bb7
JS: EnvValueAndKeyInjection
d10c Jul 4, 2025
c262517
JS: decodeJwtWithoutVerification
d10c Jul 4, 2025
29d4b16
Python: patch-generated stubs
d10c Jul 2, 2025
c87cff9
Python: LdapInjection
d10c Jul 4, 2025
bab4cb9
Python: WeakSensitiveDatHashing
d10c Jul 4, 2025
0bd7556
Python: PossibleTimingAttackAgainstHash (+ selecting source node inst…
d10c Jul 4, 2025
5bdde3f
Python: TimingAttackAgainstHash (+ new test)
d10c Jul 4, 2025
21d9700
Ruby: patch-generated stubs
d10c Jul 2, 2025
6b5d767
Ruby: MissingFullAnchor
d10c Jul 4, 2025
168a3ae
Ruby: PolynomialReDoS: keep excluded
d10c Jul 4, 2025
f5727bc
Ruby: WeakSensitiveDataHashing
d10c Jul 4, 2025
0b98d17
Ruby: WeakFilePermissions
d10c Jul 4, 2025
0d26eac
Rust: patch-generated stubs
d10c Jul 2, 2025
eb10318
Rust: AccessAfterLifetime
d10c Jul 4, 2025
9e7ed8a
Swift: patch-generated stubs
d10c Jul 2, 2025
d42750b
Swift: CleartextStorageDatabase
d10c Jul 4, 2025
55c6b4c
Swift: CleartextStoragePreferences
d10c Jul 4, 2025
c871f5e
Swift: UnsafeWebViewFetch
d10c Jul 4, 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
@@ -1,6 +1,7 @@
private import actions
private import codeql.actions.TaintTracking
private import codeql.actions.dataflow.ExternalFlow
private import codeql.actions.security.ControlChecks
import codeql.actions.dataflow.FlowSources
import codeql.actions.DataFlow

Expand Down Expand Up @@ -88,6 +89,19 @@ private module ArgumentInjectionConfig implements DataFlow::ConfigSig {
run.getScript().getAnEnvReachingArgumentInjectionSink(var, _, _)
)
}

predicate observeDiffInformedIncrementalMode() { any() }

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

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
exists(Event event | result = event.getLocation() |
inPrivilegedContext(sink.asExpr(), event) and
not exists(ControlCheck check | check.protects(sink.asExpr(), event, "argument-injection"))
)
}
}

/** Tracks flow of unsafe user input that is used to construct and evaluate a code script. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import codeql.actions.DataFlow
import codeql.actions.dataflow.FlowSources
import codeql.actions.security.PoisonableSteps
import codeql.actions.security.UntrustedCheckoutQuery
import codeql.actions.security.ControlChecks

string unzipRegexp() { result = "(unzip|tar)\\s+.*" }

Expand Down Expand Up @@ -316,6 +317,19 @@ private module ArtifactPoisoningConfig implements DataFlow::ConfigSig {
exists(run.getScript().getAFileReadCommand())
)
}

predicate observeDiffInformedIncrementalMode() { any() }

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

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
exists(Event event | result = event.getLocation() |
inPrivilegedContext(sink.asExpr(), event) and
not exists(ControlCheck check | check.protects(sink.asExpr(), event, "artifact-poisoning"))
)
}
}

/** Tracks flow of unsafe artifacts that is used in an insecure way. */
Expand Down
49 changes: 49 additions & 0 deletions actions/ql/lib/codeql/actions/security/CodeInjectionQuery.qll
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ private import codeql.actions.TaintTracking
private import codeql.actions.dataflow.ExternalFlow
import codeql.actions.dataflow.FlowSources
import codeql.actions.DataFlow
import codeql.actions.security.ControlChecks
import codeql.actions.security.CachePoisoningQuery

class CodeInjectionSink extends DataFlow::Node {
CodeInjectionSink() {
Expand Down Expand Up @@ -35,6 +37,53 @@ private module CodeInjectionConfig implements DataFlow::ConfigSig {
exists(run.getScript().getAFileReadCommand())
)
}

predicate observeDiffInformedIncrementalMode() { any() }

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

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
// where clause from CodeInjectionCritical.ql
exists(Event event, RemoteFlowSource source | result = event.getLocation() |
inPrivilegedContext(sink.asExpr(), event) and
isSource(source) and
source.getEventName() = event.getName() and
not exists(ControlCheck check | check.protects(sink.asExpr(), event, "code-injection")) and
// exclude cases where the sink is a JS script and the expression uses toJson
not exists(UsesStep script |
script.getCallee() = "actions/github-script" and
script.getArgumentExpr("script") = sink.asExpr() and
exists(getAToJsonReferenceExpression(sink.asExpr().(Expression).getExpression(), _))
)
)
or
// where clause from CachePoisoningViaCodeInjection.ql
exists(Event event, LocalJob job, DataFlow::Node source | result = event.getLocation() |
job = sink.asExpr().getEnclosingJob() and
job.getATriggerEvent() = event and
// job can be triggered by an external user
event.isExternallyTriggerable() and
// the checkout is not controlled by an access check
isSource(source) and
not exists(ControlCheck check | check.protects(source.asExpr(), event, "code-injection")) and
// excluding privileged workflows since they can be exploited in easier circumstances
// which is covered by `actions/code-injection/critical`
not job.isPrivilegedExternallyTriggerable(event) and
(
// the workflow runs in the context of the default branch
runsOnDefaultBranch(event)
or
// the workflow caller runs in the context of the default branch
event.getName() = "workflow_call" and
exists(ExternalJob caller |
caller.getCallee() = job.getLocation().getFile().getRelativePath() and
runsOnDefaultBranch(caller.getATriggerEvent())
)
)
)
}
}

/** Tracks flow of unsafe user input that is used to construct and evaluate a code script. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ private import codeql.actions.TaintTracking
private import codeql.actions.dataflow.ExternalFlow
import codeql.actions.dataflow.FlowSources
import codeql.actions.DataFlow
import codeql.actions.security.ControlChecks

private class CommandInjectionSink extends DataFlow::Node {
CommandInjectionSink() { madSink(this, "command-injection") }
Expand All @@ -16,6 +17,22 @@ private module CommandInjectionConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }

predicate isSink(DataFlow::Node sink) { sink instanceof CommandInjectionSink }

predicate observeDiffInformedIncrementalMode() { any() }

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

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
// where clause from CommandInjectionCritical.ql
exists(Event event | result = event.getLocation() |
inPrivilegedContext(sink.asExpr(), event) and
not exists(ControlCheck check |
check.protects(sink.asExpr(), event, ["command-injection", "code-injection"])
)
)
}
}

/** 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 @@ -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

Redundant import, the module is already imported inside
codeql.actions.security.ArtifactPoisoningQuery
.

abstract class EnvPathInjectionSink extends DataFlow::Node { }

Expand Down Expand Up @@ -108,6 +109,35 @@
exists(run.getScript().getAFileReadCommand())
)
}

predicate observeDiffInformedIncrementalMode() {
any()
}

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

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or // where clause from EnvPathInjectionCritical.ql
exists(Event event, RemoteFlowSource source | result = event.getLocation() |
inPrivilegedContext(sink.asExpr(), event) and
isSource(source) and
(
not source.getSourceType() = "artifact" and
not exists(ControlCheck check |
check.protects(sink.asExpr(), event, "code-injection")
)
or
source.getSourceType() = "artifact" and
not exists(ControlCheck check |
check.protects(sink.asExpr(), event, ["untrusted-checkout", "artifact-poisoning"])
) and
sink instanceof EnvPathInjectionFromFileReadSink
)
)
}
}

/** Tracks flow of unsafe user input that is used to construct and evaluate the PATH environment variable. */
Expand Down
34 changes: 34 additions & 0 deletions actions/ql/lib/codeql/actions/security/EnvVarInjectionQuery.qll
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,40 @@ private module EnvVarInjectionConfig implements DataFlow::ConfigSig {
exists(run.getScript().getAFileReadCommand())
)
}

predicate observeDiffInformedIncrementalMode() { any() }

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

Location getASelectedSinkLocation(DataFlow::Node sink) {
result = sink.getLocation()
or
// where clause from EnvVarInjectionCritical.ql
exists(Event event, RemoteFlowSource source | result = event.getLocation() |
inPrivilegedContext(sink.asExpr(), event) and
isSource(source) and
// exclude paths to file read sinks from non-artifact sources
(
// source is text
not source.getSourceType() = "artifact" and
not exists(ControlCheck check |
check.protects(sink.asExpr(), event, ["envvar-injection", "code-injection"])
)
or
// source is an artifact or a file from an untrusted checkout
source.getSourceType() = "artifact" and
not exists(ControlCheck check |
check
.protects(sink.asExpr(), event,
["envvar-injection", "untrusted-checkout", "artifact-poisoning"])
) and
(
sink instanceof EnvVarInjectionFromFileReadSink or
madSink(sink, "envvar-injection")
)
)
)
}
}

/** Tracks flow of unsafe user input that is used to construct and evaluate an environment variable. */
Expand Down
4 changes: 4 additions & 0 deletions cpp/ql/src/Critical/OverflowDestination.ql
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ module OverflowDestinationConfig implements DataFlow::ConfigSig {
nodeIsBarrierEqualityCandidate(node, access, checkedVar)
)
}

predicate observeDiffInformedIncrementalMode() {
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 91 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Critical/OverflowDestination.ql@93:8:93:9)
}
}

module OverflowDestination = TaintTracking::Global<OverflowDestinationConfig>;
Expand Down
4 changes: 4 additions & 0 deletions cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ module NonConstFlowConfig implements DataFlow::ConfigSig {
cannotContainString(t)
)
}

predicate observeDiffInformedIncrementalMode() {
any() // TODO: Make sure that the location overrides match the query's select clause: Column 5 does not select a source or sink originating from the flow call on line 181 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql@184:53:184:56)
}
}

module NonConstFlow = TaintTracking::Global<NonConstFlowConfig>;
Expand Down
14 changes: 14 additions & 0 deletions cpp/ql/src/Likely Bugs/Leap Year/LeapYear.qll
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,18 @@ private module LeapYearCheckConfig implements DataFlow::ConfigSig {
predicate isSink(DataFlow::Node sink) {
exists(ChecksForLeapYearFunctionCall fc | sink.asExpr() = fc.getAnArgument())
}

predicate observeDiffInformedIncrementalMode() {
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 34 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@57:8:57:10), Column 1 does not select a source or sink originating from the flow call on line 41 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@57:8:57:10), Column 3 does not select a source or sink originating from the flow call on line 34 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@59:3:59:17), Column 3 does not select a source or sink originating from the flow call on line 41 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@59:3:59:17), Column 5 does not select a source or sink originating from the flow call on line 34 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@59:48:59:50), Column 5 does not select a source or sink originating from the flow call on line 41 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@59:48:59:50)
}

Location getASelectedSourceLocation(DataFlow::Node source) {
none() // TODO: Make sure that this source location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 34 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@57:8:57:10), Column 1 does not select a source or sink originating from the flow call on line 41 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@57:8:57:10), Column 3 does not select a source or sink originating from the flow call on line 34 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@59:3:59:17), Column 3 does not select a source or sink originating from the flow call on line 41 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@59:3:59:17), Column 5 does not select a source or sink originating from the flow call on line 34 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@59:48:59:50), Column 5 does not select a source or sink originating from the flow call on line 41 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@59:48:59:50)
}

Location getASelectedSinkLocation(DataFlow::Node sink) {
none() // TODO: Make sure that this sink location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 34 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@57:8:57:10), Column 1 does not select a source or sink originating from the flow call on line 41 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@57:8:57:10), Column 3 does not select a source or sink originating from the flow call on line 34 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@59:3:59:17), Column 3 does not select a source or sink originating from the flow call on line 41 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@59:3:59:17), Column 5 does not select a source or sink originating from the flow call on line 34 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@59:48:59:50), Column 5 does not select a source or sink originating from the flow call on line 41 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Likely Bugs/Leap Year/UncheckedLeapYearAfterYearModification.ql@59:48:59:50)
}
}

module LeapYearCheckFlow = DataFlow::Global<LeapYearCheckConfig>;
Expand Down Expand Up @@ -285,6 +297,8 @@ private module PossibleYearArithmeticOperationCheckConfig implements DataFlow::C
aexpr.getLValue() = fa
)
}

predicate observeDiffInformedIncrementalMode() { any() }
}

module PossibleYearArithmeticOperationCheckFlow =
Expand Down
4 changes: 4 additions & 0 deletions cpp/ql/src/Security/CWE/CWE-020/ExternalAPIsSpecific.qll
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ private module UntrustedDataToExternalApiConfig implements DataFlow::ConfigSig {
}

predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode }

predicate observeDiffInformedIncrementalMode() {
any() // TODO: Make sure that the location overrides match the query's select clause: Flow call outside 'select' clause (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-020/ExternalAPIs.qll@13:36:13:80), Flow call outside 'select' clause (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-020/ExternalAPIs.qll@16:43:16:92)
}
}

module UntrustedDataToExternalApiFlow = TaintTracking::Global<UntrustedDataToExternalApiConfig>;
4 changes: 4 additions & 0 deletions cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIsSpecific.qll
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ private module UntrustedDataToExternalApiConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }

predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode }

predicate observeDiffInformedIncrementalMode() {
any() // TODO: Make sure that the location overrides match the query's select clause: Flow call outside 'select' clause (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIs.qll@13:36:13:80), Flow call outside 'select' clause (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-020/ir/ExternalAPIs.qll@16:43:16:92)
}
}

module UntrustedDataToExternalApiFlow = TaintTracking::Global<UntrustedDataToExternalApiConfig>;
4 changes: 4 additions & 0 deletions cpp/ql/src/Security/CWE/CWE-022/TaintedPath.ql
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ module TaintedPathConfig implements DataFlow::ConfigSig {
// make sinks barriers so that we only report the closest instance
isSink(node)
}

predicate observeDiffInformedIncrementalMode() {
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 selects sink.asIndirectArgument (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-022/TaintedPath.ql@108:8:108:17)
}
}

module TaintedPath = TaintTracking::Global<TaintedPathConfig>;
Expand Down
4 changes: 4 additions & 0 deletions cpp/ql/src/Security/CWE/CWE-078/ExecTainted.ql
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ module ExecTaintConfig implements DataFlow::StateConfigSig {
predicate isBarrierOut(DataFlow::Node node) {
isSink(node, _) // Prevent duplicates along a call chain, since `shellCommand` will include wrappers
}

predicate observeDiffInformedIncrementalMode() {
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 161 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-078/ExecTainted.ql@165:8:165:14), Column 7 does not select a source or sink originating from the flow call on line 161 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-078/ExecTainted.ql@167:71:167:82)
}
}

module ExecTaint = TaintTracking::GlobalWithState<ExecTaintConfig>;
Expand Down
4 changes: 4 additions & 0 deletions cpp/ql/src/Security/CWE/CWE-079/CgiXss.ql
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ module Config implements DataFlow::ConfigSig {
or
node.asCertainDefinition().getUnspecifiedType() instanceof ArithmeticType
}

predicate observeDiffInformedIncrementalMode() {
any() // TODO: Make sure that the location overrides match the query's select clause: Column 5 selects source.asIndirectExpr (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-079/CgiXss.ql@51:3:51:7)
}
}

module Flow = TaintTracking::Global<Config>;
Expand Down
4 changes: 4 additions & 0 deletions cpp/ql/src/Security/CWE/CWE-089/SqlTainted.ql
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ module SqlTaintedConfig implements DataFlow::ConfigSig {
sql.barrierSqlArgument(input, _)
)
}

predicate observeDiffInformedIncrementalMode() {
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 74 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-089/SqlTainted.ql@77:8:77:17)
}
}

module SqlTainted = TaintTracking::Global<SqlTaintedConfig>;
Expand Down
8 changes: 8 additions & 0 deletions cpp/ql/src/Security/CWE/CWE-119/OverrunWriteProductFlow.ql
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@
state1 = state2 + delta
)
}

predicate observeDiffInformedIncrementalMode() {

Check warning

Code scanning / CodeQL

Dead code Warning

This code is never used, and it's not publicly exported.
any() // TODO: Make sure that the location overrides match the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 263 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-119/OverrunWriteProductFlow.ql@269:8:269:41), Column 5 does not select a source or sink originating from the flow call on line 263 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-119/OverrunWriteProductFlow.ql@270:58:270:63), Flow call outside 'select' clause (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-119/OverrunWriteProductFlow.ql@249:5:249:76)
}

Location getASelectedSinkLocation(DataFlow::Node sink) {

Check warning

Code scanning / CodeQL

Dead code Warning

This code is never used, and it's not publicly exported.
none() // TODO: Make sure that this sink location matches the query's select clause: Column 1 does not select a source or sink originating from the flow call on line 263 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-119/OverrunWriteProductFlow.ql@269:8:269:41), Column 5 does not select a source or sink originating from the flow call on line 263 (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-119/OverrunWriteProductFlow.ql@270:58:270:63), Flow call outside 'select' clause (/Users/d10c/src/semmle-code/ql/cpp/ql/src/Security/CWE/CWE-119/OverrunWriteProductFlow.ql@249:5:249:76)
}
}

module StringSizeFlow = ProductFlow::GlobalWithState<StringSizeConfig>;
Expand Down
Loading
Loading