Commit Graph
15 Commits
Author SHA1 Message Date
sharangandClaude Opus 5.5 d406741907 feat(sast): vendored MIT semgrep packs and a guard against registry rules (#492) (#504)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m13s
CI / Deploy Agent (push) Successful in 6m21s
Our ~35 own rules left whole languages without SAST findings. Three
permissively licensed community packs now run next to them, on the same
semgrep invocation (--metrics=off, local files only):

- GitLab sast-rules v2.10.1 (53bf5cf6): 148 rules for C#, Java,
  JavaScript/TypeScript, Python and one Go rule; only files whose header says
  "License: MIT (c) GitLab Inc.". Not vendored: c/ (every file GPL-2.0,
  generated from flawfinder), go/ apart from one file (Apache-2.0 gosec
  ports), scala/, rules/lgpl, rules/lgpl-cc (Commons Clause), rules/gitlab (EE).
- 0xdea semgrep-rules (dae50da6, MIT): 35 C/C++ rules.
- elttam semgrep-rules (24426856, MIT; its LICENSE carries the Semgrep
  template's copyright line): 34 rules for Java, Go and Struts/Spring XML.

Each pack lives in compliance-agent/rules/vendor/<source>/ with LICENSE,
NOTICE (provenance, what was left out and why) and UPSTREAM (pinned commit):
upstream/ holds the selected files unchanged with their tests, pack.yaml the
rules the agent runs, ids prefixed per source (gitlab-, 0xdea-, elttam-),
rules.json an index for the tests. scripts/vendor-semgrep-rules.py
regenerates all of it deterministically.

Provenance: every candidate rule was compared with the Semgrep registry
(semgrep/semgrep-rules, read only for the comparison). Eight GitLab Python/JS
rules with the same message or the same patterns are not vendored, nor are
elttam's Kubernetes rules (registry-derived). Also left out: elttam's
entrypoint enumerators, its ORM-leak hints, three files whose upstream
tests fail on semgrep 1.177 and a join-mode rule.

Noise budget: run over the nightly fixtures, the public samples and
FreeRTOS-Kernel, lwIP, OpenRA, eShopOnWeb, requests, express and
spring-petclinic. 15 rules that flood real code (0xdea missing-return 1514
hits, typos 989, interesting-api-calls 718, signed-unsigned-conversion 221,
suspicious-assert 176, format-string-bugs 61 ...; GitLab assert-used) are
dropped from the pack, each listed with its reason in NOTICE. CPU time of
the semgrep run roughly doubles on C-heavy trees (FreeRTOS-Kernel 70 s ->
136 s, lwIP 18 s -> 68 s), well inside the 10-minute stage timeout.

Ids stay bare (#473 logic covers the vendored ids, fingerprint() unchanged).
The control map gets one vendored semgrep binding per control, by CWE (by
rule id for the few elttam rules without one), with exactly the languages of
the rules behind it; a test checks every vendored rule maps to a control
that claims its languages.

Guard: semgrep_args() builds the one invocation; a test fails if any
--config is not a staged local pack, or is auto, p/, r/ or a URL, and
another scans the agent source, scripts, docker/, CI and Dockerfile.agent for
a registry config.

Nightly baselines with C, Python, C# or JS code change and need a bless run
after the image is deployed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-06 12:22:50 +00:00
sharangandClaude Opus 5.5 f170e7cfe5 feat(cve): KEV, EPSS and Vulnrichment exploitation on every CVE alert (#493) (#500)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m28s
CI / Deploy MCP (push) Successful in 4m56s
CI / Deploy Agent (push) Successful in 12m8s
CI / Deploy Dashboard (push) Successful in 16m34s
Every CVE alert, and the SBOM's reference to the same advisory, now says
whether the CVE is exploited: its entry in CISA's KEV catalog (date added,
known ransomware use), FIRST's EPSS score and percentile, and the SSVC
exploitation decision of CISA's Vulnrichment.

- pipeline/cve_enrichment.rs reads KEV (one JSON, at most daily), EPSS
  (FIRST API, 50 CVE ids per request) and Vulnrichment (per-CVE record on
  raw.githubusercontent.com, a 404 is an answer) through guarded_net. Only
  CVE ids leave the agent. Bounded: 500 uncached CVEs, 8 at once, 2 min.
- Answers are cached a day for all tenants in <prefix>__admin
  (cve_exploitation per CVE, cisa_kev for the catalog), TTL index like the
  NuGet licence cache. A failed source stays unknown, is not cached and
  never fails the scan. CVE_EXPLOIT_LOOKUP=false turns it off.
- Runs in the scan (after the CVE stage), the PLC control-app path and the
  hourly CVE monitor (which now refreshes an existing alert's exploitation).
- CVE issues (#452): a KEV CVE always opens an issue, rated at least high;
  an EPSS percentile at or above CVE_ISSUE_EPSS_PERCENTILE (default 0.95)
  rates it one step higher. The body names KEV, EPSS (with FIRST's credit)
  and SSVC.
- LLM triage: a finding that names a CVE gets its exploitation in the
  prompt. No scanner sets Finding.cve today, so this is a hook for now.
- Dashboard: "Aktiv ausgenutzt (KEV)" and "EPSS … · P…" badges on the SBOM
  page's CVE cards, a KEV marker on the row, SSVC line, EPSS attribution.
- Docs: tools.md section and egress rows, SBOM and issues guides, staging
  check 18. Tests run on trimmed real fixtures and a loopback stand-in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-06 11:08:47 +00:00
sharang bdf7fa4268 feat(sbom): npm and Maven licenses from their public registries (#467 follow-up) (#490)
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 4m47s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m8s
2026-10-06 09:17:32 +00:00
sharang d960ba658e feat(malware): ClamAV stage, committed-binary inventory, unchanged rescans skipped (#465) (#488)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m11s
CI / Deploy MCP (push) Successful in 4m37s
CI / Deploy Dashboard (push) Successful in 6m31s
CI / Deploy Agent (push) Successful in 8m3s
2026-10-06 08:49:39 +00:00
sharang 5b2deec9e8 feat(ios): secrets in UserDefaults, URL schemes and permissions of iOS apps (#479)
CI / Deploy Agent (push) Successful in 7m29s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy Dashboard (push) Successful in 5m51s
2026-10-05 23:35:23 +00:00
sharangandClaude Opus 5.5 5fdf80a1e0 fix(cve): OSV and NVD lookups go through guarded_net (#469) (#476)
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 7m26s
CI / Deploy Docs (push) Successful in 1m10s
The CVE scanner asked api.osv.dev (querybatch, vulns/{id}) and NVD (per
CVE, per CPE product) with the agent's plain HTTP client. Every other
outbound call to an address the agent does not fully control is already
guarded, and since #468 the nuget.org license lookup is too.

New pipeline/public_http.rs (PublicHttp), the nuget_license pattern:
a guarded_client_builder client (approved addresses only, redirects
re-checked, no proxy), NetGuard::check_url before every request, 10 s
per request, 5 s connect, bodies capped at 16 MiB. CveScanner and
nvd_cpe::product_cves use it. NVD requests keep 30 s, as on the old
shared client (a product query returns up to 2,000 CVEs). A URL the
guard refuses is not retried.

CveScanner::new takes the agent's NetGuard instead of a client. The
dead search_context (SearXNG) is removed: it was never called, and an
internal SearXNG would be refused by the guard anyway. The orchestrator's
http field had no other user and is gone.

Audited every other reqwest client in compliance-agent. The LLM gateway,
tenant registry, OSCAL backend, GitLab/Jira trackers, identity providers
(pentest cleanup) and headless Chrome are operator-configured and often
internal, so they stay on plain clients. docs/reference/tools.md now
lists all egress in one place.

Tests: the OSV stand-in on loopback is refused with a public-only guard
(no request reaches it) and answers with allow_private. An NVD product
query to loopback is refused and not retried. check_url refuses
loopback, RFC 1918, link-local and metadata addresses, and a name that
resolves to loopback is refused when connecting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 23:15:12 +00:00
sharangandClaude Opus 5.5 34688fa322 feat(sbom): NuGet licenses from .nuspec files, then nuget.org (#468)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m9s
CI / Deploy Agent (push) Successful in 4m44s
CI / Check (push) Skipped
NuGet SBOM entries carried no license: none of the files they come from
names one. Fill it in after the NuGet components are merged (#467):

- local first: the .nuspec of a restored package; <license
  type="expression"> as SPDX, type="file" as LicenseRef-file, an old
  <licenseUrl> mapped to SPDX for well-known license pages, else kept
- then nuget.org: registration leaf (gzip) -> catalogEntry (inline or
  linked on api.nuget.org) -> licenseExpression / licenseFile / licenseUrl
- only real ids at exact versions (no ranges, no DLL-metadata names);
  versions normalised as nuget.org files them (6.2.0.0 -> 6.2.0, 2.0 ->
  2.0.0)
- ids a nuget.config maps to another feed are never sent; a tree whose
  nuget.config lists another feed without a mapping is not looked up
- through guarded_net, 8 at once, 10 s per request, 60 s and 300
  uncached packages per scan; failures stay empty, one warning per scan
- cached across tenants in the admin database (nuget_licenses, TTL: a
  year for a license, a week for none)
- NUGET_LICENSE_LOOKUP=false turns the nuget.org step off

Closes #467

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 21:50:32 +00:00
sharang 2cbd98e5c0 feat(git): bounded clones, Git LFS made visible, app build output left out (#450)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy Dashboard (push) Successful in 5m33s
CI / Deploy MCP (push) Successful in 4m11s
CI / Deploy Agent (push) Successful in 7m27s
2026-10-05 14:05:19 +00:00
sharang a9ca31d60c feat(sast): Android and iOS app analysis with mobsfscan (#442)
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Canceled after 0s
CI / Deploy Docs (push) Canceled after 0s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 9m28s
2026-10-05 13:38:45 +00:00
sharangandClaude Opus 5.5 a66b7a5991 fix(sast): run only our own semgrep rules, no registry rules or metrics (#441)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m11s
CI / Deploy Agent (push) Successful in 4m35s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 13:03:43 +00:00
sharang 6d8e63c226 feat(help): readable assistant answers, German UI, and docs that match the pilot product (#424)
CI / Deploy Agent (push) Successful in 7m24s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m20s
CI / Deploy Dashboard (push) Successful in 5m34s
CI / Deploy MCP (push) Successful in 4m26s
2026-09-28 22:39:06 +00:00
sharang 710fdcab6f docs: rebrand Certifai → Prüfwerk (user-facing name) (#243)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m13s
2026-09-02 08:00:12 +00:00
sharang 53bd93c96e docs: align tool inventory with what actually runs (no Grype, no ZAP/nuclei) (#233)
CI / Check (push) Canceled after 0s
CI / Detect Changes (push) Canceled after 0s
CI / Deploy Agent (push) Canceled after 0s
CI / Deploy Dashboard (push) Canceled after 0s
CI / Deploy Docs (push) Canceled after 0s
CI / Deploy MCP (push) Canceled after 0s
2026-08-31 15:58:11 +00:00
sharang 1aba85b28e docs(plc): PLC Runtime Landscape reference + support watch-list (#185)
CI / Check (push) Has been skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Has been skipped
CI / Deploy Dashboard (push) Has been skipped
CI / Deploy Docs (push) Successful in 49s
CI / Deploy MCP (push) Has been skipped
2026-07-16 22:05:39 +00:00
sharang 3ec1456b0d docs: rewrite user-facing documentation with screenshots (#11)
CI / Clippy (push) Successful in 4m56s
CI / Security Audit (push) Successful in 1m48s
CI / Tests (push) Successful in 5m36s
CI / Deploy MCP (push) Has been skipped
CI / Format (push) Successful in 6s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 2s
CI / Deploy Dashboard (push) Successful in 2s
CI / Deploy Docs (push) Successful in 3s
2026-03-11 15:26:00 +00:00