GeezerVison is showing github.com — Merge pull request #17424 from RasmusWL/active-threat-model-source · github/codeql@381ea93
File tree
Expand file treeCollapse file tree
Open diff view settings
semmle/code/csharp/security
test/library-tests/dataflow
test/library-tests/semmle/go/dataflow
src/experimental/Security/CWE
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss bannerExpand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboard +4Lines changed: 4 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +--- |
| 2 | +category: deprecated |
| 3 | +--- |
| 4 | +* The class `ThreatModelFlowSource` has been renamed to `ActiveThreatModelSource` to more clearly reflect it only contains the currently active threat model sources. `ThreatModelFlowSource` has been marked as deprecated. |
Collapse file
Copy file name to clipboardExpand all lines: csharp/ql/lib/semmle/code/csharp/security/auth/InsecureDirectObjectReferenceQuery.qll +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -18,7 +18,7 @@ private predicate needsChecks(ActionMethod m) { m.isEdit() and not m.isAdmin() } |
18 | 18 | * that may indicate that it's used as the ID for some resource |
19 | 19 | */ |
20 | 20 | private predicate hasIdParameter(ActionMethod m) { |
21 | | - exists(ThreatModelFlowSource src | src.getEnclosingCallable() = m | |
| 21 | + exists(ActiveThreatModelSource src | src.getEnclosingCallable() = m | |
22 | 22 | src.asParameter().getName().toLowerCase().matches(["%id", "%idx"]) |
23 | 23 | or |
24 | 24 | // handle cases like `Request.QueryString["Id"]` |
|
Collapse file
Copy file name to clipboardExpand all lines: csharp/ql/lib/semmle/code/csharp/security/dataflow/CodeInjectionQuery.qll +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -55,7 +55,7 @@ deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource |
55 | 55 | deprecated class LocalSource extends DataFlow::Node instanceof LocalFlowSource { } |
56 | 56 |
|
57 | 57 | /** A source supported by the current threat model. */ |
58 | | -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } |
| 58 | +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } |
59 | 59 |
|
60 | 60 | private class SimpleTypeSanitizer extends Sanitizer, SimpleTypeSanitizedExpr { } |
61 | 61 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: csharp/ql/lib/semmle/code/csharp/security/dataflow/CommandInjectionQuery.qll +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -57,7 +57,7 @@ module CommandInjection = TaintTracking::Global<CommandInjectionConfig>; |
57 | 57 | deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } |
58 | 58 |
|
59 | 59 | /** A source supported by the current threat model. */ |
60 | | -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } |
| 60 | +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } |
61 | 61 |
|
62 | 62 | /** Command Injection sinks defined through Models as Data. */ |
63 | 63 | private class ExternalCommandInjectionExprSink extends Sink { |
|
Collapse file
Copy file name to clipboardExpand all lines: csharp/ql/lib/semmle/code/csharp/security/dataflow/ConditionalBypassQuery.qll +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -54,7 +54,7 @@ module ConditionalBypass = TaintTracking::Global<ConditionalBypassConfig>; |
54 | 54 | deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } |
55 | 55 |
|
56 | 56 | /** A source supported by the current threat model. */ |
57 | | -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } |
| 57 | +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } |
58 | 58 |
|
59 | 59 | /** The result of a reverse dns may be user-controlled. */ |
60 | 60 | class ReverseDnsSource extends Source { |
|
Collapse file
Copy file name to clipboardExpand all lines: csharp/ql/lib/semmle/code/csharp/security/dataflow/ExternalAPIsQuery.qll +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -73,14 +73,14 @@ class ExternalApiDataNode extends DataFlow::Node { |
73 | 73 | } |
74 | 74 | } |
75 | 75 |
|
76 | | -/** A configuration for tracking flow from `ThreatModelFlowSource`s to `ExternalApiDataNode`s. */ |
| 76 | +/** A configuration for tracking flow from `ActiveThreatModelSource`s to `ExternalApiDataNode`s. */ |
77 | 77 | private module RemoteSourceToExternalApiConfig implements DataFlow::ConfigSig { |
78 | | - predicate isSource(DataFlow::Node source) { source instanceof ThreatModelFlowSource } |
| 78 | + predicate isSource(DataFlow::Node source) { source instanceof ActiveThreatModelSource } |
79 | 79 |
|
80 | 80 | predicate isSink(DataFlow::Node sink) { sink instanceof ExternalApiDataNode } |
81 | 81 | } |
82 | 82 |
|
83 | | -/** A module for tracking flow from `ThreatModelFlowSource`s to `ExternalApiDataNode`s. */ |
| 83 | +/** A module for tracking flow from `ActiveThreatModelSource`s to `ExternalApiDataNode`s. */ |
84 | 84 | module RemoteSourceToExternalApi = TaintTracking::Global<RemoteSourceToExternalApiConfig>; |
85 | 85 |
|
86 | 86 | /** A node representing untrusted data being passed to an external API. */ |
|
Collapse file
Copy file name to clipboardExpand all lines: csharp/ql/lib/semmle/code/csharp/security/dataflow/LDAPInjectionQuery.qll +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -60,7 +60,7 @@ module LdapInjection = TaintTracking::Global<LdapInjectionConfig>; |
60 | 60 | deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } |
61 | 61 |
|
62 | 62 | /** A source supported by the current threat model. */ |
63 | | -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } |
| 63 | +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } |
64 | 64 |
|
65 | 65 | /** LDAP sinks defined through Models as Data. */ |
66 | 66 | private class ExternalLdapExprSink extends Sink { |
|
Collapse file
Copy file name to clipboardExpand all lines: csharp/ql/lib/semmle/code/csharp/security/dataflow/LogForgingQuery.qll +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -43,7 +43,7 @@ private module LogForgingConfig implements DataFlow::ConfigSig { |
43 | 43 | module LogForging = TaintTracking::Global<LogForgingConfig>; |
44 | 44 |
|
45 | 45 | /** A source of remote user input. */ |
46 | | -private class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } |
| 46 | +private class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } |
47 | 47 |
|
48 | 48 | private class HtmlSanitizer extends Sanitizer { |
49 | 49 | HtmlSanitizer() { this.asExpr() instanceof HtmlSanitizedExpr } |
|
Collapse file
Copy file name to clipboardExpand all lines: csharp/ql/lib/semmle/code/csharp/security/dataflow/MissingXMLValidationQuery.qll +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -48,7 +48,7 @@ private module MissingXmlValidationConfig implements DataFlow::ConfigSig { |
48 | 48 | module MissingXmlValidation = TaintTracking::Global<MissingXmlValidationConfig>; |
49 | 49 |
|
50 | 50 | /** |
51 | | - * DEPRECATED: Use `ThreatModelFlowSource` instead. |
| 51 | + * DEPRECATED: Use `ActiveThreatModelSource` instead. |
52 | 52 | * |
53 | 53 | * A source of remote user input. |
54 | 54 | */ |
@@ -57,7 +57,7 @@ deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource |
57 | 57 | /** |
58 | 58 | * A source supported by the current threat model. |
59 | 59 | */ |
60 | | -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } |
| 60 | +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } |
61 | 61 |
|
62 | 62 | /** |
63 | 63 | * The input argument to a call to `XmlReader.Create` where the input will not be validated against |
|
Collapse file
Copy file name to clipboardExpand all lines: csharp/ql/lib/semmle/code/csharp/security/dataflow/ReDoSQuery.qll +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -49,7 +49,7 @@ module ReDoS = TaintTracking::Global<ReDoSConfig>; |
49 | 49 | deprecated class RemoteSource extends DataFlow::Node instanceof RemoteFlowSource { } |
50 | 50 |
|
51 | 51 | /** A source supported by the current threat model. */ |
52 | | -class ThreatModelSource extends Source instanceof ThreatModelFlowSource { } |
| 52 | +class ThreatModelSource extends Source instanceof ActiveThreatModelSource { } |
53 | 53 |
|
54 | 54 | /** |
55 | 55 | * An expression that represents a regular expression with potential exponential behavior. |
|