Skip to content

Commit

Permalink
Merge pull request #3356 from semgrep/fix-sqli-source
Browse files Browse the repository at this point in the history
Fix source in tainted-sql-string
  • Loading branch information
philipturnbull authored Apr 26, 2024
2 parents fc2cb1f + 5d9463e commit 9ac9a3d
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions javascript/express/security/injection/tainted-sql-string.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,7 @@ rules:
pattern-sources:
- patterns:
- pattern-either:
- pattern-inside: function ... ($REQ, $RES) {...}
- pattern-inside: function ... ($REQ, $RES, $NEXT) {...}
- pattern-inside: $APP.$METHOD(..., function $FUNC($REQ, $RES) {...})
- pattern-inside: $APP.$METHOD(..., function $FUNC($REQ, $RES, $NEXT) {...})
- metavariable-regex:
metavariable: $METHOD
regex: ^(get|post|put|head|delete|options)$
- pattern-inside: function ... (...,$REQ, ...) {...}
- pattern-either:
- pattern: $REQ.query
- pattern: $REQ.body
Expand All @@ -50,11 +44,11 @@ rules:
- pattern: $REQ.headers
- patterns:
- pattern-either:
- pattern-inside: |
({ $REQ }: Request,$RES: Response, $NEXT: NextFunction) =>
- pattern-inside: >
(...,{ $REQ }: Request,...) =>
{...}
- pattern-inside: |
({ $REQ }: Request,$RES: Response) => {...}
(...,{ $REQ }: $EXPRESS.Request,...) => {...}
- focus-metavariable: $REQ
- pattern-either:
- pattern: params
Expand Down

0 comments on commit 9ac9a3d

Please sign in to comment.