Skip to content

Commit 1fe9b3f

Browse files
authored
Merge pull request #10252 from erik-krogh/py-followMsg
PY: change alert messages of path queries to use the same template
2 parents 38ba516 + 0de0325 commit 1fe9b3f

File tree

37 files changed

+192
-192
lines changed

37 files changed

+192
-192
lines changed

python/ql/src/Functions/ModificationOfParameterWithDefault.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ from
1919
ModificationOfParameterWithDefault::Configuration config, DataFlow::PathNode source,
2020
DataFlow::PathNode sink
2121
where config.hasFlowPath(source, sink)
22-
select sink.getNode(), source, sink, "$@ flows to here and is mutated.", source.getNode(),
23-
"Default value"
22+
select sink.getNode(), source, sink, "This expression mutates $@.", source.getNode(),
23+
"a default value"

python/ql/src/Security/CWE-022/PathInjection.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ import DataFlow::PathGraph
2222

2323
from Configuration config, DataFlow::PathNode source, DataFlow::PathNode sink
2424
where config.hasFlowPath(source, sink)
25-
select sink.getNode(), source, sink, "$@ flows to here and is used in a path.", source.getNode(),
26-
"User-provided value"
25+
select sink.getNode(), source, sink, "This path depends on $@.", source.getNode(),
26+
"a user-provided value"

python/ql/src/Security/CWE-022/TarSlip.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ import DataFlow::PathGraph
1818

1919
from Configuration config, DataFlow::PathNode source, DataFlow::PathNode sink
2020
where config.hasFlowPath(source, sink)
21-
select sink.getNode(), source, sink, "Extraction of tarfile from $@", source.getNode(),
21+
select sink.getNode(), source, sink, "This file extraction depends on $@", source.getNode(),
2222
"a potentially untrusted source"

python/ql/src/Security/CWE-078/CommandInjection.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ import DataFlow::PathGraph
2020

2121
from Configuration config, DataFlow::PathNode source, DataFlow::PathNode sink
2222
where config.hasFlowPath(source, sink)
23-
select sink.getNode(), source, sink, "$@ flows to here and is used in a command.", source.getNode(),
24-
"User-provided value"
23+
select sink.getNode(), source, sink, "This command line depends on $@.", source.getNode(),
24+
"a user-provided value"

python/ql/src/Security/CWE-090/LdapInjection.ql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@ where
2323
or
2424
any(FilterConfiguration filterConfig).hasFlowPath(source, sink) and
2525
parameterName = "filter"
26-
select sink.getNode(), source, sink,
27-
"$@ LDAP query parameter (" + parameterName + ") comes from $@.", sink.getNode(), "This",
28-
source.getNode(), "a user-provided value"
26+
select sink.getNode(), source, sink, "$@ depends on $@.", sink.getNode(),
27+
"LDAP query parameter (" + parameterName + ")", source.getNode(), "a user-provided value"

python/ql/src/Security/CWE-094/CodeInjection.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ import DataFlow::PathGraph
2020

2121
from Configuration config, DataFlow::PathNode source, DataFlow::PathNode sink
2222
where config.hasFlowPath(source, sink)
23-
select sink.getNode(), source, sink, "$@ flows to here and is interpreted as code.",
24-
source.getNode(), "A user-provided value"
23+
select sink.getNode(), source, sink, "This code execution depends on $@.", source.getNode(),
24+
"a user-provided value"

python/ql/src/Security/CWE-117/LogInjection.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ import DataFlow::PathGraph
1717

1818
from Configuration config, DataFlow::PathNode source, DataFlow::PathNode sink
1919
where config.hasFlowPath(source, sink)
20-
select sink.getNode(), source, sink, "$@ flows to log entry.", source.getNode(),
21-
"User-provided value"
20+
select sink.getNode(), source, sink, "This log entry depends on $@.", source.getNode(),
21+
"a user-provided value"

python/ql/src/Security/CWE-209/StackTraceExposure.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ import DataFlow::PathGraph
2020
from Configuration config, DataFlow::PathNode source, DataFlow::PathNode sink
2121
where config.hasFlowPath(source, sink)
2222
select sink.getNode(), source, sink,
23-
"Stack trace information from $@ may be exposed to an external user here.", source.getNode(),
24-
"here"
23+
"$@ flows to this location and may be exposed to an external user.", source.getNode(),
24+
"Stack trace information"

python/ql/src/Security/CWE-312/CleartextLogging.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ from Configuration config, DataFlow::PathNode source, DataFlow::PathNode sink, s
2222
where
2323
config.hasFlowPath(source, sink) and
2424
classification = source.getNode().(Source).getClassification()
25-
select sink.getNode(), source, sink, "$@ is logged here.", source.getNode(),
26-
"Sensitive data (" + classification + ")"
25+
select sink.getNode(), source, sink, "This log entry depends on $@.", source.getNode(),
26+
"sensitive data (" + classification + ")"

python/ql/src/Security/CWE-312/CleartextStorage.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ from Configuration config, DataFlow::PathNode source, DataFlow::PathNode sink, s
2222
where
2323
config.hasFlowPath(source, sink) and
2424
classification = source.getNode().(Source).getClassification()
25-
select sink.getNode(), source, sink, "$@ is stored here.", source.getNode(),
26-
"Sensitive data (" + classification + ")"
25+
select sink.getNode(), source, sink, "This data storage depends on $@.", source.getNode(),
26+
"sensitive data (" + classification + ")"

0 commit comments

Comments
 (0)