File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,10 @@ newtype TApplicationModeEndpoint =
3535 arg = DataFlow:: getInstanceArgument ( call ) and
3636 not call instanceof ConstructorCall
3737 } or
38- TImplicitVarargsArray ( Call call , DataFlow:: Node arg , int idx ) {
38+ TImplicitVarargsArray ( Call call , DataFlow:: ImplicitVarargsArray arg , int idx ) {
3939 AutomodelJavaUtil:: isFromSource ( call ) and
40- exists ( Argument argExpr |
41- arg .asExpr ( ) = argExpr and
42- call .getArgument ( idx ) = argExpr and
43- argExpr .isVararg ( ) and
44- not exists ( int i | i < idx and call .getArgument ( i ) .( Argument ) .isVararg ( ) )
45- )
40+ call = arg .getCall ( ) and
41+ idx = call .getCallee ( ) .getVaragsParameterIndex ( )
4642 } or
4743 TMethodReturnValue ( Call call ) {
4844 AutomodelJavaUtil:: isFromSource ( call ) and
Original file line number Diff line number Diff line change @@ -40,11 +40,12 @@ public static InputStream getInputStream(Path openPath) throws Exception {
4040 ); // $ sourceModelCandidate=newInputStream(Path,OpenOption[]):ReturnValue
4141 }
4242
43- public static InputStream getInputStream (String openPath ) throws Exception {
43+ public static InputStream getInputStream (String openPath , String otherPath ) throws Exception {
4444 return Test .getInputStream ( // the call is not a source candidate (argument to local call)
4545 Paths .get (
46- openPath // $ negativeSinkExample=get(String,String[]):Argument[0] // modeled as a flow step
47- ) // $ sourceModelCandidate=get(String,String[]):ReturnValue
46+ openPath , // $ negativeSinkExample=get(String,String[]):Argument[0] // modeled as a flow step
47+ otherPath
48+ ) // $ sourceModelCandidate=get(String,String[]):ReturnValue negativeSinkExample=get(String,String[]):Argument[1]
4849 );
4950 }
5051
You can’t perform that action at this time.
0 commit comments