File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
java/ql/src/experimental/Security/CWE/CWE-094 Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ it may allow the attacker to run arbitrary code.</p>
13
13
14
14
<recommendation >
15
15
<p >It is generally recommended to avoid using untrusted input in a JShell expression.
16
- If it is not possible,JShell expressions should be run in a sandbox that allows accessing only
16
+ If it is not possible, JShell expressions should be run in a sandbox that allows accessing only
17
17
explicitly allowed classes.</p >
18
18
</recommendation >
19
19
@@ -25,7 +25,7 @@ to execute untrusted data.</p>
25
25
26
26
<references >
27
27
<li >
28
- Java 9 jshell tutorial : <a href =" https://examples.javacodegeeks .com/core-java /java-9- jshell-tutorial/ " >JShell introduction </a >
28
+ Introduction to JShell : <a href =" https://docs.oracle .com/en /java/javase/11/ jshell/introduction-jshell.html " >Java Shell User’s Guide </a >
29
29
</li >
30
30
</references >
31
31
</qhelp >
Original file line number Diff line number Diff line change @@ -22,15 +22,15 @@ class JShellInjectionConfiguration extends TaintTracking::Configuration {
22
22
23
23
override predicate isSink ( DataFlow:: Node sink ) { sink instanceof JShellInjectionSink }
24
24
25
- override predicate isAdditionalTaintStep ( DataFlow:: Node prod , DataFlow:: Node succ ) {
25
+ override predicate isAdditionalTaintStep ( DataFlow:: Node pred , DataFlow:: Node succ ) {
26
26
exists ( MethodAccess ma |
27
27
ma .getMethod ( ) .hasName ( "analyzeCompletion" ) and
28
28
ma .getMethod ( ) .getNumberOfParameters ( ) = 1 and
29
29
ma .getMethod ( )
30
30
.getDeclaringType ( )
31
31
.getASupertype * ( )
32
32
.hasQualifiedName ( "jdk.jshell" , "SourceCodeAnalysis" ) and
33
- ma .getArgument ( 0 ) = prod .asExpr ( ) and
33
+ ma .getArgument ( 0 ) = pred .asExpr ( ) and
34
34
ma = succ .asExpr ( )
35
35
)
36
36
}
You can’t perform that action at this time.
0 commit comments