File tree Expand file tree Collapse file tree
go/ql/src/experimental/CWE-525 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 * external/cwe/cwe-525
1111 */
1212
13- import go
13+ import go
1414
15- from DataFlow:: CallNode httpHandleFuncCall , ImportSpec importSpec
16- where
17- importSpec .getPath ( ) = "github.com/go-chi/chi/v5" and
18- httpHandleFuncCall .getCall ( ) .getArgument ( 0 ) .toString ( ) .matches ( "%/*%" ) and
19- not httpHandleFuncCall .getCall ( ) .getArgument ( 0 ) .toString ( ) .matches ( "%$%" ) and
20- importSpec .getFile ( ) = httpHandleFuncCall .getFile ( )
21- select httpHandleFuncCall .getCall ( ) .getArgument ( 0 ) , importSpec ,
22- "Wildcard Endpoint used with " + httpHandleFuncCall .getCall ( ) .getArgument ( 0 ) + " in file: " +
23- importSpec .getFile ( ) .getBaseName ( )
15+ from DataFlow:: CallNode httpHandleFuncCall , ImportSpec importSpec
16+ where
17+ importSpec .getPath ( ) = "github.com/go-chi/chi/v5" and
18+ httpHandleFuncCall .getCall ( ) .getArgument ( 0 ) .toString ( ) .matches ( "%/*%" ) and
19+ not httpHandleFuncCall .getCall ( ) .getArgument ( 0 ) .toString ( ) .matches ( "%$%" ) and
20+ importSpec .getFile ( ) = httpHandleFuncCall .getFile ( )
21+ select httpHandleFuncCall .getCall ( ) .getArgument ( 0 ) ,
22+ "Wildcard Endpoint used with " + httpHandleFuncCall .getCall ( ) .getArgument ( 0 ) + " in file: " +
23+ importSpec .getFile ( ) .getBaseName ( )
You can’t perform that action at this time.
0 commit comments