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 {
5858}
5959
6060class LodashTemplateSink extends ServerSideTemplateInjectionSink {
61- LodashTemplateSink ( ) {
62- this = LodashUnderscore:: member ( "template" ) .getACall ( ) .getArgument ( 0 )
63- }
61+ LodashTemplateSink ( ) { this = LodashUnderscore:: member ( "template" ) .getACall ( ) .getArgument ( 0 ) }
6462}
6563
6664from 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 {
650650 * ```js
651651 * // foo.js
652652 * export default Foo
653- *
653+ *
654654 * // bar.js
655655 * let Foo = await import('./foo');
656656 * ```
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ module FunctionCompositionCall {
5858 *
5959 * For simplicity, we model every composition function as if it supported this.
6060 */
61- private abstract class WithArrayOverloading extends Range {
61+ abstract private class WithArrayOverloading extends Range {
6262 /** Gets the `i`th argument to the call or the `i`th array element passed into the call. */
6363 DataFlow:: Node getEffectiveArgument ( int i ) {
6464 result = getArgument ( 0 ) .( DataFlow:: ArrayCreationNode ) .getElement ( i )
@@ -85,9 +85,7 @@ module FunctionCompositionCall {
8585 this = LodashUnderscore:: member ( "flowRight" ) .getACall ( )
8686 }
8787
88- override DataFlow:: Node getOperandNode ( int i ) {
89- result = getEffectiveArgument ( i )
90- }
88+ override DataFlow:: Node getOperandNode ( int i ) { result = getEffectiveArgument ( i ) }
9189 }
9290
9391 /** 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) {
668668 */
669669private class UseMemoStep extends PreCallGraphStep {
670670 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" ) |
674672 pred = call .getCallback ( 0 ) .getReturnNode ( ) and
675673 succ = call
676674 )
@@ -688,9 +686,7 @@ private class ReactRouterSource extends RemoteFlowSource {
688686 this = reactRouterDom ( ) .getAMemberCall ( "useRouteMatch" ) .getAPropertyRead ( [ "params" , "url" ] )
689687 }
690688
691- override string getSourceType ( ) {
692- result = "react-router path parameters"
693- }
689+ override string getSourceType ( ) { result = "react-router path parameters" }
694690}
695691
696692/**
@@ -711,7 +707,7 @@ private predicate dependsOnReactRouter(Module mod) {
711707 * For example:
712708 * ```js
713709 * let location = useLocation();
714- *
710+ *
715711 * function MyComponent(props) {
716712 * props.location;
717713 * }
You can’t perform that action at this time.
0 commit comments