diff --git a/java/ql/src/Security/CWE/CWE-117/LogInjection.ql b/java/ql/src/Security/CWE/CWE-117/LogInjection.ql index 1c0739d9b11..81f545baee9 100644 --- a/java/ql/src/Security/CWE/CWE-117/LogInjection.ql +++ b/java/ql/src/Security/CWE/CWE-117/LogInjection.ql @@ -17,5 +17,5 @@ import DataFlow::PathGraph from LogInjectionConfiguration cfg, DataFlow::PathNode source, DataFlow::PathNode sink where cfg.hasFlowPath(source, sink) -select sink.getNode(), source, sink, "Log entry depends on a $@.", source.getNode(), +select sink.getNode(), source, sink, "This log entry depends on a $@.", source.getNode(), "user-provided value" diff --git a/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql b/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql index 5667373612f..015abf5831f 100644 --- a/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql +++ b/java/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql @@ -55,5 +55,5 @@ where underflowSink(exp, sink.getNode().asExpr()) and effect = "underflow" select exp, source, sink, - "This arithmetic expression depends on a $@, potentially causing an " + effect + ".", + "This arithmetic expression depends on an $@, potentially causing an " + effect + ".", source.getNode(), "uncontrolled value" diff --git a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql index af423052396..604dd366513 100644 --- a/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql +++ b/java/ql/src/Security/CWE/CWE-918/RequestForgery.ql @@ -17,5 +17,5 @@ import DataFlow::PathGraph from DataFlow::PathNode source, DataFlow::PathNode sink, RequestForgeryConfiguration conf where conf.hasFlowPath(source, sink) -select sink.getNode(), source, sink, "Potential server-side request forgery due to $@.", - source.getNode(), "a user-provided value" +select sink.getNode(), source, sink, "Potential server-side request forgery due to a $@.", + source.getNode(), "user-provided value" diff --git a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticUncontrolled.expected b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticUncontrolled.expected index d91ce02a1b4..43256841646 100644 --- a/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticUncontrolled.expected +++ b/java/ql/test/query-tests/security/CWE-190/semmle/tests/ArithmeticUncontrolled.expected @@ -12,7 +12,7 @@ nodes | Test.java:280:37:280:41 | data2 | semmle.label | data2 | subpaths #select -| 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 | -| 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 | -| 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 | -| 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 | +| 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 | +| 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 | +| 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 | +| 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 |