File tree Expand file tree Collapse file tree 4 files changed +7
-15
lines changed
experimental/Security/CWE-94 Expand file tree Collapse file tree 4 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,7 @@ class SSTINunjucksSink extends ServerSideTemplateInjectionSink {
58
58
}
59
59
60
60
class LodashTemplateSink extends ServerSideTemplateInjectionSink {
61
- LodashTemplateSink ( ) {
62
- this = LodashUnderscore:: member ( "template" ) .getACall ( ) .getArgument ( 0 )
63
- }
61
+ LodashTemplateSink ( ) { this = LodashUnderscore:: member ( "template" ) .getACall ( ) .getArgument ( 0 ) }
64
62
}
65
63
66
64
from DataFlow:: PathNode source , DataFlow:: PathNode sink , ServerSideTemplateInjectionConfiguration c
Original file line number Diff line number Diff line change @@ -650,7 +650,7 @@ private module DynamicImportSteps {
650
650
* ```js
651
651
* // foo.js
652
652
* export default Foo
653
- *
653
+ *
654
654
* // bar.js
655
655
* let Foo = await import('./foo');
656
656
* ```
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ module FunctionCompositionCall {
58
58
*
59
59
* For simplicity, we model every composition function as if it supported this.
60
60
*/
61
- private abstract class WithArrayOverloading extends Range {
61
+ abstract private class WithArrayOverloading extends Range {
62
62
/** Gets the `i`th argument to the call or the `i`th array element passed into the call. */
63
63
DataFlow:: Node getEffectiveArgument ( int i ) {
64
64
result = getArgument ( 0 ) .( DataFlow:: ArrayCreationNode ) .getElement ( i )
@@ -85,9 +85,7 @@ module FunctionCompositionCall {
85
85
this = LodashUnderscore:: member ( "flowRight" ) .getACall ( )
86
86
}
87
87
88
- override DataFlow:: Node getOperandNode ( int i ) {
89
- result = getEffectiveArgument ( i )
90
- }
88
+ override DataFlow:: Node getOperandNode ( int i ) { result = getEffectiveArgument ( i ) }
91
89
}
92
90
93
91
/** A call whose arguments are functions `f,g,h` which are composed into `f(g(h(...))` */
Original file line number Diff line number Diff line change @@ -668,9 +668,7 @@ private DataFlow::CallNode getAContextOutput(DataFlow::CallNode createContext) {
668
668
*/
669
669
private class UseMemoStep extends PreCallGraphStep {
670
670
override predicate step ( DataFlow:: Node pred , DataFlow:: Node succ ) {
671
- exists ( DataFlow:: CallNode call |
672
- call = react ( ) .getAMemberCall ( "useMemo" )
673
- |
671
+ exists ( DataFlow:: CallNode call | call = react ( ) .getAMemberCall ( "useMemo" ) |
674
672
pred = call .getCallback ( 0 ) .getReturnNode ( ) and
675
673
succ = call
676
674
)
@@ -688,9 +686,7 @@ private class ReactRouterSource extends RemoteFlowSource {
688
686
this = reactRouterDom ( ) .getAMemberCall ( "useRouteMatch" ) .getAPropertyRead ( [ "params" , "url" ] )
689
687
}
690
688
691
- override string getSourceType ( ) {
692
- result = "react-router path parameters"
693
- }
689
+ override string getSourceType ( ) { result = "react-router path parameters" }
694
690
}
695
691
696
692
/**
@@ -711,7 +707,7 @@ private predicate dependsOnReactRouter(Module mod) {
711
707
* For example:
712
708
* ```js
713
709
* let ___location = useLocation();
714
- *
710
+ *
715
711
* function MyComponent(props) {
716
712
* props.___location;
717
713
* }
You can’t perform that action at this time.
0 commit comments