fix(sast): run only our own semgrep rules, no registry rules or metrics #441
No files matched your search
@@ -36,7 +36,7 @@ Compliance Scanner is an autonomous agent that continuously monitors git reposit
|
||||
|
||||
| Area | Capabilities |
|
||||
|------|-------------|
|
||||
| **SAST Scanning** | Semgrep-based static analysis with auto-config rules |
|
||||
| **SAST Scanning** | Semgrep engine with our own CRA rules (no registry rules), cppcheck for C/C++ |
|
||||
| **SBOM Generation** | Syft + cargo-audit for complete dependency inventory |
|
||||
| **CVE Monitoring** | OSV.dev batch queries, NVD CVSS enrichment, SearXNG context |
|
||||
| **GDPR Patterns** | Detect PII logging, missing consent, hardcoded retention, missing deletion |
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
const { exec } = require("child_process");
|
||||
const express = require("express");
|
||||
const app = express();
|
||||
|
||||
app.get("/orders/export", (req, res) => {
|
||||
// ruleid: cra-ai-20-node-shell-command
|
||||
exec("/usr/local/bin/export-orders --customer " + req.query.customer, (err, stdout) => {
|
||||
// ruleid: cra-ai-20-node-reflected-input
|
||||
res.send("<p>Exported for " + req.query.customer + "</p>" + stdout);
|
||||
});
|
||||
// ok: cra-ai-20-node-shell-command
|
||||
exec("uptime", () => {});
|
||||
// ok: cra-ai-20-node-reflected-input
|
||||
res.send("<p>" + encodeURIComponent(req.query.customer) + "</p>");
|
||||
// ok: cra-ai-20-node-shell-command
|
||||
/a(b)/.exec(req.query.customer);
|
||||
// ruleid: cra-ai-15-node-cleartext-http
|
||||
fetch("http://api.example.com/orders");
|
||||
// ok: cra-ai-15-node-cleartext-http
|
||||
fetch("https://api.example.com/orders");
|
||||
});
|
||||
@@ -0,0 +1,57 @@
|
||||
import os
|
||||
import subprocess
|
||||
import requests
|
||||
|
||||
# ruleid: cra-ai-20-python-shell-command
|
||||
os.system("ping -c 1 " + host)
|
||||
# ok: cra-ai-20-python-shell-command
|
||||
os.system("uptime")
|
||||
# ruleid: cra-ai-20-python-shell-command
|
||||
subprocess.call("rotate-key --id " + key_id, shell=True)
|
||||
# ok: cra-ai-20-python-shell-command
|
||||
subprocess.call("rotate-key --all", shell=True)
|
||||
# ok: cra-ai-20-python-shell-command
|
||||
subprocess.call(["rotate-key", "--id", key_id])
|
||||
|
||||
# ruleid: cra-ai-20-python-sql-string
|
||||
cur.execute("SELECT * FROM users WHERE id = " + user_id)
|
||||
# ruleid: cra-ai-20-python-sql-string
|
||||
cur.execute(f"SELECT * FROM users WHERE id = {user_id}")
|
||||
# ruleid: cra-ai-20-python-sql-string
|
||||
cur.execute("SELECT * FROM users WHERE id = %s" % user_id)
|
||||
# ok: cra-ai-20-python-sql-string
|
||||
cur.execute("SELECT * FROM users WHERE id = %s", (user_id,))
|
||||
# ok: cra-ai-20-python-sql-string
|
||||
cur.execute("SELECT 1")
|
||||
|
||||
# ruleid: cra-ai-8-python-hardcoded-credential
|
||||
ADMIN_PASSWORD = "admin123"
|
||||
# ruleid: cra-ai-8-python-hardcoded-credential
|
||||
API_KEY = "sk_live_51HxYzABCDEFghijklmnopqrstuvwxyz0123456789"
|
||||
# ok: cra-ai-8-python-hardcoded-credential
|
||||
ADMIN_PASSWORD = os.environ["ADMIN_PASSWORD"]
|
||||
# ok: cra-ai-8-python-hardcoded-credential
|
||||
PASSWORD_FIELD = "password"
|
||||
# ok: cra-ai-8-python-hardcoded-credential
|
||||
password = ""
|
||||
# ok: cra-ai-8-python-hardcoded-credential
|
||||
password = "changeme"
|
||||
|
||||
# ruleid: cra-ai-15-python-cleartext-http
|
||||
requests.get("http://api.internal.example/" + path)
|
||||
# ok: cra-ai-15-python-cleartext-http
|
||||
requests.get("https://api.internal.example/" + path)
|
||||
# ok: cra-ai-15-python-cleartext-http
|
||||
requests.get("http://localhost:8080/health")
|
||||
|
||||
import pickle
|
||||
import yaml
|
||||
|
||||
# ruleid: cra-ai-20-python-unsafe-deserialization
|
||||
config = yaml.load(request.data)
|
||||
# ok: cra-ai-20-python-unsafe-deserialization
|
||||
config = yaml.load(request.data, Loader=yaml.SafeLoader)
|
||||
# ok: cra-ai-20-python-unsafe-deserialization
|
||||
config = yaml.safe_load(request.data)
|
||||
# ruleid: cra-ai-20-python-unsafe-deserialization
|
||||
session = pickle.loads(request.cookies["session"])
|
||||
@@ -1,4 +1,5 @@
|
||||
# Custom semgrep rules for CRA controls that no off-the-shelf ruleset digs out.
|
||||
# Prüfwerk's own semgrep rules, the only ones it runs: the Semgrep registry rules
|
||||
# are licensed for internal use only, not for a service offered to others.
|
||||
# Each rule id is `cra-ai-<n>-<slug>` and is keyed back to its control via the
|
||||
# `control-map` LUT (by rule-id suffix, so semgrep's path prefix on check_id does
|
||||
# not matter). Detection here is deterministic; the grounded LLM judge downstream
|
||||
@@ -116,6 +117,166 @@ rules:
|
||||
- pattern: 'crypto.createCipheriv("des", ...)'
|
||||
- pattern: 'crypto.createCipher(...)'
|
||||
|
||||
# --- Python and JavaScript/TypeScript: injection, credentials, transport -------
|
||||
# A constant string never matches; the reflected-input rule follows Express
|
||||
# request input (`req.query`, `req.params`, `req.body`) into the response.
|
||||
# Annotated cases: cra_semgrep.py / cra_semgrep.js, run with
|
||||
# `semgrep --test compliance-agent/rules`.
|
||||
- id: cra-ai-20-python-shell-command
|
||||
languages: [python]
|
||||
severity: ERROR
|
||||
message: A shell command is built from a variable, so whoever controls it can run any command (CWE-78). Pass an argument list without shell=True, or validate the value against an allowlist.
|
||||
metadata:
|
||||
cwe: ["CWE-78: Improper Neutralization of Special Elements used in an OS Command"]
|
||||
control: cra-ai-20
|
||||
patterns:
|
||||
- pattern-either:
|
||||
- pattern: os.system($CMD)
|
||||
- pattern: os.popen($CMD, ...)
|
||||
- pattern: subprocess.$F($CMD, ..., shell=True, ...)
|
||||
- metavariable-pattern:
|
||||
metavariable: $CMD
|
||||
patterns:
|
||||
- pattern-not: '"..."'
|
||||
|
||||
- id: cra-ai-20-python-sql-string
|
||||
languages: [python]
|
||||
severity: ERROR
|
||||
message: An SQL statement is assembled from a variable, so its value can change the query (SQL injection, CWE-89). Pass values as query parameters (cursor.execute(sql, params)).
|
||||
metadata:
|
||||
cwe: ["CWE-89: Improper Neutralization of Special Elements used in an SQL Command"]
|
||||
control: cra-ai-20
|
||||
patterns:
|
||||
- pattern-either:
|
||||
- pattern: $CUR.execute("..." + $X, ...)
|
||||
- pattern: $CUR.execute("..." % $X, ...)
|
||||
- pattern: $CUR.execute(f"...", ...)
|
||||
- pattern: $CUR.execute("...".format(...), ...)
|
||||
- pattern: $CUR.executemany("..." + $X, ...)
|
||||
- pattern-not: $CUR.execute(f"{$C}", ...)
|
||||
|
||||
- id: cra-ai-20-python-unsafe-deserialization
|
||||
languages: [python]
|
||||
severity: ERROR
|
||||
message: Data is deserialised with a loader that can build arbitrary objects, so crafted input runs code (CWE-502). Use yaml.safe_load, or JSON for data from outside.
|
||||
metadata:
|
||||
cwe: ["CWE-502: Deserialization of Untrusted Data"]
|
||||
control: cra-ai-20
|
||||
pattern-either:
|
||||
- pattern: pickle.loads(...)
|
||||
- pattern: pickle.load(...)
|
||||
- pattern: cPickle.loads(...)
|
||||
- pattern: marshal.loads(...)
|
||||
- patterns:
|
||||
- pattern: yaml.load(...)
|
||||
- pattern-not: yaml.load(..., Loader=yaml.SafeLoader, ...)
|
||||
- pattern-not: yaml.load(..., Loader=yaml.CSafeLoader, ...)
|
||||
- pattern-not: yaml.load(..., Loader=SafeLoader, ...)
|
||||
- pattern: yaml.unsafe_load(...)
|
||||
|
||||
- id: cra-ai-20-node-shell-command
|
||||
languages: [javascript, typescript]
|
||||
severity: ERROR
|
||||
message: A shell command is built from a variable, so whoever controls it can run any command (CWE-78). Use execFile/spawn with an argument list, or validate the value against an allowlist.
|
||||
metadata:
|
||||
cwe: ["CWE-78: Improper Neutralization of Special Elements used in an OS Command"]
|
||||
control: cra-ai-20
|
||||
patterns:
|
||||
- pattern-either:
|
||||
- pattern: exec($CMD, ...)
|
||||
- pattern: execSync($CMD, ...)
|
||||
- pattern: $CP.exec($CMD, ...)
|
||||
- pattern: $CP.execSync($CMD, ...)
|
||||
- pattern-not: exec("...", ...)
|
||||
- pattern-not: execSync("...", ...)
|
||||
- pattern-not: $CP.exec("...", ...)
|
||||
- pattern-not: $CP.execSync("...", ...)
|
||||
- pattern-not: $CP.exec(`...`, ...)
|
||||
- pattern-inside: |
|
||||
$REQ = require("child_process")
|
||||
...
|
||||
- pattern-not: $RE.exec($X)
|
||||
|
||||
- id: cra-ai-20-node-reflected-input
|
||||
languages: [javascript, typescript]
|
||||
severity: WARNING
|
||||
message: Request input is written into the response without encoding, so a crafted link runs script in the user's browser (reflected XSS, CWE-79). Encode it, or use a template engine that escapes by default.
|
||||
metadata:
|
||||
cwe: ["CWE-79: Improper Neutralization of Input During Web Page Generation"]
|
||||
control: cra-ai-20
|
||||
mode: taint
|
||||
pattern-sources:
|
||||
- pattern-either:
|
||||
- pattern: $REQ.query
|
||||
- pattern: $REQ.params
|
||||
- pattern: $REQ.body
|
||||
pattern-sinks:
|
||||
- pattern-either:
|
||||
- pattern: $RES.send(...)
|
||||
- pattern: $RES.write(...)
|
||||
pattern-sanitizers:
|
||||
- pattern-either:
|
||||
- pattern: encodeURIComponent(...)
|
||||
- pattern: escape(...)
|
||||
- pattern: escapeHtml(...)
|
||||
- pattern: parseInt(...)
|
||||
- pattern: Number(...)
|
||||
|
||||
- id: cra-ai-8-python-hardcoded-credential
|
||||
languages: [python]
|
||||
severity: ERROR
|
||||
message: $NAME holds a credential written into the code, so every installation ships the same secret (CWE-798). Read it from the environment or a secret store.
|
||||
metadata:
|
||||
cwe: ["CWE-798: Use of Hard-coded Credentials"]
|
||||
control: cra-ai-8
|
||||
patterns:
|
||||
- pattern-either:
|
||||
- pattern: $NAME = "$VALUE"
|
||||
- pattern: $OBJ.$NAME = "$VALUE"
|
||||
- metavariable-regex:
|
||||
metavariable: $NAME
|
||||
regex: (?i)^[a-z_]*(password|passwd|pwd|secret|api_?key|access_?key|token|credential)s?$
|
||||
- metavariable-regex:
|
||||
metavariable: $VALUE
|
||||
regex: ^(?!(?i:changeme|change-me|xxx+|\*+|todo|example|placeholder|dummy|test)$).{4,}$
|
||||
|
||||
- id: cra-ai-15-python-cleartext-http
|
||||
languages: [python]
|
||||
severity: WARNING
|
||||
message: A request goes over plain http://, so it can be read and altered in transit (CWE-319). Use https:// with certificate checking.
|
||||
metadata:
|
||||
cwe: ["CWE-319: Cleartext Transmission of Sensitive Information"]
|
||||
control: cra-ai-15
|
||||
patterns:
|
||||
- pattern-either:
|
||||
- pattern: requests.$M("$URL", ...)
|
||||
- pattern: requests.$M("$URL" + $X, ...)
|
||||
- pattern: urllib.request.urlopen("$URL", ...)
|
||||
- pattern: httpx.$M("$URL", ...)
|
||||
- pattern: httpx.$M("$URL" + $X, ...)
|
||||
- metavariable-regex:
|
||||
metavariable: $URL
|
||||
regex: ^http://(?!(localhost|127\.|0\.0\.0\.0|\[::1\]))
|
||||
|
||||
- id: cra-ai-15-node-cleartext-http
|
||||
languages: [javascript, typescript]
|
||||
severity: WARNING
|
||||
message: A request goes over plain http://, so it can be read and altered in transit (CWE-319). Use https:// with certificate checking.
|
||||
metadata:
|
||||
cwe: ["CWE-319: Cleartext Transmission of Sensitive Information"]
|
||||
control: cra-ai-15
|
||||
patterns:
|
||||
- pattern-either:
|
||||
- pattern: fetch("$URL", ...)
|
||||
- pattern: fetch("$URL" + $X, ...)
|
||||
- pattern: axios.$M("$URL", ...)
|
||||
- pattern: axios.$M("$URL" + $X, ...)
|
||||
- pattern: http.get("$URL", ...)
|
||||
- pattern: http.request("$URL", ...)
|
||||
- metavariable-regex:
|
||||
metavariable: $URL
|
||||
regex: ^http://(?!(localhost|127\.|0\.0\.0\.0|\[::1\]))
|
||||
|
||||
# --- C/C++ firmware ------------------------------------------------------------
|
||||
# C and C++ sources alike (`languages: [c, cpp]`), with the `std::` spellings.
|
||||
# Microcontroller code: unbounded string handling, non-literal format strings,
|
||||
|
||||
@@ -10,28 +10,34 @@ use crate::pipeline::source_text::{read_lines, relative_path};
|
||||
/// What open-source semgrep writes in place of the matched code.
|
||||
const REDACTED_LINES: &str = "requires login";
|
||||
|
||||
/// Custom CRA-control detectors bundled into the binary and staged to a temp file
|
||||
/// at scan time so semgrep can `--config` them alongside the auto ruleset. These
|
||||
/// cover controls no off-the-shelf rule digs out (secure defaults, weak password
|
||||
/// hashing, insecure session cookies, weak data-at-rest ciphers); each rule id is
|
||||
/// keyed back to its control by the `control-map` LUT.
|
||||
/// Our own CRA-control rules, bundled into the binary and staged to a temp
|
||||
/// file at scan time. They are the only rules semgrep runs: the Semgrep
|
||||
/// registry rules (`--config=auto`, `p/...`) are licensed for internal use
|
||||
/// only, not for a service offered to others, and `auto` cannot run without
|
||||
/// sending metrics to Semgrep. Each rule id is keyed back to its control by the
|
||||
/// `control-map` LUT.
|
||||
const CRA_RULES: &str = include_str!("../../rules/cra_semgrep.yaml");
|
||||
|
||||
/// Write the bundled CRA rules to a stable temp path (atomic: unique tmp +
|
||||
/// rename). Returns `None` on failure — the scan then runs with auto rules only.
|
||||
async fn stage_cra_rules() -> Option<PathBuf> {
|
||||
/// rename).
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// Returns `CoreError::Scanner` when the file cannot be written: without it
|
||||
/// semgrep has no rules to run, and the stage must read as failed, not clean.
|
||||
async fn stage_cra_rules() -> Result<PathBuf, CoreError> {
|
||||
let dir = std::env::temp_dir();
|
||||
let path = dir.join("compliance-cra-semgrep.yaml");
|
||||
let tmp = dir.join(format!("compliance-cra-semgrep.{}.tmp", std::process::id()));
|
||||
if let Err(e) = tokio::fs::write(&tmp, CRA_RULES).await {
|
||||
tracing::warn!(error = %e, "failed to stage custom CRA semgrep rules; using auto rules only");
|
||||
return None;
|
||||
}
|
||||
if let Err(e) = tokio::fs::rename(&tmp, &path).await {
|
||||
tracing::warn!(error = %e, "failed to stage custom CRA semgrep rules; using auto rules only");
|
||||
return None;
|
||||
}
|
||||
Some(path)
|
||||
let staged = async {
|
||||
tokio::fs::write(&tmp, CRA_RULES).await?;
|
||||
tokio::fs::rename(&tmp, &path).await
|
||||
};
|
||||
staged.await.map_err(|e| CoreError::Scanner {
|
||||
scanner: "semgrep".to_string(),
|
||||
source: format!("could not stage the CRA rules: {e}").into(),
|
||||
})?;
|
||||
Ok(path)
|
||||
}
|
||||
|
||||
/// semgrep over a tree, skipping vendor directories.
|
||||
@@ -59,15 +65,23 @@ impl Scanner for SemgrepScanner {
|
||||
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn scan(&self, repo_path: &Path, repo_id: &str) -> Result<ScanOutput, CoreError> {
|
||||
let cra_rules = stage_cra_rules().await;
|
||||
let cra_rules = stage_cra_rules().await?;
|
||||
// Empty environment + kill-on-drop: semgrep only needs to find itself
|
||||
// and write temp files, and a timed-out run must actually die.
|
||||
let mut command = crate::pipeline::tool_cmd::tool("semgrep", &["SEMGREP_RULES"]);
|
||||
command.arg("--config=auto");
|
||||
if let Some(path) = &cra_rules {
|
||||
command.arg(format!("--config={}", path.display()));
|
||||
}
|
||||
command.args(["--json", "--quiet", "--max-memory", "500", "--jobs", "2"]);
|
||||
// and write temp files, and a timed-out run must actually die. No
|
||||
// metrics and no version check: nothing about a customer's code leaves
|
||||
// the scan.
|
||||
let mut command = crate::pipeline::tool_cmd::tool("semgrep", &[]);
|
||||
command.arg(format!("--config={}", cra_rules.display()));
|
||||
command.args([
|
||||
"--metrics=off",
|
||||
"--disable-version-check",
|
||||
"--json",
|
||||
"--quiet",
|
||||
"--max-memory",
|
||||
"500",
|
||||
"--jobs",
|
||||
"2",
|
||||
]);
|
||||
// Anchored at the tree root: a bare `Drivers` would also skip a
|
||||
// customer's own `app/Drivers/`.
|
||||
for dir in &self.excluded {
|
||||
|
||||
@@ -110,7 +110,7 @@ mod tests {
|
||||
// `Command`'s environment is not readable back, so assert on what we can
|
||||
// see: the program, and that building one does not panic with a cleared
|
||||
// environment plus extras.
|
||||
let cmd = tool("semgrep", &["SEMGREP_RULES"]);
|
||||
let cmd = tool("semgrep", &[]);
|
||||
assert_eq!(cmd.as_std().get_program(), "semgrep");
|
||||
assert!(cmd.as_std().get_envs().count() > 0, "allowlist applied");
|
||||
}
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
//! - a blessed snapshot in `fixtures/nightly/baselines/<key>.json`:
|
||||
//! - **exact**: scan status, skipped stages, SBOM components, and findings
|
||||
//! from deterministic scanners (PLC rules, secrets, patterns, lint, our own
|
||||
//! `cra-ai-*` semgrep rules);
|
||||
//! - **at least**: CVE and advisory ids, and semgrep registry rules, whose
|
||||
//! sources change daily;
|
||||
//! `cra-ai-*` semgrep rules, the only ones semgrep runs);
|
||||
//! - **at least**: CVE and advisory ids, whose sources change daily;
|
||||
//! - **ignored**: LLM code review and triage. Control refs, which the LLM
|
||||
//! control judge stamps, are reported under "advisory" but do not gate.
|
||||
//!
|
||||
@@ -336,8 +335,6 @@ struct Snapshot {
|
||||
findings: BTreeSet<String>,
|
||||
/// CVE and advisory ids; the run must contain at least these.
|
||||
cves: BTreeSet<String>,
|
||||
/// Semgrep registry rules; the run must contain at least these.
|
||||
registry_rules: BTreeSet<String>,
|
||||
}
|
||||
|
||||
impl Snapshot {
|
||||
@@ -380,11 +377,6 @@ impl Snapshot {
|
||||
out.extend(exact("SBOM component", &self.sbom, &baseline.sbom));
|
||||
out.extend(exact("finding", &self.findings, &baseline.findings));
|
||||
out.extend(at_least("CVE", &self.cves, &baseline.cves));
|
||||
out.extend(at_least(
|
||||
"registry rule",
|
||||
&self.registry_rules,
|
||||
&baseline.registry_rules,
|
||||
));
|
||||
out
|
||||
}
|
||||
}
|
||||
@@ -465,8 +457,6 @@ async fn collect(agent: &Agent, target_id: &str, run: &Value) -> Collected {
|
||||
snapshot.cves.insert(rule);
|
||||
} else if scan_type == "codereview" {
|
||||
// LLM output: runs, never gates.
|
||||
} else if scanner == "semgrep" && !rule.starts_with("cra-ai-") {
|
||||
snapshot.registry_rules.insert(rule);
|
||||
} else {
|
||||
let file = Path::new(&text(f, "file_path"))
|
||||
.file_name()
|
||||
@@ -734,26 +724,25 @@ mod unit {
|
||||
skipped_stages: set(&["dast"]),
|
||||
sbom: set(&["cargo:itoa@1.0.15"]),
|
||||
findings: set(&["gitleaks:aws-key a.py:3"]),
|
||||
cves: set(&["CVE-2020-1"]),
|
||||
registry_rules: set(&["python.lang.x"]),
|
||||
cves: set(&["CVE-2020-1", "GHSA-xxxx-yyyy-zzzz"]),
|
||||
};
|
||||
let mut run = blessed.clone();
|
||||
assert!(run.diff(&blessed).is_empty());
|
||||
|
||||
run.sbom = set(&["cargo:itoa@1.0.16"]);
|
||||
run.cves = set(&["CVE-2020-1", "CVE-2026-9"]); // a new CVE is fine
|
||||
run.registry_rules = set(&[]);
|
||||
// A new CVE is fine, a lost one is not.
|
||||
run.cves = set(&["CVE-2020-1", "CVE-2026-9"]);
|
||||
run.scan_status = "failed".into();
|
||||
let diff = run.diff(&blessed);
|
||||
for needle in [
|
||||
"scan status failed, blessed completed",
|
||||
"missing SBOM component: cargo:itoa@1.0.15",
|
||||
"unexpected SBOM component: cargo:itoa@1.0.16",
|
||||
"missing registry rule: python.lang.x",
|
||||
"missing CVE: GHSA-xxxx-yyyy-zzzz",
|
||||
] {
|
||||
assert!(diff.iter().any(|d| d == needle), "{needle} not in {diff:?}");
|
||||
}
|
||||
assert!(!diff.iter().any(|d| d.contains("CVE")), "{diff:?}");
|
||||
assert!(!diff.iter().any(|d| d.contains("CVE-2026-9")), "{diff:?}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -119,14 +119,6 @@
|
||||
"scan_type": "sast",
|
||||
"languages": [
|
||||
"python",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"java",
|
||||
"go",
|
||||
"ruby",
|
||||
"php",
|
||||
"csharp",
|
||||
"kotlin",
|
||||
"c",
|
||||
"cpp"
|
||||
],
|
||||
@@ -135,6 +127,7 @@
|
||||
"CWE-259"
|
||||
],
|
||||
"rules": [
|
||||
"cra-ai-8-python-hardcoded-credential",
|
||||
"cra-ai-8-c-hardcoded-credential"
|
||||
],
|
||||
"check": "No credential (password, key, token) may be written into the product's source, as a variable or a #define: every device would ship the same secret. A placeholder or an empty value does not violate it."
|
||||
@@ -154,27 +147,6 @@
|
||||
"cwe": [],
|
||||
"rules": [],
|
||||
"check": "Credentials must not be kept in plain text in the source or configuration; a real secret committed to the repository violates it."
|
||||
},
|
||||
{
|
||||
"tool": "semgrep",
|
||||
"scan_type": "sast",
|
||||
"languages": [
|
||||
"python",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"java",
|
||||
"go",
|
||||
"ruby",
|
||||
"php",
|
||||
"csharp",
|
||||
"kotlin"
|
||||
],
|
||||
"cwe": [
|
||||
"CWE-798",
|
||||
"CWE-522"
|
||||
],
|
||||
"rules": [],
|
||||
"check": "Credentials must not be kept or compared in plain text; a hard-coded or plain-text stored secret violates it."
|
||||
}
|
||||
],
|
||||
"note": null,
|
||||
@@ -267,15 +239,6 @@
|
||||
"tool": "semgrep",
|
||||
"scan_type": "sast",
|
||||
"languages": [
|
||||
"python",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"java",
|
||||
"go",
|
||||
"ruby",
|
||||
"php",
|
||||
"csharp",
|
||||
"kotlin",
|
||||
"c",
|
||||
"cpp"
|
||||
],
|
||||
@@ -325,19 +288,13 @@
|
||||
"languages": [
|
||||
"python",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"java",
|
||||
"go",
|
||||
"ruby",
|
||||
"php",
|
||||
"csharp",
|
||||
"kotlin"
|
||||
"typescript"
|
||||
],
|
||||
"cwe": [
|
||||
"CWE-319",
|
||||
"CWE-311"
|
||||
"cwe": [],
|
||||
"rules": [
|
||||
"cra-ai-15-python-cleartext-http",
|
||||
"cra-ai-15-node-cleartext-http"
|
||||
],
|
||||
"rules": [],
|
||||
"check": "Network traffic must use TLS 1.2 or newer with certificate checking; plain HTTP for sensitive data, disabled verification or old protocol versions violate it."
|
||||
}
|
||||
],
|
||||
@@ -360,15 +317,6 @@
|
||||
"tool": "semgrep",
|
||||
"scan_type": "sast",
|
||||
"languages": [
|
||||
"python",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"java",
|
||||
"go",
|
||||
"ruby",
|
||||
"php",
|
||||
"csharp",
|
||||
"kotlin",
|
||||
"c",
|
||||
"cpp"
|
||||
],
|
||||
@@ -417,12 +365,6 @@
|
||||
"python",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"java",
|
||||
"go",
|
||||
"ruby",
|
||||
"php",
|
||||
"csharp",
|
||||
"kotlin",
|
||||
"c",
|
||||
"cpp"
|
||||
],
|
||||
@@ -433,11 +375,16 @@
|
||||
"CWE-22"
|
||||
],
|
||||
"rules": [
|
||||
"cra-ai-20-python-shell-command",
|
||||
"cra-ai-20-python-sql-string",
|
||||
"cra-ai-20-python-unsafe-deserialization",
|
||||
"cra-ai-20-node-shell-command",
|
||||
"cra-ai-20-node-reflected-input",
|
||||
"cra-ai-20-c-unbounded-string-function",
|
||||
"cra-ai-20-c-scanf-unbounded-string",
|
||||
"cra-ai-20-c-non-literal-format-string"
|
||||
],
|
||||
"check": "The code must not write past a buffer or let input control a format string: strcpy, strcat, sprintf, gets, scanf(\"%s\") or a non-literal format argument violates it."
|
||||
"check": "Untrusted input must not reach a shell, an SQL statement or an HTML response unencoded, and the code must not write past a buffer or let input control a format string: a command or query built from a variable, request input echoed into a response, strcpy, strcat, sprintf, gets, scanf(\"%s\") or a non-literal format argument violates it."
|
||||
},
|
||||
{
|
||||
"tool": "cppcheck",
|
||||
|
||||
@@ -292,8 +292,8 @@ mod tests {
|
||||
let s = ControlMap::cra().unwrap().summary();
|
||||
assert!(s.covered > 0);
|
||||
assert!(s.not_code_checkable > 0);
|
||||
// needs_tooling is now empty: every code-checkable control is either
|
||||
// tool-covered or covered by the grounded surface pass.
|
||||
// needs_tooling is empty: every code-checkable control is either
|
||||
// covered by our own rules and tools or by the grounded surface pass.
|
||||
assert_eq!(s.needs_tooling, 0);
|
||||
}
|
||||
|
||||
@@ -329,8 +329,9 @@ mod tests {
|
||||
#[test]
|
||||
fn coverage_after_grounded_promotion() {
|
||||
let s = ControlMap::cra().unwrap().summary();
|
||||
// 9 off-the-shelf + 4 custom-semgrep + 8 grounded surface controls (promoted
|
||||
// after the grounded path was validated live).
|
||||
// Our own semgrep rules, gitleaks, cppcheck, syft/OSV and 8 grounded
|
||||
// surface controls (promoted after the grounded path was validated
|
||||
// live).
|
||||
assert_eq!(s.covered, 21);
|
||||
// Nothing left as needs_tooling — every code-checkable control is covered.
|
||||
assert_eq!(s.needs_tooling, 0);
|
||||
|
||||
@@ -14,7 +14,7 @@ coverage.
|
||||
|
||||
## How it works today
|
||||
|
||||
1. **Detectors run on their own:** semgrep (the registry and our CRA rule pack),
|
||||
1. **Detectors run on their own:** semgrep (our CRA rule pack; registry rules are not licensed for a service),
|
||||
cppcheck, gitleaks, syft/osv and the PLC linter.
|
||||
2. **Our control map** (`control-map/data/cra_control_map.json`, written and reviewed by
|
||||
us) binds each of the 40 CRA Annex I controls to the tools, rule ids, CWEs and
|
||||
|
||||
@@ -22,10 +22,10 @@ Every control lands in one of three buckets, recorded in the `control-map` LUT (
|
||||
| `needs_tooling` | Code-checkable, but no off-the-shelf tool digs it out — we author a detector or use the grounded surface check |
|
||||
| `not_code_checkable` | A design/process property — out of static-scan scope |
|
||||
|
||||
For the **CRA** framework (40 controls) the split is **21 covered · 0 needs_tooling · 19 not_code_checkable**. The originally uncovered controls were resolved as a hybrid:
|
||||
For the **CRA** framework (40 controls) the split is **21 covered · 0 needs_tooling · 19 not_code_checkable**. Every semgrep binding names our own rules only: the Semgrep registry rules are not run (their licence allows internal use only, not a service for others), so a binding covers exactly the languages its rules are written for. The originally uncovered controls were resolved as a hybrid:
|
||||
|
||||
- **Custom semgrep detectors**, shipped in the binary and matched back to controls **by rule id** so a broad CWE can't over-attribute:
|
||||
- for Python and JavaScript/TypeScript: `cra-ai-1`, `7`, `10`, `14` (secure-by-default, weak password hashing, insecure session cookies, weak data-at-rest ciphers);
|
||||
- for Python and JavaScript/TypeScript: `cra-ai-1`, `7`, `10`, `14` (secure-by-default, weak password hashing, insecure session cookies, weak data-at-rest ciphers), `cra-ai-20` (shell commands and SQL built from variables, request input echoed into a response), `cra-ai-8` (hard-coded credentials, Python) and `cra-ai-15` (plain `http://` requests);
|
||||
- for C and C++ firmware: `cra-ai-8`, `13`, `16`, `20` (hard-coded credentials including `#define` macros, broken hash/cipher, `rand()`, unbounded string functions and non-literal format strings), next to cppcheck for memory safety.
|
||||
- **8 grounded surface checks** (`cra-ai-6`, `11`, `12`, `24`, `27`, `28`, `29`, `30`): the absence-based controls (no rate limiting, no security logging, no update-signature check…) that have no syntactic pattern.
|
||||
- **Marked not_code_checkable** (`cra-ai-2`, `3`, `4`, `5`, among the 19): minimal attack surface, secure architecture, least privilege, tamper protection.
|
||||
|
||||
@@ -16,8 +16,9 @@ names while the scan runs.
|
||||
- *Archiv entpacken* -- for an uploaded archive instead of a repository.
|
||||
- *Projekttyp bestimmen* -- firmware, PLC project, backend service, and so on.
|
||||
- *Firmware analysieren* -- for firmware, lists the libraries and toolchain the build uses.
|
||||
2. **Static code analysis** (*Statische Codeanalyse*) -- Semgrep over the whole
|
||||
tree; for C and C++ also cppcheck, which follows values through the code
|
||||
2. **Static code analysis** (*Statische Codeanalyse*) -- Semgrep with
|
||||
Prüfwerk's own rules (Python, JavaScript/TypeScript, C and C++; see
|
||||
[Tools](/reference/tools)); for C and C++ also cppcheck, which follows values through the code
|
||||
(out-of-bounds writes, uninitialised reads, null dereferences). Vendor and
|
||||
third-party code (HAL, CMSIS, vendored libraries) is left out of the code
|
||||
findings and listed under **Nicht ausgeführt**; it stays in the SBOM.
|
||||
|
||||
+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.
|
||||
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
"findings": [
|
||||
"gitleaks:github-pat service.env:5",
|
||||
"gitleaks:slack-bot-token service.env:6",
|
||||
"semgrep:cra-ai-20-node-reflected-input server.js:15",
|
||||
"semgrep:cra-ai-20-node-shell-command server.js:10",
|
||||
"semgrep:cra-ai-20-python-shell-command auth.py:15",
|
||||
"semgrep:cra-ai-7-weak-password-hash auth.py:9"
|
||||
],
|
||||
"cves": [
|
||||
@@ -20,13 +23,5 @@
|
||||
"GHSA-vh95-rmgr-6w4m",
|
||||
"GHSA-xvch-5gv4-984h",
|
||||
"GHSA-xxjr-mmjv-4gpg"
|
||||
],
|
||||
"registry_rules": [
|
||||
"generic.secrets.security.detected-github-token.detected-github-token",
|
||||
"javascript.express.security.audit.express-check-csurf-middleware-usage.express-check-csurf-middleware-usage",
|
||||
"javascript.express.security.audit.xss.direct-response-write.direct-response-write",
|
||||
"javascript.express.security.injection.raw-html-format.raw-html-format",
|
||||
"javascript.lang.security.detect-child-process.detect-child-process",
|
||||
"python.lang.security.audit.subprocess-shell-true.subprocess-shell-true"
|
||||
]
|
||||
}
|
||||
@@ -9,6 +9,9 @@
|
||||
"findings": [
|
||||
"gitleaks:github-pat service.env:5",
|
||||
"gitleaks:slack-bot-token service.env:6",
|
||||
"semgrep:cra-ai-20-node-reflected-input server.js:15",
|
||||
"semgrep:cra-ai-20-node-shell-command server.js:10",
|
||||
"semgrep:cra-ai-20-python-shell-command auth.py:15",
|
||||
"semgrep:cra-ai-7-weak-password-hash auth.py:9"
|
||||
],
|
||||
"cves": [
|
||||
@@ -20,13 +23,5 @@
|
||||
"GHSA-vh95-rmgr-6w4m",
|
||||
"GHSA-xvch-5gv4-984h",
|
||||
"GHSA-xxjr-mmjv-4gpg"
|
||||
],
|
||||
"registry_rules": [
|
||||
"generic.secrets.security.detected-github-token.detected-github-token",
|
||||
"javascript.express.security.audit.express-check-csurf-middleware-usage.express-check-csurf-middleware-usage",
|
||||
"javascript.express.security.audit.xss.direct-response-write.direct-response-write",
|
||||
"javascript.express.security.injection.raw-html-format.raw-html-format",
|
||||
"javascript.lang.security.detect-child-process.detect-child-process",
|
||||
"python.lang.security.audit.subprocess-shell-true.subprocess-shell-true"
|
||||
]
|
||||
}
|
||||
@@ -17,6 +17,5 @@
|
||||
"toolchain:zephyr-sdk@"
|
||||
],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -5,6 +5,5 @@
|
||||
"toolchain:arduino-cli@"
|
||||
],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -22,6 +22,5 @@
|
||||
"semgrep:cra-ai-8-c-hardcoded-credential comms.c:9",
|
||||
"semgrep:cra-ai-8-c-hardcoded-credential net_config.h:7"
|
||||
],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -7,6 +7,5 @@
|
||||
"toolchain:rustc@1.82.0"
|
||||
],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -5,6 +5,5 @@
|
||||
"toolchain:arm-none-eabi-gcc@"
|
||||
],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -78,6 +78,5 @@
|
||||
"CVE-2026-77235",
|
||||
"CVE-2026-77236",
|
||||
"CVE-2026-77237"
|
||||
],
|
||||
"registry_rules": []
|
||||
]
|
||||
}
|
||||
@@ -8,6 +8,5 @@
|
||||
"toolchain:esp-idf-toolchain@"
|
||||
],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -6,6 +6,5 @@
|
||||
"toolchain:arm-none-eabi-gcc@"
|
||||
],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -8,6 +8,5 @@
|
||||
"toolchain:arm-none-eabi-gcc@"
|
||||
],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -5,6 +5,5 @@
|
||||
"toolchain:arm-none-eabi-gcc@"
|
||||
],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -5,6 +5,5 @@
|
||||
"toolchain:arm-none-eabi-gcc@"
|
||||
],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -7,6 +7,5 @@
|
||||
"library:knolleary/PubSubClient@2.8"
|
||||
],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -5,6 +5,5 @@
|
||||
],
|
||||
"sbom": [],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -17,6 +17,5 @@
|
||||
"toolchain:zephyr-sdk@"
|
||||
],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -9,6 +9,5 @@
|
||||
"toolchain:zephyr-sdk@"
|
||||
],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -4,13 +4,12 @@
|
||||
"sbom": [],
|
||||
"findings": [
|
||||
"gitleaks:stripe-access-token auth.py:2",
|
||||
"semgrep:cra-ai-14-python-weak-cipher crypto.py:8"
|
||||
"semgrep:cra-ai-14-python-weak-cipher crypto.py:8",
|
||||
"semgrep:cra-ai-15-python-cleartext-http net.py:4",
|
||||
"semgrep:cra-ai-20-python-shell-command db.py:9",
|
||||
"semgrep:cra-ai-20-python-sql-string db.py:5",
|
||||
"semgrep:cra-ai-8-python-hardcoded-credential auth.py:2",
|
||||
"semgrep:cra-ai-8-python-hardcoded-credential auth.py:3"
|
||||
],
|
||||
"cves": [],
|
||||
"registry_rules": [
|
||||
"generic.secrets.security.detected-stripe-api-key.detected-stripe-api-key",
|
||||
"python.lang.security.audit.insecure-transport.requests.request-with-http.request-with-http",
|
||||
"python.pycryptodome.security.insecure-cipher-algorithm-des.insecure-cipher-algorithm-des",
|
||||
"python.sqlalchemy.security.sqlalchemy-execute-raw-query.sqlalchemy-execute-raw-query"
|
||||
]
|
||||
"cves": []
|
||||
}
|
||||
@@ -7,11 +7,8 @@
|
||||
"findings": [
|
||||
"gitleaks:generic-api-key session.ts:8",
|
||||
"gitleaks:npm-access-token .env.local:3",
|
||||
"gitleaks:stripe-access-token .env.local:2"
|
||||
"gitleaks:stripe-access-token .env.local:2",
|
||||
"semgrep:cra-ai-20-node-shell-command cli.js:9"
|
||||
],
|
||||
"cves": [],
|
||||
"registry_rules": [
|
||||
"generic.secrets.security.detected-generic-secret.detected-generic-secret",
|
||||
"generic.secrets.security.detected-stripe-api-key.detected-stripe-api-key"
|
||||
]
|
||||
"cves": []
|
||||
}
|
||||
@@ -9,7 +9,8 @@
|
||||
"findings": [
|
||||
"gitleaks:generic-api-key session.ts:8",
|
||||
"gitleaks:npm-access-token .env.local:3",
|
||||
"gitleaks:stripe-access-token .env.local:2"
|
||||
"gitleaks:stripe-access-token .env.local:2",
|
||||
"semgrep:cra-ai-20-node-reflected-input server.js:9"
|
||||
],
|
||||
"cves": [
|
||||
"GHSA-29mw-wpgm-hmr9",
|
||||
@@ -43,12 +44,5 @@
|
||||
"GHSA-xhjh-pmcv-23jw",
|
||||
"GHSA-xx6v-rp6x-q39c",
|
||||
"GHSA-xxjr-mmjv-4gpg"
|
||||
],
|
||||
"registry_rules": [
|
||||
"generic.secrets.security.detected-generic-secret.detected-generic-secret",
|
||||
"generic.secrets.security.detected-stripe-api-key.detected-stripe-api-key",
|
||||
"javascript.express.security.audit.express-check-csurf-middleware-usage.express-check-csurf-middleware-usage",
|
||||
"javascript.express.security.audit.xss.direct-response-write.direct-response-write",
|
||||
"javascript.express.security.injection.raw-html-format.raw-html-format"
|
||||
]
|
||||
}
|
||||
@@ -7,11 +7,8 @@
|
||||
"findings": [
|
||||
"gitleaks:generic-api-key session.ts:8",
|
||||
"gitleaks:npm-access-token .env.local:3",
|
||||
"gitleaks:stripe-access-token .env.local:2"
|
||||
"gitleaks:stripe-access-token .env.local:2",
|
||||
"semgrep:cra-ai-20-node-shell-command cli.js:9"
|
||||
],
|
||||
"cves": [],
|
||||
"registry_rules": [
|
||||
"generic.secrets.security.detected-generic-secret.detected-generic-secret",
|
||||
"generic.secrets.security.detected-stripe-api-key.detected-stripe-api-key"
|
||||
]
|
||||
"cves": []
|
||||
}
|
||||
@@ -10,7 +10,8 @@
|
||||
"findings": [
|
||||
"gitleaks:generic-api-key session.ts:8",
|
||||
"gitleaks:npm-access-token .env.local:3",
|
||||
"gitleaks:stripe-access-token .env.local:2"
|
||||
"gitleaks:stripe-access-token .env.local:2",
|
||||
"semgrep:cra-ai-20-node-reflected-input server.js:9"
|
||||
],
|
||||
"cves": [
|
||||
"GHSA-29mw-wpgm-hmr9",
|
||||
@@ -44,12 +45,5 @@
|
||||
"GHSA-xhjh-pmcv-23jw",
|
||||
"GHSA-xx6v-rp6x-q39c",
|
||||
"GHSA-xxjr-mmjv-4gpg"
|
||||
],
|
||||
"registry_rules": [
|
||||
"generic.secrets.security.detected-generic-secret.detected-generic-secret",
|
||||
"generic.secrets.security.detected-stripe-api-key.detected-stripe-api-key",
|
||||
"javascript.express.security.audit.express-check-csurf-middleware-usage.express-check-csurf-middleware-usage",
|
||||
"javascript.express.security.audit.xss.direct-response-write.direct-response-write",
|
||||
"javascript.express.security.injection.raw-html-format.raw-html-format"
|
||||
]
|
||||
}
|
||||
@@ -9,7 +9,8 @@
|
||||
"findings": [
|
||||
"gitleaks:generic-api-key session.ts:8",
|
||||
"gitleaks:npm-access-token .env.local:3",
|
||||
"gitleaks:stripe-access-token .env.local:2"
|
||||
"gitleaks:stripe-access-token .env.local:2",
|
||||
"semgrep:cra-ai-20-node-reflected-input server.js:9"
|
||||
],
|
||||
"cves": [
|
||||
"GHSA-29mw-wpgm-hmr9",
|
||||
@@ -43,12 +44,5 @@
|
||||
"GHSA-xhjh-pmcv-23jw",
|
||||
"GHSA-xx6v-rp6x-q39c",
|
||||
"GHSA-xxjr-mmjv-4gpg"
|
||||
],
|
||||
"registry_rules": [
|
||||
"generic.secrets.security.detected-generic-secret.detected-generic-secret",
|
||||
"generic.secrets.security.detected-stripe-api-key.detected-stripe-api-key",
|
||||
"javascript.express.security.audit.express-check-csurf-middleware-usage.express-check-csurf-middleware-usage",
|
||||
"javascript.express.security.audit.xss.direct-response-write.direct-response-write",
|
||||
"javascript.express.security.injection.raw-html-format.raw-html-format"
|
||||
]
|
||||
}
|
||||
@@ -9,7 +9,8 @@
|
||||
"findings": [
|
||||
"gitleaks:generic-api-key session.ts:8",
|
||||
"gitleaks:npm-access-token .env.local:3",
|
||||
"gitleaks:stripe-access-token .env.local:2"
|
||||
"gitleaks:stripe-access-token .env.local:2",
|
||||
"semgrep:cra-ai-20-node-reflected-input server.js:9"
|
||||
],
|
||||
"cves": [
|
||||
"GHSA-29mw-wpgm-hmr9",
|
||||
@@ -43,13 +44,5 @@
|
||||
"GHSA-xhjh-pmcv-23jw",
|
||||
"GHSA-xx6v-rp6x-q39c",
|
||||
"GHSA-xxjr-mmjv-4gpg"
|
||||
],
|
||||
"registry_rules": [
|
||||
"generic.secrets.security.detected-generic-secret.detected-generic-secret",
|
||||
"generic.secrets.security.detected-stripe-api-key.detected-stripe-api-key",
|
||||
"javascript.express.security.audit.express-check-csurf-middleware-usage.express-check-csurf-middleware-usage",
|
||||
"javascript.express.security.audit.xss.direct-response-write.direct-response-write",
|
||||
"javascript.express.security.injection.raw-html-format.raw-html-format",
|
||||
"package_managers.yarn.yarn-missing-minimal-age-gate.yarn-missing-minimal-age-gate"
|
||||
]
|
||||
}
|
||||
@@ -9,7 +9,8 @@
|
||||
"findings": [
|
||||
"gitleaks:generic-api-key session.ts:8",
|
||||
"gitleaks:npm-access-token .env.local:3",
|
||||
"gitleaks:stripe-access-token .env.local:2"
|
||||
"gitleaks:stripe-access-token .env.local:2",
|
||||
"semgrep:cra-ai-20-node-reflected-input server.js:9"
|
||||
],
|
||||
"cves": [
|
||||
"GHSA-29mw-wpgm-hmr9",
|
||||
@@ -43,12 +44,5 @@
|
||||
"GHSA-xhjh-pmcv-23jw",
|
||||
"GHSA-xx6v-rp6x-q39c",
|
||||
"GHSA-xxjr-mmjv-4gpg"
|
||||
],
|
||||
"registry_rules": [
|
||||
"generic.secrets.security.detected-generic-secret.detected-generic-secret",
|
||||
"generic.secrets.security.detected-stripe-api-key.detected-stripe-api-key",
|
||||
"javascript.express.security.audit.express-check-csurf-middleware-usage.express-check-csurf-middleware-usage",
|
||||
"javascript.express.security.audit.xss.direct-response-write.direct-response-write",
|
||||
"javascript.express.security.injection.raw-html-format.raw-html-format"
|
||||
]
|
||||
}
|
||||
@@ -5,6 +5,5 @@
|
||||
],
|
||||
"sbom": [],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -11,6 +11,5 @@
|
||||
"GHSA-3cqm-mf7h-prrj",
|
||||
"GHSA-4jrv-ppp4-jm57",
|
||||
"GHSA-w33c-445m-f8w7"
|
||||
],
|
||||
"registry_rules": []
|
||||
]
|
||||
}
|
||||
@@ -10,6 +10,5 @@
|
||||
"findings": [],
|
||||
"cves": [
|
||||
"GHSA-9324-jv53-9cc8"
|
||||
],
|
||||
"registry_rules": []
|
||||
]
|
||||
}
|
||||
@@ -8,6 +8,5 @@
|
||||
"cocoapods:AFNetworking@2.5.1"
|
||||
],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -5,6 +5,5 @@
|
||||
],
|
||||
"sbom": [],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -13,6 +13,5 @@
|
||||
"GHSA-qppj-fm5r-hxr3",
|
||||
"GHSA-w3f6-pc54-gfw7",
|
||||
"GHSA-xvr7-p2c6-j83w"
|
||||
],
|
||||
"registry_rules": []
|
||||
]
|
||||
}
|
||||
@@ -42,6 +42,5 @@
|
||||
"GHSA-xhjh-pmcv-23jw",
|
||||
"GHSA-xx6v-rp6x-q39c",
|
||||
"GHSA-xxjr-mmjv-4gpg"
|
||||
],
|
||||
"registry_rules": []
|
||||
]
|
||||
}
|
||||
@@ -44,6 +44,5 @@
|
||||
"cves": [
|
||||
"CVE-2022-4046",
|
||||
"CVE-2025-41738"
|
||||
],
|
||||
"registry_rules": []
|
||||
]
|
||||
}
|
||||
@@ -81,6 +81,5 @@
|
||||
"CVE-2026-0393",
|
||||
"CVE-2026-44468",
|
||||
"CVE-2026-44469"
|
||||
],
|
||||
"registry_rules": []
|
||||
]
|
||||
}
|
||||
@@ -12,6 +12,5 @@
|
||||
"plc-control-logic:plc-insecure-protocol-port traffic_light.st:45",
|
||||
"plc-control-logic:plc-safety-bypass traffic_light.st:59"
|
||||
],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -5,6 +5,5 @@
|
||||
],
|
||||
"sbom": [],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -8,6 +8,5 @@
|
||||
"plc-control-logic:plc-insecure-protocol-port mixer_ld.xml:7",
|
||||
"plc-control-logic:plc-insecure-protocol-port mixer_ld.xml:8"
|
||||
],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -10,6 +10,5 @@
|
||||
"plc-control-logic:plc-insecure-protocol-port traffic_light.st:45",
|
||||
"plc-control-logic:plc-safety-bypass traffic_light.st:59"
|
||||
],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -20,6 +20,5 @@
|
||||
"plc-control-logic:plc-safety-bypass pump_station.st:37",
|
||||
"plc-control-logic:plc-unstructured-jump pump_station.st:45"
|
||||
],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -9,16 +9,10 @@
|
||||
"gitleaks:gitlab-pat service.env:4",
|
||||
"ruff:E722 app.py:45",
|
||||
"ruff:F401 app.py:4",
|
||||
"semgrep:cra-ai-1-tls-verify-disabled auth.py:12"
|
||||
"semgrep:cra-ai-1-tls-verify-disabled auth.py:12",
|
||||
"semgrep:cra-ai-20-python-shell-command app.py:32",
|
||||
"semgrep:cra-ai-20-python-unsafe-deserialization app.py:16",
|
||||
"semgrep:cra-ai-8-python-hardcoded-credential auth.py:7"
|
||||
],
|
||||
"cves": [],
|
||||
"registry_rules": [
|
||||
"generic.secrets.security.detected-generic-secret.detected-generic-secret",
|
||||
"python.flask.security.injection.subprocess-injection.subprocess-injection",
|
||||
"python.flask.security.insecure-deserialization.insecure-deserialization",
|
||||
"python.lang.security.audit.subprocess-shell-true.subprocess-shell-true",
|
||||
"python.lang.security.dangerous-subprocess-use.dangerous-subprocess-use",
|
||||
"python.lang.security.deserialization.avoid-pyyaml-load.avoid-pyyaml-load",
|
||||
"python.requests.security.disabled-cert-validation.disabled-cert-validation"
|
||||
]
|
||||
"cves": []
|
||||
}
|
||||
@@ -10,7 +10,10 @@
|
||||
"findings": [
|
||||
"gitleaks:generic-api-key auth.py:7",
|
||||
"gitleaks:gitlab-pat service.env:4",
|
||||
"semgrep:cra-ai-1-tls-verify-disabled auth.py:12"
|
||||
"semgrep:cra-ai-1-tls-verify-disabled auth.py:12",
|
||||
"semgrep:cra-ai-20-python-shell-command app.py:32",
|
||||
"semgrep:cra-ai-20-python-unsafe-deserialization app.py:16",
|
||||
"semgrep:cra-ai-8-python-hardcoded-credential auth.py:7"
|
||||
],
|
||||
"cves": [
|
||||
"GHSA-2xpw-w6gg-jr37",
|
||||
@@ -37,6 +40,7 @@
|
||||
"GHSA-qccp-gfcp-xxvc",
|
||||
"GHSA-r64q-w8jr-g9qp",
|
||||
"GHSA-v845-jxx5-vc9f",
|
||||
"GHSA-vxq7-64xx-v4gw",
|
||||
"GHSA-wqvq-5m8c-6g24",
|
||||
"GHSA-x84v-xcm2-53pg",
|
||||
"PYSEC-2018-28",
|
||||
@@ -65,14 +69,5 @@
|
||||
"PYSEC-2026-1998",
|
||||
"PYSEC-2026-1999",
|
||||
"PYSEC-2026-2275"
|
||||
],
|
||||
"registry_rules": [
|
||||
"generic.secrets.security.detected-generic-secret.detected-generic-secret",
|
||||
"python.flask.security.injection.subprocess-injection.subprocess-injection",
|
||||
"python.flask.security.insecure-deserialization.insecure-deserialization",
|
||||
"python.lang.security.audit.subprocess-shell-true.subprocess-shell-true",
|
||||
"python.lang.security.dangerous-subprocess-use.dangerous-subprocess-use",
|
||||
"python.lang.security.deserialization.avoid-pyyaml-load.avoid-pyyaml-load",
|
||||
"python.requests.security.disabled-cert-validation.disabled-cert-validation"
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,10 @@
|
||||
"gitleaks:gitlab-pat service.env:4",
|
||||
"ruff:E722 app.py:45",
|
||||
"ruff:F401 app.py:4",
|
||||
"semgrep:cra-ai-1-tls-verify-disabled auth.py:12"
|
||||
"semgrep:cra-ai-1-tls-verify-disabled auth.py:12",
|
||||
"semgrep:cra-ai-20-python-shell-command app.py:32",
|
||||
"semgrep:cra-ai-20-python-unsafe-deserialization app.py:16",
|
||||
"semgrep:cra-ai-8-python-hardcoded-credential auth.py:7"
|
||||
],
|
||||
"cves": [
|
||||
"GHSA-2xpw-w6gg-jr37",
|
||||
@@ -39,6 +42,7 @@
|
||||
"GHSA-qccp-gfcp-xxvc",
|
||||
"GHSA-r64q-w8jr-g9qp",
|
||||
"GHSA-v845-jxx5-vc9f",
|
||||
"GHSA-vxq7-64xx-v4gw",
|
||||
"GHSA-wqvq-5m8c-6g24",
|
||||
"GHSA-x84v-xcm2-53pg",
|
||||
"PYSEC-2018-28",
|
||||
@@ -67,14 +71,5 @@
|
||||
"PYSEC-2026-1998",
|
||||
"PYSEC-2026-1999",
|
||||
"PYSEC-2026-2275"
|
||||
],
|
||||
"registry_rules": [
|
||||
"generic.secrets.security.detected-generic-secret.detected-generic-secret",
|
||||
"python.flask.security.injection.subprocess-injection.subprocess-injection",
|
||||
"python.flask.security.insecure-deserialization.insecure-deserialization",
|
||||
"python.lang.security.audit.subprocess-shell-true.subprocess-shell-true",
|
||||
"python.lang.security.dangerous-subprocess-use.dangerous-subprocess-use",
|
||||
"python.lang.security.deserialization.avoid-pyyaml-load.avoid-pyyaml-load",
|
||||
"python.requests.security.disabled-cert-validation.disabled-cert-validation"
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,10 @@
|
||||
"gitleaks:gitlab-pat service.env:4",
|
||||
"ruff:E722 app.py:45",
|
||||
"ruff:F401 app.py:4",
|
||||
"semgrep:cra-ai-1-tls-verify-disabled auth.py:12"
|
||||
"semgrep:cra-ai-1-tls-verify-disabled auth.py:12",
|
||||
"semgrep:cra-ai-20-python-shell-command app.py:32",
|
||||
"semgrep:cra-ai-20-python-unsafe-deserialization app.py:16",
|
||||
"semgrep:cra-ai-8-python-hardcoded-credential auth.py:7"
|
||||
],
|
||||
"cves": [
|
||||
"GHSA-2xpw-w6gg-jr37",
|
||||
@@ -39,6 +42,7 @@
|
||||
"GHSA-qccp-gfcp-xxvc",
|
||||
"GHSA-r64q-w8jr-g9qp",
|
||||
"GHSA-v845-jxx5-vc9f",
|
||||
"GHSA-vxq7-64xx-v4gw",
|
||||
"GHSA-wqvq-5m8c-6g24",
|
||||
"GHSA-x84v-xcm2-53pg",
|
||||
"PYSEC-2018-28",
|
||||
@@ -67,14 +71,5 @@
|
||||
"PYSEC-2026-1998",
|
||||
"PYSEC-2026-1999",
|
||||
"PYSEC-2026-2275"
|
||||
],
|
||||
"registry_rules": [
|
||||
"generic.secrets.security.detected-generic-secret.detected-generic-secret",
|
||||
"python.flask.security.injection.subprocess-injection.subprocess-injection",
|
||||
"python.flask.security.insecure-deserialization.insecure-deserialization",
|
||||
"python.lang.security.audit.subprocess-shell-true.subprocess-shell-true",
|
||||
"python.lang.security.dangerous-subprocess-use.dangerous-subprocess-use",
|
||||
"python.lang.security.deserialization.avoid-pyyaml-load.avoid-pyyaml-load",
|
||||
"python.requests.security.disabled-cert-validation.disabled-cert-validation"
|
||||
]
|
||||
}
|
||||
@@ -12,7 +12,10 @@
|
||||
"gitleaks:gitlab-pat service.env:4",
|
||||
"ruff:E722 app.py:45",
|
||||
"ruff:F401 app.py:4",
|
||||
"semgrep:cra-ai-1-tls-verify-disabled auth.py:12"
|
||||
"semgrep:cra-ai-1-tls-verify-disabled auth.py:12",
|
||||
"semgrep:cra-ai-20-python-shell-command app.py:32",
|
||||
"semgrep:cra-ai-20-python-unsafe-deserialization app.py:16",
|
||||
"semgrep:cra-ai-8-python-hardcoded-credential auth.py:7"
|
||||
],
|
||||
"cves": [
|
||||
"GHSA-2xpw-w6gg-jr37",
|
||||
@@ -39,6 +42,7 @@
|
||||
"GHSA-qccp-gfcp-xxvc",
|
||||
"GHSA-r64q-w8jr-g9qp",
|
||||
"GHSA-v845-jxx5-vc9f",
|
||||
"GHSA-vxq7-64xx-v4gw",
|
||||
"GHSA-wqvq-5m8c-6g24",
|
||||
"GHSA-x84v-xcm2-53pg",
|
||||
"PYSEC-2018-28",
|
||||
@@ -67,14 +71,5 @@
|
||||
"PYSEC-2026-1998",
|
||||
"PYSEC-2026-1999",
|
||||
"PYSEC-2026-2275"
|
||||
],
|
||||
"registry_rules": [
|
||||
"generic.secrets.security.detected-generic-secret.detected-generic-secret",
|
||||
"python.flask.security.injection.subprocess-injection.subprocess-injection",
|
||||
"python.flask.security.insecure-deserialization.insecure-deserialization",
|
||||
"python.lang.security.audit.subprocess-shell-true.subprocess-shell-true",
|
||||
"python.lang.security.dangerous-subprocess-use.dangerous-subprocess-use",
|
||||
"python.lang.security.deserialization.avoid-pyyaml-load.avoid-pyyaml-load",
|
||||
"python.requests.security.disabled-cert-validation.disabled-cert-validation"
|
||||
]
|
||||
}
|
||||
@@ -5,6 +5,5 @@
|
||||
],
|
||||
"sbom": [],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -7,6 +7,5 @@
|
||||
],
|
||||
"sbom": [],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -5,6 +5,5 @@
|
||||
],
|
||||
"sbom": [],
|
||||
"findings": [],
|
||||
"cves": [],
|
||||
"registry_rules": []
|
||||
"cves": []
|
||||
}
|
||||
@@ -339,8 +339,8 @@
|
||||
"sast_rule_ids": [
|
||||
"github-pat",
|
||||
"slack-bot-token",
|
||||
"python.lang.security.audit.subprocess-shell-true.subprocess-shell-true",
|
||||
"javascript.lang.security.detect-child-process.detect-child-process"
|
||||
"cra-ai-20-python-shell-command",
|
||||
"cra-ai-20-node-shell-command"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -361,8 +361,8 @@
|
||||
"sast_rule_ids": [
|
||||
"github-pat",
|
||||
"slack-bot-token",
|
||||
"python.lang.security.audit.subprocess-shell-true.subprocess-shell-true",
|
||||
"javascript.lang.security.detect-child-process.detect-child-process"
|
||||
"cra-ai-20-python-shell-command",
|
||||
"cra-ai-20-node-shell-command"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user