Skip to content

Commit a8dc300

Browse files
authored
Merge pull request #19660 from d10c/d10c/go/diff-informed
Go: mass enable diff-informed data flow
2 parents 47623aa + e233501 commit a8dc300

30 files changed

+62
-0
lines changed

go/ql/lib/semmle/go/security/CleartextLogging.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ module CleartextLogging {
4646
// Also exclude protobuf field fetches, since they amount to single field reads.
4747
not any(Protobuf::GetMethod gm).taintStep(src, trg)
4848
}
49+
50+
predicate observeDiffInformedIncrementalMode() { any() }
4951
}
5052

5153
/**

go/ql/lib/semmle/go/security/ExternalAPIs.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ private module UntrustedDataToUnknownExternalApiConfig implements DataFlow::Conf
197197
predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource }
198198

199199
predicate isSink(DataFlow::Node sink) { sink instanceof UnknownExternalApiDataNode }
200+
201+
predicate observeDiffInformedIncrementalMode() { any() }
200202
}
201203

202204
/**

go/ql/lib/semmle/go/security/LogInjection.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ module LogInjection {
2121
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
2222

2323
predicate isBarrier(DataFlow::Node sanitizer) { sanitizer instanceof Sanitizer }
24+
25+
predicate observeDiffInformedIncrementalMode() { any() }
2426
}
2527

2628
/** Tracks taint flow for reasoning about log injection vulnerabilities. */

go/ql/lib/semmle/go/security/MissingJwtSignatureCheck.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ module MissingJwtSignatureCheck {
2323
predicate isAdditionalFlowStep(DataFlow::Node nodeFrom, DataFlow::Node nodeTo) {
2424
any(AdditionalFlowStep s).step(nodeFrom, nodeTo)
2525
}
26+
27+
predicate observeDiffInformedIncrementalMode() { any() }
2628
}
2729

2830
/** Tracks taint flow for reasoning about JWT vulnerabilities. */

go/ql/lib/semmle/go/security/OpenUrlRedirect.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ module OpenUrlRedirect {
5454
or
5555
hostnameSanitizingPrefixEdge(node, _)
5656
}
57+
58+
predicate observeDiffInformedIncrementalMode() { any() }
5759
}
5860

5961
/** Tracks taint flow from unvalidated, untrusted data to URL redirections. */

go/ql/lib/semmle/go/security/SqlInjection.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ module SqlInjection {
2323
}
2424

2525
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
26+
27+
predicate observeDiffInformedIncrementalMode() { any() }
2628
}
2729

2830
/** Tracks taint flow for reasoning about SQL-injection vulnerabilities. */

go/ql/lib/semmle/go/security/StoredCommand.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ module StoredCommand {
2626
predicate isSink(DataFlow::Node sink) { sink instanceof CommandInjection::Sink }
2727

2828
predicate isBarrier(DataFlow::Node node) { node instanceof CommandInjection::Sanitizer }
29+
30+
predicate observeDiffInformedIncrementalMode() { any() }
2931
}
3032

3133
/** Tracks taint flow for reasoning about command-injection vulnerabilities. */

go/ql/lib/semmle/go/security/StoredXss.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ module StoredXss {
2222
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
2323

2424
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
25+
26+
predicate observeDiffInformedIncrementalMode() { any() }
2527
}
2628

2729
/** Tracks taint flow for reasoning about XSS. */

go/ql/lib/semmle/go/security/StringBreak.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ module StringBreak {
2626
predicate isBarrier(DataFlow::Node node, FlowState state) {
2727
state = node.(Sanitizer).getQuote()
2828
}
29+
30+
predicate observeDiffInformedIncrementalMode() { any() }
2931
}
3032

3133
/**

go/ql/lib/semmle/go/security/TaintedPath.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ module TaintedPath {
1717
predicate isSink(DataFlow::Node sink) { sink instanceof Sink }
1818

1919
predicate isBarrier(DataFlow::Node node) { node instanceof Sanitizer }
20+
21+
predicate observeDiffInformedIncrementalMode() { any() }
2022
}
2123

2224
/** Tracks taint flow for reasoning about path-traversal vulnerabilities. */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy