Skip to content

Commit

Permalink
Merge Develop into Release (#3516)
Browse files Browse the repository at this point in the history
* Allow OWASP Top 10 references from Kubernetes and LLM Top 10 (#3499)

Co-authored-by: Berne Campbell <[email protected]>
Co-authored-by: Pieter De Cremer (Semgrep) <[email protected]>

* Add literal pattern (#3507)

Co-authored-by: Pieter De Cremer (Semgrep) <[email protected]>

* Filter exceptions from tainted-sql-string (#3501)

Co-authored-by: Berne Campbell <[email protected]>
Co-authored-by: Pieter De Cremer (Semgrep) <[email protected]>

---------

Co-authored-by: berney <[email protected]>
Co-authored-by: Berne Campbell <[email protected]>
Co-authored-by: Pieter De Cremer (Semgrep) <[email protected]>
Co-authored-by: QU35T-code <[email protected]>
  • Loading branch information
5 people authored Nov 18, 2024
1 parent d53e57e commit 6c78f54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scala/lang/security/audit/tainted-sql-string.scala
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,9 @@ object Smth {
logWarning(s"Create user $name")
}
}

def throwException(name: String) = {
// ok: tainted-sql-string
throw new IllegalArgumentException(s"Can't create a ${name}")
}
}
1 change: 1 addition & 0 deletions scala/lang/security/audit/tainted-sql-string.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ rules:
- pattern-regex: |
.*\b(?i)(select|delete|insert|create|update|alter|drop)\b.*
- pattern-not-inside: println(...)
- pattern-not-inside: throw new $EXCEPTION(...)
pattern-sanitizers:
- pattern-either:
- patterns:
Expand Down

0 comments on commit 6c78f54

Please sign in to comment.