Skip to content

Commit 54d2ae2

Browse files
committed
Actions: mass enable diff-informed data flow
1 parent 28f3073 commit 54d2ae2

16 files changed

+67
-0
lines changed

Diff for: actions/ql/lib/codeql/actions/security/ArgumentInjectionQuery.qll

+6
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ private module ArgumentInjectionConfig implements DataFlow::ConfigSig {
8888
run.getScript().getAnEnvReachingArgumentInjectionSink(var, _, _)
8989
)
9090
}
91+
92+
predicate observeDiffInformedIncrementalMode() {
93+
// TODO(diff-informed): Manually verify if config can be diff-informed.
94+
// ql/src/Security/CWE-088/ArgumentInjectionCritical.ql:29: Column 7 does not select a source or sink originating from the flow call on line 22
95+
none()
96+
}
9197
}
9298

9399
/** Tracks flow of unsafe user input that is used to construct and evaluate a code script. */

Diff for: actions/ql/lib/codeql/actions/security/ArtifactPoisoningQuery.qll

+6
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ private module ArtifactPoisoningConfig implements DataFlow::ConfigSig {
316316
exists(run.getScript().getAFileReadCommand())
317317
)
318318
}
319+
320+
predicate observeDiffInformedIncrementalMode() {
321+
// TODO(diff-informed): Manually verify if config can be diff-informed.
322+
// ql/src/Security/CWE-829/ArtifactPoisoningCritical.ql:28: Column 7 does not select a source or sink originating from the flow call on line 21
323+
none()
324+
}
319325
}
320326

321327
/** Tracks flow of unsafe artifacts that is used in an insecure way. */

Diff for: actions/ql/lib/codeql/actions/security/CodeInjectionQuery.qll

+7
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ private module CodeInjectionConfig implements DataFlow::ConfigSig {
3535
exists(run.getScript().getAFileReadCommand())
3636
)
3737
}
38+
39+
predicate observeDiffInformedIncrementalMode() {
40+
// TODO(diff-informed): Manually verify if config can be diff-informed.
41+
// ql/src/Security/CWE-094/CodeInjectionCritical.ql:36: Column 7 does not select a source or sink originating from the flow call on line 24
42+
// ql/src/Security/CWE-349/CachePoisoningViaCodeInjection.ql:48: Column 7 does not select a source or sink originating from the flow call on line 23
43+
none()
44+
}
3845
}
3946

4047
/** Tracks flow of unsafe user input that is used to construct and evaluate a code script. */

Diff for: actions/ql/lib/codeql/actions/security/CommandInjectionQuery.qll

+6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ private module CommandInjectionConfig implements DataFlow::ConfigSig {
1616
predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
1717

1818
predicate isSink(DataFlow::Node sink) { sink instanceof CommandInjectionSink }
19+
20+
predicate observeDiffInformedIncrementalMode() {
21+
// TODO(diff-informed): Manually verify if config can be diff-informed.
22+
// ql/src/Security/CWE-078/CommandInjectionCritical.ql:30: Column 7 does not select a source or sink originating from the flow call on line 23
23+
none()
24+
}
1925
}
2026

2127
/** Tracks flow of unsafe user input that is used to construct and evaluate a system command. */

Diff for: actions/ql/lib/codeql/actions/security/EnvPathInjectionQuery.qll

+6
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ private module EnvPathInjectionConfig implements DataFlow::ConfigSig {
108108
exists(run.getScript().getAFileReadCommand())
109109
)
110110
}
111+
112+
predicate observeDiffInformedIncrementalMode() {
113+
// TODO(diff-informed): Manually verify if config can be diff-informed.
114+
// ql/src/Security/CWE-077/EnvPathInjectionCritical.ql:39: Column 7 does not select a source or sink originating from the flow call on line 23
115+
none()
116+
}
111117
}
112118

113119
/** Tracks flow of unsafe user input that is used to construct and evaluate the PATH environment variable. */

Diff for: actions/ql/lib/codeql/actions/security/EnvVarInjectionQuery.qll

+6
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,12 @@ private module EnvVarInjectionConfig implements DataFlow::ConfigSig {
163163
exists(run.getScript().getAFileReadCommand())
164164
)
165165
}
166+
167+
predicate observeDiffInformedIncrementalMode() {
168+
// TODO(diff-informed): Manually verify if config can be diff-informed.
169+
// ql/src/Security/CWE-077/EnvVarInjectionCritical.ql:48: Column 7 does not select a source or sink originating from the flow call on line 24
170+
none()
171+
}
166172
}
167173

168174
/** Tracks flow of unsafe user input that is used to construct and evaluate an environment variable. */

Diff for: actions/ql/lib/codeql/actions/security/OutputClobberingQuery.qll

+2
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ private module OutputClobberingConfig implements DataFlow::ConfigSig {
214214
)
215215
)
216216
}
217+
218+
predicate observeDiffInformedIncrementalMode() { any() }
217219
}
218220

219221
/** Tracks flow of unsafe user input that is used to construct and evaluate an environment variable. */

Diff for: actions/ql/lib/codeql/actions/security/RequestForgeryQuery.qll

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ private module RequestForgeryConfig implements DataFlow::ConfigSig {
1616
predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
1717

1818
predicate isSink(DataFlow::Node sink) { sink instanceof RequestForgerySink }
19+
20+
predicate observeDiffInformedIncrementalMode() { any() }
1921
}
2022

2123
/** Tracks flow of unsafe user input that is used to construct and evaluate a system command. */

Diff for: actions/ql/lib/codeql/actions/security/SecretExfiltrationQuery.qll

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ private module SecretExfiltrationConfig implements DataFlow::ConfigSig {
1515
predicate isSource(DataFlow::Node source) { source instanceof RemoteFlowSource }
1616

1717
predicate isSink(DataFlow::Node sink) { sink instanceof SecretExfiltrationSink }
18+
19+
predicate observeDiffInformedIncrementalMode() { any() }
1820
}
1921

2022
/** Tracks flow of unsafe user input that is used in a context where it may lead to a secret exfiltration. */

Diff for: actions/ql/lib/codeql/actions/security/UntrustedCheckoutQuery.qll

+12
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ private module ActionsMutableRefCheckoutConfig implements DataFlow::ConfigSig {
7070
exists(run.getScript().getAFileReadCommand())
7171
)
7272
}
73+
74+
predicate observeDiffInformedIncrementalMode() {
75+
// TODO(diff-informed): Manually verify if config can be diff-informed.
76+
// ql/lib/codeql/actions/security/UntrustedCheckoutQuery.qll:238: Flow call outside 'select' clause
77+
none()
78+
}
7379
}
7480

7581
module ActionsMutableRefCheckoutFlow = TaintTracking::Global<ActionsMutableRefCheckoutConfig>;
@@ -121,6 +127,12 @@ private module ActionsSHACheckoutConfig implements DataFlow::ConfigSig {
121127
exists(run.getScript().getAFileReadCommand())
122128
)
123129
}
130+
131+
predicate observeDiffInformedIncrementalMode() {
132+
// TODO(diff-informed): Manually verify if config can be diff-informed.
133+
// ql/lib/codeql/actions/security/UntrustedCheckoutQuery.qll:273: Flow call outside 'select' clause
134+
none()
135+
}
124136
}
125137

126138
module ActionsSHACheckoutFlow = TaintTracking::Global<ActionsSHACheckoutConfig>;

Diff for: actions/ql/src/Models/CompositeActionsSinks.ql

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ private module MyConfig implements DataFlow::ConfigSig {
2424
predicate isSink(DataFlow::Node sink) {
2525
sink instanceof CodeInjectionSink and not madSink(sink, "code-injection")
2626
}
27+
28+
predicate observeDiffInformedIncrementalMode() { any() }
2729
}
2830

2931
module MyFlow = TaintTracking::Global<MyConfig>;

Diff for: actions/ql/src/Models/CompositeActionsSources.ql

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ private module MyConfig implements DataFlow::ConfigSig {
3434
isSink(node) and
3535
set instanceof DataFlow::FieldContent
3636
}
37+
38+
predicate observeDiffInformedIncrementalMode() { any() }
3739
}
3840

3941
module MyFlow = TaintTracking::Global<MyConfig>;

Diff for: actions/ql/src/Models/CompositeActionsSummaries.ql

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ private module MyConfig implements DataFlow::ConfigSig {
2525
predicate isSink(DataFlow::Node sink) {
2626
exists(CompositeAction c | c.getAnOutputExpr() = sink.asExpr())
2727
}
28+
29+
predicate observeDiffInformedIncrementalMode() { any() }
2830
}
2931

3032
module MyFlow = TaintTracking::Global<MyConfig>;

Diff for: actions/ql/src/Models/ReusableWorkflowsSinks.ql

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ private module MyConfig implements DataFlow::ConfigSig {
2424
predicate isSink(DataFlow::Node sink) {
2525
sink instanceof CodeInjectionSink and not madSink(sink, "code-injection")
2626
}
27+
28+
predicate observeDiffInformedIncrementalMode() { any() }
2729
}
2830

2931
module MyFlow = TaintTracking::Global<MyConfig>;

Diff for: actions/ql/src/Models/ReusableWorkflowsSources.ql

+2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ private module MyConfig implements DataFlow::ConfigSig {
3434
isSink(node) and
3535
set instanceof DataFlow::FieldContent
3636
}
37+
38+
predicate observeDiffInformedIncrementalMode() { any() }
3739
}
3840

3941
module MyFlow = TaintTracking::Global<MyConfig>;

Diff for: actions/ql/src/Models/ReusableWorkflowsSummaries.ql

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ private module MyConfig implements DataFlow::ConfigSig {
2525
predicate isSink(DataFlow::Node sink) {
2626
exists(ReusableWorkflow w | w.getAnOutputExpr() = sink.asExpr())
2727
}
28+
29+
predicate observeDiffInformedIncrementalMode() { any() }
2830
}
2931

3032
module MyFlow = TaintTracking::Global<MyConfig>;

0 commit comments

Comments
 (0)