Skip to content

Commit e6872ca

Browse files
committed
PROGRSS
1 parent c9cf1f7 commit e6872ca

File tree

28 files changed

+53
-45
lines changed

28 files changed

+53
-45
lines changed

cpp/ql/src/Documentation/CommentedOutCode.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
import CommentedOutCode
1313

1414
from CommentedOutCode comment
15-
select comment, "This comment appears to contain commented-out code"
15+
select comment, "This comment appears to contain commented-out code."

csharp/ql/src/Bad Practices/Comments/TodoComments.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ import csharp
1414

1515
from CommentLine c
1616
where c.getText().regexpMatch("(?s).*FIXME.*|.*TODO.*|.*(?<!=)\\s*XXX.*")
17-
select c, "TODO comment."
17+
select c, "TODO comments should be addressed."

csharp/ql/src/Security Features/CWE-730/RegexInjection.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ where
2323
c.hasFlowPath(source, sink) and
2424
// No global timeout set
2525
not exists(RegexGlobalTimeout r)
26-
select sink.getNode(), source, sink, "$@ flows to the construction of a regular expression.",
27-
source.getNode(), "User-provided value"
26+
select sink.getNode(), source, sink, "This regular expression is constructed from a $@.",
27+
source.getNode(), "user-provided value"

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,6 @@ class StackTraceExposureConfig extends TaintTracking::Configuration {
7676

7777
from StackTraceExposureConfig cfg, DataFlow::PathNode source, DataFlow::PathNode sink
7878
where cfg.hasFlowPath(source, sink)
79-
select source.getNode(), source, sink, "This stack trace is exposed to a remote user $@.",
80-
sink.getNode(), "here"
79+
select sink.getNode(), source, sink,
80+
"Stack trace information from $@ may be exposed to an external user here.", source.getNode(),
81+
"here"

go/ql/src/experimental/CWE-285/PamAuthBypass.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @description Not using `pam.AcctMgmt` after `pam.Authenticate` to check the validity of a login can lead to authorization bypass.
44
* @kind problem
55
* @problem.severity warning
6-
* @id go/unreachable-statement
6+
* @id go/pam-auth-bypass
77
* @tags maintainability
88
* correctness
99
* external/cwe/cwe-561

java/ql/src/DeadCode/UselessParameter.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ import semmle.code.java.deadcode.DeadCode
1414

1515
from RootdefCallable c
1616
where not c.whitelisted()
17-
select c.unusedParameter() as p, "The parameter " + p + " is unused."
17+
select c.unusedParameter() as p, "The parameter '" + c + "' is never used."

java/ql/src/Security/CWE/CWE-089/SqlTainted.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ import DataFlow::PathGraph
1919

2020
from QueryInjectionSink query, DataFlow::PathNode source, DataFlow::PathNode sink
2121
where queryTaintedBy(query, source, sink)
22-
select query, source, sink, "Query might include code from $@.", source.getNode(), "this user input"
22+
select query, source, sink, "This SQL query depends on $@.", source.getNode(),
23+
"a user-provided value"

java/ql/src/Security/CWE/CWE-611/XXE.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@ class XxeConfig extends TaintTracking::Configuration {
5151

5252
from DataFlow::PathNode source, DataFlow::PathNode sink, XxeConfig conf
5353
where conf.hasFlowPath(source, sink)
54-
select sink.getNode(), source, sink, "Unsafe parsing of XML file from $@.", source.getNode(),
55-
"user input"
54+
select sink.getNode(), source, sink,
55+
"A $@ is parsed as XML without guarding against external entity expansion.", source.getNode(),
56+
"user-provided value"

java/ql/src/Violations of Best Practice/Comments/TodoComments.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ from JavadocText c
1717
where
1818
c.getText().matches("%TODO%") or
1919
c.getText().matches("%FIXME%")
20-
select c, "TODO/FIXME comment."
20+
select c, "TODO comments should be addressed."

java/ql/src/experimental/Security/CWE/CWE-730/RegexInjection.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@ class RegexInjectionConfiguration extends TaintTracking::Configuration {
8585

8686
from DataFlow::PathNode source, DataFlow::PathNode sink, RegexInjectionConfiguration c
8787
where c.hasFlowPath(source, sink)
88-
select sink.getNode(), source, sink, "$@ is user controlled.", source.getNode(),
89-
"This regular expression pattern"
88+
select sink.getNode(), source, sink, "This regular expression is constructed from a $@.",
89+
source.getNode(), "user-provided value"

0 commit comments

Comments
 (0)