File tree Expand file tree Collapse file tree
java/ql/src/experimental/Security/CWE/CWE-094 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ it may allow the attacker to run arbitrary code.</p>
1313
1414<recommendation >
1515<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
1717explicitly allowed classes.</p >
1818</recommendation >
1919
@@ -25,7 +25,7 @@ to execute untrusted data.</p>
2525
2626<references >
2727<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 >
2929</li >
3030</references >
3131</qhelp >
Original file line number Diff line number Diff line change @@ -22,15 +22,15 @@ class JShellInjectionConfiguration extends TaintTracking::Configuration {
2222
2323 override predicate isSink ( DataFlow:: Node sink ) { sink instanceof JShellInjectionSink }
2424
25- override predicate isAdditionalTaintStep ( DataFlow:: Node prod , DataFlow:: Node succ ) {
25+ override predicate isAdditionalTaintStep ( DataFlow:: Node pred , DataFlow:: Node succ ) {
2626 exists ( MethodAccess ma |
2727 ma .getMethod ( ) .hasName ( "analyzeCompletion" ) and
2828 ma .getMethod ( ) .getNumberOfParameters ( ) = 1 and
2929 ma .getMethod ( )
3030 .getDeclaringType ( )
3131 .getASupertype * ( )
3232 .hasQualifiedName ( "jdk.jshell" , "SourceCodeAnalysis" ) and
33- ma .getArgument ( 0 ) = prod .asExpr ( ) and
33+ ma .getArgument ( 0 ) = pred .asExpr ( ) and
3434 ma = succ .asExpr ( )
3535 )
3636 }
You can’t perform that action at this time.
0 commit comments