Skip to content

Commit 39ffa55

Browse files
committed
make a few more queries consistent with the other languages
1 parent 2f673ef commit 39ffa55

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

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

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

1818
from LogInjectionConfiguration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
1919
where cfg.hasFlowPath(source, sink)
20-
select sink.getNode(), source, sink, "Log entry depends on a $@.", source.getNode(),
20+
select sink.getNode(), source, sink, "This log entry depends on a $@.", source.getNode(),
2121
"user-provided value"

java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ where
5555
underflowSink(exp, sink.getNode().asExpr()) and
5656
effect = "underflow"
5757
select exp, source, sink,
58-
"This arithmetic expression depends on a $@, potentially causing an " + effect + ".",
58+
"This arithmetic expression depends on an $@, potentially causing an " + effect + ".",
5959
source.getNode(), "uncontrolled value"

java/ql/src/Security/CWE/CWE-918/RequestForgery.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 DataFlow::PathNode source, DataFlow::PathNode sink, RequestForgeryConfiguration conf
1919
where conf.hasFlowPath(source, sink)
20-
select sink.getNode(), source, sink, "Potential server-side request forgery due to $@.",
21-
source.getNode(), "a user-provided value"
20+
select sink.getNode(), source, sink, "Potential server-side request forgery due to a $@.",
21+
source.getNode(), "user-provided value"

java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticUncontrolled.expected

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ nodes
1212
| Test.java:280:37:280:41 | data2 | semmle.label | data2 |
1313
subpaths
1414
#select
15-
| Test.java:210:17:210:24 | ... + ... | Test.java:206:14:206:57 | nextInt(...) : Number | Test.java:210:17:210:20 | data | This arithmetic expression depends on a $@, potentially causing an overflow. | Test.java:206:14:206:57 | nextInt(...) | uncontrolled value |
16-
| Test.java:241:37:241:46 | ... + ... | Test.java:206:14:206:57 | nextInt(...) : Number | Test.java:241:37:241:40 | data | This arithmetic expression depends on a $@, potentially causing an overflow. | Test.java:206:14:206:57 | nextInt(...) | uncontrolled value |
17-
| Test.java:249:17:249:25 | ... + ... | Test.java:245:15:245:35 | nextInt(...) : Number | Test.java:249:17:249:21 | data2 | This arithmetic expression depends on a $@, potentially causing an overflow. | Test.java:245:15:245:35 | nextInt(...) | uncontrolled value |
18-
| Test.java:280:37:280:47 | ... + ... | Test.java:245:15:245:35 | nextInt(...) : Number | Test.java:280:37:280:41 | data2 | This arithmetic expression depends on a $@, potentially causing an overflow. | Test.java:245:15:245:35 | nextInt(...) | uncontrolled value |
15+
| Test.java:210:17:210:24 | ... + ... | Test.java:206:14:206:57 | nextInt(...) : Number | Test.java:210:17:210:20 | data | This arithmetic expression depends on an $@, potentially causing an overflow. | Test.java:206:14:206:57 | nextInt(...) | uncontrolled value |
16+
| Test.java:241:37:241:46 | ... + ... | Test.java:206:14:206:57 | nextInt(...) : Number | Test.java:241:37:241:40 | data | This arithmetic expression depends on an $@, potentially causing an overflow. | Test.java:206:14:206:57 | nextInt(...) | uncontrolled value |
17+
| Test.java:249:17:249:25 | ... + ... | Test.java:245:15:245:35 | nextInt(...) : Number | Test.java:249:17:249:21 | data2 | This arithmetic expression depends on an $@, potentially causing an overflow. | Test.java:245:15:245:35 | nextInt(...) | uncontrolled value |
18+
| Test.java:280:37:280:47 | ... + ... | Test.java:245:15:245:35 | nextInt(...) : Number | Test.java:280:37:280:41 | data2 | This arithmetic expression depends on an $@, potentially causing an overflow. | Test.java:245:15:245:35 | nextInt(...) | uncontrolled value |

0 commit comments

Comments
 (0)