fix(sast): run only our own semgrep rules, no registry rules or metrics (#441)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
This commit was merged in pull request #441.
This commit is contained in:
1 parent
260d07c783
commit
a66b7a5991
61 files changed
+417
-319
No files matched your search
+17
-4
@@ -4,11 +4,24 @@ Prüfwerk uses a combination of open-source scanners and AI-powered analysis to
|
||||
|
||||
## Semgrep -- Static Analysis (SAST)
|
||||
|
||||
[Semgrep](https://semgrep.dev/) is an open-source static analysis tool that finds vulnerabilities by matching patterns in source code. It supports many languages and has an extensive rule library.
|
||||
[Semgrep](https://semgrep.dev/) is an open-source static analysis engine (LGPL-2.1) that finds vulnerabilities by matching patterns in source code.
|
||||
|
||||
Prüfwerk runs Semgrep with its public `auto` ruleset plus its own CRA rules
|
||||
for controls no off-the-shelf rule covers (secure defaults, weak password
|
||||
hashing, insecure session cookies, weak ciphers for data at rest).
|
||||
Prüfwerk runs the engine with **its own CRA rules only**:
|
||||
|
||||
- Python and JavaScript/TypeScript: secure defaults, weak password hashing,
|
||||
insecure session cookies, weak ciphers for data at rest, shell commands and
|
||||
SQL statements built from variables, request input echoed into a response,
|
||||
plain `http://` requests, and (Python) hard-coded credentials.
|
||||
- C and C++: unbounded string functions, non-literal format strings,
|
||||
hard-coded credentials, broken hashes and ciphers, `rand()` for security.
|
||||
|
||||
The rules of the Semgrep registry (`--config=auto`, `p/...`) are not used:
|
||||
their licence (Semgrep Rules License v1.0) allows internal use only, not a
|
||||
service offered to others, and `auto` cannot run without sending metrics to
|
||||
Semgrep. Semgrep runs with `--metrics=off` and no version check, so nothing
|
||||
about your code leaves the scan. Code in other languages gets no Semgrep
|
||||
findings; the CRA view says so (*Keine Prüfregel für den gefundenen Code*)
|
||||
instead of reporting it as clean.
|
||||
|
||||
Semgrep produces **Codeanalyse (SAST)** findings with file paths, line numbers, and rule descriptions.
|
||||
|
||||
|
||||
Reference in new issue
Block a user