Compare commits

...
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 fbc1ba0362 fix(dashboard): CRA panel first on narrow screens, no id-column indent
CI / Deploy Agent (pull_request) Skipped
CI / Check (push) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m32s
CI / Detect Changes (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Check (pull_request) Successful in 22m47s
CI / Deploy MCP (pull_request) Skipped
Found rendering the map against the mockup: on a phone the open
requirement sat below all forty chips, the reasons and findings kept the
indent of the removed id column, and the requirement chip on a finding
stretched across the row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
2026-11-27 23:23:14 +01:00
Sharang ParnerkarandClaude Opus 5.5 ade1191070 fix(agent): CVE tickets name the CRA requirements, not their ids
The CRA section of a CVE issue listed cra-ai-22 and cra-ai-33 with the
catalog titles; it now reads like the finding issues, by the requirement
names in both languages, through the same helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
2026-11-27 23:23:14 +01:00
Sharang ParnerkarandClaude Opus 5.5 9119dcdd9d feat(dashboard): CRA requirements by name, no off-site advisory links
The 40 CRA Annex I requirements are shown by a name customers read
("Keine Standardpasswörter") instead of cra-ai-N, grouped by area on a
map; a requirement opens beside it with what red, orange and green mean
for that requirement, or the document that proves it.

- compliance-core: cra_requirements table (names, state meanings, proof
  documents, DE/EN) and AdvisoryRef::required_backlink (Siemens only)
- dashboard: CRA map with area cards and side panel; names in the
  compliance list, findings list and finding detail; "not checked yet" is
  grey, orange means partly checked only
- no links to OSV, GHSA, NVD or other advisory sites: CVE and advisory
  ids get a copy button; only a provider whose terms require a backlink
  keeps a "Quelle" link; off-site links in rendered markdown become text
- agent: ticket texts name requirements; CVE tickets and notifications
  no longer carry an osv.dev link; findings.csv adds requirement names
- machine-readable exports (CSAF, VEX, OSCAL, JSON) keep the ids

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
2026-11-27 23:23:14 +01:00
sharangandClaude Opus 5.5 87b1e281ed fix(vex): a CVE a scan no longer finds is not stated fixed (#994) (#1015)
CI / Deploy Agent (push) Successful in 8m42s
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m14s
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Successful in 2m42s
CI / Deploy Docs (push) Successful in 1m19s
A scan never states VEX `fixed`. When a scan stops finding a CVE, its tracker issue stays open and gets one comment; a person closes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
2026-11-27 22:23:03 +00:00
sharangandSharang Parnerkar ddb0068b3e chore(deps): cookie 0.18.3 and url 2.5.9 for two new advisories (#1075)
CI / Deploy Agent (push) Successful in 12m29s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 14m6s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Successful in 6m3s
This PR changes only `Cargo.lock`, to fix `cargo audit`. The audit currently fails the Check job on every PR, including #1015 and #1074, because of two advisories published since the last main build:

- **RUSTSEC-2026-0594**, `cookie` 0.18.1 → 0.18.3: private cookie nonces can repeat in processes that fork. Medium, 6.5.
- **RUSTSEC-2026-0592**, `url` 2.5.8 → 2.5.9: stack overflow in `Url::origin()` on nested `blob:` URLs. `form_urlencoded` moves from 1.2.2 to 1.2.3 with it.

**Checks**
- Locally, `cargo audit` reports no vulnerabilities, only the 14 allowed warnings.
- `cargo check` passes for agent, MCP and dashboard (server).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
Co-authored-by: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com>
Reviewed-on: #1075
2026-11-27 21:59:51 +00:00
sharang f5848f7bad chore(release): workspace crates at 0.4.17 (#1073)
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 7m11s
CI / Deploy MCP (push) Successful in 4m54s
CI / Deploy Agent (push) Successful in 9m10s
CI / Detect Changes (push) Successful in 4s
2026-11-20 11:56:52 +00:00
sharang d9280939e2 feat(supply-chain): a supplier's box says how it delivers (#1028) (#1072)
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 3m46s
CI / Deploy Agent (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Skipped
2026-11-20 11:32:18 +00:00
sharang 600a8f0dd7 fix(dashboard): a release page of an unknown target says so (#1028) (#1071)
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 3m54s
CI / Deploy Agent (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Agent integration (push) Skipped
2026-11-20 10:50:03 +00:00
sharang f59dae4a66 feat(supply-chain): the Lieferkette draws a supplier's release (#1028) (#1070)
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m13s
CI / Deploy Dashboard (push) Successful in 5m50s
CI / Deploy Agent (push) Successful in 8m4s
2026-11-20 10:50:02 +00:00
sharang ae5d8f1ca8 feat(dashboard): what suppliers offer, the customer's offer screen (#1028) (#1069)
CI / Detect Changes (push) Successful in 2s
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m55s
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Agent integration (push) Skipped
2026-11-19 22:19:46 +00:00
sharang 7478ff57df feat(offers): an open offer names the version accepting delivers (#1028) (#1068)
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m7s
CI / Deploy Agent (push) Successful in 5m40s
CI / Deploy Dashboard (push) Skipped
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
2026-11-19 21:56:04 +00:00
sharang a252096810 feat(dashboard): where a target's SBOM goes, the supplier's release screen (#1028) (#1067)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m51s
CI / Deploy Docs (push) Skipped
2026-11-19 17:58:33 +00:00
sharang d3500d4be4 feat(releases): the next version's draft and each version's customers (#1028) (#1066)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 9m7s
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m55s
CI / Deploy MCP (push) Successful in 4m56s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m11s
2026-11-19 17:36:22 +00:00
sharang 9da4d83ed0 feat(delivery): published SBOM versions reach the customers who accepted (#1028) (#1065)
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Successful in 1m11s
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 5m55s
2026-11-19 16:21:44 +00:00
sharang 20d56d2301 feat(offers): the customer is offered a supplier's release and answers it (#1028) (#1064)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Successful in 7m39s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m18s
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
2026-11-19 13:10:21 +00:00
sharang c8a13fecad feat(releases): release a target to a connected workspace and publish versions (#1028) (#1063)
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 6m59s
CI / Deploy Docs (push) Successful in 1m11s
CI / Check (push) Skipped
2026-11-19 12:35:08 +00:00
sharang fb8223bc11 feat(registry): connections between workspaces in the registry client (#1028) (#1062)
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Successful in 7m29s
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
2026-11-19 12:12:02 +00:00
sharang 835bc3fc98 fix(dashboard): the Lieferkette's document links go to the portal's origin (#1054) (#1061)
CI / Detect Changes (push) Successful in 3s
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m47s
CI / Check (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Deploy Docs (push) Skipped
2026-11-19 11:32:21 +00:00
sharang f06a347dd7 feat(dashboard): fold the Lieferkette's components in no product (#1050) (#1060)
CI / Deploy Docs (push) Successful in 1m12s
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 5m45s
CI / Deploy Agent (push) Successful in 7m47s
CI / Agent integration (push) Skipped
2026-11-19 10:57:55 +00:00
sharang 1376efa249 feat(supply-chain): a product's description and documents on its box (#1054) (#1059)
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Successful in 7m21s
CI / Deploy Docs (push) Successful in 1m10s
CI / Deploy Dashboard (push) Successful in 3m53s
2026-11-19 10:35:22 +00:00
sharang 40fb69072e feat(dashboard): the Lieferkette's first steps as ghost boxes (#1050) (#1058)
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m1s
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Agent (push) Skipped
2026-11-19 10:12:15 +00:00
sharang d979fc1644 feat(dashboard): the Lieferkette page (#1053) (#1057)
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m16s
CI / Deploy Agent (push) Successful in 9m7s
CI / Deploy Docs (push) Successful in 1m11s
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
2026-11-19 09:46:09 +00:00
sharang bc73a61f96 feat(supply-chain): keep the customer's arrangement (#1052) (#1056)
CI / Deploy Agent (push) Successful in 5m41s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
2026-11-19 09:23:27 +00:00
sharang 240c4d734a feat(supply-chain): the supply chain as a graph (#1051) (#1055)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 8m2s
CI / Deploy MCP (push) Successful in 5m26s
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Successful in 10m36s
2026-11-19 08:59:46 +00:00
sharang 019ea73e86 feat(sbom): the stripped SBOM a supplier workspace releases (#1028) (#1049)
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m59s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 8m56s
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 5m5s
2026-11-19 07:55:09 +00:00
sharang 497318e50d feat(supplier): the supplier uploads an SBOM through its invite (#1027) (#1048)
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Successful in 1m6s
CI / Deploy Agent (push) Successful in 5m49s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
2026-11-18 11:55:19 +00:00
sharang dc14c77e84 feat(supplier): the portal invites a supplier for one component (#1027) (#1047)
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Successful in 1m8s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Successful in 5m51s
2026-11-18 11:32:59 +00:00
sharang 31b8cb9d37 fix(onboarding): a scan the target runs is listed once among its applicable scans (#1043) (#1046)
CI / Deploy Agent (push) Successful in 5m53s
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
2026-11-17 16:46:32 +00:00
sharang c222210a87 fix(scans): a supplier-SBOM-only target's skipped code reads as such, not as the Yocto recipe note (#1042) (#1044)
CI / Detect Changes (push) Successful in 3s
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m49s
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 6m56s
2026-11-17 12:59:53 +00:00
sharang 832f9b13e1 fix(cve): an alert keeps when it was first found when a scan reports it again (#1041) (#1045)
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 5m59s
CI / Deploy Dashboard (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Skipped
2026-11-17 12:59:51 +00:00
sharang eff6f92a33 feat(dashboard): a machine's page, its parts, CVEs and history (#1026) (#1038)
CI / Deploy Dashboard (push) Successful in 5m42s
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m7s
CI / Deploy Agent (push) Successful in 7m50s
2026-11-17 12:21:07 +00:00
sharang 6f42fbd583 feat(api): the machine page's overview, CVEs and history (#1026) (#1037)
CI / Deploy Agent (push) Successful in 8m35s
CI / Deploy Docs (push) Successful in 1m9s
CI / Deploy Dashboard (push) Successful in 6m9s
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 2m54s
2026-11-17 11:57:04 +00:00
sharang 90d5c8f8d1 fix(deps): libz-sys 1.1.33, past its heap buffer overflow (RUSTSEC-2026-0544) (#1039)
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 8m48s
CI / Deploy Dashboard (push) Successful in 6m35s
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Successful in 4m59s
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Skipped
2026-11-17 11:35:01 +00:00
sharang b5a2dd93fd feat(dashboard): bought-in components with their supplier's SBOM and VEX (#1025) (#1035)
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m4s
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Successful in 4m32s
CI / Deploy Agent (push) Successful in 5m53s
2026-11-17 10:13:59 +00:00
sharang 72ef09b981 feat(sbom): a machine's SBOM, its parts with their suppliers (#1026) (#1036)
CI / Deploy MCP (push) Successful in 5m21s
CI / Deploy Docs (push) Successful in 1m9s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 7m11s
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Successful in 9m19s
2026-11-17 10:10:36 +00:00
sharang 684d3514ab feat(csaf): count a target's supplier advisories, with the provider's last read (#1025) (#1034)
CI / Deploy Docs (push) Successful in 1m11s
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 6m45s
CI / Agent integration (push) Skipped
2026-11-17 09:51:45 +00:00
sharang 0790810afb feat(sbom): check a supplier SBOM before a target holds it (#1025) (#1033)
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 6m46s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m8s
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Skipped
2026-11-17 09:29:56 +00:00
sharang af76e516a1 feat(vex): what a supplier states about its component's vulnerabilities (#1025) (#1032)
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m45s
CI / Deploy Docs (push) Successful in 1m11s
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 4m57s
CI / Deploy Agent (push) Successful in 8m53s
2026-11-16 23:09:27 +00:00
sharang 7d0ccd7171 feat(csaf): a bought-in component's supplier CSAF advisories, kept per tenant (#1025) (#1031)
CI / Deploy Docs (push) Successful in 1m9s
CI / Deploy Dashboard (push) Successful in 6m23s
CI / Deploy Agent (push) Successful in 8m46s
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 2m33s
CI / Detect Changes (push) Successful in 4s
CI / Agent integration (push) Skipped
2026-11-16 22:45:45 +00:00
sharang d679f9cbf1 feat(api): the OpenAPI description covers the pentest routes (#1006) (#1024)
CI / Deploy Agent (push) Successful in 6m1s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
2026-11-16 22:25:56 +00:00
sharang 55091fe02e feat(sbom): a supplier's SBOM of a bought-in component is scanned for known CVEs (#1025) (#1030)
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 3m5s
CI / Deploy Agent (push) Successful in 7m50s
CI / Deploy Docs (push) Successful in 1m8s
CI / Deploy Dashboard (push) Successful in 5m45s
2026-11-16 22:23:22 +00:00
sharang 97b8e35a87 feat(api): the OpenAPI description covers the inbox routes (#1006) (#1023)
CI / Deploy Agent (push) Successful in 7m4s
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
2026-11-16 22:03:15 +00:00
sharang e521c8fdd9 feat(api): the OpenAPI description covers health, workspace and support routes (#1006) (#1022)
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 6m2s
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Agent integration (push) Skipped
2026-11-16 21:42:10 +00:00
sharang 126345aa9d feat(api): the OpenAPI description covers compliance, evidence and manual findings (#1006) (#1021)
CI / Deploy Agent (push) Successful in 5m32s
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Skipped
2026-11-16 20:22:02 +00:00
sharang 8ae561a01a feat(api): the OpenAPI description covers notifications, MCP, tickets and scan runs (#1006) (#1020)
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Successful in 5m36s
CI / Deploy Docs (push) Skipped
2026-11-16 19:09:51 +00:00
sharang 668b6814c8 chore(release): workspace crates at 0.4.16 (#1019)
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Successful in 3m21s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 5m44s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 3m36s
2026-11-16 18:06:02 +00:00
sharang 48b1a4a47d feat(api): the OpenAPI description covers the code graph and chat routes (#1006) (#1017)
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 5m43s
CI / Deploy Docs (push) Skipped
2026-11-16 17:40:52 +00:00
sharang bde53a96dd feat(api): the OpenAPI description covers the SBOM and licence routes (#1006) (#1016)
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Successful in 5m45s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
2026-11-16 16:42:47 +00:00
sharang dcfac283e6 feat(api): the OpenAPI description covers the target routes (#1006) (#1014)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 5m46s
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
2026-11-16 15:45:28 +00:00
sharang 141176df20 feat(api): the OpenAPI description covers the finding routes (#1006) (#1013)
CI / Deploy Agent (push) Successful in 5m38s
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 3s
2026-11-16 15:14:53 +00:00
sharang 32332f65bb feat(api): the agent serves an OpenAPI description, starting with DAST (#1006) (#1012)
CI / Deploy Docs (push) Successful in 1m11s
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Successful in 4m56s
CI / Deploy Agent (push) Successful in 8m52s
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m45s
2026-11-16 13:10:26 +00:00
sharang 246e2c4ac5 feat(control-map): a missing Content-Security-Policy is evidence for cra-ai-1 (#998) (#1011)
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m9s
CI / Deploy Agent (push) Successful in 6m12s
2026-11-16 11:57:55 +00:00
sharang 98be82c0d0 feat(pipeline): a DAST finding links the code finding with its CWE (#998) (#1010)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 6m22s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Successful in 1m7s
CI / Check (push) Skipped
2026-11-16 11:46:47 +00:00
sharang 0ad8bbc3c9 feat(dast): every scan runs the header, CSP, cookie and TLS checks (#998) (#1009)
CI / Deploy Docs (push) Successful in 1m8s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 7m12s
2026-11-16 11:24:06 +00:00
sharang cdb84f0967 feat(pipeline): DAST findings are findings of the target (#998) (#1008)
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 5m47s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Successful in 1m7s
2026-11-16 11:01:25 +00:00
sharang 4f5d713bbc feat(pipeline): the DAST stage waits for its scans and records a failure (#998) (#1007)
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Successful in 1m6s
CI / Deploy Agent (push) Successful in 5m42s
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 3m43s
CI / Deploy Dashboard (push) Successful in 4m45s
2026-11-16 10:30:45 +00:00
sharang df16a49c93 fix(dast): robots.txt is an Info finding only when it names reachable sensitive paths (#1005)
CI / Deploy Agent (push) Successful in 5m48s
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
2026-11-16 08:16:51 +00:00
sharang 12206bfac5 fix(dast): each browser tab gets its own browser context (#1004)
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Successful in 5m48s
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
2026-11-16 08:16:50 +00:00
sharang f5ac5321bd feat(dast): scans log in with the target's credentials (#1000)
CI / Deploy Agent (push) Successful in 9m2s
CI / Deploy Dashboard (push) Successful in 6m48s
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m15s
CI / Deploy MCP (push) Successful in 5m14s
CI / Agent integration (push) Skipped
2026-11-16 02:31:38 +00:00
sharang fad023e734 fix(pentest): delete test users only in the target's identity provider (#999) (#1002)
CI / Deploy Docs (push) Successful in 1m9s
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Successful in 3m49s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 6m4s
CI / Deploy Dashboard (push) Successful in 4m55s
CI / Agent integration (push) Skipped
2026-11-14 10:43:00 +00:00
sharang 396cb3cd39 fix(issues): a null Gitea timeline page ends the list (#995) (#996)
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 6m41s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 3s
2026-11-14 10:40:40 +00:00
sharang 064bada213 chore(deps): quinn-udp 0.5.16 for RUSTSEC-2026-0538 (#1001)
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Successful in 9m47s
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 3m4s
CI / Deploy Dashboard (push) Successful in 7m47s
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 4s
2026-11-14 10:18:19 +00:00
sharangandClaude Opus 5.5 deda6d4867 chore(release): workspace crates at 0.4.15 (#992)
CI / Deploy MCP (push) Successful in 5m26s
CI / Deploy Dashboard (push) Successful in 7m50s
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Successful in 10m43s
CI / Detect Changes (push) Successful in 3s
The crate versions had stayed at 0.4.6 since the first releases; the
running version comes from the release tag. Bumping them to the release
also changes Cargo.toml and Cargo.lock, so the main build after merging
rebuilds the agent, dashboard and MCP images together for v0.4.15.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 17:18:39 +00:00
sharangandClaude Opus 5.5 783e075891 fix(dashboard): the Managed Git hint links one docs path in both languages (#980) (#991)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 3m56s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Skipped
On prod, DOCS_URL is the customer docs site, which keeps a page at the
same path under each language root and has no "-en" pages: the English
link to guide/managed-git-en would 404 there. Both languages now link
guide/managed-git.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 11:17:59 +00:00
sharangandClaude Opus 5.5 ea1b48dd37 feat(auth): Prüfwerk access for the RBAC step 4 roles (#989) (#990)
CI / Deploy MCP (push) Successful in 4m54s
CI / Deploy Agent (push) Successful in 9m1s
CI / Deploy Dashboard (push) Successful in 7m12s
CI / Detect Changes (push) Successful in 4s
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Successful in 1m11s
CI / Check (push) Skipped
Decided 2026-11-12: PSIRT and DEVELOPMENT get full access (they triage
findings and run scans); QUALITY, PURCHASING and AUDITOR read only;
PRIVACY and EXTERNAL none, as before. Each parses to its own OrgRole.
Admin-only actions (manual findings, git source, licence decisions) stay
with IT_ADMIN and OWNER; confirming a licence follows full access, so
PSIRT and DEVELOPMENT may confirm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 10:24:59 +00:00
sharangandClaude Opus 5.5 867453b63e fix(dashboard): the target editor fits the window, in sections (#987) (#988)
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m43s
CI / Deploy Agent (push) Skipped
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
The "Prüfobjekt bearbeiten" dialog was taller than a laptop window and
could not scroll, so its title and Save were out of reach; at 480px its
add-reference row squeezed five controls into one line.

Dialogs now stop at the window height and scroll, with the actions
pinned at the bottom. The target editor is 680px wide and split into
sections (artefacts, add a file, exclusions, projects); adding a
reference puts kind and reference on one line and branch, token and the
button on the next; the upload's archive password gets its own line;
the project picker reads as a section inside a dialog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 10:04:13 +00:00
sharangandClaude Opus 5.5 ca8a662b60 feat(sbom): explain an empty or incomplete SBOM with findings (#979) (#985)
CI / Detect Changes (push) Successful in 4s
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Successful in 5m55s
CI / Deploy Docs (push) Successful in 1m3s
CI / Deploy MCP (push) Successful in 2m44s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m46s
Source code without a manifest or lockfile gave an empty SBOM with no
explanation, which reads as "no libraries". Two findings of a new
sbom-coverage check now say why:

- sbom-no-manifest (Medium): code in a language with a package manager
  (Python, JS/TS, Rust, Go, Java/Kotlin, C#, PHP, Ruby, Dart) and no
  manifest or lockfile for it outside vendor directories, one per
  ecosystem. Never for C/C++, Yocto layers, or a tree whose components
  come from its sources (library headers, firmware, CODESYS).
- sbom-dependencies-unresolved (Low): a manifest whose dependencies were
  not resolved, one per manifest the SBOM stage already lists under
  sbom_dependencies; legacy build systems keep their own finding.

Each finding names a concrete way to add the missing file, maps to the
SBOM requirement (cra-ai-23, also bound in the control map) and closes at
the next scan that no longer reports it, as the check completes on every
code scan. Dart is now detected as a source language.

The SBOM page shows an explanation instead of an empty table: where the
SBOM comes from, the target's open findings with their examples and a
link, or a general example. The findings API takes a scanner filter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 09:21:59 +00:00
sharangandClaude Opus 5.5 fc72b6a1f4 feat(findings): copy a finding as ticket text, hint at Breakpilot Git (#980) (#984)
CI / Deploy Docs (push) Successful in 1m6s
CI / Deploy MCP (push) Successful in 4m58s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 9m5s
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Successful in 7m12s
The finding page gets an "Als Ticket-Text kopieren" button that copies
the finding as Markdown (title, severity, status, location, description,
the AI assessment, CRA-Themen and a link back to Prüfwerk), confirmed
with "Kopiert". The Markdown is built in Rust; JavaScript only writes it
to the clipboard.

Where the target opens no tickets on its own and the finding has none, a
hint says "Mit Breakpilot Git werden Tickets automatisch angelegt" and
links to connecting a tracker and to the Managed Git guide. The target's
CRA view now says whether a tracker is connected: one with a type is
configured, or the target came from a managed git source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 09:21:46 +00:00
sharangandClaude Opus 5.5 aa022b0d0f fix(auth): OWNER has IT_ADMIN's rights in Prüfwerk (#982) (#983)
CI / Deploy Docs (push) Successful in 1m17s
CI / Deploy Dashboard (push) Successful in 5m11s
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Successful in 4m7s
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Successful in 6m32s
CI / Check (push) Skipped
OrgRole::parse knew only IT_ADMIN, CXO, FINANCE, LEGAL and USER, so an
OWNER got no access at all. OWNER now parses to its own role with full
access, and what only an administrator may do (manual findings, the git
source, licence decisions) asks OrgRole::is_admin (IT_ADMIN or OWNER).
The other new RBAC bundles still get no access.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 09:09:48 +00:00
sharangandClaude Opus 5.5 5ea49661d0 fix(dashboard): CRA links read as technical hints, not a legal assessment (#978) (#981)
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 7m8s
CI / Deploy Agent (push) Successful in 9m1s
The scan phase "CRA-Anforderungen zuordnen" could read as legal advice.
It is now "Bezug zu CRA-Themen ermitteln (technischer Hinweis)"; the
finding detail says "CRA-Themen, auf die dieser Befund hinweist" and
"CRA-Themen (Anhang I)"; the CRA status page and the CRA tiles say
"Technische Hinweise, keine rechtliche Bewertung". The docs use the
same wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 09:02:53 +00:00
sharangandClaude Opus 5.5 f5697ff21d feat(scan): record which components each scan added, updated or removed (#974) (#975)
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 6m12s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m29s
CI / Deploy Agent (push) Successful in 8m13s
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Successful in 58s
Before a stage replaces its part of a target's SBOM (the code SBOM, the
CODESYS libraries, the firmware components), the entries it replaces are
compared with the new ones and the changes are added to the scan run
(`component_changes`, at most 5000; `None` on runs from before). A
component is its package manager and name; one version before and one
after is an update, otherwise each new version an addition and each gone
one a removal.

The Verlauf API joins them with the scan's CVEs: a new CVE goes with the
component now at its version, a gone one with the component that was at
its version, and what no change explains is an advisory row. The scan's
drill-down shows the mockup's table (neu / aktualisiert / entfernt / neue
Advisory, version before → after, CVEs +n −m) above the CVE list; scans
from before say the components were not recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 10:18:01 +00:00
sharangandClaude Opus 5.5 31886d226c feat(dashboard): CRA Annex I tiles and the scan history chart (#957) (#973)
CI / Detect Changes (push) Successful in 5s
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Successful in 4m7s
CI / Deploy Dashboard (push) Successful in 3m34s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 5m53s
CI / Deploy Docs (push) Successful in 1m7s
The two views the repo tabs still showed as placeholders, as in the mockup:

- CRA Annex I: the 40 requirements as tiles, ten to a row, coloured by state
  and marked with a sign (! ? ~ OK –) so the state is never told by colour
  alone, with a legend and counts. A tile opens the requirement (in the
  URL, ?control=cra-ai-3) with its state, findings and reason, reusing the
  CRA page's row.
- Verlauf: per scan the CVE alerts found new above the line and those found
  gone below it, with the run's status, and a table view. A scan opens what
  it changed (?scan=<run id>): each CVE with component, version and
  severity. New: GET /api/v1/targets/{id}/scan-changes and
  compliance_core::scan_changes. A completed scan's window runs from the end
  of the completed scan before it; the first is the baseline; scans that did
  not complete change nothing. Which components a scan added, updated or
  removed is not stored, and the view says so.

Docs: the target's page and its views in the targets guide; the overview's
repo cards with their Heute buckets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 21:31:03 +00:00
sharangandClaude Opus 5.5 692840df59 feat(issues): poll Gitea for issues a person closed or reopened (#953) (#972)
CI / Deploy Agent (push) Successful in 6m58s
CI / Deploy Docs (push) Successful in 1m14s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
The back-sync of #960 only listened to the managed git source's
organisation webhook, which most targets do not have: repositories with a
Gitea issue tracker get no webhook at all. Every GIT_SOURCE_SYNC_MINUTES
(30 by default) the agent now lists the issues of each target that has
Prüfwerk issues, one listing per repository, and compares their state with
its records. For an issue whose state differs it reads the timeline to see
who closed or reopened it; a person's change is carried back exactly as a
webhook delivery is (same rules: an undecided finding is resolved as
"closed in the ticket", a decision already made stays, a CVE issue only
records the close). Changes by the bot user that opened the issue are left
alone. Targets are polled one after the other, so a small Gitea sees one
listing at a time; tenants go through the same entitlement check as the
webhook. Where the webhook delivered a change already, the records match
and the poll does nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 21:31:02 +00:00
sharangandClaude Opus 5.5 f5ed826b99 feat(dashboard): repo views as tabs, Heute per repo, bucket counts on repo cards (#957) (#971)
CI / Deploy MCP (push) Successful in 3m18s
CI / Deploy Dashboard (push) Successful in 5m18s
CI / Deploy Agent (push) Successful in 7m8s
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 6s
Checked against the mockup in a local run: the tab strip scrolls on its
own on a narrow screen instead of widening the page and no longer shows a
stray scrollbar; the CRA tab counts the requirements checked without a
finding (not those outside the code); the licence tab says why it is empty;
the repo cards' bucket labels wrap as in the mockup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 20:17:31 +00:00
sharangandClaude Opus 5.5 5017c6286e fix(inbox): resubmissions return to their bucket, new CVEs end a snooze, secrets stay for today (#950) (#970)
CI / Detect Changes (push) Successful in 5s
CI / Deploy MCP (push) Successful in 4m57s
CI / Deploy Dashboard (push) Successful in 7m29s
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 10m5s
CI / Deploy Docs (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 20:17:17 +00:00
sharangandClaude Opus 5.5 ad0fde9106 feat(dashboard): licences by group as a clickable chart (#957) (#967)
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 7m57s
CI / Deploy Agent (push) Successful in 10m8s
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 5m10s
CI / Agent integration (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:45:09 +00:00
sharangandClaude Opus 5.5 d6986d23b1 feat(dashboard): Heute inbox with urgency buckets and dated resubmission (#950) (#965)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 7m58s
CI / Deploy Docs (push) Skipped
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 2m35s
CI / Deploy Agent (push) Successful in 9m56s
A new landing page "Heute" (the overview moves to /overview and stays in
the sidebar): the Erstbewertung, target chips, the four bucket tiles and
the cards of the chosen bucket with their decisions, "Später" with one
week, one month or a date, "Details", an undo strip after each decision,
and the keys j/k/f/a/s on this page only. The sidebar's "Heute" entry
shows the workspace's "Heute handeln" count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:22:59 +00:00
sharangandClaude Opus 5.5 7b7731f46d feat(dashboard): CVE trend charts on the overview and per repo, repos grouped by project (#952) (#963)
CI / Deploy Dashboard (push) Successful in 7m51s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m5s
CI / Deploy Agent (push) Successful in 9m45s
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 2m39s
CI / Agent integration (push) Skipped
Describe the new overview figures, the 30-day chart, the targets by
project and the target page's "Wo handeln" table in the guide. Key the
overview's project groups by the project's id, so two projects with the
same name stay apart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:00:51 +00:00
sharangandClaude Opus 5.5 03dd8f8df4 feat(dashboard): search and filter tickets, link each to its finding (#946) (#956)
CI / Deploy Docs (push) Successful in 1m8s
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Successful in 4m49s
CI / Deploy Dashboard (push) Successful in 6m57s
CI / Deploy Agent (push) Successful in 8m53s
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
The Tickets page was a paged table only. GET /api/v1/issues now takes
q (title word or ticket number: 913, #913, PROJ-913), status (open
takes in_progress, closed takes resolved) and repo_id, tenant-scoped as
before. A ticket stores no target: the target filter takes the ids of
the target's findings with a ticket plus its CVE tickets
(finding_id cve:{target}:...).

Each row links to its finding, or for a CVE ticket to the target's
components and CVEs (SBOM page), next to the tracker link. Texts are
German and English, the status is a readable badge. The CVE key prefix
and the closed check move to compliance-core so the agent and the
dashboard read them the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 16:41:38 +00:00
sharangandClaude Opus 5.5 f1123e1adb feat(issues): closing or reopening a Prüfwerk issue in Gitea updates the finding (#953) (#960)
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Successful in 8m53s
CI / Deploy Dashboard (push) Successful in 6m54s
CI / Deploy MCP (push) Successful in 4m56s
CI / Deploy Docs (push) Successful in 1m8s
CI / Detect Changes (push) Successful in 3s
The managed Git source's org webhook now handles `issues` events. A
person closing an issue Prüfwerk opened resolves the undecided finding,
recorded as "closed in the ticket" with the Gitea login; reopening it
makes the finding open again. A decision already made in Prüfwerk is
kept. Events whose sender is the issue's author (Prüfwerk's bot user,
which opened it) are ignored, and the back-sync never calls Gitea, so
nothing loops; the issue record is updated first, so the outbound sync
has nothing left to comment or close.

CVE issues closed in Gitea only record the close and who did it, no VEX
status. The scan leaves such an issue closed while the CVE is still
found, and forgets the close once a complete scan no longer finds it, so
a CVE that comes back reopens the issue as before.

The platform API names the events the webhook needs (`webhook_events`);
Prüfwerk cannot change the webhook itself, so existing webhooks need
the Issues event added in Gitea. The finding history shows
"Im Ticket geschlossen von <login>".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 16:22:29 +00:00
sharangandClaude Opus 5.5 6e97a0bf4c feat(findings): group findings by rule and file, decide a group at once (#951) (#961)
CI / Deploy MCP (push) Successful in 5m35s
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 5s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 9m58s
CI / Deploy Dashboard (push) Successful in 7m38s
CI / Deploy Docs (push) Skipped
Undecided findings are grouped on read, by target, tool, rule and file,
and by directory when a rule fires in three or more files of one
directory. A stored #464 group stays a group of its own. Nothing about
groups is stored.

- compliance-core: models::finding_group with the pure group_findings
  and members_of, for the findings list and later the Heute inbox.
- GET /api/v1/finding-groups[?target=] lists the groups;
  POST /api/v1/finding-groups/decide gives every undecided member the
  same status through the bulk path (status history, issue sync), so
  VEX and the evidence pack see ordinary per-finding changes.
- Findings list: Gruppiert / Einzeln toggle (default grouped) with group
  cards, the AI's reason, the places, and Fehlalarm / Risiko akzeptiert
  for all places of a group.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 16:01:15 +00:00
sharangandClaude Opus 5.5 cd90a26558 feat(dashboard): open findings by type and folder as clickable charts (#957) (#964)
CI / Deploy Dashboard (push) Successful in 7m22s
CI / Deploy MCP (push) Successful in 3m18s
CI / Deploy Agent (push) Successful in 9m43s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Skipped
The findings page of one target (/findings?target=...) now opens with two
charts of its open findings: a bar per finding type stacked by severity
(one red scale, every segment a button), and a tree map of the folders
they are in (area = open findings, colour = the most severe). A click
opens the list narrowed to that type and severity, or to that folder; the
filter goes into the URL, a breadcrumb names it and leads back to the
charts. A "Tabelle" toggle shows the same numbers as tables.

- core: finding_breakdown (the shared DTO and the pure counting function;
  open = Open, Triaged, NeedsReview as for tracker issues)
- agent: GET /api/v1/targets/{id}/finding-breakdown; the findings list
  takes an anchored literal `path` folder filter and `status=undecided`
- dashboard: FindingsPage takes scan_type, severity and path from the
  query (Route::findings(target) builds the plain list link)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 15:40:05 +00:00
sharangandClaude Opus 5.5 32cd11bb2f feat(dashboard): CVEs by severity and VEX status as a clickable grid (#957) (#962)
CI / Deploy MCP (push) Successful in 5m4s
CI / Deploy Docs (push) Successful in 1m11s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m44s
CI / Deploy Agent (push) Successful in 8m59s
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 3s
The target's "Schwachstellen und VEX" card now opens with a grid of
severity rows against VEX-status columns (offen, in Pruefung, betroffen,
nicht betroffen, behoben), each count shaded on one blue scale and a
button into the CVE list narrowed to that cell. The choice sits in the
URL (?cve_severity=high&cve_vex=open), with a breadcrumb and a way back;
a table toggle shows the same numbers, and a tile counts the CVEs nobody
has assessed yet.

The agent counts the still-reported alerts in
GET /api/v1/targets/{id}/cve-matrix; the bucketing lives in
compliance-core so the dashboard narrows the list the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 15:16:06 +00:00
sharangandClaude Opus 5.5 88682c6c6a feat(dashboard): components by update impact and ecosystem as clickable charts (#957) (#966)
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 5m2s
CI / Deploy Agent (push) Successful in 9m12s
CI / Deploy Docs (push) Successful in 1m19s
CI / Deploy Dashboard (push) Successful in 6m50s
The SBOM page's component tab opens, for one target, with two bar charts
(one hue, no legend; "Tabelle" shows the same numbers as tables):

- "Welches Update entfernt die meisten CVEs": per CVE group of #949 with
  a fix, "openssl 3.0.11 -> 3.0.15" and "-3 CVEs", ranked by the CVEs the
  update fixes, then by the worst severity; top 10, then "Alle anzeigen".
  A bar opens that component's group card in place (breadcrumb
  "Komponenten > openssl 3.0.11", "Zurueck zum Diagramm"). The card is
  #949's own; only its visibility changes.
- "Komponenten nach Oekosystem": per package manager the components and
  how many have a known vulnerability. A bar filters the component table
  below to it and puts it in the URL: the new additive route
  /sbom/ecosystem/:ecosystem?target=<id> renders the same page. The
  package-manager select now shows the active filter.

Agent: GET /api/v1/targets/{id}/sbom-ecosystems counts the target's SBOM
components per package manager in one aggregation (tenant database, org
role gate as every route). The ranking and the filterable managers live
in compliance-core (sbom_ecosystems), shared with /sbom/filters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:52:22 +00:00
sharangandClaude Opus 5.5 f57a1020db feat(cve): group CVEs by package with one VEX decision per group (#949) (#959)
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m34s
CI / Deploy Docs (push) Successful in 1m11s
CI / Deploy Agent (push) Successful in 8m35s
CI / Deploy MCP (push) Successful in 4m55s
CI / Agent integration (push) Skipped
The target's open CVE alerts are grouped by component (package, version,
purl) in compliance-core: the highest fixed version the advisories name
above the component's own, how many CVEs that update fixes, the CVEs per
severity (a CVE in several alerts counts once), KEV and the highest EPSS.

Agent:
- GET /api/v1/targets/{id}/cve-groups lists the groups, most severe first.
- PATCH /api/v1/targets/{id}/cve-groups/vex states one VEX status on every
  open alert of a component: one statement per alert with the validation,
  author and time of PATCH /api/v1/cves/{id}/vex, so the exports and the
  CVE issue auto-close treat them as single decisions. Settled alerts keep
  their statements; 404 when the component has no open alert.

Dashboard: the target's VEX section opens grouped ("Gruppiert") with one
card per component ("vite 5.4.21 -> 8.3.3 behebt 9 CVEs (1 hoch, ...)"),
"Nicht betroffen (alle N)" opening the same statement editor as
"Bewerten", and the rows on demand; "Einzeln" keeps the full list. The
severity badge of a row now uses the same rating as the group counts
(GitHub's MODERATE reads as medium, a CVSS-only alert gets its badge).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:31:33 +00:00
sharangandClaude Opus 5.5 29e38c8b80 feat(dashboard): MCP-Tokens in the sidebar, also in source-only deployments (#969)
CI / Deploy Dashboard (push) Successful in 7m0s
CI / Deploy Agent (push) Successful in 9m19s
CI / Deploy Docs (push) Successful in 1m11s
CI / Detect Changes (push) Successful in 3s
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
The only link to the MCP tokens was the overview's MCP-Server card, which a
source-only deployment (prod) hides with the runtime sections. The MCP
endpoint serves such a deployment all the same, so there a token could only
be created by typing /mcp-tokens. The sidebar now has an MCP-Tokens entry
that source-only mode leaves enabled; the overview card is unchanged.

The docs name the entry instead of the bare URL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 14:10:25 +00:00
sharangandClaude Opus 5.5 ef9c578948 feat(findings): say why a finding needs review — AI false alarm or AI unsure (#954) (#958)
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 6s
CI / Deploy Dashboard (push) Successful in 5m38s
CI / Deploy MCP (push) Successful in 4m6s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 6m19s
"Zu prüfen" now says which of the two cases put it there: the LLM triage
dismissed the finding as a likely false alarm ("KI: wohl Fehlalarm"), or it
confirmed it with too little confidence ("KI: unsicher"). The reason is read
from the verdict already stored on the finding (triage_action, confidence),
so findings from before this change get it too; the wire status stays
needs_review.

- core: ReviewReason, ReviewReason::of_verdict and Finding::review_reason;
  the triage's confidence threshold and its action markers move to core.
- agent: apply_action decides through ReviewReason::of_verdict, so the
  triage and the label cannot drift apart.
- dashboard: the list and the finding page show the reason instead of the
  bare status, the list with the AI's rationale on hover; the finding page
  confirms ("Fehlalarm bestätigen", false positive with the rationale as
  reason) or rejects ("Doch prüfen", triaged) the AI's guess in one click,
  for roles that may change a status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 13:49:33 +00:00
sharangandClaude Opus 5.5 589c3b440b docs(mcp): how to get an MCP token and connect a client (#968)
CI / Deploy Docs (push) Successful in 1m14s
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Canceled after 0s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
The MCP endpoint accepts only MCP tokens (mcpt_…) from the MCP-Tokens page,
which a signed-in person creates; the docs said to use the MCP server
entry's access token, which the endpoint refuses, and gave a wrong URL.
Portal API keys neither work at the endpoint nor can create MCP tokens.

- Step by step: create the token at /mcp-tokens (also reachable in
  source-only deployments, where the overview card is hidden), add the
  server with the real endpoint (/mcp/mcp) to Claude Code or a JSON-configured
  client, check /mcp/health, and read the three 401 answers.
- API-Schlüssel: a note that keys are not for MCP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 13:48:58 +00:00
sharangandClaude Opus 5.5 b9acabb6ba feat(issues): link a finding's issue to the finding itself (#947) (#948)
CI / Deploy Agent (push) Successful in 5m55s
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 4s
The "Open in Prüfwerk" link in a finding's issue went to the target's
whole finding list. It now opens the finding's own page
(/findings/{id}), where its status is set; a group (#464) links to its
own page. The link stays https-only and is left out for a finding
without an id. CVE issues and the new-findings notification keep their
links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 13:48:43 +00:00
sharangandClaude Opus 5.5 d274c68ecb test(nightly): a queued scan run is not finished yet (t84) (#945)
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 5m38s
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 3s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 12:53:02 +00:00
sharangandClaude Opus 5.5 29d3c91f5a feat(graph): Razor and Web Forms code in the code graph (t84) (#944)
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 6m14s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 12:10:23 +00:00
sharangandClaude Opus 5.5 5a11a3b602 feat(graph): Visual Basic .NET in the code graph (t84) (#943)
CI / Deploy Dashboard (push) Successful in 4m8s
CI / Deploy MCP (push) Successful in 3m30s
CI / Deploy Agent (push) Successful in 6m21s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
CI / Agent integration (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 11:49:59 +00:00
sharangandClaude Opus 5.5 ca66b9a7b1 fix(scan): read UTF-16 and Windows-1252 files in the remaining readers (t84) (#942)
CI / Deploy MCP (push) Successful in 51s
CI / Deploy Agent (push) Successful in 7m21s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 5m8s
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 09:58:55 +00:00
sharangandClaude Opus 5.5 b420b28ea8 fix(graph): read UTF-16 and Windows-1252 source files into the code graph (t84) (#941)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m18s
CI / Deploy Agent (push) Successful in 8m33s
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 4m48s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:13:46 +00:00
sharangandClaude Opus 5.5 d3c8eee393 fix(scan): a person's scan gets the next slot and shows as queued (t84) (#940)
CI / Deploy Agent (push) Successful in 8m15s
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 5s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 4m47s
CI / Deploy Dashboard (push) Successful in 6m1s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 07:52:24 +00:00
sharang c8deabd4d9 feat(dashboard): show the code graph, from its card and from a finding (t82) (#939)
CI / Detect Changes (push) Successful in 5s
CI / Check (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m27s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
2026-11-07 10:43:02 +00:00
sharang c1a70b025c feat(dashboard): the code graph's card on the target page (t82) (#937)
CI / Deploy Agent (push) Successful in 8m31s
CI / Detect Changes (push) Successful in 5s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 4m50s
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m20s
2026-11-07 10:24:13 +00:00
sharang 37888af374 feat(graph): PLC programs, function blocks and functions in the code graph (t82) (#936)
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 6m46s
CI / Detect Changes (push) Successful in 5s
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Skipped
2026-11-07 10:05:15 +00:00
sharang 1569100721 feat(graph): C and C# in the code graph (t82) (#935)
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 5m58s
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Successful in 7m28s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 10m49s
2026-11-07 09:44:21 +00:00
sharang d9fcc75792 fix(nightly): start the agent in a step, not as a service (#938)
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 5s
2026-11-07 09:44:11 +00:00
sharang a2699a3ec3 feat(metering): swap an extra target with an included one (t72) (#932)
CI / Detect Changes (push) Successful in 5s
CI / Deploy Dashboard (push) Successful in 6m27s
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 4m54s
CI / Deploy Agent (push) Successful in 8m36s
CI / Check (push) Skipped
2026-11-07 03:11:29 +00:00
sharang 3bdaf28737 feat(metering): this month's usage on the targets page (t72) (#931)
CI / Deploy Agent (push) Successful in 8m43s
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m24s
CI / Detect Changes (push) Successful in 5s
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
2026-11-07 02:50:56 +00:00
sharang 168cbe98f8 ci: build the dashboard tests one rustc at a time (#933)
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
2026-11-06 21:05:29 +00:00
sharang 9f2e78c6c4 feat(metering): new content starts a change-driven scan (t72) (#930)
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m53s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 5s
CI / Deploy MCP (push) Successful in 3m13s
CI / Deploy Docs (push) Successful in 1m28s
CI / Deploy Agent (push) Successful in 9m6s
2026-11-06 16:14:26 +00:00
sharang 9ce3b868bb feat(metering): send the month's peak of extra targets (t72) (#929)
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 5m57s
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
2026-11-06 15:55:44 +00:00
sharang a7355ffdc8 feat(metering): the quota, Prüftage, the daily limit and the cap (t72) (#928)
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 4m52s
CI / Deploy Dashboard (push) Failing after 5m54s
CI / Deploy Agent (push) Failing after 7m45s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
CI / Agent integration (push) Skipped
2026-11-06 14:48:07 +00:00
sharangandSharang Parnerkar ce786b716b feat(metering): included and extra targets, and why each scan ran (t72) (#927)
CI / Detect Changes (push) Successful in 6s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 9m4s
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 5m4s
CI / Deploy Dashboard (push) Successful in 6m57s
First part of t72, Prüfwerk metering (LB §2 Abs. 4–5, §7). This PR records what a scan is metered by. Nothing is counted or enforced yet; counters, the 6-per-day limit and the Prüftag cap come in the next PR.

## What changes

- **Included vs extra targets.** Each target stores `billing: included | extra`.
  - The oldest active targets by `created_at` are included, up to the plan's `limits.included_targets` from the registry entitlement. The rest are extra.
  - The split is refreshed before each scan and when a target is created. Archiving an included target moves the oldest extra one up.
  - A plan without that key includes every target, which is every plan until the registry sends the limits. So this PR changes nothing for existing tenants.
- **Run attribution.** Each run records an `attribution`:
  - `request`: the customer started it (dashboard or API).
  - `support`: staff started it.
  - `change`: something the customer changed, i.e. new commits, other uploads, or a live URL.
  - `rescan`: only the Prüfwerk build changed.

  For scheduled and webhook scans it's set where change detection decides, so our rescan after an update is no longer counted as a customer change. `uploads_changed` / `content_changed` don't depend on `UPLOAD_CHANGE_SKIP`.
- **`chargeable`.** Says whether the run counts once it completes:
  - a request always counts;
  - a change counts only on an extra target;
  - rescans and support scans never count.

  `scan.completed` now carries `attribution` and `counted` as properties.
- **Dashboard.** The targets list shows a "Zusätzliches Prüfobjekt" badge on an extra target.

## Tests

- **Core:** the included/extra split, attribution, and the contract table of what counts.
- **Agent:** `content_changed`/`uploads_changed`, the `included_targets` limit, reading a stored target's billing, and a Mongo integration test (`tests/target_billing.rs`): the oldest are included, and an extra target moves up on archive.

Not built locally, per the CI-only rule; CI is the compiler here.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com>
Reviewed-on: #927
2026-11-06 14:30:07 +00:00
sharang c28f9e186b fix(mcp): rmcp 3.9, with the Host check of the Streamable HTTP server (#909)
CI / Detect Changes (push) Successful in 6s
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m43s
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 5m8s
CI / Deploy Agent (push) Successful in 8m54s
2026-11-05 19:31:06 +00:00
sharang 4480e8b509 fix(scan): Prüfwerk's own code no longer flags its test literals (#908)
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 5m37s
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 8s
CI / Check (push) Skipped
2026-11-05 19:12:37 +00:00
sharang aa1c9b5d2b fix(docs): update the docs site's dependencies within their ranges (#907)
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 10s
CI / Deploy Agent (push) Canceled after 0s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Successful in 1m21s
2026-11-05 19:12:16 +00:00
sharang b2b9fd2a02 fix(scan): a Semgrep rule pack with its samples is test data (#905)
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Successful in 1m13s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Canceled after 0s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 11s
2026-11-05 19:11:56 +00:00
sharang 8d839ed5ad fix(deps): openssl 0.10.82 and mongodb 3.10 (hickory 0.26) (#906)
CI / Deploy Dashboard (push) Successful in 4m25s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 7m20s
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 7s
CI / Deploy MCP (push) Successful in 3m51s
2026-11-05 19:11:42 +00:00
sharang b079cf9267 fix(scan): findings in test data and excluded paths close, whichever scanner stored them (#904)
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 6s
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Successful in 6m47s
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Skipped
2026-11-05 17:56:00 +00:00
sharang 2157ae2d42 fix(telemetry): service.version reports the release, not the crate version (#883)
CI / Deploy Agent (push) Successful in 8m36s
CI / Deploy Dashboard (push) Successful in 6m12s
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 6s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 4m40s
2026-11-05 17:32:27 +00:00
sharang 13d09dc830 fix(sbom): a component the build installed is badged "Im Image (gebaut)" (#881)
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m11s
CI / Deploy Agent (push) Successful in 8m28s
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m14s
CI / Deploy MCP (push) Skipped
2026-11-05 08:30:19 +00:00
sharang 01a24f4556 test(nightly): a Yocto target with only its SPDX 3.0 image document (#150) (#860)
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
2026-11-05 01:06:34 +00:00
sharang 3d7deee4a8 feat(yocto): read the build's SPDX 3.0 image document (#150) (#859)
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Successful in 5m30s
CI / Detect Changes (push) Successful in 5s
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m7s
CI / Deploy Dashboard (push) Skipped
2026-11-05 00:30:35 +00:00
sharang 360c905894 feat(yocto): a target with only its build output is scanned (#150) (#857)
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m9s
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Successful in 4m0s
CI / Deploy Dashboard (push) Successful in 5m15s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 5m48s
2026-11-05 00:13:11 +00:00
sharang b531227b45 feat(yocto): kernel CVEs the kernel configuration does not build (#150) (#858)
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m8s
CI / Deploy Agent (push) Successful in 6m10s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Agent integration (push) Skipped
2026-11-05 00:00:50 +00:00
sharang 919cac01e9 test(nightly): a Yocto layer with its build's SPDX and cve-check (#150) (#856)
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 5s
2026-11-04 23:35:36 +00:00
sharang 7f5ddf69fc feat(yocto): build output in the wizard and the guide (#150) (#855)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 6m16s
CI / Deploy Docs (push) Successful in 1m4s
CI / Deploy Agent (push) Successful in 8m27s
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Skipped
2026-11-04 23:18:50 +00:00
sharang c2fbffd2c6 feat(yocto): Yocto's own cve-check verdicts join the scan (#150) (#854)
CI / Detect Changes (push) Successful in 5s
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 5m29s
2026-11-04 23:00:08 +00:00
sharang e637964c02 feat(yocto): a target's build output joins the scan (#150) (#853)
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 6s
CI / Deploy Agent (push) Successful in 6m59s
CI / Deploy Dashboard (push) Successful in 4m57s
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Successful in 3m0s
CI / Check (push) Skipped
2026-11-04 22:42:48 +00:00
sharang 2ca87d1920 feat(yocto): read what a build installed from its SPDX 2.2 (#150) (#852)
CI / Deploy Agent (push) Successful in 8m1s
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m58s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 4m29s
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
2026-11-04 21:47:00 +00:00
sharang 60b2eeda5f fix(docs): the CODESYS export script link carries the /docs/ base (#830)
CI / Deploy Docs (push) Successful in 1m12s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Successful in 5m33s
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
2026-11-04 11:53:59 +00:00
sharang e911e75c09 feat(plc): a CODESYS script that exports PLCopen XML for Prüfwerk (#165) (#829)
CI / Deploy Agent (push) Successful in 6m30s
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 5s
CI / Agent integration (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m10s
2026-11-04 11:10:09 +00:00
sharang c16e91f981 fix(plc): test data and excluded paths leave the PLC analysis too (#828)
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m7s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Successful in 5m24s
2026-11-04 09:32:36 +00:00
sharang b645769f67 feat(plc): say when a native CODESYS project is not analysed (#165) (#827)
CI / Deploy MCP (push) Successful in 4m52s
CI / Deploy Dashboard (push) Successful in 6m46s
CI / Detect Changes (push) Successful in 4s
CI / Agent integration (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m11s
CI / Deploy Agent (push) Successful in 8m56s
2026-11-04 09:13:00 +00:00
sharang 533d5f35b5 fix(issues): a skipped scan still catches up the deferred issues (#826)
CI / Deploy Agent (push) Successful in 6m45s
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Successful in 1m13s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 7s
2026-11-04 08:50:51 +00:00
sharang 8ede373353 feat(scan): per-target excluded paths, left out of the whole scan (#825)
CI / Deploy Docs (push) Successful in 1m14s
CI / Agent integration (push) Skipped
CI / Detect Changes (push) Successful in 5s
CI / Deploy MCP (push) Successful in 2m53s
CI / Deploy Agent (push) Successful in 10m50s
CI / Deploy Dashboard (push) Successful in 7m56s
CI / Check (push) Skipped
2026-11-04 08:48:40 +00:00
sharang e01d2146e9 fix(nightly): no chat model, and GitHub Actions by major version (#573) (#821)
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 5m23s
CI / Deploy Docs (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 6s
2026-11-04 08:29:03 +00:00
sharang ac95126af2 feat(scan): leave test data (fixtures, testdata) out of the whole scan (#820)
CI / Deploy MCP (push) Successful in 4m57s
CI / Detect Changes (push) Successful in 6s
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Canceled after 0s
CI / Deploy Docs (push) Successful in 1m16s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m46s
2026-11-04 08:28:51 +00:00
sharang 5b0bf08478 fix(mobile): a manifest rule counts only on an AndroidManifest.xml (#824)
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 9m15s
CI / Detect Changes (push) Successful in 5s
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Skipped
2026-11-04 08:28:14 +00:00
sharang 93b98965b3 fix(scheduler): start a tick's scans together; the slots cap them (#61) (#823)
CI / Deploy Agent (push) Successful in 5m54s
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
2026-11-04 08:17:57 +00:00
sharang 2523ecb018 fix(health): answer 503 when MongoDB does not answer (#60) (#822)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 7s
CI / Deploy MCP (push) Skipped
CI / Agent integration (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Canceled after 0s
2026-11-04 08:17:15 +00:00
sharang 7d73893485 fix(llm): configurable call timeout; one failed triage call is not "model down" (#588)
CI / Detect Changes (push) Successful in 5s
CI / Deploy Dashboard (push) Successful in 4m21s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 4m17s
CI / Agent integration (push) Skipped
CI / Deploy Agent (push) Successful in 8m51s
CI / Check (push) Skipped
2026-11-04 08:10:46 +00:00
sharang 3300bb1851 ci: agent integration tests with mongod inside the job (#586)
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Agent integration (push) Skipped
2026-11-02 21:27:12 +00:00
sharang 70be25650b fix(deps): pulldown-cmark 0.13.6 (RUSTSEC-2026-0433) (#587)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m51s
CI / Deploy Agent (push) Successful in 8m11s
CI / Deploy MCP (push) Successful in 4m23s
2026-11-02 21:08:01 +00:00
sharang 34243b208d fix(i18n): CRA status names mapped findings, not verdicts (#585)
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m9s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 7m36s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m26s
2026-10-31 23:55:08 +00:00
sharang 9d4e46c34f fix(agent): cascade delete reads ids raw; integration tests fixed (#584)
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 5m34s
CI / Deploy Dashboard (push) Skipped
2026-10-30 08:28:13 +00:00
sharang 0cbabb73fd fix(deps): zip 9 and tantivy 0.27 (zstd 0.14), drop seven audit ignores (#583)
CI / Deploy Agent (push) Successful in 6m1s
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m56s
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Successful in 3m23s
CI / Check (push) Skipped
2026-10-30 07:23:58 +00:00
sharang 1135b65b9e fix(llm): embedding requests within the model's token budget (#582)
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 5s
CI / Deploy Agent (push) Successful in 6m15s
CI / Deploy Docs (push) Skipped
2026-10-30 07:22:30 +00:00
sharangandSharang Parnerkar 330d492578 fix(docker): Upgrade Alpine packages in the docs image (#581)
CI / Deploy Dashboard (push) Successful in 14m17s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m37s
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Successful in 6m3s
CI / Deploy Agent (push) Successful in 12m9s
vuln-watch flags CVE-2026-111497 (critical, brotli decoder out-of-bounds write) in compliance-docs. nginx:alpine (3.24) still ships brotli-libs 1.2.0-r1; Alpine already has 1.2.1-r0. Dockerfile.docs now runs `apk upgrade --no-cache` in the nginx stage (CI already builds it with `--pull`).

Tested locally: image builds, brotli-libs 1.2.1-r0, `nginx -t` passes, site present under /docs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com>
Reviewed-on: #581
2026-10-29 16:44:59 +00:00
sharangandSharang Parnerkar 794a3aa525 fix(agent): Semgrep 1.179.0 for PyJWT 2.15, fresh base images (#580)
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Successful in 7m33s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
vuln-watch flags PyJWT 2.13.0 in compliance-agent (CVE-2026-102268, critical, fixed in 2.14.0). semgrep 1.177.0 pins pyjwt~=2.13.0; 1.179.0 is the first release that allows >=2.15.0. Tested in debian:bookworm-slim: semgrep 1.179.0 + ruff 0.16.8 install, PyJWT 2.15.1, mobsfscan still installs with --no-deps (its semgrep==1.172.0 mismatch already existed), a sample rule still finds its match. All four image builds now use `--pull`.

Note: a semgrep minor bump can shift findings; watch the nightly baseline run after merge. Prod stays on its pinned digest until it is promoted.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com>
Reviewed-on: #580
2026-10-29 14:31:09 +00:00
sharang 24001850ec fix(telemetry): console logs to WARN+ while logs go out over OTLP (#579)
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 6m0s
CI / Detect Changes (push) Successful in 5s
CI / Deploy Dashboard (push) Successful in 4m17s
CI / Deploy MCP (push) Successful in 3m28s
CI / Check (push) Skipped
2026-10-29 11:58:25 +00:00
sharang fad23c20a9 feat(telemetry): W3C propagation, route-named spans, trace-linked logs (#577)
CI / Deploy MCP (push) Successful in 4m19s
CI / Deploy Dashboard (push) Successful in 5m41s
CI / Deploy Agent (push) Successful in 7m38s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
2026-10-29 10:13:33 +00:00
sharang c739f1b7e5 ci: two cargo jobs and line-tables-only debug info on the runners (#578)
CI / Deploy Agent (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 5s
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
2026-10-29 09:58:03 +00:00
sharang b247c5b359 fix(llm): nightly uses the gateway's models; no OpenAI defaults (#575)
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m25s
CI / Deploy MCP (push) Successful in 5m21s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 10m24s
CI / Deploy Dashboard (push) Successful in 11m57s
2026-10-29 07:43:21 +00:00
sharang 4ded72ce32 fix(deps): pulldown-cmark 0.13.5; zstd advisories until zip 9.x (#576)
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 10m24s
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Successful in 5m18s
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m40s
2026-10-28 22:11:42 +00:00
sharangandClaude Opus 5.5 f77e78c5d2 fix(deps): Distrust the compromised eMudhra root (webpki-roots 1.0.10) (#574)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 5m41s
CI / Deploy Dashboard (push) Successful in 14m39s
CI / Deploy Agent (push) Successful in 12m40s
CI / Check (push) Skipped
webpki-roots 1.0.10 and rustls-webpki 0.103.16 drop emSign ECC Root CA - G3 from the compiled-in roots (Mozilla bug 2083449); agent, dashboard and MCP final stages fail the build if Debian's store still ships it. zip extract() advisories RUSTSEC-2026-0367/0368/0369 ignored with reason (we never call extract()); zip 9.x follow-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 15:48:20 +00:00
sharang ed71ced9b3 fix(licenses): confirm a licence before its review; one row per package (#571)
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 5m29s
CI / Deploy Agent (push) Successful in 7m28s
CI / Deploy Docs (push) Skipped
2026-10-15 15:09:59 +00:00
sharang 41c337138d feat(licenses): licence policy, legal review, third-party notices (licence review v2) (#570)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 8m13s
CI / Deploy MCP (push) Successful in 4m37s
CI / Deploy Docs (push) Successful in 1m11s
CI / Deploy Dashboard (push) Successful in 6m22s
2026-10-15 14:35:43 +00:00
sharang e65aa76ef5 feat(sbom): confirm the licence of components (licence review) (#569)
CI / Deploy Docs (push) Successful in 1m16s
CI / Deploy Dashboard (push) Successful in 6m40s
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 8m39s
CI / Deploy MCP (push) Successful in 4m49s
2026-10-15 12:03:29 +00:00
sharang 70125b4556 ci: a weekly check compares the bundled end-of-life tables with endoflife.date (#563)
CI / Detect Changes (push) Successful in 6s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 5m25s
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
2026-10-15 10:19:49 +00:00
sharang 43d8ff1589 feat(platform): count open vulnerabilities in the portal's target list (#568)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 5s
CI / Deploy Dashboard (push) Successful in 4m44s
CI / Deploy Agent (push) Successful in 5m35s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 3m48s
2026-10-14 18:20:55 +00:00
sharangandSharang Parnerkar 5ce496303d feat(audit): API-key writes carry the caller's address to the registry (#567)
CI / Deploy Agent (push) Successful in 5m6s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
Audit entries for API-key writes recorded the agent's container address (172.17.0.6 on stage), because the registry stores the peer of its own request. With this change they carry the caller's address.

- The API host's proxy puts the caller's address in `X-BP-Client-IP`, overwriting anything the client sent. That proxy change is a separate orca-platform PR on `pruefwerk-stage/api-proxy.conf`.
- `audit_delegated_writes` reads the header for **API-key requests only** and keeps it only if it parses as an IP address, because the registry stores it as Postgres `inet` and garbage would sink the whole entry.
- `AuditEntry.source_ip` is sent as `source_ip` and skipped when empty.
- The registry ignores the field until tenant-registry accepts it (separate PR), so the deploy order doesn't matter.
- The address is informational: nothing decides on it.
- Support writes via the dashboard still show the dashboard's address.

Tests: unit test for the header parse (v4, v6, a list, junk, missing); `tests/api_key_access.rs` checks `source_ip` in the posted audit entry. Not run locally (RAM); CI runs them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
Co-authored-by: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com>
Reviewed-on: #567
2026-10-14 09:33:24 +00:00
sharang a84681918b fix(findings): feedback on an unknown finding answers 404 (#566)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 5m41s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
2026-10-14 08:52:54 +00:00
sharang 07ba0d6665 feat(api): the customer API accepts portal-issued API keys (#564)
CI / Deploy MCP (push) Successful in 3m1s
CI / Deploy Docs (push) Successful in 1m23s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 3m53s
CI / Deploy Agent (push) Successful in 5m32s
CI / Check (push) Skipped
2026-10-13 22:22:21 +00:00
sharang 171ff9a9f8 fix(deps): quinn-proto 0.11.19 for RUSTSEC-2026-0338..0342 (#565)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 10m29s
CI / Deploy MCP (push) Successful in 4m36s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 9m55s
CI / Check (push) Skipped
2026-10-13 22:07:02 +00:00
sharang 860d1a78bf fix(eol): end-of-life findings are high, soon is medium, and non-LTS Yocto releases warn two months ahead (#562)
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m14s
CI / Deploy Dashboard (push) Successful in 6m17s
CI / Deploy Agent (push) Successful in 8m0s
CI / Deploy MCP (push) Successful in 4m30s
2026-10-09 19:28:49 +00:00
sharang a3735b12b7 chore(deps): remove dependencies nothing uses (#561)
CI / Deploy Dashboard (push) Successful in 5m57s
CI / Deploy Agent (push) Successful in 8m35s
CI / Deploy MCP (push) Successful in 3m17s
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
2026-10-09 18:58:27 +00:00
sharang db515486a4 feat(yocto): layer pins from kas, repo manifests and submodules, and a finding when the Yocto release is end of life (#559)
CI / Deploy Docs (push) Successful in 1m20s
CI / Deploy Dashboard (push) Successful in 6m45s
CI / Deploy Agent (push) Successful in 10m26s
CI / Detect Changes (push) Successful in 5s
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 3m57s
2026-10-09 18:40:00 +00:00
sharang d9f5ad85dc ci: the agent redeploys when werkbank-exec, control-map or docker/ change (#560)
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 4s
2026-10-09 18:33:57 +00:00
sharang 64f5a810dd feat(scans): a scan run lists informational notes apart from skipped stages (#556)
CI / Deploy Dashboard (push) Successful in 6m27s
CI / Deploy Agent (push) Successful in 6m59s
CI / Deploy MCP (push) Successful in 3m20s
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
2026-10-09 18:21:28 +00:00
sharang 57b5aaeb97 feat(cve): the daily monitor re-checks NVD/CPE-only components incrementally (#558)
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m19s
CI / Deploy Agent (push) Successful in 9m5s
CI / Detect Changes (push) Successful in 6s
2026-10-09 18:19:19 +00:00
sharang ba499d14e4 feat(yocto): recipes an image recipe installs are marked as in the image (declared) (#557)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 10m7s
CI / Deploy MCP (push) Successful in 3m21s
CI / Deploy Docs (push) Successful in 1m13s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 7m17s
2026-10-09 17:58:38 +00:00
sharang 42b25719ec fix(cve): notifications and tracker issues respect VEX not_affected and fixed (#555)
CI / Deploy MCP (push) Successful in 4m42s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 8m35s
CI / Deploy Docs (push) Successful in 1m15s
CI / Deploy Dashboard (push) Successful in 6m30s
CI / Check (push) Skipped
2026-10-09 17:07:37 +00:00
sharang 8d6be32c83 fix(yocto): recipe lint binds attack-surface findings to cra-ai-2 and counts suppressed findings (#554)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 5s
CI / Deploy Dashboard (push) Successful in 6m15s
CI / Deploy Docs (push) Successful in 1m13s
CI / Deploy Agent (push) Successful in 8m39s
CI / Deploy MCP (push) Successful in 3m26s
2026-10-09 16:49:27 +00:00
sharang ac50880b25 feat(yocto): the recipe inventory becomes SBOM components, CVE_STATUS and CVE patches become VEX (#551)
CI / Detect Changes (push) Successful in 6s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m13s
CI / Deploy Dashboard (push) Successful in 7m53s
CI / Deploy Agent (push) Successful in 12m32s
CI / Deploy MCP (push) Successful in 3m26s
2026-10-09 16:17:47 +00:00
sharang e382746cfb feat(issues): a catch-up files Gitea issues for open findings that never got one (off by default) (#553)
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m11s
CI / Deploy Agent (push) Successful in 8m58s
CI / Deploy Dashboard (push) Successful in 6m35s
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Successful in 2m54s
2026-10-09 16:08:23 +00:00
sharang 7e3856db31 feat(yocto): recipes are checked with oelint-adv and our own secure-by-default rules (#552)
CI / Deploy MCP (push) Successful in 5m11s
CI / Detect Changes (push) Successful in 6s
CI / Deploy Dashboard (push) Successful in 16m16s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m32s
CI / Deploy Agent (push) Successful in 13m11s
2026-10-09 15:48:31 +00:00
sharang 750f1d7308 feat(yocto): layer trees are detected as Embedded Linux / Yocto, and the scan matrix says what runs (#550)
CI / Deploy MCP (push) Successful in 4m46s
CI / Deploy Agent (push) Successful in 8m49s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 6m40s
CI / Deploy Docs (push) Successful in 1m15s
2026-10-09 14:58:09 +00:00
sharang 528c9d4f7f feat(dashboard): Embedded Linux / Yocto is marked as a preview (#549)
CI / Deploy Dashboard (push) Successful in 4m9s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m15s
CI / Deploy Agent (push) Successful in 6m20s
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
2026-10-09 14:41:47 +00:00
sharang cc5b667870 fix(scheduler): scheduled scans are spread out and at most two clones run per git host (#547)
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Successful in 6m28s
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
2026-10-09 14:37:22 +00:00
sharang 11e3b98c99 fix(issues): Gitea issue sync lists once per scan and keeps at most two requests in flight per instance (#548)
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 8m50s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Skipped
2026-10-09 14:25:29 +00:00
sharang dcf78b8e66 fix(git): clone and fetch retry three times on a 5xx or connection error (#546)
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 6m4s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
2026-10-09 14:22:34 +00:00
sharang 6f1172589e fix(sbom): SPDX licences are declared, and copyleft is found by SPDX id (#545)
CI / Detect Changes (push) Successful in 5s
CI / Deploy Dashboard (push) Successful in 6m31s
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 4m48s
CI / Deploy Agent (push) Successful in 6m53s
CI / Deploy Docs (push) Skipped
2026-10-09 13:57:47 +00:00
sharang 7f2b128efd feat(webhooks): the target page shows its last webhook deliveries, refused ones too (#544)
CI / Deploy MCP (push) Successful in 3m28s
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 6s
CI / Deploy Dashboard (push) Successful in 5m29s
CI / Deploy Agent (push) Successful in 9m6s
2026-10-09 13:51:47 +00:00
sharang 2c2fea6222 fix(sbom): known licence names are exported as SPDX ids (#543)
CI / Deploy Agent (push) Successful in 8m27s
CI / Detect Changes (push) Successful in 5s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 3m26s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m51s
2026-10-09 13:39:28 +00:00
sharang 44b2f38841 fix(vex): CVE is the primary vulnerability id in VEX, CSAF and CycloneDX, GHSA an alias (#542)
CI / Deploy Agent (push) Successful in 8m37s
CI / Deploy MCP (push) Successful in 3m33s
CI / Deploy Docs (push) Successful in 1m15s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m49s
CI / Detect Changes (push) Successful in 5s
2026-10-09 13:22:05 +00:00
sharang 69a4c2084a feat(dashboard): the targets page pages server-side with page size and total (#541)
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 5s
CI / Deploy Dashboard (push) Successful in 6m11s
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 9m13s
2026-10-09 13:18:20 +00:00
sharang 2ca73acabf fix(vex): the startup purl backfill always logs its count (#540)
CI / Deploy Agent (push) Successful in 7m15s
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
2026-10-09 13:00:15 +00:00
sharang 2c5b2eb003 fix(malware): an unreachable or silent clamd is logged as an error (#539)
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 6s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 5m12s
CI / Check (push) Skipped
2026-10-09 13:00:12 +00:00
sharang e396141490 fix(webhooks): the managed Gitea webhook answers 202 and works in the background (#538)
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 2s
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 5m24s
2026-10-09 11:22:00 +00:00
sharang ac4064daed fix(vex): alerts stored before purls get their component's purl (#537)
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 4m58s
CI / Deploy Docs (push) Skipped
2026-10-08 22:55:22 +00:00
sharang b6955db9e0 fix(dashboard): the SBOM arrow on a target opens the SBOM filtered to it (#533)
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m2s
CI / Deploy Dashboard (push) Successful in 3m33s
CI / Deploy Agent (push) Successful in 5m15s
2026-10-08 21:50:28 +00:00
sharang 10cebd894f fix(dashboard): target page reloads findings, SBOM and CRA status when a scan finishes (#530)
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 59s
CI / Deploy Dashboard (push) Canceled after 0s
CI / Deploy Agent (push) Canceled after 0s
2026-10-08 21:50:22 +00:00
sharang 0586f2c639 feat(dashboard): the CSAF draft's TLP label as a coloured badge with its meaning (#535)
CI / Check (push) Skipped
CI / Deploy Agent (push) Canceled after 0s
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m8s
CI / Deploy Dashboard (push) Canceled after 0s
2026-10-08 21:45:50 +00:00
sharang 0f22455db9 fix(sbom): npm registry policy per project, from nested .npmrc/.yarnrc.yml (#534)
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 7m9s
CI / Detect Changes (push) Successful in 5s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Canceled after 0s
2026-10-08 21:45:43 +00:00
sharang 1f02a89226 fix(vex): keep the alert's purl for components that left the SBOM (#532)
CI / Deploy MCP (push) Successful in 2m38s
CI / Deploy Dashboard (push) Canceled after 0s
CI / Detect Changes (push) Successful in 5s
CI / Deploy Agent (push) Canceled after 0s
CI / Deploy Docs (push) Successful in 1m17s
CI / Check (push) Skipped
2026-10-08 21:45:37 +00:00
sharang a22b4497a5 fix(scan): uploads carry their sha256, so change detection compares the bytes (#531)
CI / Deploy Dashboard (push) Successful in 5m32s
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Canceled after 0s
CI / Check (push) Skipped
CI / Deploy Docs (push) Canceled after 0s
2026-10-08 21:45:32 +00:00
sharang 90c19b5a94 fix(plc): a repository holding only a CODESYS archive is a PLC project (#528)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 7m26s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 59s
2026-10-08 21:38:23 +00:00
sharang ffe31964e6 fix(dashboard): targets named owner/repo can be edited and saved (#527)
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m11s
2026-10-08 21:24:15 +00:00
sharang c8af053d9d fix(semgrep): short finding titles, rule messages shown as Markdown (#529)
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 10m54s
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Successful in 4m10s
2026-10-08 21:23:20 +00:00
sharang dd70ec753c fix(release): one Prüfwerk version in every document, crates at 0.4.6 (#526)
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 7m2s
CI / Deploy MCP (push) Successful in 2m55s
CI / Deploy Dashboard (push) Successful in 5m10s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
2026-10-08 21:15:41 +00:00
sharang e1bf9e861c fix(cve): KEV from CISA's GitHub mirror, exploitation cached per source (#493) (#525)
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m10s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Successful in 5m6s
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Skipped
2026-10-06 19:02:52 +00:00
sharang 85aff4cd2c docs(release): pre-verification of the v0.4.5 batch, daily CVE monitor (#524)
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 5m9s
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Successful in 1m10s
2026-10-06 17:38:00 +00:00
sharang 90d8d072a4 fix(csaf): vendor remediations named through product groups (#515) (#523)
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 2m22s
CI / Deploy Agent (push) Successful in 9m50s
CI / Deploy Dashboard (push) Successful in 6m11s
2026-10-06 17:23:22 +00:00
sharang 8ea3731b51 feat(csaf): match components against vendor CSAF advisories (#515, part C) (#521)
CI / Deploy MCP (push) Successful in 3m31s
CI / Deploy Agent (push) Successful in 5m4s
CI / Deploy Dashboard (push) Successful in 4m19s
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m11s
2026-10-06 16:45:55 +00:00
sharang ff570bac66 feat(csaf): index vendor CSAF advisories daily (#515, part B) (#520)
CI / Deploy Agent (push) Successful in 5m38s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m9s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
2026-10-06 16:33:00 +00:00
sharang dc9ca8dcd8 fix(plc): CVE alerts of PLC targets resolve, their issues sync (#519)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 5m21s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m9s
2026-10-06 16:13:58 +00:00
sharang b4dc84671f feat(csaf): read vendor CSAF advisories for matching (#515, part A) (#518)
CI / Deploy MCP (push) Successful in 3m59s
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 5m33s
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m50s
2026-10-06 16:11:07 +00:00
sharang d96509db8c feat(secrets): Betterleaks instead of gitleaks, findings carry over (#516) (#517)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy Agent (push) Successful in 6m54s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
2026-10-06 15:59:10 +00:00
sharang 908e6b8449 feat(vex): ENISA deadlines evaluated by the agent, one notification per CVE (#498 follow-up) (#514)
CI / Deploy Docs (push) Successful in 1m6s
CI / Deploy MCP (push) Successful in 2m57s
CI / Deploy Agent (push) Successful in 5m43s
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m30s
2026-10-06 15:36:38 +00:00
sharang 5f8fbe9802 feat(vex): draft ENISA notifications of actively exploited vulnerabilities (CRA Art. 14) (#498, 4/4) (#513)
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Successful in 2m33s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m10s
CI / Deploy Dashboard (push) Successful in 4m40s
CI / Deploy Agent (push) Successful in 6m26s
2026-10-06 15:16:19 +00:00
sharang 77d27646b8 feat(sbom): component creator from registries and purls (#508, part B2) (#512)
CI / Deploy Agent (push) Successful in 5m57s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 4m1s
CI / Deploy Docs (push) Successful in 1m11s
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 3m12s
2026-10-06 15:03:16 +00:00
sharang cd943b8d67 feat(sbom): lockfile hashes and download URLs in the SBOM (#508, part B1) (#511)
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m16s
CI / Deploy MCP (push) Successful in 2m31s
CI / Detect Changes (push) Successful in 5s
CI / Deploy Dashboard (push) Successful in 4m0s
CI / Deploy Agent (push) Successful in 5m5s
2026-10-06 14:48:40 +00:00
sharang 8538b31682 feat(vex): CSAF 2.0 VEX advisory draft (#498, 3/4) (#510)
CI / Deploy MCP (push) Successful in 2m54s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m23s
CI / Deploy Agent (push) Successful in 9m36s
CI / Deploy Dashboard (push) Successful in 11m5s
CI / Detect Changes (push) Successful in 4s
2026-10-06 14:38:42 +00:00
sharang 1923a6c433 feat(sbom): CycloneDX 1.6 export with BSI TR-03183-2 properties (#508, part A) (#509)
CI / Deploy MCP (push) Successful in 2m21s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 6m54s
CI / Deploy Dashboard (push) Successful in 5m9s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m13s
2026-10-06 14:23:40 +00:00
sharang 4448a5394f feat(dashboard): VEX editor and OpenVEX/CycloneDX VEX downloads on the target page (#498, 2/4) (#505)
CI / Deploy Dashboard (push) Successful in 5m25s
CI / Deploy MCP (push) Successful in 2m34s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 7m14s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m15s
2026-10-06 14:07:10 +00:00
sharangandClaude Opus 5.5 63a2bf2bcb test(nightly): baselines for the vendored semgrep packs and DevSkim (#492, #494) (#507)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Deploy Dashboard (push) Skipped
Blessed by the nightly run 8514 (workflow_dispatch, bless) on the image of
34e3f6c: the vendored gitlab-/0xdea- rules in fw-c-sensor-node, the Python
targets, archive-order-intake and git-cra-vuln-demo, and new baselines for
the .NET targets dotnet-framework48 and dotnet-legacy-sample (DevSkim, the
C# semgrep rules and the .NET config checks). py-uv also records the
malware stage as skipped and one more PYSEC id, as the current image
reports them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-06 13:17:33 +00:00
sharangandClaude Opus 5.5 34e3f6cf6a feat(sast): DevSkim for .NET without a build (#494) (#506)
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m19s
CI / Deploy Agent (push) Successful in 8m23s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 5m25s
Legacy .NET Framework code often cannot be built outside the customer's
Windows toolchain, so no Roslyn analyser applies. DevSkim (MIT, Microsoft)
matches its rules on the source text and now runs as the sast_dotnet stage
on every tree with C# or VB.NET code: .cs, .vb, Razor/ASP.NET pages and
.config files, skipping bin/, obj/, packages/ and vendor directories
(anchored at the tree root).

- Only DevSkim's own rules at Critical/Important/Moderate (its ManualReview
  and BestPractice hints are not findings); DS205000 (NuGet feed mapping),
  DS184626 (controller base class) and DS440000 (generic twin of DS440020)
  are left out, and two that flood real C# (OpenRA, eShopOnWeb): DS148264
  matches any method named Random (71 hits in OpenRA), DS126858 the bare
  words md5/sha1, identifiers included (35). DS168931 and our own semgrep
  rules still cover broken hashes and System.Random. What remains: 3 hits
  in OpenRA (test vectors), 14 Low http:// hits in eShopOnWeb seed data;
  each run took about 2 s.
- SARIF is read with import::sarif::parse; findings are normalised like the
  other scanners (relative path, whole source line as snippet, one finding
  per rule/file/line), severity from DevSkim's own Critical/Important/
  Moderate (its SARIF level says "error" for both of the first two).
- DevSkim's SARIF names no CWE, so pipeline/devskim.rs gives each rule one;
  the control map binds the devskim tool by CWE to cra-ai-1, 8, 10, 13, 14,
  15, 16 and 20 for csharp and vb. A test checks every mapped rule reaches a
  control. A failed run is a sast_dotnet skip, so those controls read "not
  assessed" instead of clean.
- languages.rs now records VB.NET (vb).

Image: the CLI is published as a .NET tool on nuget.org only (no release
binaries). Dockerfile.agent pins the 1.0.100 nupkg by sha256 and the .NET
10.0.12 runtime (no SDK) by sha512, keeps only the linux-x64 natives, and
runs it through docker/devskim.sh with invariant globalisation (no ICU).
The tools stage grows from 1.525 GB to 1.623 GB (+98.5 MB: runtime 80 MB,
DevSkim 16 MB). Checked in that image as the unprivileged user with an empty
environment and --network none: it runs offline. tool-versions.json lists
devskim and dotnet-runtime.

Fixtures: fixtures/dotnet/legacy-sample, a small vulnerable C#/VB.NET
library with a Web.config (SSL 3, certificate validation off, DES, XXE,
BinaryFormatter in VB.NET, tracing, cookies without Secure), and nightly
targets for it and for framework48; their baselines need a bless run after
deploy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-06 12:51:10 +00:00
sharangandClaude Opus 5.5 e51a790d59 feat(sbom): sbomqs quality score as CRA evidence for the SBOM (#496) (#503)
CI / Deploy Docs (push) Successful in 1m19s
CI / Deploy Dashboard (push) Successful in 6m41s
CI / Deploy MCP (push) Successful in 4m49s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 9m41s
CI / Check (push) Skipped
At the end of every completed scan the target's CycloneDX SBOM (the same
document as the evidence pack's sbom.cdx.json) is scored by sbomqs against
BSI TR-03183-2 v2.1 and the NTIA minimum elements (2021).

- Dockerfile.agent pins sbomqs 2.1.2 (Apache-2.0) with the sha256 from the
  release's checksums.txt and lists it in tool-versions.json.
- Profiles by explicit name (bsi-v2.1, ntia-2021): in 2.1.2 `bsi` and
  `ntia` float to the newest BSI and CISA 2026 profiles.
- pipeline/sbom_quality.rs runs it offline through tool_cmd (empty
  environment, 120 s), keeps per profile the score, grade and the checks
  not fully met; stored on the scan run as sbom_quality. Without sbomqs the
  run records the skipped stage sbom_quality.
- Supporting evidence, not findings: attached to cra-ai-23 in the CRA
  status without changing its state, sbom-quality.json in the evidence
  pack, GET /api/v1/sbom/quality for the SBOM page.
- Dashboard: SBOM-Qualität card on the SBOM page, a supporting-evidence line
  on cra-ai-23 on the CRA page.
- Docs: tools.md, SBOM and target guides, staging check 20.

Our export (CycloneDX 1.5, no creator, timestamp, supplier or hashes)
grades F against BSI; the failed checks list what it needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-06 12:35:01 +00:00
sharangandClaude Opus 5.5 d406741907 feat(sast): vendored MIT semgrep packs and a guard against registry rules (#492) (#504)
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
CI / Deploy Dashboard (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
sharang 9bf7aad5b1 feat(vex): VEX status on CVE alerts, OpenVEX and CycloneDX VEX, a valid CycloneDX SBOM (#498, 1/4) (#502)
CI / Deploy Dashboard (push) Successful in 6m25s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 9m6s
CI / Deploy Docs (push) Successful in 1m20s
CI / Deploy MCP (push) Successful in 3m26s
2026-10-06 11:56:04 +00:00
sharangandClaude Opus 5.5 b7dbd8f196 feat(binaries): hardening, signatures, .NET references and Intel HEX checks of committed binaries (#495) (#501)
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy MCP (push) Successful in 3m35s
CI / Deploy Agent (push) Successful in 8m31s
CI / Deploy Dashboard (push) Successful in 5m49s
CI / Check (push) Skipped
On top of the committed-binary inventory (#465), natively in Rust:

- PE: ASLR (DYNAMICBASE, relocations), high-entropy ASLR, DEP, CFG,
  SafeSEH, /GS, Authenticode present; IL-only .NET assemblies skip the
  native-only checks
- ELF (dynamically linked only): RELRO, NX stack, PIE, stack protector,
  FORTIFY; static and bare-metal ELF are not assessed
- .NET: AssemblyRefs from the CLI metadata tables (own ECMA-335 reader)
- native PE: CPE/purl candidates from the version resource, low confidence
- Intel HEX: record checksums, address ranges, size, start address

Evidence goes on the inventory finding; each gap is its own Low/Info
finding per rule (grouped by #477). ASLR/NX/RELRO gaps bind to cra-ai-1 and
a damaged HEX image to cra-ai-6 through attach-only control-map bindings,
which never make a control count as checked.

PE/ELF headers are read with the object crate, already in the build via
firmwerk-sbom: no new crate, no Python helper, no image change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-06 11:40:54 +00:00
sharang 9d1f8b6883 feat(plc): PLC findings keyed by what they flag, saved through RunFindings (#491 follow-up) (#499)
CI / Deploy Docs (push) Successful in 1m9s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Successful in 5m50s
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
2026-10-06 11:27:35 +00:00
sharangandClaude Opus 5.5 f170e7cfe5 feat(cve): KEV, EPSS and Vulnrichment exploitation on every CVE alert (#493) (#500)
CI / Deploy MCP (push) Successful in 4m56s
CI / Deploy Docs (push) Successful in 1m28s
CI / Deploy Agent (push) Successful in 12m8s
CI / Deploy Dashboard (push) Successful in 16m34s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
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 ece992da32 feat(findings): keyed by the code they flag, not its line number (#491) (#497)
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 7m31s
CI / Deploy MCP (push) Successful in 5m29s
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy Agent (push) Successful in 9m24s
CI / Detect Changes (push) Successful in 3s
2026-10-06 10:35:14 +00:00
sharang bdf7fa4268 feat(sbom): npm and Maven licenses from their public registries (#467 follow-up) (#490)
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m8s
CI / Deploy Agent (push) Successful in 4m47s
2026-10-06 09:17:32 +00:00
sharang d7ab09f634 feat(sbom): transitive NuGet packages resolved from nuget.org metadata (#461) (#489)
CI / Deploy Docs (push) Successful in 1m12s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 6m21s
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Skipped
2026-10-06 09:07:35 +00:00
sharang d960ba658e feat(malware): ClamAV stage, committed-binary inventory, unchanged rescans skipped (#465) (#488)
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 4m37s
CI / Deploy Dashboard (push) Successful in 6m31s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m11s
CI / Deploy Agent (push) Successful in 8m3s
2026-10-06 08:49:39 +00:00
sharang ecc6466a18 fix(git): the clone cache heals itself after an interrupted clone or fetch (#486) (#487)
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Successful in 1m11s
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 6m7s
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
2026-10-06 08:19:13 +00:00
sharang 530df9cc3d docs(release): staging test plan for the batch after v0.4.5 (#485)
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m8s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 4m49s
2026-10-06 01:25:15 +00:00
sharang 770991c2c5 fix(findings): groups take over their places' human decisions (#483) (#484)
CI / Deploy MCP (push) Successful in 3m15s
CI / Deploy Dashboard (push) Successful in 6m20s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 8m48s
CI / Deploy Docs (push) Skipped
2026-10-06 01:15:48 +00:00
sharang 70e7bc9533 test(nightly): public mobile apps at pinned commits; two scanner fixes they exposed (#482)
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 4m43s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
2026-10-06 00:59:32 +00:00
sharang 2893a5813e feat(findings): app variants (phone/tablet app, flavors, app targets) on every finding (#481)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 4m18s
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy Dashboard (push) Successful in 6m5s
CI / Deploy Agent (push) Successful in 7m44s
2026-10-06 00:26:59 +00:00
sharang 25072056dc feat(unity): mobile build targets from Player Settings; generated app projects recorded (#480)
CI / Deploy Dashboard (push) Successful in 4m54s
CI / Deploy MCP (push) Successful in 3m51s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m11s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 6m2s
2026-10-05 23:56:34 +00:00
sharangandClaude Opus 5.5 918c871a25 feat(findings): one finding for a rule that fires all over a repository (#464) (#477)
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 3m45s
CI / Deploy Dashboard (push) Successful in 6m31s
CI / Deploy Agent (push) Successful in 8m33s
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 7s
Closes #464.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 23:52:07 +00:00
sharang 5b2deec9e8 feat(ios): secrets in UserDefaults, URL schemes and permissions of iOS apps (#479)
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy Dashboard (push) Successful in 5m51s
CI / Deploy Agent (push) Successful in 7m29s
CI / Detect Changes (push) Successful in 4s
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 MCP (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 7m26s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Successful in 1m10s
CI / Check (push) Skipped
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
sharang 2941d89fc5 feat(ios): Carthage pins in the SBOM, iOS and Swift lifecycle findings (#478)
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Canceled after 0s
CI / Deploy Docs (push) Successful in 1m8s
CI / Deploy MCP (push) Skipped
2026-10-05 23:14:04 +00:00
sharangandClaude Opus 5.5 fc099d07c1 fix(findings): bare semgrep rule ids, real umlauts in control titles (#463) (#473)
CI / Deploy MCP (push) Successful in 3m46s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 8m44s
CI / Deploy Dashboard (push) Successful in 6m6s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
Closes #463.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 23:07:14 +00:00
sharangandClaude Opus 5.5 d8c52192d9 fix(sbom): .NET assemblies from DLL metadata mapped to NuGet ids (#460) (#474)
CI / Deploy Dashboard (push) Successful in 6m14s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Successful in 8m21s
CI / Deploy Docs (push) Successful in 52s
CI / Deploy MCP (push) Successful in 3m28s
Syft names a DLL without a .deps.json by its version resource: product
name and file version. As a purl that is no NuGet package, so OSV
matched nothing: pkg:nuget/DotNetZip%20Library@1.9.1.5 has no advisory,
pkg:nuget/DotNetZip@1.9.1.5 has GHSA-7378-6268-4278.

Syft's dotnet-portable-executable-entry components are now mapped, in
this order:

- a DLL inside packages/<Id>.<Version>/ is that package
- a curated alias table, by assembly name (file name) and then product
  name (DotNetZip Library -> DotNetZip, Json.NET -> Newtonsoft.Json,
  Apache log4net -> log4net, Xceed Toolkit for WPF ->
  Extended.Wpf.Toolkit, empira MigraDoc -> PDFsharp-MigraDoc), with how
  the package's file versions relate to its versions (Newtonsoft.Json:
  first three parts; EntityFramework: unrelated, so the DLL only
  confirms a manifest entry)
- the assembly name, when it is a valid NuGet id and not one of the
  tree's own projects (project name or <AssemblyName>), whose names are
  not sent to OSV or nuget.org
- otherwise no purl, and the scan records the assembly as not matched
  against OSV

Alias before file name: DotNetZip ships Ionic.Zip.dll, and Ionic.Zip is
a different package. Versions go through nuget_license's
normalise_version (4.1.0.0 -> 4.1.0, +build dropped); a non-zero fourth
part stays (1.9.1.5 is a real NuGet version).

One package found in several DLLs, or in a DLL and a manifest, is one
entry: SbomEntry gains `evidence` (the manifests and DLLs it was read
from), and merge_nuget compares normalised versions and merges the
evidence instead of dropping it. Native pe-binary components are left
as they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 22:54:44 +00:00
sharangandClaude Opus 5.5 0c0eedb242 fix(triage): stop asking a model that is down (#462) (#475)
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Successful in 7m2s
The per-id retries of #472 ask about a finding up to three times, the
critical/high ones on their own. A model that accepts requests and never
answers would hold each call for the client's 300 s timeout: up to 720
calls instead of 60. When every call in flight fails at once, the model
is taken as down; what it answered so far is kept, the rest is recorded
as "skipped: no answer". An unreadable answer still counts as an answer
and is asked about again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 22:48:15 +00:00
sharangandClaude Opus 5.5 6f2e278969 fix(triage): every critical/high finding gets a verdict, stored on rescans too (#462) (#472)
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 6m29s
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
The LLM triage of the first pilot scans left 74 of 75 findings without a
triage_action. Three causes:

- Partial answers: 30 findings per call with a 4096-token budget that a
  reasoning model spends on thinking and the answer together. The answer
  was cut off after a few verdicts; #457 only retries an empty answer.
  Verdicts were also matched by position and the echoed id was ignored,
  so a finding the model left out shifted every later verdict.
- Not persisted: write_back stored triage fields only on rows this run
  inserted. A rescan (or a scan restarted after stages 1-4 had saved its
  findings) triaged them, then dropped the result.
- Unanswered findings were marked "triaged" and counted as "passed".

Now:
- 10 findings per call with a 12k budget (below #457's retry budget);
  verdicts matched by id (the finding's number in the chunk, or its
  fingerprint), by position only when the answer carries no ids
- findings without a verdict are asked again by id in chunks half the
  size, then each critical/high one on its own
- one call per fingerprint: copies (gitleaks reports a secret once per
  commit) share the verdict
- low/info findings are not sent; recorded as triage_action "skipped",
  rationale "skipped: low"; likewise "skipped: over cap" and "skipped:
  no answer". Skipped findings keep their status (open).
- write_back stores triage on rows an earlier run stored while nobody
  has decided about them (open/triaged/needs_review); a skip never
  replaces an earlier verdict; status still only onto open rows
- one summary line per scan replaces "N findings passed confidence
  threshold": triaged by outcome, skipped by reason, LLM calls
- dismissed and low-confidence findings stay as needs_review (#367):
  nothing is dropped

Tests drive the triage with a fake model: partial answer then retry by
id, malformed chunks, model down, threshold, lows and copies, and the
stored updates for new and earlier rows.

Closes #462

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 22:29:44 +00:00
sharang 0e7a138cd4 feat(access): blocked workspace members are refused (portal#74) (#471)
CI / Deploy MCP (push) Successful in 3m30s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 7m28s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 5m12s
CI / Deploy Docs (push) Skipped
2026-10-05 22:21:20 +00:00
sharangandClaude Opus 5.5 788c57094e feat(platform): build commit in the version handshake (#470)
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 6m13s
CI / Detect Changes (push) Successful in 4s
GET /api/v1/platform/version reported the crate version (0.4.4) and no
commit, so the portal's staff dashboard showed Prüfwerk without one. The
agent now reads PRUEFWERK_VERSION and PRUEFWERK_COMMIT at compile time;
the deploy-agent job passes the latest v* tag (without its v) and the
commit as Docker build args, like the tenant-registry's GET /version.
Locally, or with empty args, it falls back to the crate version and
"unknown".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 22:20:18 +00:00
sharangandClaude Opus 5.5 34688fa322 feat(sbom): NuGet licenses from .nuspec files, then nuget.org (#468)
CI / Deploy Agent (push) Successful in 4m44s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Successful in 1m9s
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
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 04b4f32807 feat(mobile): legacy Android and Unity builds flagged, not resolved; Android found everywhere (#466)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy Dashboard (push) Successful in 5m0s
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 6m27s
2026-10-05 21:17:52 +00:00
sharang 0da96110c3 feat(lifecycle): scans interrupted by an agent restart start again (#459)
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 4m42s
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 3s
2026-10-05 20:14:27 +00:00
sharang 3822d624e1 fix(git-source): managed targets get the type their code shows (#458)
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 2m28s
CI / Deploy Agent (push) Successful in 5m41s
CI / Deploy Dashboard (push) Successful in 4m21s
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
2026-10-05 20:14:21 +00:00
sharang 96da28dd3f fix(llm): a reasoning model out of tokens is asked again with a larger budget (#457)
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 5m24s
2026-10-05 19:09:08 +00:00
sharang 6c9756bebf feat(secrets): Android signing passwords and Firebase keys; our gitleaks config only (#456)
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Canceled after 0s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
2026-10-05 18:31:33 +00:00
sharang d98cbbada4 fix(dashboard): readable tool names for findings, including the new .NET and mobile checks (#455)
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m31s
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 3s
2026-10-05 18:26:27 +00:00
sharang 808b6ab3aa fix(mcp): MCP server cards per tenant, not shared by all (#454)
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Canceled after 0s
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Canceled after 0s
2026-10-05 18:19:04 +00:00
sharang 81699b2111 fix(triage): read imperfect batch answers and retry unanswered findings once (#453)
CI / Deploy Agent (push) Canceled after 0s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 5s
2026-10-05 18:15:19 +00:00
sharang 7e3d57b648 feat(issues): critical and high CVEs as issues in managed repositories (#452)
CI / Deploy MCP (push) Successful in 2m49s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 4m23s
CI / Deploy Agent (push) Successful in 5m40s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 45s
2026-10-05 17:52:36 +00:00
sharangandClaude Opus 5.5 8926255d6f feat(dotnet): .NET detection, NuGet SBOM, C# rules and config checks (#447)
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m10s
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 4m42s
CI / Check (push) Skipped
Minimal .NET/C# support for epic #445 (N1-N5): detection of solutions/projects and target frameworks, NuGet SBOM without build or restore (pkg:nuget purls for OSV, unresolved-dependency warning, end-of-support frameworks), own C# semgrep rule pack, .NET configuration and key-file checks, .NET build output and restored packages not counted as own code. Fixture fixtures/dotnet/framework48, docs .NET-Projekte (DE/EN).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 14:38:13 +00:00
sharang 654f387c80 feat(issues): a tracker issue follows its finding's status (#451)
CI / Deploy Agent (push) Successful in 5m45s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m8s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
2026-10-05 14:14:13 +00:00
sharang 2cbd98e5c0 feat(git): bounded clones, Git LFS made visible, app build output left out (#450)
CI / Deploy Dashboard (push) Successful in 5m33s
CI / Deploy Agent (push) Successful in 7m27s
CI / Deploy Docs (push) Successful in 1m12s
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 4m11s
CI / Check (push) Skipped
2026-10-05 14:05:19 +00:00
sharang e92c395e50 feat(classify): Android modules at any depth, Unity, React Native, Flutter, .NET split (#449)
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Successful in 7m30s
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
2026-10-05 14:02:43 +00:00
sharang 3790b9c6cc fix(sast): concurrent scans no longer fail semgrep while staging the rules (#448)
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 8m13s
2026-10-05 13:48:56 +00:00
sharang 04d0ad5113 feat(sbom): direct dependencies of Gradle builds without a lockfile (#446)
CI / Deploy Agent (push) Canceled after 0s
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Successful in 3m50s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy Dashboard (push) Successful in 5m44s
2026-10-05 13:39:02 +00:00
sharang a9ca31d60c feat(sast): Android and iOS app analysis with mobsfscan (#442)
CI / Deploy Agent (push) Successful in 9m28s
CI / Deploy Docs (push) Canceled after 0s
CI / Deploy Dashboard (push) Canceled after 0s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
2026-10-05 13:38:45 +00:00
sharang 82736a1eec feat(findings): a scan closes what it no longer finds and reopens what returns (#443)
CI / Deploy MCP (push) Successful in 3m12s
CI / Deploy Agent (push) Successful in 8m37s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 6m40s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m14s
2026-10-05 13:16:35 +00:00
sharangandClaude Opus 5.5 a66b7a5991 fix(sast): run only our own semgrep rules, no registry rules or metrics (#441)
CI / Deploy Agent (push) Successful in 4m35s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m11s
CI / Deploy MCP (push) Skipped
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
sharangandClaude Opus 5.5 260d07c783 feat(agent): managed git source — auto targets and CRA issues (#439) (#444)
CI / Deploy Docs (push) Successful in 1m12s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m15s
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 4m22s
CI / Deploy Agent (push) Successful in 7m42s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-10-05 10:39:19 +00:00
sharang 9b85d5148e fix(sbom): no clean-looking result for mobile apps without readable lockfiles (#440)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m15s
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m20s
CI / Deploy Agent (push) Successful in 7m53s
CI / Check (push) Skipped
2026-10-01 18:45:27 +00:00
sharangandClaude Opus 5.5 5429ff6f0e fix(auth): enforce tenant org roles; crates at 0.4.4 (#431)
CI / Deploy MCP (push) Successful in 4m19s
CI / Deploy Dashboard (push) Successful in 6m7s
CI / Deploy Agent (push) Successful in 7m27s
CI / Deploy Docs (push) Successful in 1m11s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
Every member of a tenant could use Prüfwerk fully, whatever their org
role: nothing but manual findings checked org_roles. A FINANCE user
could create and delete targets, start scans and triage findings.

Now, as decided on 30.09.2026:
- IT_ADMIN, USER: read and write.
- CXO, LEGAL: read only. GET/HEAD/OPTIONS plus the POSTs that only
  read (OSCAL assess, pentest report export, code chat, help chat).
- FINANCE or no role: no access.

- Agent: one middleware (api::role_gate) right after the JWT one
  refuses with 403 {"error":"forbidden_role","access":...}. It is
  classified by route template, so ids do not matter. Support sessions
  (TenantContext.staff) and requests without a tenant context
  (platform service API, Werkbank runner and admin APIs, health) are
  unchanged. Manual findings stay IT_ADMIN-only.
- Core: ProductAccess and TenantContext::product_access.
- Dashboard: a role without access sees a "no access" page (DE/EN)
  with a link back to the portal, and no server function runs for it.
  Read-only roles get a read-only note, and write actions (add target,
  scan, edit, delete, triage, tokens, MCP servers, pentest control,
  graph/embedding builds, notification dismiss) are hidden. The direct
  MCP server functions check the role, and access tokens are withheld
  from read-only roles.
- MCP server: unchanged. Its tokens are tenant-bound and carry no
  roles, its tools only read, and creating a token now needs write
  access.
- Docs: the roles table in Getting Started.
- The crates are at version 0.4.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-09-30 21:59:07 +00:00
sharangandClaude Opus 5.5 77164c2050 fix: self-host fonts (no Google Fonts request) and crates at 0.4.3 (#430)
CI / Deploy MCP (push) Successful in 4m46s
CI / Detect Changes (push) Successful in 6s
CI / Deploy Docs (push) Successful in 1m29s
CI / Deploy Dashboard (push) Successful in 12m37s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 9m53s
The dashboard, the docs site and the pentest report no longer load
Google Fonts, so no visitor's IP goes to Google (platform/portal#65,
privacy release gate 4).

- Dashboard: Geist and Geist Mono (variable woff2, SIL OFL 1.1) are
  embedded and served at /fonts/geist.woff2 and /fonts/geist-mono.woff2;
  main.css declares them with @font-face under the same family names.
- Docs: the same woff2 files are bundled by Vite from the theme; the
  Google Fonts links in config.mts are gone.
- Pentest report: preconnects and the Google Fonts stylesheet removed;
  a system font stack instead, with a test that the report references
  no external resource.
- The crates are at version 0.4.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-09-30 20:48:02 +00:00
sharang 6a150b4aee fix(dashboard): favicon at /favicon.svg, and the crates at version 0.4.2 (#429)
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 4m25s
CI / Deploy Dashboard (push) Successful in 6m6s
CI / Deploy Agent (push) Successful in 7m29s
CI / Detect Changes (push) Successful in 3s
2026-09-29 15:56:00 +00:00
sharang 001ab17b47 feat(audit): record project assignments in the workspace audit log (#428)
CI / Deploy Agent (push) Successful in 4m54s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
2026-09-29 14:34:34 +00:00
sharang 202f5ea325 feat(projects): assign targets to the tenant's projects (#427)
CI / Deploy MCP (push) Successful in 4m18s
CI / Deploy Dashboard (push) Successful in 5m59s
CI / Deploy Agent (push) Successful in 7m20s
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
2026-09-29 14:13:01 +00:00
sharang ec5a68a982 fix(dashboard): staff sign in directly, and old history entries read as people (#426)
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m17s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
2026-09-29 08:23:35 +00:00
sharang 96d97ae6eb feat(support): BreakPilot support can open any tenant, attributed and audited (#425)
CI / Deploy MCP (push) Successful in 4m24s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 7m22s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m0s
2026-09-29 07:37:12 +00:00
sharang 6d8e63c226 feat(help): readable assistant answers, German UI, and docs that match the pilot product (#424)
CI / Deploy Dashboard (push) Successful in 5m34s
CI / Deploy MCP (push) Successful in 4m26s
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 7m24s
CI / Deploy Docs (push) Successful in 1m20s
2026-09-28 22:39:06 +00:00
sharang 99f0bb33e9 fix(dashboard): help assistant signs in, scan list follows a started scan, catalog controls readable (#423)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 4m59s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 6m16s
2026-09-28 21:59:07 +00:00
sharang f7c2c03415 feat(scans): PLC control mapping shows as its own phase (#422)
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 5m34s
2026-09-28 21:53:03 +00:00
sharang fce9edfbeb feat(scans): show sub-steps of "Projekt erkennen" and clone once per scan (#421)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m6s
CI / Deploy MCP (push) Successful in 4m20s
CI / Deploy Agent (push) Successful in 8m25s
2026-09-28 21:40:00 +00:00
sharang d4bfb4dc2a fix(dashboard): adding demo targets selects them by key (#420)
CI / Deploy Agent (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m42s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
2026-09-28 21:23:48 +00:00
sharang 6fe7874ccd fix(scan): "Prüfung starten" always scans, and a skipped scan says why (#419)
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 4m4s
CI / Deploy Agent (push) Successful in 7m0s
CI / Deploy Dashboard (push) Successful in 5m43s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
2026-09-28 20:52:10 +00:00
sharang 420ce241cd fix(dashboard): an expired sign-in goes to the login, and the evidence pack says why it failed (#418)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 7m40s
CI / Deploy MCP (push) Successful in 4m3s
CI / Deploy Dashboard (push) Successful in 5m58s
CI / Deploy Docs (push) Skipped
2026-09-28 20:40:02 +00:00
sharang 8972db0594 feat(findings): two kinds of Fehlalarm, the rule's and the mapping's (#417)
CI / Deploy Dashboard (push) Successful in 5m42s
CI / Deploy Agent (push) Successful in 7m7s
CI / Deploy MCP (push) Successful in 4m21s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 4s
2026-09-28 18:55:53 +00:00
sharang e9bda32dc6 fix: findings from the first acceptance round (#415)
CI / Deploy Dashboard (push) Successful in 4m37s
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 5m59s
2026-09-28 16:18:11 +00:00
sharang a35b57ee50 fix(scan): a failed run says why in plain words, never with a raw error (#414)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m9s
CI / Deploy MCP (push) Successful in 2m0s
CI / Deploy Agent (push) Successful in 4m5s
2026-09-26 11:01:04 +00:00
sharang e09c0d0a9d fix(scan): skipped stages name a file or tool, never a server path (#413)
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 4m53s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 3m39s
CI / Deploy Agent (push) Successful in 5m0s
CI / Detect Changes (push) Successful in 3s
2026-09-26 10:41:34 +00:00
sharang 17633083e0 fix(compliance): an empty SBOM claims nothing about the SBOM requirements (#412)
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 5s
CI / Deploy Dashboard (push) Successful in 11m42s
CI / Deploy Agent (push) Successful in 9m11s
2026-09-26 10:22:15 +00:00
sharang bcb6bfd91c feat(dashboard): navigation on a phone (#411)
CI / Deploy Agent (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 3m16s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
2026-09-26 09:03:53 +00:00
sharang 87078a25b2 feat(dashboard): the CRA status page grouped by what needs doing (#410)
CI / Deploy Dashboard (push) Successful in 4m5s
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 4s
2026-09-26 08:55:08 +00:00
sharang d1a4147488 feat(dashboard): a page per target, and a targets list that leads to it (#408)
CI / Check (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Deploy Dashboard (push) Successful in 4m7s
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
2026-09-26 08:46:23 +00:00
sharang 6ab3390db3 feat(dashboard): an overview built around where each target stands on the CRA (#407)
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 6m8s
CI / Deploy Agent (push) Successful in 7m46s
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
2026-09-26 08:35:35 +00:00
sharang 2a10a932b0 feat(dashboard): the platform's look, German throughout, and findings a customer can read (#406)
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 6m0s
CI / Deploy Agent (push) Successful in 7m34s
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
2026-09-26 08:25:43 +00:00
sharang bf24fb3370 docs: a German home and getting started for Maschinenbauer (#405)
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Skipped
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 53s
2026-09-26 08:25:10 +00:00
sharang 96aab82382 docs(design): deriving checks from breakpilot-compliance controls (#383) (#400)
CI / Deploy Agent (push) Skipped
CI / Deploy Docs (push) Successful in 51s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
2026-09-25 20:43:10 +00:00
sharang 0bd7ae560e feat(controls): ship the master-controls snapshot; semantic mapping capped (#403)
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 5m27s
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
2026-09-25 20:28:09 +00:00
sharang 6d78d2cd1e feat(scan): findings are saved as each stage ends, and show while the scan runs (#372) (#401)
CI / Deploy Agent (push) Successful in 6m17s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 4m31s
2026-09-25 19:38:57 +00:00
sharang 33394cc609 feat(controls): the catalog's ratings, and a check text per binding (#381) (#399)
CI / Deploy Agent (push) Successful in 7m40s
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m48s
CI / Deploy MCP (push) Successful in 3m59s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
2026-09-25 19:10:10 +00:00
sharang fdf22e99c0 test: lint test code in CI, and run core's integration tests (#379) (#398)
CI / Deploy MCP (push) Successful in 3m57s
CI / Deploy Agent (push) Successful in 7m26s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 5m28s
2026-09-25 11:41:56 +00:00
sharang 08c68db65f docs(controls): the control-mapping page matches the code again (#378) (#397)
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Successful in 49s
2026-09-25 11:32:48 +00:00
sharang ce93cc08d5 test(nightly): the report shows each target's CVE matches (#377) (#396)
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Successful in 5m28s
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Skipped
2026-09-25 11:31:54 +00:00
sharang a3cfaf422f fix(sast): an upper-case format macro is not a non-literal format (#380) (#395)
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 4m3s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
2026-09-25 11:27:23 +00:00
sharang aee2f5b9eb feat(sast): hard-coded credentials in #define macros (#374) (#392)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 5m54s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
2026-09-25 11:16:32 +00:00
sharang a3e0618283 feat(controls): the grounded surface check reads C and C++ (#376) (#394)
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Canceled after 0s
CI / Detect Changes (push) Successful in 4s
2026-09-25 11:09:01 +00:00
sharang 827b7196b5 feat(sbom): FreeRTOS+TCP and FatFs in firmware trees, matched in NVD (#375) (#393)
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Canceled after 0s
2026-09-25 11:07:07 +00:00
sharang 9a0d690036 feat(sast): the CRA C rules also run on C++ (#373) (#391)
CI / Deploy Agent (push) Successful in 7m13s
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Skipped
2026-09-25 11:01:43 +00:00
sharang e399cea0b6 fix(cve): NVD lookups retry, cache, and record what they missed (#387) (#390)
CI / Deploy Dashboard (push) Successful in 5m21s
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 7m24s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
2026-09-25 10:52:38 +00:00
sharang e6e5b14a04 feat(dashboard): a running scan shows its stages, time and results live (#371) (#389)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 5m46s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 7m37s
CI / Deploy MCP (push) Successful in 4m1s
CI / Deploy Docs (push) Skipped
2026-09-25 10:39:53 +00:00
sharang 80eb7f462c feat(ingest): password-protected archives; 7z and rar refused clearly (#370) (#388)
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m32s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 6m3s
2026-09-25 09:59:17 +00:00
sharang 52d3735d21 fix(sast): recognise common embedded vendor layouts (#369) (#386)
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 7m15s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
2026-09-25 09:58:23 +00:00
sharang 62da6dbbf7 fix(compliance): claim "no violation found" only where a rule checked the code (#368) (#385)
CI / Deploy Agent (push) Successful in 7m48s
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 4m3s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m52s
2026-09-25 09:45:43 +00:00
sharang 5f7c947fb3 fix(triage): the automated review never hides a finding (#367) (#384)
CI / Deploy Agent (push) Successful in 7m47s
CI / Deploy Dashboard (push) Successful in 5m55s
CI / Deploy MCP (push) Successful in 4m4s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 4s
2026-09-25 08:39:16 +00:00
sharang 79b8bef8ba fix(dashboard): read the docs URL at runtime (#366)
CI / Deploy Agent (push) Successful in 6m58s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 3m56s
CI / Deploy Dashboard (push) Successful in 5m35s
2026-09-25 07:54:07 +00:00
sharang 33eb46df76 feat(dashboard): a link back to the platform portal (#365)
CI / Deploy Dashboard (push) Successful in 5m34s
CI / Deploy MCP (push) Successful in 4m7s
CI / Deploy Agent (push) Successful in 7m1s
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
2026-09-24 12:16:55 +00:00
sharang d7316dc403 fix(dashboard): the docs link opens the docs, not a 404 (#364)
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m46s
2026-09-24 12:07:58 +00:00
sharang 12b7e9b6b8 fix(dashboard): the demo targets dialog in German (#363)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 2m59s
2026-09-24 10:15:46 +00:00
sharang 6d700589fe ci: never drop a main run's deploy when merges land close together (#362)
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Skipped
CI / Check (push) Skipped
2026-09-24 09:40:32 +00:00
sharangandClaude Opus 5.5 492247625e fix(dashboard): keep the dashboard out of search indexes (#361)
CI / Deploy Dashboard (push) Successful in 2m48s
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-09-23 22:03:42 +00:00
sharangandClaude Opus 5.5 6a6587a074 feat(notify): mail the workspace when a scan finds something new (#360)
CI / Deploy Agent (push) Successful in 4m3s
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 4s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-09-23 20:47:26 +00:00
sharang 33b1b3127c fix(control-map): umlauts in the CRA control titles (#359)
CI / Deploy Agent (push) Canceled after 0s
CI / Check (push) Canceled after 0s
CI / Deploy MCP (push) Canceled after 0s
CI / Deploy Dashboard (push) Canceled after 0s
CI / Detect Changes (push) Canceled after 0s
CI / Deploy Docs (push) Canceled after 0s
2026-09-23 20:39:49 +00:00
sharang 0441220330 fix(targets): the targets list counts findings live (#358)
CI / Detect Changes (push) Canceled after 0s
CI / Deploy MCP (push) Canceled after 0s
CI / Deploy Docs (push) Canceled after 0s
CI / Deploy Dashboard (push) Canceled after 0s
CI / Check (push) Canceled after 0s
CI / Deploy Agent (push) Canceled after 0s
2026-09-23 20:39:18 +00:00
sharang 9d23b2c8e0 feat(dashboard): breakpilot branding and the portal's ledger design (#357)
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Canceled after 0s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Detect Changes (push) Successful in 3s
2026-09-23 20:02:33 +00:00
sharang 6752f54036 feat(retention): deleting a target or erasing a tenant removes its files (#289) (#355)
CI / Deploy Docs (push) Successful in 53s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 4m12s
2026-09-23 16:12:09 +00:00
sharang 0249aee44a feat(compliance): per-target CRA Annex I status (#283) (#354)
CI / Deploy Agent (push) Successful in 7m36s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m43s
2026-09-23 16:03:24 +00:00
sharang 48c113bc41 feat(mcp): contract tools for targets, scans, SBOM, CVEs and the control mapping (#273) (#353)
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 54s
CI / Deploy Agent (push) Successful in 7m26s
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 2m16s
CI / Deploy Dashboard (push) Successful in 5m42s
2026-09-23 15:54:40 +00:00
sharang 88495f0c77 test(shutdown): wait for the handler to start instead of 100 ms (#356)
CI / Deploy Dashboard (push) Successful in 5m37s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 7m57s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 2m42s
2026-09-23 15:46:48 +00:00
sharang c62b5c7ee2 feat(evidence): the evidence pack of a target, served as a ZIP (#285) (#352)
CI / Detect Changes (push) Successful in 5s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m18s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 7m2s
2026-09-23 15:37:46 +00:00
sharang ff62bf4210 feat(sbom): CVEs for FreeRTOS, lwIP, Mbed TLS and wolfSSL in firmware trees (#351)
CI / Deploy Agent (push) Successful in 5m19s
CI / Deploy Dashboard (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
2026-09-23 15:13:09 +00:00
sharang 32bdada66b feat(findings): accepted risk, a who/when/why history, strict status values (#350)
CI / Deploy Dashboard (push) Successful in 5m54s
CI / Deploy Agent (push) Successful in 8m6s
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 2m49s
CI / Deploy Docs (push) Skipped
2026-09-23 15:03:26 +00:00
sharang a5fb0aa947 feat(findings): add pentest and DAST findings by hand or from a report (#337) (#349)
CI / Deploy Dashboard (push) Successful in 5m54s
CI / Deploy Docs (push) Successful in 1m3s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Successful in 1m57s
CI / Deploy Agent (push) Successful in 7m41s
2026-09-23 14:46:34 +00:00
sharang 8f7a2afe4d feat(dashboard): SBOM page in German and English (#348)
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 3m55s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Skipped
2026-09-23 14:38:50 +00:00
sharang 338849d050 feat(git): check out submodules, each URL held to the remote's checks (#347)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m54s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 7m29s
2026-09-23 14:29:05 +00:00
sharang fe318c2b85 feat(targets): git tokens for private repositories, kept across edits (#303, #304) (#346)
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m53s
CI / Detect Changes (push) Successful in 5s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 7m47s
2026-09-23 14:19:19 +00:00
sharang 8386032565 feat(dashboard): findings show where and what, and saves wait (#345)
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Skipped
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m54s
2026-09-23 14:11:32 +00:00
sharang efb2c8a1ea feat(dashboard): onboarding starts the first scan and shows its progress (#344)
CI / Deploy Agent (push) Skipped
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m59s
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 4s
2026-09-23 14:03:45 +00:00
sharang 52359d1786 feat(dashboard): scan status and history on the targets page (#343)
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 7m11s
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m37s
2026-09-23 13:55:01 +00:00
sharang 5efc267075 feat(dashboard): German by default, English switchable (#336) (#342)
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Agent (push) Skipped
CI / Deploy Dashboard (push) Successful in 10m0s
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
2026-09-23 13:46:15 +00:00
sharang dae80043e6 fix(firmware): produce the firmware SBOM when detection finds firmware (#341)
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 13s
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 7m35s
2026-09-23 13:37:12 +00:00
sharang 0e0dfadf56 feat(ingest): unpack tar and tar.gz source archives (#335) (#340)
CI / Deploy Agent (push) Successful in 6m4s
CI / Deploy MCP (push) Successful in 2m10s
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 4m33s
2026-09-23 13:08:06 +00:00
sharang fbf3a7cf29 feat(sast): C/C++ SAST for microcontroller firmware (#334) (#339)
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 6m55s
CI / Detect Changes (push) Successful in 6s
2026-09-23 13:07:50 +00:00
sharang c6d2d07999 fix(sbom): stop resolving tenant manifests in shared deployments (#330) (#333)
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m26s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 57s
CI / Deploy Agent (push) Successful in 6m48s
CI / Deploy MCP (push) Successful in 3m41s
2026-09-23 08:59:35 +00:00
sharang 44a48957c1 feat(ci): JavaScript/TypeScript and Python fixtures for the nightly (#310) (#331)
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Successful in 3m53s
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy MCP (push) Skipped
2026-09-23 08:15:00 +00:00
sharang fe2414a3c0 feat(scans): scan uploaded source archives like repositories (#325) (#329)
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 3m53s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 4s
2026-09-23 07:22:05 +00:00
sharang f90bfcc5c6 fix(scans): stop offering scans nothing runs, and record them (#319) (#328)
CI / Deploy MCP (push) Successful in 3m39s
CI / Deploy Dashboard (push) Successful in 5m21s
CI / Deploy Agent (push) Successful in 6m43s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 53s
2026-09-22 21:05:31 +00:00
sharang 27e8c866ba fix(sbom): firmware SBOMs list what the manifests declare (#317) (#327)
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 1m50s
CI / Deploy Agent (push) Successful in 4m31s
CI / Deploy Dashboard (push) Successful in 2m47s
CI / Check (push) Skipped
2026-09-22 20:34:06 +00:00
sharang 42c7b09151 feat(ci): firmware and RTOS fixtures for the nightly scan regression (#313) (#326)
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 3m59s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
2026-09-22 05:36:10 +00:00
sharang d4cbdc822a feat(ci): PLC fixtures for the nightly scan regression (#314) (#324)
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 7m50s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
2026-09-21 21:48:42 +00:00
sharang af9c640bc1 feat(ci): nightly scan regression against the built image (#188) (#323)
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 3m35s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 5m18s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 7m0s
2026-09-21 21:21:20 +00:00
sharang 40c7557349 feat(security): pin resolved addresses and check every redirect hop (#294) (#322)
CI / Deploy Docs (push) Successful in 54s
CI / Deploy Dashboard (push) Successful in 5m20s
CI / Deploy Agent (push) Successful in 6m41s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 3m41s
2026-09-21 20:26:43 +00:00
sharang 0444f18a8e feat(platform): harden the container images (#261) (#307)
CI / Deploy MCP (push) Successful in 4m0s
CI / Deploy Dashboard (push) Successful in 6m25s
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy Agent (push) Successful in 9m12s
2026-09-21 17:28:23 +00:00
sharang 616732b3a3 feat(security): harden dashboard sessions, fix the login open redirect (#260) (#306)
CI / Deploy MCP (push) Successful in 3m49s
CI / Deploy Agent (push) Successful in 7m2s
CI / Deploy Dashboard (push) Successful in 5m38s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 3s
2026-09-21 16:42:42 +00:00
sharang 6611c5b691 feat(security): seal tenant credentials at rest, never return them (#260) (#302)
CI / Deploy MCP (push) Successful in 3m52s
CI / Deploy Dashboard (push) Successful in 5m38s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m8s
CI / Deploy Agent (push) Successful in 7m6s
2026-09-21 16:28:54 +00:00
sharang 85959907b7 feat(platform): graceful shutdown and restart recovery (#259) (#301)
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 1m9s
CI / Deploy MCP (push) Successful in 3m51s
CI / Deploy Agent (push) Successful in 6m53s
CI / Deploy Dashboard (push) Successful in 5m35s
2026-09-21 15:35:54 +00:00
sharang bc4553d576 chore: replace every remaining "tramiton" with Firmwerk (#300)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 6m50s
CI / Deploy MCP (push) Successful in 2m25s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Successful in 5m10s
CI / Deploy Docs (push) Successful in 1m7s
2026-09-21 11:38:35 +00:00
sharang 592f947de7 feat(security): stream uploads end to end, bound request bodies (#258) (#299)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 6m46s
CI / Deploy MCP (push) Successful in 2m36s
CI / Deploy Docs (push) Skipped
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 8m31s
2026-09-21 11:37:18 +00:00
sharang 55da128a3c feat(security): bound memory on queries, archives and concurrent scans (#258) (#297)
CI / Deploy Docs (push) Successful in 1m11s
CI / Deploy Agent (push) Successful in 6m57s
CI / Deploy MCP (push) Successful in 3m52s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 5m33s
2026-09-21 11:01:54 +00:00
sharang 06d2f458e6 feat(security): stop executing code from scanned repositories (#257) (#296)
CI / Deploy Docs (push) Successful in 1m7s
CI / Deploy MCP (push) Successful in 2m56s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 3m57s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 4m54s
2026-09-21 10:27:59 +00:00
sharang cc3a9c7130 feat(platform): isolate tenants on disk, in the runner API and on webhooks (#255) (#295)
CI / Deploy Docs (push) Successful in 1m10s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 3m49s
CI / Deploy Dashboard (push) Successful in 5m32s
CI / Deploy Agent (push) Successful in 6m52s
2026-09-21 06:53:36 +00:00
sharang eef3ccdf43 feat(security): refuse scans aimed at our own network (#256) (#293)
CI / Deploy MCP (push) Successful in 3m12s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m23s
CI / Deploy Dashboard (push) Successful in 11m34s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 11m3s
2026-09-20 21:59:50 +00:00
sharang aa64e2b25a feat(platform): fail closed when auth configuration is missing (#254) (#292)
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Canceled after 0s
CI / Detect Changes (push) Successful in 5s
CI / Deploy MCP (push) Canceled after 0s
CI / Deploy Agent (push) Canceled after 0s
CI / Deploy Docs (push) Canceled after 0s
2026-09-20 21:37:00 +00:00
sharangandSharang Parnerkar 6557f03d7c feat(dashboard): add demo targets, fix MCP status, source-only UI (#252)
CI / Check (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Dashboard (push) Successful in 3m0s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m6s
Demonstration plan, phase D3 (dashboard side). Pairs with #251, which adds the agent endpoints and the `source_only` feature flag.

**Add demo targets.** The Targets page (empty state) and the onboarding wizard now offer a button that lists what the agent would create, seeds it, and reports per target `created` / `already there` / `failed` with the error inline. That replaces "onboard something by hand before you can see anything" for a trial user; the curl script stays for ops.

**MCP status.** The card never turned *running* on staging: the health URL was built by appending `/health` to an endpoint that already ends in `/mcp`, and the ingress routes `/mcp/*` to a server that serves `/health` at its own root. The probe now tries `…/mcp/health` and then `…/health`, and `MCP_HEALTH_URL` overrides it outright for the seeded cards (staging: `https://pruefwerk-stage.breakpilot.com/mcp/health`). Unit-tested through `mcp_health_url_candidates`.

**Source-only mode.** The dashboard reads the agent's `features` list from the public version handshake (cached, and an older agent without the key degrades to "everything enabled"). With `source_only` it hides dynamic application testing, pentest, the ICS probe and the PLC runtime behind one short note rather than offering actions that fail at the tool, and a stage the pipeline reports as skipped for that reason renders neutral instead of red.

**Control column.** The findings table shows the control-mapping column only when at least one finding in view carries `control_refs`, so an environment without a control catalog does not show a column of em dashes.

Docs: getting-started gains the demo-target entry point and a section on static-analysis-only environments; the MCP feature page documents the status probe and `MCP_HEALTH_URL`, which is also in `.env.example`.

Verified locally: `cargo fmt --all --check`, `cargo clippy -p compliance-dashboard --features server --no-default-features`, both dashboard test suites (`server` and `web` features) green.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
Co-authored-by: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com>
Reviewed-on: #252
2026-09-14 08:24:43 +00:00
sharangandSharang Parnerkar d9850bef90 feat(demo): seed curated targets from the agent, source-only mode (#251)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 5m34s
CI / Deploy Agent (push) Successful in 6m58s
CI / Deploy MCP (push) Successful in 3m53s
CI / Deploy Docs (push) Successful in 1m8s
Demonstration plan, phase D3 (agent side). Two things blocked a self-serve demo: a fresh trial tenant landed on an empty targets page, and staging tried to run DAST, pentest, the ICS probe and the soft-PLC runtime that are not deployed there, so those stages surfaced as tool errors.

## Seeding

| Request | Meaning |
|---|---|
| `GET /api/v1/targets/demo-seed` | what would be created: `key`, display `name`, `kind`, `description`, `source_only` |
| `POST /api/v1/targets/demo-seed` | body `{"names":[…],"rescan":false}`, empty `names` seeds all; `202` with one row per target, `status` = `queued` \| `exists` \| `failed` |
| `POST /api/v1/platform/tenants/demo/reset` | now takes `{"seed": true}` and reseeds with a service token, for the nightly sales-demo reset |

Seeding runs through a new shared target lifecycle (`compliance-agent/src/targets.rs`: create → store upload → attach → detect), which the onboarding handlers now call as well — so a seeded target is an ordinary target with the same records and the same `target.added` usage events, and there is no HTTP self-call. It is idempotent by display name: the seeder owns the `Demo · ` prefix, so a second call finds its own targets. `scan_id` is always `null` in the response because the scan run is created inside the background pipeline.

## Source-only set

The manifest is now source-only: `plc-pump-station`, `plc-conveyor-line`, `git-cra-vuln-demo`, `firmware-zephyr-example`. The Juice Shop target needed a running instance for DAST and pentest and is removed, along with `DEMO_WEB_URL`. Everything ships inside the agent binary (manifest plus the PLC upload fixtures), so a deployed agent seeds without the repo.

## `PW_FEATURES=source_only`

A static-analysis-only deployment: DAST, the ICS probe and the ephemeral PLC runtime record a `skipped_stages` entry on the scan run (`{stage, status:"skipped", reason:"feature disabled"}`) instead of failing; starting a DAST run or a pentest session answers `409`; the flag list is published on the public `/api/v1/platform/version` handshake so the dashboard reads the set the agent enforces rather than its own copy of the env. Unknown flags are kept and reported, so a dashboard-only flag needs no agent release.

Docs and the ops script are updated: `scripts/seed-demo-targets.sh --api` hands the job to the agent, the client-side path stays for `--reset` and for agents older than the checkout.

Verified locally: `cargo fmt --all --check`, `cargo clippy -p compliance-agent -- -D warnings`, `cargo clippy -p compliance-core -- -D warnings`, `cargo test -p compliance-core -p compliance-agent -p werkbank-exec -p control-map --lib` (414 tests). `compliance-agent/tests/demo_seed.rs` needs Mongo and runs outside CI like the other integration tests.

Pairs with the dashboard's "Add demo targets" button and with orca-platform setting `PW_FEATURES=source_only` on the staging agent.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
Co-authored-by: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com>
Reviewed-on: #251
2026-09-14 08:24:33 +00:00
sharangandSharang Parnerkar 728f3ab3bc feat(controls): ship a CRA catalog snapshot, map without the backend (#250)
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Successful in 1m8s
CI / Deploy MCP (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 4m20s
Demonstration plan, phase D3: on staging `BREAKPILOT_BASE_URL` points at `api-dev.breakpilot.ai`, which answers 401 until the dsms migration (M-MIG-9, parked). Control mapping was gated on that URL, so demo scans produce findings with **no control references** — the one thing a CRA prospect looks for.

The catalog loader already snapshotted the bytes it fetched and fell back to them when the backend was down. This promotes the snapshot to a real source:

- `OscalControlsProvider` takes `Option<String>` for the base URL; with `None` it serves snapshots only, and `has_snapshots()` decides whether control triage runs at all.
- The agent image ships `compliance-agent/controls/snapshot/oscal-catalog-cra.json` — CRA Annex I, 8 groups / 40 controls, generated by breakpilot-compliance's own `build_cra_catalog()`, so it is byte-identical to what `?framework=cra` serves. The entrypoint copies it into `BREAKPILOT_SNAPSHOT_DIR` only if that file is absent, so a snapshot fetched from a live backend (or a mounted volume) always wins.
- `scripts/refresh-oscal-snapshot.sh` regenerates the committed snapshots from a backend when one is reachable.
- A test asserts the shipped file parses and still carries 40 controls, so a bad refresh cannot silently disable mapping.

`master-controls` is DB-derived (~3k controls) and is not shipped, so the semantic pass stays a no-op offline; staging should set `BREAKPILOT_SEMANTIC_MAPPING=false` and drop `BREAKPILOT_BASE_URL` (separate orca-platform change). Deterministic LUT triage and the grounded surface checks then run against the CRA catalog and findings carry `control_refs`.

Verified locally: `cargo fmt --all --check`, `cargo clippy -p compliance-agent -- -D warnings`, `cargo test -p compliance-agent --lib` (314 passed).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
Co-authored-by: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com>
Reviewed-on: #250
2026-09-14 07:53:19 +00:00
sharang 7eb4d8054a fix(platform): version handshake is public (#249)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 4m11s
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Skipped
2026-09-12 09:33:46 +00:00
sharang cf08ab222d fix(werkbank): bind registry API keys to their tenant on the runner API (#248)
CI / Deploy Dashboard (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 4m14s
CI / Check (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 3s
2026-09-12 09:17:16 +00:00
sharang 99b7769ed8 feat(agent): push usage events to the registry (scan.completed, target.added) (#247)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 4m14s
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Skipped
2026-09-12 08:49:19 +00:00
sharang 5822b51cec feat(agent): registry entitlements, platform endpoints, JWT aud/iss (#246)
CI / Deploy MCP (push) Successful in 3m51s
CI / Deploy Dashboard (push) Successful in 5m26s
CI / Deploy Agent (push) Successful in 6m47s
CI / Detect Changes (push) Successful in 3s
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 57s
2026-09-12 07:39:01 +00:00
sharang 498d1cc443 chore: move to platform/pruefwerk — firmwerk deps, CI token, image project (#245)
CI / Check (push) Skipped
CI / Deploy Docs (push) Successful in 30s
CI / Deploy MCP (push) Successful in 1m34s
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Successful in 3m21s
CI / Deploy Agent (push) Successful in 3m43s
2026-09-11 13:48:22 +00:00
sharang b84c75dc2e ci(sccache): SCCACHE_BUCKET to bp-sccache (Hetzner account migration) (#244)
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Skipped
CI / Deploy Dashboard (push) Skipped
2026-09-10 09:22:12 +00:00
sharang 710fdcab6f docs: rebrand Certifai → Prüfwerk (user-facing name) (#243)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m13s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Skipped
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
2026-09-02 08:00:12 +00:00
sharang e0c54c4659 fix(deps): repoint tramiton git-deps to the renamed firmwerk repo (fixes CI) (#240)
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Successful in 2m24s
CI / Deploy Dashboard (push) Successful in 5m44s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Agent (push) Successful in 11m36s
CI / Check (push) Skipped
2026-08-31 17:09:08 +00:00
sharang 8dcdad9fe7 feat(fixtures): curated demo targets + seed script + golden PLC baselines (#187) (#232)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Agent (push) Failing after 18s
CI / Deploy Docs (push) Successful in 1m11s
CI / Check (push) Skipped
CI / Deploy MCP (push) Skipped
2026-08-31 15:58:16 +00:00
sharang 53bd93c96e docs: align tool inventory with what actually runs (no Grype, no ZAP/nuclei) (#233)
CI / Deploy Agent (push) Canceled after 0s
CI / Deploy MCP (push) Canceled after 0s
CI / Deploy Docs (push) Canceled after 0s
CI / Detect Changes (push) Canceled after 0s
CI / Deploy Dashboard (push) Canceled after 0s
CI / Check (push) Canceled after 0s
2026-08-31 15:58:11 +00:00
sharang 0834547a74 chore(ci): repoint registry/git/cargo meghsakha.com -> breakpilot.com (#231)
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Failing after 15s
CI / Deploy Agent (push) Failing after 18s
CI / Check (push) Skipped
CI / Deploy Dashboard (push) Failing after 4m47s
CI / Detect Changes (push) Successful in 5s
2026-08-06 08:42:45 +00:00
1386 changed files with 322961 additions and 11213 deletions

No files matched your search

+5 -19
View File
@@ -1,23 +1,9 @@
[advisories]
ignore = [
# hickory-proto 0.25.x pulled in transitively via mongodb → hickory-resolver.
# MongoDB 3.x has not yet released with hickory-resolver 0.26.x, so we cannot
# upgrade past this without a mongodb release. Both are DNS-layer DoS vectors
# requiring a MITM/controlled DNS server against MongoDB's hostname resolution —
# not a realistic attack surface here. Revisit when mongodb bumps hickory.
# hickory-proto, pulled in transitively via mongodb → hickory-resolver
# (0.26.3 since mongodb 3.10, which fixed RUSTSEC-2026-0119). The NSEC3 loop
# is in DNSSEC validation, which the driver does not use, and needs a
# MITM/controlled DNS server against MongoDB's hostname resolution — not a
# realistic attack surface here. Revisit when hickory ships a fix.
"RUSTSEC-2026-0118", # NSEC3 loop, no fix available upstream
"RUSTSEC-2026-0119", # O(n²) name compression, fixed in hickory-proto >=0.26.1
# rmcp 0.16.0 — DNS rebinding in Streamable HTTP server transport (missing
# Host header validation). Patched in rmcp >= 1.4.0, which is a major API
# version jump from our pin; rmcp shipped 0.x → 1.x → 2.x in three months
# and the migration touches every tool handler + the auth middleware we
# just landed in #92. Threat model in our deployment: the MCP server is
# exposed at a public hostname (comp-mcp-dev.meghsakha.com) behind orca's
# TLS-terminating ingress with per-tenant bearer auth — the attack model
# (browser DNS-rebinding into localhost MCP server) doesn't directly apply.
# Defense-in-depth Host-header check is still a worthwhile follow-up.
# FOLLOW-UP: bump rmcp to 2.x in a dedicated PR (M7.3 follow-up, sized
# multi-hour due to API surface change).
"RUSTSEC-2026-0189",
]
+12
View File
@@ -0,0 +1,12 @@
# Build context: sources only. Keeps local builds from sending gigabytes of
# build output to the daemon, and keeps local secrets (.env) out of it.
.git
.claude
target
**/node_modules
docs/.vitepress/dist
docs/.vitepress/cache
.env
.env.*
!.env.example
*.log
+130 -4
View File
@@ -5,7 +5,11 @@ MONGODB_DATABASE=compliance_scanner
# LiteLLM
LITELLM_URL=http://localhost:4000
LITELLM_API_KEY=
LITELLM_MODEL=gpt-4o
LITELLM_MODEL=Qwen3.8-27B
LITELLM_EMBED_MODEL=bge-multilingual-gemma2
# Seconds one LLM call may take in total, the gateway's queue included. Keep it
# at the gateway's request timeout (LiteLLM: 600).
LLM_TIMEOUT_SECS=600
# GitHub
GITHUB_TOKEN=
@@ -27,19 +31,52 @@ SEARXNG_URL=http://localhost:8888
# NVD
NVD_API_KEY=
# The CVE monitor re-checks components only NVD knows (Yocto recipes, embedded
# libraries, CODESYS runtime) by NVD's changed CVEs; on by default.
# NVD_MONITOR=off
# Agent
AGENT_PORT=3001
# Port of the separate webhook listener (Git push / PR events).
WEBHOOK_PORT=3002
# Scans (and PR reviews) running at once across all tenants; each is a clone
# plus semgrep and syft. Requests for a target already being scanned coalesce
# into one follow-up instead of running in parallel.
SCAN_CONCURRENCY=2
SCAN_SCHEDULE=0 0 */6 * * *
CVE_MONITOR_SCHEDULE=0 0 0 * * *
# Managed git sources (#439): hosts a tenant's Gitea may be on (anchored regex),
# minutes between syncs of the org's repositories, and the public origin of the
# webhook server for the webhook URL the platform API returns.
# GIT_SOURCE_HOST_PATTERN=^[a-z0-9-]+\.code(-stage)?\.breakpilot\.com$
# GIT_SOURCE_SYNC_MINUTES=30
# WEBHOOK_PUBLIC_URL=https://pruefwerk-hooks.example.com
# Grouping (#464): more than this many low/info findings of one scanner's rule
# in one repository become one finding listing every place (`off`: never).
# Per scanner as `scanner=N` or `scanner=off`; the severities that are grouped.
# FINDING_GROUP_THRESHOLD=5
# FINDING_GROUP_SCANNERS=mobsfscan=5,gitleaks=off
# FINDING_GROUP_SEVERITIES=low,info
# Issue catch-up (Gitea only): after a scan's own issues, open medium+ findings
# that never got an issue are linked to their existing issue or get a new one,
# at most 20 new per target and scan. off (default) | dry_run (log counts only) | on
# ISSUE_CATCHUP=off
# Closing CVE issues a VEX statement settles (not_affected or fixed), with a
# comment, at most 20 per target and scan; no new issue is opened for such a
# CVE either way. off (default) | dry_run (log counts per VEX status) | on
# ISSUE_AUTOCLOSE=off
GIT_CLONE_BASE_PATH=/tmp/compliance-scanner/repos
# NuGet licenses (#467): look up licenses the tree's .nuspec files do not give
# on api.nuget.org (package id and version only; never for ids a nuget.config
# routes to another feed). Set to false to keep the lookup offline.
NUGET_LICENSE_LOOKUP=true
# Dynamic PLC testing — ephemeral soft-PLC provisioning (#183). Off unless
# enabled; requires the agent container to have Docker access (socket mount).
# When on, a PLC/SPS target with control logic but no reachable device gets its
# logic instantiated on a throwaway OpenPLC, probed, then torn down.
PLC_RUNTIME_ENABLED=0
PLC_RUNTIME_IMAGE=registry.meghsakha.com/openplc:latest
PLC_RUNTIME_IMAGE=repo.breakpilot.com/pruefwerk/openplc:latest
PLC_RUNTIME_NETWORK=certifai
PLC_RUNTIME_MEMORY=512m
PLC_RUNTIME_CPUS=0.5
@@ -48,16 +85,77 @@ PLC_RUNTIME_OPENPLC_USER=openplc
PLC_RUNTIME_OPENPLC_PASSWORD=openplc
# Werkbank runner API (/api/v1/werkbank/jobs/*, /api/v1/werkbank/artifacts/*).
# When set, mounts the runner-facing queue + artifact endpoints behind this
# bearer token; runners present the same token. Unset = endpoints not mounted.
# Mounted when this static token is set OR a tenant registry is configured
# (runners then present portal-issued `bp_…` API keys with scope
# werkbank:runner, verified via the registry). Unset + no registry = not mounted.
WERKBANK_RUNNER_TOKEN=
# Breakpilot Platform (PRODUCT_INTEGRATION_SPEC 2.0)
# Deployment environment: dev (default) | staging | production.
# Anything but dev is HARDENED: the agent, dashboard and MCP server refuse to
# start unless auth is fully configured, instead of quietly serving
# unauthenticated as the `dev` tenant. Required in staging/production:
# KEYCLOAK_URL, KEYCLOAK_REALM, KEYCLOAK_AUDIENCE, CORS_ALLOWED_ORIGINS,
# TENANT_REGISTRY_URL, TENANT_REGISTRY_CLIENT_ID/_SECRET,
# PLATFORM_ALLOWED_CLIENTS, SECRETS_ENCRYPTION_KEY (+ MCP_PORT for
# compliance-mcp, DASHBOARD_SESSION_KEY for the dashboard).
APP_ENV=dev
# 64 hex characters (32 bytes) that seal tenant credentials (git and tracker
# tokens, webhook secrets) at rest. Generate with `openssl rand -hex 32`. Without
# it the agent refuses to store a credential. Changing it makes every stored
# credential unreadable, so keep it with the database backups.
SECRETS_ENCRYPTION_KEY=
# Catalog key this deployment serves; used for entitlement checks, usage
# events and the platform handshake.
PRODUCT_KEY=pruefwerk
# Tenant registry: entitlement authority (POST /v1/internal/entitlements/check,
# cached ≤60 s, fail-closed), tenant list for the scheduler, API-key verify.
# Unset = claims-only mode (dev).
TENANT_REGISTRY_URL=
# client_credentials for the registry (Keycloak client `pruefwerk-svc-<env>`).
TENANT_REGISTRY_CLIENT_ID=
TENANT_REGISTRY_CLIENT_SECRET=
# JWT audience that user/service tokens must carry (scope `pruefwerk-audience`).
# Default `pruefwerk`; an empty string disables audience validation — dev only,
# rejected at startup when APP_ENV is staging/production.
KEYCLOAK_AUDIENCE=pruefwerk
# Browser origins allowed by CORS (csv). Unset = permissive — dev only,
# rejected at startup when APP_ENV is staging/production.
CORS_ALLOWED_ORIGINS=https://app-stage.breakpilot.com,https://pruefwerk-stage.breakpilot.com
# Keycloak client ids (azp) allowed on /api/v1/platform/* with a service token.
# The built-in default (tenant-registry-svc-{stage,prod},portal-svc-{stage,prod})
# applies in dev only; staging/production must name its own clients.
PLATFORM_ALLOWED_CLIENTS=
# Dashboard
DASHBOARD_PORT=8080
AGENT_API_URL=http://localhost:3001
# 128 hex characters (64 bytes): half signs the session cookie, half seals the
# session records in Mongo (they hold the user's Keycloak tokens). Generate
# with `openssl rand -hex 64`. Required in staging/production; unset in dev
# means sessions end when the dashboard restarts.
DASHBOARD_SESSION_KEY=
# The platform portal, for the sidebar's "Zur Plattform" link to the user's
# workspace (<PORTAL_URL>/<tenant_slug>/dashboard). Staging:
# https://app-stage.breakpilot.com, production: https://app.breakpilot.com.
# Unset hides the link.
# PORTAL_URL=
# The docs site the sidebar links to. Default /docs/ (the docs container on
# the dashboard host); production uses https://docs.breakpilot.com/pruefwerk/.
# DOCS_URL=
# MCP Server
MCP_ENDPOINT_URL=http://localhost:8090
# The hostnames (or host:port) clients reach the MCP server at, comma-separated:
# the public hostname behind the ingress and the in-network name the dashboard
# uses. Requests with another Host header are refused (DNS rebinding
# protection). Unset, the Host header is not checked and a warning is logged.
# MCP_ALLOWED_HOSTS=pruefwerk-stage.breakpilot.com,compliance-mcp:8090
# Absolute health URL for the default MCP server card. Set it where an ingress
# routes /mcp/* to a server that serves /health at its own root (staging:
# https://pruefwerk-stage.breakpilot.com/mcp/health). Derived from
# MCP_ENDPOINT_URL when unset.
# MCP_HEALTH_URL=
# Keycloak (required for authentication)
KEYCLOAK_URL=http://localhost:8080
@@ -66,6 +164,34 @@ KEYCLOAK_CLIENT_ID=compliance-dashboard
REDIRECT_URI=http://localhost:8080/auth/callback
APP_URL=http://localhost:8080
# Control mapping (OSCAL catalog from breakpilot-compliance)
# Unset BREAKPILOT_BASE_URL to run snapshot-only: the image ships a CRA catalog
# snapshot, so findings still carry control_refs without the backend. The
# master-controls catalog is DB-derived and not shipped — turn the semantic pass
# off when running snapshot-only.
# BREAKPILOT_BASE_URL=https://api-dev.breakpilot.ai
# BREAKPILOT_TOKEN=
BREAKPILOT_SNAPSHOT_DIR=/data/compliance-scanner/oscal
# BREAKPILOT_SEMANTIC_MAPPING=false
# BREAKPILOT_GROUNDED_CHECKS=true
# Execute code from the repositories being scanned, or fetch from hosts they
# name? A few stages do: cargo clippy compiles the repo (build.rs, proc
# macros), ESLint runs from the repo's own node_modules, pip-compile builds
# sdists (setup.py), the firmware reproducible build shells out to Nix with
# sandbox=false, and npm / cargo lockfile generation and cargo metadata fetch
# whatever the manifests name (#330). They are OFF unless this is set, and a
# staging/production APP_ENV ignores it — the agent holds every tenant's data.
# Without them, commit a lockfile; firmware SBOMs come from an imported
# Firmwerk bundle.
# PW_ALLOW_UNTRUSTED_CODE_EXEC=1
# Deployment feature flags (comma list). `source_only` = static analysis only:
# the scan pipeline skips DAST, pentest, the ICS probe and the ephemeral PLC
# runtime (recorded as skipped stages, not failures), and the dashboard hides
# those actions. Staging runs with it until that infrastructure is deployed.
# PW_FEATURES=source_only
# OpenTelemetry (optional - omit to disable)
# OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
# OTEL_SERVICE_NAME=compliance-agent
+221 -50
View File
@@ -16,19 +16,25 @@ env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
# Job containers on the OVH runners get --cpus=2 --memory=3g, but cargo sees
# the host's 8 cores and ran up to 8 rustc with full debug info: the dashboard
# build was OOM-killed (signal 9). Two jobs to match the CPUs, and line tables
# only (backtraces keep file:line, no full variable info).
CARGO_BUILD_JOBS: "2"
CARGO_PROFILE_DEV_DEBUG: line-tables-only
# Compile cache: sccache -> Hetzner S3 (breakpilot-sccache), runner-independent
# and persistent across CI runs (own key prefix). Reuses the shared cluster S3
# creds (same bucket as werkpilot). Requires repo secrets HETZNER_S3_ACCESS_KEY
# and HETZNER_S3_SECRET_KEY.
RUSTC_WRAPPER: /usr/local/bin/sccache
SCCACHE_BUCKET: breakpilot-sccache
SCCACHE_BUCKET: bp-sccache
SCCACHE_ENDPOINT: https://nbg1.your-objectstorage.com
SCCACHE_REGION: auto
SCCACHE_S3_USE_SSL: "true"
SCCACHE_S3_KEY_PREFIX: compliance-scanner
AWS_ACCESS_KEY_ID: ${{ secrets.HETZNER_S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.HETZNER_S3_SECRET_KEY }}
# compliance-agent depends on tramiton-core via git; use the system git so the
# compliance-agent depends on firmwerk-core via git; use the system git so the
# credential rewrite below (see "Configure git auth ...") is honored on fetch.
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
# Throttle cargo so a ~670-crate concurrent download burst doesn't 429 the
@@ -36,12 +42,14 @@ env:
CARGO_NET_RETRY: "10"
CARGO_HTTP_MULTIPLEXING: "false"
# Cancel superseded PR runs, but NEVER cancel main-branch runs — those build and
# deploy per-service images, and cancelling one merge's deploy when the next
# merge lands leaves a service un-deployed (as happened between two back-to-back
# merges). So cancel-in-progress only for pull_request events.
# Cancel superseded PR runs, but NEVER drop a main-branch run: each one deploys
# only the services its own commit changed, so a dropped run leaves a service
# un-deployed. `cancel-in-progress: false` is not enough, because a group keeps
# one pending run and cancels a queued one when the next merge lands. So main
# runs get a group per commit; the deploy jobs' own groups keep each service's
# deploys in merge order.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
@@ -62,7 +70,7 @@ jobs:
git fetch --depth=1 origin "${GITHUB_SHA}"
git checkout FETCH_HEAD
# Resolve crates.io deps through the self-hosted Kellnr mirror (cached,
# crates.io-independent). Git deps (tramiton-core) are unaffected — source
# crates.io-independent). Git deps (firmwerk-core) are unaffected — source
# replacement only applies to crates.io-sourced crates.
- name: Use Kellnr crates.io mirror
run: |
@@ -72,7 +80,7 @@ jobs:
echo '[source.crates-io]'
echo 'replace-with = "kellnr"'
echo '[registries.kellnr]'
echo 'index = "sparse+https://crates.meghsakha.com/api/v1/cratesio/"'
echo 'index = "sparse+https://crates.breakpilot.com/api/v1/cratesio/"'
} >> "$CARGO_HOME/config.toml"
env:
RUSTC_WRAPPER: ""
@@ -86,16 +94,16 @@ jobs:
env:
RUSTC_WRAPPER: ""
# compliance-agent has a git dependency on tramiton-core (a private repo on
# compliance-agent has a git dependency on firmwerk-core (a private repo on
# this Gitea instance). Rewrite its SSH URL to HTTPS + a PAT so the runner
# can fetch it. Requires the repo secret TRAMITON_FETCH_TOKEN (a Gitea PAT
# with read:repository, owned by a user with access to sharang/tramiton).
# can fetch it. Uses the org secret PLATFORM_CI_TOKEN (bot `platform-ci`,
# read-only member of the platform org).
# (Honored on fetch because CARGO_NET_GIT_FETCH_WITH_CLI=true uses system git.)
- name: Configure git auth for private tramiton dependency
- name: Configure git auth for the private firmwerk dependency
run: |
git config --global \
url."https://sharang:${{ secrets.TRAMITON_FETCH_TOKEN }}@gitea.meghsakha.com/".insteadOf \
"ssh://git@gitea.meghsakha.com:22222/"
url."https://platform-ci:${{ secrets.PLATFORM_CI_TOKEN }}@git.breakpilot.com/".insteadOf \
"ssh://git@git.breakpilot.com:22222/"
env:
RUSTC_WRAPPER: ""
@@ -105,19 +113,37 @@ jobs:
env:
RUSTC_WRAPPER: ""
# Clippy (compiles once, sccache reuses across feature sets)
# The repository's Python scripts (the EOL table check, the CODESYS
# export script customers download) have offline tests.
- name: Script tests
run: |
command -v python3 >/dev/null || { apt-get update -qq && apt-get install -y -qq --no-install-recommends python3; }
python3 -B -I -m unittest discover -s scripts -p "test_*.py"
env:
RUSTC_WRAPPER: ""
# Clippy (compiles once, sccache reuses across feature sets). --all-targets
# lints test code too; tests may unwrap (clippy.toml), production may not.
- name: Clippy (core)
run: cargo clippy -p compliance-core --all-targets -- -D warnings
- name: Clippy (agent)
run: cargo clippy -p compliance-agent -- -D warnings
run: cargo clippy -p compliance-agent --all-targets -- -D warnings
- name: Clippy (dashboard server)
run: cargo clippy -p compliance-dashboard --features server --no-default-features -- -D warnings
run: cargo clippy -p compliance-dashboard --features server --no-default-features --all-targets -- -D warnings
- name: Clippy (dashboard web)
run: cargo clippy -p compliance-dashboard --features web --no-default-features -- -D warnings
run: cargo clippy -p compliance-dashboard --features web --no-default-features --all-targets -- -D warnings
- name: Clippy (mcp)
run: cargo clippy -p compliance-mcp -- -D warnings
run: cargo clippy -p compliance-mcp --all-targets -- -D warnings
- name: Clippy (werkbank-exec)
run: cargo clippy -p werkbank-exec -- -D warnings
run: cargo clippy -p werkbank-exec --all-targets -- -D warnings
- name: Clippy (control-map)
run: cargo clippy -p control-map -- -D warnings
run: cargo clippy -p control-map --all-targets -- -D warnings
- name: Clippy (graph)
run: cargo clippy -p compliance-graph --all-targets -- -D warnings
# The library only: its test modules still predate the lint
# (items_after_test_module); --all-targets once they are moved.
- name: Clippy (dast)
run: cargo clippy -p compliance-dast -- -D warnings
# Security audit
- name: Security Audit
@@ -126,17 +152,119 @@ jobs:
RUSTC_WRAPPER: ""
# Tests (reuses compilation artifacts from clippy)
- name: Tests (core + agent + werkbank-exec + control-map)
run: cargo test -p compliance-core -p compliance-agent -p werkbank-exec -p control-map --lib
- name: Tests (core + agent + graph + werkbank-exec + control-map)
run: cargo test -p compliance-core -p compliance-agent -p compliance-graph -p werkbank-exec -p control-map --lib
# compliance-core's integration tests need no services.
- name: Tests (core integration)
run: cargo test -p compliance-core --tests
# compliance-dast: unit tests, doc tests and the scan tests against
# local fake sites (no services).
- name: Tests (dast)
run: cargo test -p compliance-dast
# The dashboard crate compiles as the library and as its test harness at
# once, each rustc at about 1.65 GB: two of them exceed the job's 3 GiB
# and get OOM-killed (signal 9). One at a time for these two steps.
- name: Tests (dashboard server)
env:
CARGO_BUILD_JOBS: "1"
run: cargo test -p compliance-dashboard --features server --no-default-features
- name: Tests (dashboard web)
env:
CARGO_BUILD_JOBS: "1"
run: cargo test -p compliance-dashboard --features web --no-default-features
- name: Show sccache stats
run: sccache --show-stats
if: always()
# compliance-agent's integration tests (compliance-agent/tests) need MongoDB.
# Every test opens its own database, so WiredTiger keeps a file open per
# collection and index: with the containers' default of 1024 open files
# mongod aborts mid-run ("Too many open files"), which is what took the
# mongo service down in #584. mongod runs as a process in this job
# container with a raised limit, and its log is printed when a test fails.
agent-integration:
name: Agent integration
if: github.event_name == 'pull_request'
runs-on: docker
container:
image: rust:1.94-bookworm
env:
MONGODB_VERSION: "7.0.45"
MONGODB_SHA256: e97e79211a7106a065d9119039ead401f32cfbbfa1681977fdeba4b4a4bf1f63
steps:
- name: Checkout
run: |
git init
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
git fetch --depth=1 origin "${GITHUB_SHA}"
git checkout FETCH_HEAD
- name: Use Kellnr crates.io mirror
run: |
: "${CARGO_HOME:=/usr/local/cargo}"
mkdir -p "$CARGO_HOME"
{
echo '[source.crates-io]'
echo 'replace-with = "kellnr"'
echo '[registries.kellnr]'
echo 'index = "sparse+https://crates.breakpilot.com/api/v1/cratesio/"'
} >> "$CARGO_HOME/config.toml"
env:
RUSTC_WRAPPER: ""
- name: Install sccache
run: |
curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz \
| tar xz --strip-components=1 -C /usr/local/bin/ sccache-v0.10.0-x86_64-unknown-linux-musl/sccache
chmod +x /usr/local/bin/sccache
env:
RUSTC_WRAPPER: ""
- name: Configure git auth for the private firmwerk dependency
run: |
git config --global \
url."https://platform-ci:${{ secrets.PLATFORM_CI_TOKEN }}@git.breakpilot.com/".insteadOf \
"ssh://git@git.breakpilot.com:22222/"
env:
RUSTC_WRAPPER: ""
# Build first, so compiling and mongod never share the job's 3 GB.
- name: Build the agent integration tests
run: cargo test -p compliance-agent --test '*' --no-run
# The official Debian 12 build, checked against its sha256; a small
# WiredTiger cache, no auth (the job container is its only client).
- name: Start MongoDB
run: |
T="mongodb-linux-x86_64-debian12-${MONGODB_VERSION}"
curl -fsSL "https://fastdl.mongodb.org/linux/${T}.tgz" -o /tmp/mongodb.tgz
echo "${MONGODB_SHA256} /tmp/mongodb.tgz" | sha256sum -c -
tar -xzf /tmp/mongodb.tgz -C /opt
mkdir -p /tmp/mongo-db
ulimit -n 64000 2>/dev/null || ulimit -n "$(ulimit -Hn)"
echo "open files: soft $(ulimit -Sn), hard $(ulimit -Hn)"
"/opt/${T}/bin/mongod" --dbpath /tmp/mongo-db --bind_ip 127.0.0.1 --port 27017 \
--wiredTigerCacheSizeGB 0.25 --fork --logpath /tmp/mongod.log
for i in $(seq 1 30); do
if (exec 3<>/dev/tcp/127.0.0.1/27017) 2>/dev/null; then echo "mongod is up"; exit 0; fi
sleep 1
done
echo "mongod did not start"; tail -50 /tmp/mongod.log; exit 1
shell: bash
env:
RUSTC_WRAPPER: ""
- name: Tests (agent integration)
run: cargo test -p compliance-agent --test '*'
env:
TEST_MONGODB_URI: mongodb://127.0.0.1:27017/
- name: MongoDB log
if: failure()
run: |
pgrep -a mongod || echo "mongod is not running"
tail -100 /tmp/mongod.log || true
env:
RUSTC_WRAPPER: ""
# ---------------------------------------------------------------------------
# Stage 2: Deploy (only on main, after checks pass)
# Each service only deploys when its relevant files changed.
@@ -168,8 +296,11 @@ jobs:
echo "Changed files:"
echo "$CHANGED"
# Agent: core libs, agent code, agent Dockerfile
if echo "$CHANGED" | grep -qE '^(compliance-core/|compliance-agent/|compliance-graph/|compliance-dast/|Dockerfile\.agent|Cargo\.(toml|lock))'; then
# Agent: core libs and the crates the agent links (werkbank-exec,
# control-map), agent code, agent Dockerfile and the helper scripts
# it copies from docker/, and the docs and README the help assistant
# answers from (baked into the image)
if echo "$CHANGED" | grep -qE '^(compliance-core/|compliance-agent/|compliance-graph/|compliance-dast/|werkbank-exec/|control-map/|docker/|Dockerfile\.agent|Cargo\.(toml|lock)|docs/|README\.md)'; then
echo "agent=true" >> "$GITHUB_OUTPUT"
else
echo "agent=false" >> "$GITHUB_OUTPUT"
@@ -201,62 +332,95 @@ jobs:
runs-on: docker
needs: [detect-changes]
if: needs.detect-changes.outputs.agent == 'true'
# One agent deploy at a time, in merge order. A queued one may be replaced
# by a newer one, which builds from a later main and so includes it.
concurrency:
group: deploy-agent
cancel-in-progress: false
container:
image: docker:27-cli
steps:
- name: Build, push and trigger orca redeploy
env:
# PAT for fetching the private tramiton-core git dependency during the
# PAT for fetching the private firmwerk git dependency during the
# image build (injected as a BuildKit secret, never baked into a layer).
TRAMITON_FETCH_TOKEN: ${{ secrets.TRAMITON_FETCH_TOKEN }}
PLATFORM_CI_TOKEN: ${{ secrets.PLATFORM_CI_TOKEN }}
run: |
apk add --no-cache git curl openssl
git init && git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
git fetch --depth=1 origin "${GITHUB_SHA}" && git checkout FETCH_HEAD
IMAGE=repo.meghsakha.com/certifai/compliance-agent
echo "$REGISTRY_PASSWORD" | docker login repo.meghsakha.com -u "$REGISTRY_USERNAME" --password-stdin
DOCKER_BUILDKIT=1 docker build --secret id=tramiton_token,env=TRAMITON_FETCH_TOKEN \
# GET /api/v1/platform/version: the latest release tag without its v
# (the checkout is shallow, so fetch the history and tags first) and
# the commit. No tag → empty, and the agent reports its crate version.
git fetch --quiet --unshallow --tags origin || true
TAG=$(git describe --tags --abbrev=0 --match 'v[0-9]*' 2>/dev/null || true)
PRUEFWERK_VERSION="${TAG#v}"
echo "version: ${PRUEFWERK_VERSION:-crate} commit: ${GITHUB_SHA}"
IMAGE=repo.breakpilot.com/pruefwerk/compliance-agent
echo "$REGISTRY_PASSWORD" | docker login repo.breakpilot.com -u "$REGISTRY_USERNAME" --password-stdin
DOCKER_BUILDKIT=1 docker build --pull --secret id=git_token,env=PLATFORM_CI_TOKEN \
--build-arg PRUEFWERK_VERSION="${PRUEFWERK_VERSION}" \
--build-arg PRUEFWERK_COMMIT="${GITHUB_SHA}" \
-f Dockerfile.agent -t "$IMAGE:latest" -t "$IMAGE:${GITHUB_SHA}" .
docker push "$IMAGE:latest" && docker push "$IMAGE:${GITHUB_SHA}"
{ command -v cosign >/dev/null 2>&1 || curl -sSfLo /usr/local/bin/cosign https://github.com/sigstore/cosign/releases/download/v2.4.3/cosign-linux-amd64 || wget -qO /usr/local/bin/cosign https://github.com/sigstore/cosign/releases/download/v2.4.3/cosign-linux-amd64; } || echo "::warning::cosign fetch failed"
chmod +x /usr/local/bin/cosign 2>/dev/null || true
cosign sign --yes --key env://COSIGN_KEY "$IMAGE:latest" || echo "::warning::cosign failed"
PAYLOAD=$(printf '{"ref":"refs/heads/main","repository":{"full_name":"sharang/compliance-scanner-agent"},"head_commit":{"id":"%s","message":"deploy agent"}}' "${GITHUB_SHA}")
PAYLOAD=$(printf '{"ref":"refs/heads/main","repository":{"full_name":"platform/pruefwerk"},"head_commit":{"id":"%s","message":"deploy agent"}}' "${GITHUB_SHA}")
if [ -z "${{ vars.ORCA_WEBHOOK_URL }}" ]; then echo "::notice::ORCA_WEBHOOK_URL not set — image pushed, no redeploy triggered"; exit 0; fi
SIG=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "${{ secrets.ORCA_WEBHOOK_SECRET }}" | awk '{print $2}')
RESP=$(curl -fsS -w "\nHTTP %{http_code}" -X POST "http://46.225.100.82:6880/api/v1/webhooks/github" -H "Content-Type: application/json" -H "X-Hub-Signature-256: sha256=$SIG" -d "$PAYLOAD"); echo "$RESP"
RESP=$(curl -fsS -w "\nHTTP %{http_code}" -X POST "${{ vars.ORCA_WEBHOOK_URL }}" -H "Content-Type: application/json" -H "X-Hub-Signature-256: sha256=$SIG" -d "$PAYLOAD"); echo "$RESP"
deploy-dashboard:
name: Deploy Dashboard
runs-on: docker
needs: [detect-changes]
if: needs.detect-changes.outputs.dashboard == 'true'
# One dashboard deploy at a time, in merge order. A queued one may be replaced
# by a newer one, which builds from a later main and so includes it.
concurrency:
group: deploy-dashboard
cancel-in-progress: false
container:
image: docker:27-cli
steps:
- name: Build, push and trigger orca redeploy
env:
TRAMITON_FETCH_TOKEN: ${{ secrets.TRAMITON_FETCH_TOKEN }}
PLATFORM_CI_TOKEN: ${{ secrets.PLATFORM_CI_TOKEN }}
run: |
apk add --no-cache git curl openssl
git init && git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
git fetch --depth=1 origin "${GITHUB_SHA}" && git checkout FETCH_HEAD
IMAGE=repo.meghsakha.com/certifai/compliance-dashboard
echo "$REGISTRY_PASSWORD" | docker login repo.meghsakha.com -u "$REGISTRY_USERNAME" --password-stdin
DOCKER_BUILDKIT=1 docker build --secret id=tramiton_token,env=TRAMITON_FETCH_TOKEN \
# service.version in telemetry: the latest release tag without its v,
# as for the agent. No tag → empty, and the crate version is used.
git fetch --quiet --unshallow --tags origin || true
TAG=$(git describe --tags --abbrev=0 --match 'v[0-9]*' 2>/dev/null || true)
PRUEFWERK_VERSION="${TAG#v}"
echo "version: ${PRUEFWERK_VERSION:-crate}"
IMAGE=repo.breakpilot.com/pruefwerk/compliance-dashboard
echo "$REGISTRY_PASSWORD" | docker login repo.breakpilot.com -u "$REGISTRY_USERNAME" --password-stdin
DOCKER_BUILDKIT=1 docker build --pull --secret id=git_token,env=PLATFORM_CI_TOKEN \
--build-arg PRUEFWERK_VERSION="${PRUEFWERK_VERSION}" \
-f Dockerfile.dashboard -t "$IMAGE:latest" -t "$IMAGE:${GITHUB_SHA}" .
docker push "$IMAGE:latest" && docker push "$IMAGE:${GITHUB_SHA}"
{ command -v cosign >/dev/null 2>&1 || curl -sSfLo /usr/local/bin/cosign https://github.com/sigstore/cosign/releases/download/v2.4.3/cosign-linux-amd64 || wget -qO /usr/local/bin/cosign https://github.com/sigstore/cosign/releases/download/v2.4.3/cosign-linux-amd64; } || echo "::warning::cosign fetch failed"
chmod +x /usr/local/bin/cosign 2>/dev/null || true
cosign sign --yes --key env://COSIGN_KEY "$IMAGE:latest" || echo "::warning::cosign failed"
PAYLOAD=$(printf '{"ref":"refs/heads/main","repository":{"full_name":"sharang/compliance-scanner-agent"},"head_commit":{"id":"%s","message":"deploy dashboard"}}' "${GITHUB_SHA}")
PAYLOAD=$(printf '{"ref":"refs/heads/main","repository":{"full_name":"platform/pruefwerk"},"head_commit":{"id":"%s","message":"deploy dashboard"}}' "${GITHUB_SHA}")
if [ -z "${{ vars.ORCA_WEBHOOK_URL }}" ]; then echo "::notice::ORCA_WEBHOOK_URL not set — image pushed, no redeploy triggered"; exit 0; fi
SIG=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "${{ secrets.ORCA_WEBHOOK_SECRET }}" | awk '{print $2}')
RESP=$(curl -fsS -w "\nHTTP %{http_code}" -X POST "http://46.225.100.82:6880/api/v1/webhooks/github" -H "Content-Type: application/json" -H "X-Hub-Signature-256: sha256=$SIG" -d "$PAYLOAD"); echo "$RESP"
RESP=$(curl -fsS -w "\nHTTP %{http_code}" -X POST "${{ vars.ORCA_WEBHOOK_URL }}" -H "Content-Type: application/json" -H "X-Hub-Signature-256: sha256=$SIG" -d "$PAYLOAD"); echo "$RESP"
deploy-docs:
name: Deploy Docs
runs-on: docker
needs: [detect-changes]
if: needs.detect-changes.outputs.docs == 'true'
# One docs deploy at a time, in merge order. A queued one may be replaced
# by a newer one, which builds from a later main and so includes it.
concurrency:
group: deploy-docs
cancel-in-progress: false
container:
image: docker:27-cli
steps:
@@ -265,40 +429,47 @@ jobs:
apk add --no-cache git curl openssl
git init && git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
git fetch --depth=1 origin "${GITHUB_SHA}" && git checkout FETCH_HEAD
IMAGE=repo.meghsakha.com/certifai/compliance-docs
echo "$REGISTRY_PASSWORD" | docker login repo.meghsakha.com -u "$REGISTRY_USERNAME" --password-stdin
docker build -f Dockerfile.docs -t "$IMAGE:latest" -t "$IMAGE:${GITHUB_SHA}" .
IMAGE=repo.breakpilot.com/pruefwerk/compliance-docs
echo "$REGISTRY_PASSWORD" | docker login repo.breakpilot.com -u "$REGISTRY_USERNAME" --password-stdin
docker build --pull -f Dockerfile.docs -t "$IMAGE:latest" -t "$IMAGE:${GITHUB_SHA}" .
docker push "$IMAGE:latest" && docker push "$IMAGE:${GITHUB_SHA}"
{ command -v cosign >/dev/null 2>&1 || curl -sSfLo /usr/local/bin/cosign https://github.com/sigstore/cosign/releases/download/v2.4.3/cosign-linux-amd64 || wget -qO /usr/local/bin/cosign https://github.com/sigstore/cosign/releases/download/v2.4.3/cosign-linux-amd64; } || echo "::warning::cosign fetch failed"
chmod +x /usr/local/bin/cosign 2>/dev/null || true
cosign sign --yes --key env://COSIGN_KEY "$IMAGE:latest" || echo "::warning::cosign failed"
PAYLOAD=$(printf '{"ref":"refs/heads/main","repository":{"full_name":"sharang/compliance-scanner-agent"},"head_commit":{"id":"%s","message":"deploy docs"}}' "${GITHUB_SHA}")
PAYLOAD=$(printf '{"ref":"refs/heads/main","repository":{"full_name":"platform/pruefwerk"},"head_commit":{"id":"%s","message":"deploy docs"}}' "${GITHUB_SHA}")
if [ -z "${{ vars.ORCA_WEBHOOK_URL }}" ]; then echo "::notice::ORCA_WEBHOOK_URL not set — image pushed, no redeploy triggered"; exit 0; fi
SIG=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "${{ secrets.ORCA_WEBHOOK_SECRET }}" | awk '{print $2}')
RESP=$(curl -fsS -w "\nHTTP %{http_code}" -X POST "http://46.225.100.82:6880/api/v1/webhooks/github" -H "Content-Type: application/json" -H "X-Hub-Signature-256: sha256=$SIG" -d "$PAYLOAD"); echo "$RESP"
RESP=$(curl -fsS -w "\nHTTP %{http_code}" -X POST "${{ vars.ORCA_WEBHOOK_URL }}" -H "Content-Type: application/json" -H "X-Hub-Signature-256: sha256=$SIG" -d "$PAYLOAD"); echo "$RESP"
deploy-mcp:
name: Deploy MCP
runs-on: docker
needs: [detect-changes]
if: needs.detect-changes.outputs.mcp == 'true'
# One mcp deploy at a time, in merge order. A queued one may be replaced
# by a newer one, which builds from a later main and so includes it.
concurrency:
group: deploy-mcp
cancel-in-progress: false
container:
image: docker:27-cli
steps:
- name: Build, push and trigger orca redeploy
env:
TRAMITON_FETCH_TOKEN: ${{ secrets.TRAMITON_FETCH_TOKEN }}
PLATFORM_CI_TOKEN: ${{ secrets.PLATFORM_CI_TOKEN }}
run: |
apk add --no-cache git curl openssl
git init && git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
git fetch --depth=1 origin "${GITHUB_SHA}" && git checkout FETCH_HEAD
IMAGE=repo.meghsakha.com/certifai/compliance-mcp
echo "$REGISTRY_PASSWORD" | docker login repo.meghsakha.com -u "$REGISTRY_USERNAME" --password-stdin
DOCKER_BUILDKIT=1 docker build --secret id=tramiton_token,env=TRAMITON_FETCH_TOKEN \
IMAGE=repo.breakpilot.com/pruefwerk/compliance-mcp
echo "$REGISTRY_PASSWORD" | docker login repo.breakpilot.com -u "$REGISTRY_USERNAME" --password-stdin
DOCKER_BUILDKIT=1 docker build --pull --secret id=git_token,env=PLATFORM_CI_TOKEN \
-f Dockerfile.mcp -t "$IMAGE:latest" -t "$IMAGE:${GITHUB_SHA}" .
docker push "$IMAGE:latest" && docker push "$IMAGE:${GITHUB_SHA}"
{ command -v cosign >/dev/null 2>&1 || curl -sSfLo /usr/local/bin/cosign https://github.com/sigstore/cosign/releases/download/v2.4.3/cosign-linux-amd64 || wget -qO /usr/local/bin/cosign https://github.com/sigstore/cosign/releases/download/v2.4.3/cosign-linux-amd64; } || echo "::warning::cosign fetch failed"
chmod +x /usr/local/bin/cosign 2>/dev/null || true
cosign sign --yes --key env://COSIGN_KEY "$IMAGE:latest" || echo "::warning::cosign failed"
PAYLOAD=$(printf '{"ref":"refs/heads/main","repository":{"full_name":"sharang/compliance-scanner-agent"},"head_commit":{"id":"%s","message":"deploy mcp"}}' "${GITHUB_SHA}")
PAYLOAD=$(printf '{"ref":"refs/heads/main","repository":{"full_name":"platform/pruefwerk"},"head_commit":{"id":"%s","message":"deploy mcp"}}' "${GITHUB_SHA}")
if [ -z "${{ vars.ORCA_WEBHOOK_URL }}" ]; then echo "::notice::ORCA_WEBHOOK_URL not set — image pushed, no redeploy triggered"; exit 0; fi
SIG=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "${{ secrets.ORCA_WEBHOOK_SECRET }}" | awk '{print $2}')
RESP=$(curl -fsS -w "\nHTTP %{http_code}" -X POST "http://46.225.100.82:6880/api/v1/webhooks/github" -H "Content-Type: application/json" -H "X-Hub-Signature-256: sha256=$SIG" -d "$PAYLOAD"); echo "$RESP"
RESP=$(curl -fsS -w "\nHTTP %{http_code}" -X POST "${{ vars.ORCA_WEBHOOK_URL }}" -H "Content-Type: application/json" -H "X-Hub-Signature-256: sha256=$SIG" -d "$PAYLOAD"); echo "$RESP"
+57
View File
@@ -0,0 +1,57 @@
name: End-of-life tables
# Compares the bundled end-of-life tables (compliance-agent/data/eol/: Yocto
# releases, .NET target frameworks, the oldest patched Android and iOS
# releases) with endoflife.date once a week. A difference (a new release, a
# changed end-of-life date) opens one issue, or updates the open one, labelled
# "eol-tables"; the tables themselves are updated by hand after checking the
# vendor's page. A separate workflow, so it never fails main CI.
#
# The issue is written with NIGHTLY_ALERT_TOKEN, the token the nightly
# regression already uses for its alert issue (issue write on this repo).
# Without it the differences are only printed in the log.
on:
schedule:
- cron: '0 5 * * 1' # Mondays, 5 AM UTC
workflow_dispatch:
inputs:
dry_run:
description: "Print the differences only, write no issue"
type: boolean
default: false
concurrency:
group: eol-tables
cancel-in-progress: true
jobs:
check:
name: Compare with endoflife.date
runs-on: docker
container:
image: python:3.12-alpine
steps:
- name: Checkout
run: |
apk add --no-cache git
git init
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
git fetch --depth=1 origin "${GITHUB_SHA}"
git checkout FETCH_HEAD
- name: Test the check
run: python3 -I -m unittest discover -s scripts -p "test_check_eol_tables.py"
- name: Compare and file the issue
env:
GITEA_TOKEN: ${{ secrets.NIGHTLY_ALERT_TOKEN }}
GITEA_API: ${{ github.server_url }}/api/v1
GITEA_REPO: ${{ github.repository }}
DRY_RUN: ${{ inputs.dry_run }}
run: |
if [ "$DRY_RUN" = "true" ]; then
python3 -I scripts/check-eol-tables.py --dry-run
else
python3 -I scripts/check-eol-tables.py
fi
+211 -13
View File
@@ -1,24 +1,47 @@
name: Nightly E2E Tests
name: Nightly scan regression
# Scans the fixture corpus (fixtures/demo-targets and fixtures/nightly) with
# the agent image built from main and compares the results with the blessed
# baselines in fixtures/nightly/baselines (#188, epic #309). A regression
# anywhere between a tool bump and a parser change turns this red before a
# customer sees it.
#
# Run it by hand with "bless" ticked after an intended change: the job then
# rewrites the baselines instead of comparing, and the new files are in the
# `nightly-report` artifact to commit.
on:
schedule:
- cron: '0 3 * * *' # 3 AM UTC daily
workflow_dispatch: # Allow manual trigger
workflow_dispatch:
inputs:
bless:
description: "Rewrite the baselines from this run (commit them from the artifact)"
type: boolean
default: false
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
RUSTC_WRAPPER: /usr/local/bin/sccache
SCCACHE_DIR: /tmp/sccache
TEST_MONGODB_URI: "mongodb://root:example@mongo:27017/?authSource=admin"
SCCACHE_BUCKET: bp-sccache
SCCACHE_ENDPOINT: https://nbg1.your-objectstorage.com
SCCACHE_REGION: auto
SCCACHE_S3_USE_SSL: "true"
SCCACHE_S3_KEY_PREFIX: compliance-scanner
AWS_ACCESS_KEY_ID: ${{ secrets.HETZNER_S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.HETZNER_S3_SECRET_KEY }}
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
CARGO_NET_RETRY: "10"
CARGO_HTTP_MULTIPLEXING: "false"
concurrency:
group: nightly-e2e
group: nightly-scans
cancel-in-progress: true
jobs:
e2e:
name: E2E Tests
scans:
name: Scan regression
runs-on: docker
container:
image: rust:1.94-bookworm
@@ -36,17 +59,192 @@ jobs:
git fetch --depth=1 origin "${GITHUB_SHA:-refs/heads/main}"
git checkout FETCH_HEAD
- name: Use Kellnr crates.io mirror
run: |
: "${CARGO_HOME:=/usr/local/cargo}"
mkdir -p "$CARGO_HOME"
{
echo '[source.crates-io]'
echo 'replace-with = "kellnr"'
echo '[registries.kellnr]'
echo 'index = "sparse+https://crates.breakpilot.com/api/v1/cratesio/"'
} >> "$CARGO_HOME/config.toml"
env:
RUSTC_WRAPPER: ""
- name: Install sccache
run: |
curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.9.1/sccache-v0.9.1-x86_64-unknown-linux-musl.tar.gz \
| tar xz --strip-components=1 -C /usr/local/bin/ sccache-v0.9.1-x86_64-unknown-linux-musl/sccache
curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz \
| tar xz --strip-components=1 -C /usr/local/bin/ sccache-v0.10.0-x86_64-unknown-linux-musl/sccache
chmod +x /usr/local/bin/sccache
env:
RUSTC_WRAPPER: ""
- name: Run E2E tests
run: cargo test -p compliance-agent --test e2e -- --test-threads=4
# The harness links compliance-agent, which depends on the private
# firmwerk repo; same PAT rewrite as in ci.yml.
- name: Configure git auth for the private firmwerk dependency
run: |
git config --global \
url."https://platform-ci:${{ secrets.PLATFORM_CI_TOKEN }}@git.breakpilot.com/".insteadOf \
"ssh://git@git.breakpilot.com:22222/"
env:
RUSTC_WRAPPER: ""
- name: Show sccache stats
run: sccache --show-stats
# The real CODESYS sample is ~10 MB, so it is fetched at a pinned commit
# and checksum rather than committed. fixtures/nightly/targets.json skips
# its target where NIGHTLY_CODESYS_SAMPLE is unset.
- name: Fetch the CODESYS sample
run: |
curl -fsSL -o /tmp/csv-blackbox.projectarchive \
"https://github.com/Proemion/codesys-examples/raw/164d8eea7b7483f764b4959788fd2a733624e576/CSV-BlackBox-Writter/CSV-BlackBox-Writter.projectarchive"
echo "8e1150728e33fc0f5e2572bc060545497cfa64308c927c0d81ecda71873db265 /tmp/csv-blackbox.projectarchive" \
| sha256sum -c -
env:
RUSTC_WRAPPER: ""
# The upstream Zephyr example application, at a pinned commit so the
# result does not drift with upstream main. codeload zips are not
# byte-stable, so the commit pin (not a checksum) is the guarantee.
- name: Fetch the Zephyr example application
run: |
curl -fsSL -o /tmp/zephyr-example.zip \
"https://codeload.github.com/zephyrproject-rtos/example-application/zip/38a6d9b276ed434454900130cacc87d058d3ac62"
env:
RUSTC_WRAPPER: ""
# Public mobile apps at pinned commits (MIT, Apache-2.0): a current
# SwiftUI app and a large Android app, so the mobile checks meet real
# projects, not only the hand-written fixtures. Not committed, as with
# the Zephyr example.
- name: Fetch the public mobile samples
run: |
curl -fsSL -o /tmp/ios-sample.zip \
"https://codeload.github.com/nalexn/clean-architecture-swiftui/zip/9eca97b8cfff96a14084b564b1fefd949c93d232"
curl -fsSL -o /tmp/android-sample.zip \
"https://codeload.github.com/android/nowinandroid/zip/a49ed253d75e61a2b6ab80a8da677b57437b08eb"
env:
RUSTC_WRAPPER: ""
# The image main deployed, started here rather than as a service:
# act_runner 0.6.1 hands a service's registry credentials to the job
# container's own pull (map order decides which service wins), so the
# Harbor login reached docker.io about every other night. mongo, the
# only service left, has no credentials. The agent shares this
# container's network: it reaches mongo by name and listens on
# localhost here. The login lands in this container's ~/.docker, which
# goes with it.
# Dev mode (no Keycloak): the harness talks to the unauthenticated dev
# tenant; source_only matches staging.
- name: Start the agent
run: |
curl -fsSL -o /tmp/docker.tgz \
https://download.docker.com/linux/static/stable/x86_64/docker-27.5.1.tgz
echo "4f798b3ee1e0140eab5bf30b0edc4e84f4cdb53255a429dc3bbae9524845d640 /tmp/docker.tgz" \
| sha256sum -c -
tar xzf /tmp/docker.tgz --strip-components=1 -C /usr/local/bin docker/docker
echo "$REGISTRY_PASSWORD" | docker login repo.breakpilot.com -u "$REGISTRY_USERNAME" --password-stdin
# -e NAME without a value passes this step's variable, so no secret
# appears on the command line. The container runs on the runner's
# daemon, outside the job's own limits, so it has its own; the label
# finds one a cancelled job left behind.
docker run -d --pull always --name "nightly-agent-${GITHUB_RUN_ID}" \
--label pruefwerk-nightly --memory 4g --cpus 2 \
--network "container:$(hostname)" \
-e APP_ENV=dev \
-e MONGODB_URI=mongodb://root:example@mongo:27017/?authSource=admin \
-e MONGODB_DATABASE=nightly \
-e PW_FEATURES=source_only \
-e LITELLM_URL -e LITELLM_API_KEY \
-e LITELLM_EMBED_MODEL=bge-multilingual-gemma2 \
-e NVD_API_KEY \
repo.breakpilot.com/pruefwerk/compliance-agent:latest
env:
RUSTC_WRAPPER: ""
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
# No chat model: LLM triage, code review and the control judge are
# off (LlmClient sends nothing without LITELLM_MODEL, #575). Their
# output never gates the run, and with the model on, ~600 calls of
# 11 s on average (p99 147 s) on the gateway prod also uses kept
# every scan past NIGHTLY_TIMEOUT_SECS from 2026-10-30 on (#573).
# Embeddings stay on: the gateway's embedding model.
LITELLM_URL: ${{ secrets.NIGHTLY_LITELLM_URL }}
LITELLM_API_KEY: ${{ secrets.NIGHTLY_LITELLM_API_KEY }}
# Optional. The CODESYS CVE match queries NVD, which rate-limits
# unauthenticated clients; a key keeps those CVEs from going missing.
NVD_API_KEY: ${{ secrets.NIGHTLY_NVD_API_KEY }}
- name: Wait for the agent
run: |
for i in $(seq 1 90); do
curl -fsS http://localhost:3001/api/v1/health && exit 0
sleep 2
done
echo "agent did not become healthy" >&2
exit 1
env:
RUSTC_WRAPPER: ""
- name: Scan the corpus and compare with the baselines
run: cargo test -p compliance-agent --test nightly -- --nocapture
env:
NIGHTLY_AGENT_URL: http://localhost:3001
NIGHTLY_CODESYS_SAMPLE: /tmp/csv-blackbox.projectarchive
NIGHTLY_ZEPHYR_EXAMPLE: /tmp/zephyr-example.zip
NIGHTLY_IOS_SAMPLE: /tmp/ios-sample.zip
NIGHTLY_ANDROID_SAMPLE: /tmp/android-sample.zip
NIGHTLY_BLESS: ${{ inputs.bless && '1' || '0' }}
# The agent is not a service, so the runner does not remove it.
- name: Stop the agent
if: always()
run: docker rm -f "nightly-agent-${GITHUB_RUN_ID}" || true
env:
RUSTC_WRAPPER: ""
# upload-artifact is a Node action and the Rust image has no node.
- name: Install node for the artifact upload
if: always()
run: |
apt-get update -qq
apt-get install -y -qq --no-install-recommends nodejs >/dev/null
env:
RUSTC_WRAPPER: ""
- name: Keep the report and this run's snapshots
if: always()
uses: actions/upload-artifact@v3
with:
name: nightly-report
path: |
target/nightly/
fixtures/nightly/baselines/
# One open issue tracks a red nightly: opened on the first failure,
# commented on while it stays red. Needs NIGHTLY_ALERT_TOKEN (issue write
# on this repo); without it the job still fails, just without the issue.
- name: Alert
if: failure() && github.event_name == 'schedule'
env:
RUSTC_WRAPPER: ""
TOKEN: ${{ secrets.NIGHTLY_ALERT_TOKEN }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
if [ -z "$TOKEN" ]; then
echo "::warning::NIGHTLY_ALERT_TOKEN is not set; not opening an issue"
exit 0
fi
api="${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}"
title="Nightly scan regression is red"
body="The nightly scan regression failed: ${RUN_URL} (report in the nightly-report artifact)."
number=$(curl -fsS -H "Authorization: token $TOKEN" \
"$api/issues?state=open&type=issues&q=$(printf %s "$title" | sed 's/ /%20/g')" \
| python3 -c "import json,sys; print(next((i['number'] for i in json.load(sys.stdin) if i['title']==sys.argv[1]), ''))" "$title")
payload=$(python3 -c "import json,sys; print(json.dumps({'title': sys.argv[1], 'body': sys.argv[2]}))" "$title" "$body")
if [ -n "$number" ]; then
curl -fsS -X POST -H "Authorization: token $TOKEN" -H "Content-Type: application/json" \
"$api/issues/$number/comments" -d "$payload" >/dev/null
else
curl -fsS -X POST -H "Authorization: token $TOKEN" -H "Content-Type: application/json" \
"$api/issues" -d "$payload" >/dev/null
fi
+3
View File
@@ -7,3 +7,6 @@
.playwright-mcp/
report-preview-full.png
compliance-dashboard/attack-chain-final.html
# Python bytecode (the agent image helpers)
__pycache__/
+11
View File
@@ -0,0 +1,11 @@
# Made-up secrets in Prüfwerk's own tests, found by the secret scanner in the
# git history (commit:file:rule:line, as gitleaks fingerprints them). Neither is
# a real credential; the history keeps them, so they are listed here.
#
# A Firebase-shaped key in the test that the real scanner still finds Firebase
# keys (compliance-agent/src/pipeline/gitleaks.rs).
6c9756bebf599eb16112d693c769cd752292d6a9:compliance-agent/src/pipeline/gitleaks.rs:gcp-api-key:278
d42b429273668bd285440596fd78e564d34b01ef:compliance-agent/src/pipeline/gitleaks.rs:gcp-api-key:278
# The throwaway MongoDB root password of a CI test container.
3ef5c28a97f169ed03009f70a9a20a7c9095f0b2:.gitea/workflows/ci.yml:generic-password:170
5424074d26552882c6529c2dd9d309b9cc37376a:.gitea/workflows/ci.yml:generic-password:72
Generated
+1123 -756
View File
File diff suppressed because it is too large. Load diff
+7 -2
View File
@@ -26,14 +26,19 @@ tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
chrono = { version = "0.4", features = ["serde"] }
mongodb = { version = "3", features = ["rustls-tls", "compat-3-0-0"] }
reqwest = { version = "0.12", features = ["json", "rustls-tls", "multipart", "cookies"], default-features = false }
reqwest = { version = "0.12", features = ["json", "rustls-tls", "multipart", "cookies", "stream"], default-features = false }
thiserror = "2"
# Source files in UTF-16 or Windows-1252 (code graph, PLC, .NET).
encoding_rs = "0.8"
sha2 = "0.10"
hex = "0.4"
uuid = { version = "1", features = ["v4", "v5", "serde"] }
secrecy = { version = "0.10", features = ["serde"] }
regex = "1"
zip = { version = "2", features = ["aes-crypto", "deflate"] }
zip = { version = "9", features = ["aes-crypto", "deflate"] }
# Uploaded tar and tar.gz source archives (ingest).
tar = "0.4"
flate2 = "1"
dashmap = "6"
tokio-stream = { version = "0.1", features = ["sync"] }
aes-gcm = "0.10"
+1 -1
View File
@@ -4,7 +4,7 @@ default_platform = "web"
asset_dir = "assets"
[web.app]
title = "Compliance Scanner Dashboard"
title = "Prüfwerk · BreakPilot"
[web.watcher]
reload_html = true
+175 -57
View File
@@ -1,86 +1,204 @@
# Pinned versions of every tool the agent runs. They are also written to
# /opt/pruefwerk/tool-versions.json, so evidence can name the tool that
# produced a finding. Bump a version together with its checksum.
ARG RUST_VERSION=1.98.1
ARG CARGO_AUDIT_VERSION=0.22.2
ARG SYFT_VERSION=1.52.0
ARG SYFT_SHA256=caeedb81fb0491615f1ebd1761e4145d41ee86dd2cc7bf80669f9f5ad9d6133d
ARG BETTERLEAKS_VERSION=1.9.0
ARG BETTERLEAKS_SHA256=f8b185a39ffcece2a1ca82bf3a4e7435cd81963ffd16b7a9128daf75f35f6de7
# SBOM quality score (Interlynk, Apache-2.0), #496. The checksum is the one
# in the release's checksums.txt.
ARG SBOMQS_VERSION=2.1.2
ARG SBOMQS_SHA256=451c800019c81059f86eac2c1344c57572b3436e7e0ffeaa076459d195a39ab8
ARG SEMGREP_VERSION=1.179.0
ARG RUFF_VERSION=0.16.8
# mobsfscan pins an older semgrep; it is installed without its dependencies so
# it runs on the semgrep above, and its other dependencies are pinned here.
ARG MOBSFSCAN_VERSION=1.0.1
# Yocto recipe lint (BSD-2-Clause): only its security rules run.
ARG OELINT_ADV_VERSION=9.11.2
# The recipe inventory reads the recipes with the same oelint-parser.
ARG OELINT_PARSER_VERSION=8.13.2
# DevSkim (MIT) is published as a .NET tool on nuget.org, not as a release
# binary: the package is pinned by checksum and run on the .NET runtime (MIT).
ARG DEVSKIM_VERSION=1.0.100
ARG DEVSKIM_SHA256=11a08ca73ef1020c4dd8efaf4e34ce0d59df75eed4fcef478724bc6be28f04fd
ARG DOTNET_RUNTIME_VERSION=10.0.12
ARG DOTNET_RUNTIME_SHA512=58388fdde4f13bd703c7a6f7defb3300b17e42ba5fe8bca50066f80f64ac7406620dcdfb4acc1eff7992750c8cc5cff8369dd12d09730c8a9e8760d6032f7f6e
FROM rust:1.94-bookworm AS builder
WORKDIR /app
COPY . .
# compliance-agent depends on the private tramiton-core git repo. Authenticate
# The version and commit GET /api/v1/platform/version reports (CI passes the
# latest release tag and the commit); the agent reads them at compile time and
# falls back to the crate version and "unknown" when they are empty.
ARG PRUEFWERK_VERSION=
ARG PRUEFWERK_COMMIT=
# compliance-agent depends on the private firmwerk git repo (platform/firmwerk). Authenticate
# the fetch with a PAT passed as a BuildKit secret (never baked into a layer).
# Build with: DOCKER_BUILDKIT=1 docker build --secret id=tramiton_token,env=TRAMITON_FETCH_TOKEN ...
RUN --mount=type=secret,id=tramiton_token \
if [ -s /run/secrets/tramiton_token ]; then \
# Build with: DOCKER_BUILDKIT=1 docker build --secret id=git_token,env=PLATFORM_CI_TOKEN ...
RUN --mount=type=secret,id=git_token \
if [ -s /run/secrets/git_token ]; then \
git config --global \
url."https://sharang:$(cat /run/secrets/tramiton_token)@gitea.meghsakha.com/".insteadOf \
"ssh://git@gitea.meghsakha.com:22222/"; \
url."https://platform-ci:$(cat /run/secrets/git_token)@git.breakpilot.com/".insteadOf \
"ssh://git@git.breakpilot.com:22222/"; \
fi && \
CARGO_NET_GIT_FETCH_WITH_CLI=true cargo build --release -p compliance-agent
# A throwaway stage that packs a real nix store (store paths + the validity DB)
# into a compressed bootstrap tarball. Only the tarball is copied into the final
# image, so we don't carry a raw /nix copy layer.
FROM nixos/nix:latest AS nixseed
RUN tar -C / -czf /nix-bootstrap.tar.gz nix
# cargo-audit is compiled here, where a C toolchain exists, so the runtime image
# needs none.
FROM rust:1.94-bookworm AS cargo-audit
ARG CARGO_AUDIT_VERSION
RUN cargo install cargo-audit --version "${CARGO_AUDIT_VERSION}" --locked
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates libssl3 git curl python3 python3-pip npm golang-go php-cli && rm -rf /var/lib/apt/lists/*
# The runtime without the agent binary: every scanner, pinned. Buildable on its
# own (`--target tools`), which is how the tool installs are tested.
FROM debian:bookworm-slim AS tools
ARG RUST_VERSION
ARG CARGO_AUDIT_VERSION
ARG SYFT_VERSION
ARG SYFT_SHA256
ARG BETTERLEAKS_VERSION
ARG BETTERLEAKS_SHA256
ARG SBOMQS_VERSION
ARG SBOMQS_SHA256
ARG SEMGREP_VERSION
ARG RUFF_VERSION
ARG MOBSFSCAN_VERSION
ARG OELINT_ADV_VERSION
ARG OELINT_PARSER_VERSION
ARG DEVSKIM_VERSION
ARG DEVSKIM_SHA256
ARG DOTNET_RUNTIME_VERSION
ARG DOTNET_RUNTIME_SHA512
# Install Cargo (minimal, for cargo metadata / cargo audit / generate-lockfile)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
ENV PATH="/root/.cargo/bin:${PATH}"
RUN cargo install cargo-audit
# No recommended packages: python3-pip would otherwise pull in a full C
# toolchain, which nothing at runtime needs.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates libssl3 git curl python3 python3-pip npm cppcheck \
&& rm -rf /var/lib/apt/lists/*
# eMudhra (Mozilla bug 2083449, Oct 2026): fail the build if the image still
# trusts the compromised root. Also keeps a cached layer with the old store
# from being reused.
RUN test ! -e /usr/share/ca-certificates/mozilla/emSign_ECC_Root_CA_-_G3.crt
# Install Composer for PHP dependency resolution
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Cargo resolves Rust lockfiles and metadata for the SBOM stage. Installed
# system-wide so the unprivileged user can run it; its caches go to the user's
# CARGO_HOME below.
ENV RUSTUP_HOME=/usr/local/rustup \
PATH=/usr/local/cargo/bin:${PATH}
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| CARGO_HOME=/usr/local/cargo sh -s -- -y --no-modify-path --profile minimal \
--default-toolchain "${RUST_VERSION}"
# Install Bundler for Ruby dependency resolution
RUN apt-get update && apt-get install -y ruby && rm -rf /var/lib/apt/lists/* && gem install bundler
RUN curl -sSfL -o /tmp/syft.tar.gz \
"https://github.com/anchore/syft/releases/download/v${SYFT_VERSION}/syft_${SYFT_VERSION}_linux_amd64.tar.gz" \
&& echo "${SYFT_SHA256} /tmp/syft.tar.gz" | sha256sum -c - \
&& tar -xzf /tmp/syft.tar.gz -C /usr/local/bin syft \
&& rm /tmp/syft.tar.gz
# Install syft for SBOM generation
RUN curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
# Betterleaks (MIT), gitleaks' successor by its author (#516): reads our
# gitleaks.toml. Its live validation is never switched on.
RUN curl -sSfL -o /tmp/betterleaks.tar.gz \
"https://github.com/betterleaks/betterleaks/releases/download/v${BETTERLEAKS_VERSION}/betterleaks_${BETTERLEAKS_VERSION}_linux_x64.tar.gz" \
&& echo "${BETTERLEAKS_SHA256} /tmp/betterleaks.tar.gz" | sha256sum -c - \
&& tar -xzf /tmp/betterleaks.tar.gz -C /usr/local/bin betterleaks \
&& rm /tmp/betterleaks.tar.gz
# Install gitleaks for secret detection
RUN curl -sSfL https://github.com/gitleaks/gitleaks/releases/download/v8.21.2/gitleaks_8.21.2_linux_x64.tar.gz \
| tar -xz -C /usr/local/bin gitleaks
RUN curl -sSfL -o /tmp/sbomqs.tar.gz \
"https://github.com/interlynk-io/sbomqs/releases/download/v${SBOMQS_VERSION}/sbomqs_${SBOMQS_VERSION}_Linux_x86_64.tar.gz" \
&& echo "${SBOMQS_SHA256} /tmp/sbomqs.tar.gz" | sha256sum -c - \
&& tar -xzf /tmp/sbomqs.tar.gz -C /usr/local/bin sbomqs \
&& rm /tmp/sbomqs.tar.gz
# Install semgrep for static analysis
RUN pip3 install --break-system-packages semgrep
RUN pip3 install --break-system-packages --no-cache-dir \
"semgrep==${SEMGREP_VERSION}" "ruff==${RUFF_VERSION}"
# Install ruff for Python linting
RUN pip3 install --break-system-packages ruff
# Mobile app SAST (LGPL-3.0). The wrapper clears its substring path ignores;
# see compliance-agent/src/pipeline/mobsfscan.rs.
RUN pip3 install --break-system-packages --no-cache-dir --no-deps \
"mobsfscan==${MOBSFSCAN_VERSION}" \
&& pip3 install --break-system-packages --no-cache-dir \
"libsast==3.1.8" "billiard==4.3.0" "pyyaml==6.0.3" "colorama==0.4.6" \
"sarif-om==1.0.4" "jschema-to-python==1.2.3" "jsonpickle==4.1.2" "pbr==7.0.3" \
"tabulate==0.10.0" "xmltodict==1.0.4"
COPY docker/pruefwerk_mobsfscan.py /opt/pruefwerk/pruefwerk_mobsfscan.py
# Real nix for the tramiton reproducible-build firmware SBOM.
#
# nix-portable's proot fallback can't run here: user namespaces are blocked by
# the container's default seccomp/apparmor profile, and orca exposes no way to
# relax it. So ship a *real* nix and disable its build sandbox
# (`sandbox = false`) — a plain gcc/make firmware build needs no user namespace,
# so it runs fine under the locked-down profile with no proot involved.
#
# The store is shipped as a bootstrap tarball and seeded onto /nix at first
# start (see docker/agent-entrypoint.sh), so a persistent /nix volume survives
# redeploys. A missing/broken nix just falls back to the analysis-only SBOM.
COPY --from=nixseed /nix-bootstrap.tar.gz /opt/nix-bootstrap.tar.gz
ENV PATH="/nix/var/nix/profiles/default/bin:${PATH}"
RUN mkdir -p /etc/nix && printf '%s\n' \
'experimental-features = nix-command flakes' \
'sandbox = false' \
'build-users-group =' \
'substituters = https://cache.nixos.org' \
'trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=' \
> /etc/nix/nix.conf
# Yocto recipe lint and recipe inventory; see
# compliance-agent/src/pipeline/recipe_lint/oelint.rs and yocto_inventory.rs.
# Its dependencies are pinned with it (oelint-parser reads the recipes;
# deprecated's wrapt is the 1.x semgrep's OpenTelemetry already installed).
RUN pip3 install --break-system-packages --no-cache-dir \
"oelint-adv==${OELINT_ADV_VERSION}" "oelint-parser==${OELINT_PARSER_VERSION}" "oelint-data==1.5.23" \
"anytree==2.13.0" "argcomplete==3.7.2" "urllib3==2.8.0" "regex==2026.9.29" \
"deprecated==1.3.1"
COPY docker/pruefwerk_yocto_recipes.py /opt/pruefwerk/pruefwerk_yocto_recipes.py
# .NET SAST without a build (#494): DevSkim on C#, VB.NET and .config files.
# The .NET runtime only (no SDK), with invariant globalisation so it needs no
# ICU; of DevSkim's bundled native libraries only the linux-x64 ones are kept.
# The licence texts stay next to each (LICENSE.txt, ThirdPartyNotices.txt).
RUN curl -sSfL -o /tmp/dotnet.tar.gz \
"https://builds.dotnet.microsoft.com/dotnet/Runtime/${DOTNET_RUNTIME_VERSION}/dotnet-runtime-${DOTNET_RUNTIME_VERSION}-linux-x64.tar.gz" \
&& echo "${DOTNET_RUNTIME_SHA512} /tmp/dotnet.tar.gz" | sha512sum -c - \
&& mkdir -p /opt/dotnet \
&& tar -xzf /tmp/dotnet.tar.gz -C /opt/dotnet \
&& rm /tmp/dotnet.tar.gz \
&& curl -sSfL -o /tmp/devskim.nupkg \
"https://api.nuget.org/v3-flatcontainer/microsoft.cst.devskim.cli/${DEVSKIM_VERSION}/microsoft.cst.devskim.cli.${DEVSKIM_VERSION}.nupkg" \
&& echo "${DEVSKIM_SHA256} /tmp/devskim.nupkg" | sha256sum -c - \
&& python3 -c "import zipfile; z = zipfile.ZipFile('/tmp/devskim.nupkg'); \
[z.extract(n, '/tmp/devskim') for n in z.namelist() if n.startswith('tools/net10.0/any/') or n == 'LICENSE.txt']" \
&& mv /tmp/devskim/tools/net10.0/any /opt/devskim \
&& mv /tmp/devskim/LICENSE.txt /opt/devskim/LICENSE.txt \
&& rm -rf /tmp/devskim /tmp/devskim.nupkg /opt/devskim/x86 /opt/devskim/amd64 /opt/devskim/arm64 /opt/devskim/*.pdb \
&& find /opt/devskim/runtimes -mindepth 1 -maxdepth 1 ! -name linux-x64 -exec rm -rf {} +
COPY --chmod=0755 docker/devskim.sh /usr/local/bin/devskim
RUN mkdir -p /opt/pruefwerk \
&& printf '{"rust":"%s","cargo-audit":"%s","syft":"%s","betterleaks":"%s","semgrep":"%s","ruff":"%s","cppcheck":"%s","mobsfscan":"%s","oelint-adv":"%s","oelint-parser":"%s","sbomqs":"%s","devskim":"%s","dotnet-runtime":"%s"}\n' \
"${RUST_VERSION}" "${CARGO_AUDIT_VERSION}" "${SYFT_VERSION}" "${BETTERLEAKS_VERSION}" \
"${SEMGREP_VERSION}" "${RUFF_VERSION}" "$(cppcheck --version | cut -d' ' -f2)" \
"${MOBSFSCAN_VERSION}" "${OELINT_ADV_VERSION}" "${OELINT_PARSER_VERSION}" "${SBOMQS_VERSION}" "${DEVSKIM_VERSION}" \
"${DOTNET_RUNTIME_VERSION}" \
> /opt/pruefwerk/tool-versions.json
# The agent runs unprivileged. It writes only to its home (tool caches), the
# data root (uploaded artifacts, the OSCAL snapshot; mount a volume there) and
# /tmp (git checkouts), so the rest of the filesystem can be read-only.
RUN useradd --uid 10001 --user-group --create-home --home-dir /home/app --shell /usr/sbin/nologin app \
&& mkdir -p /data/compliance-scanner/artifacts /data/compliance-scanner/oscal \
&& chown -R app:app /data/compliance-scanner
ENV HOME=/home/app \
CARGO_HOME=/home/app/.cargo \
ARTIFACT_STORE_BASE_PATH=/data/compliance-scanner/artifacts \
BREAKPILOT_SNAPSHOT_DIR=/data/compliance-scanner/oscal
FROM tools
COPY --from=cargo-audit /usr/local/cargo/bin/cargo-audit /usr/local/cargo/bin/cargo-audit
COPY --from=builder /app/target/release/compliance-agent /usr/local/bin/compliance-agent
COPY docker/agent-entrypoint.sh /usr/local/bin/agent-entrypoint.sh
RUN chmod +x /usr/local/bin/agent-entrypoint.sh
COPY --chmod=0755 docker/agent-entrypoint.sh /usr/local/bin/agent-entrypoint.sh
# OSCAL control-catalog snapshot: lets control mapping run without the
# breakpilot-compliance backend. The entrypoint seeds it into
# BREAKPILOT_SNAPSHOT_DIR on start (copy-if-absent).
COPY --from=builder /app/compliance-agent/controls/snapshot /opt/breakpilot/oscal-snapshot
# Copy documentation for the help chat assistant
COPY --from=builder /app/README.md /app/README.md
COPY --from=builder /app/docs /app/docs
ENV HELP_DOCS_PATH=/app
# Ensure SSH key directory exists
RUN mkdir -p /data/compliance-scanner/ssh
USER app
EXPOSE 3001 3002
# Seeds /nix (fresh volume) from the bootstrap tarball, then runs the agent.
ENTRYPOINT ["/usr/local/bin/agent-entrypoint.sh"]
# Liveness from the agent's own health endpoint (#262 makes it report its
# dependencies too).
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
CMD curl -fsS "http://127.0.0.1:${AGENT_PORT:-3001}/api/v1/health" || exit 1
# Checks the data directories are writable, seeds the OSCAL snapshot, then runs
# the agent.
ENTRYPOINT ["/usr/local/bin/agent-entrypoint.sh"]
+27 -9
View File
@@ -2,31 +2,49 @@ FROM rust:1.94-bookworm AS builder
RUN cargo install dioxus-cli --version 0.7.3 --locked
ARG DOCS_URL=/docs
# Legal pages linked from the sidebar; the defaults are breakpilot.com's.
ARG IMPRINT_URL=https://breakpilot.com/impressum
ARG PRIVACY_URL=https://breakpilot.com/datenschutz
# The release telemetry reports as service.version (CI passes the latest
# release tag); empty falls back to the crate version.
ARG PRUEFWERK_VERSION=
WORKDIR /app
COPY . .
ENV DOCS_URL=${DOCS_URL}
# compliance-agent (a workspace member) depends on the private tramiton-core git
ENV IMPRINT_URL=${IMPRINT_URL} \
PRIVACY_URL=${PRIVACY_URL}
# compliance-agent (a workspace member) depends on the private firmwerk git
# repo, so the workspace resolve needs it even to build the dashboard.
# Authenticate the fetch with a PAT passed as a BuildKit secret.
RUN --mount=type=secret,id=tramiton_token \
if [ -s /run/secrets/tramiton_token ]; then \
RUN --mount=type=secret,id=git_token \
if [ -s /run/secrets/git_token ]; then \
git config --global \
url."https://sharang:$(cat /run/secrets/tramiton_token)@gitea.meghsakha.com/".insteadOf \
"ssh://git@gitea.meghsakha.com:22222/"; \
url."https://platform-ci:$(cat /run/secrets/git_token)@git.breakpilot.com/".insteadOf \
"ssh://git@git.breakpilot.com:22222/"; \
fi && \
CARGO_NET_GIT_FETCH_WITH_CLI=true dx build --release --package compliance-dashboard
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates libssl3 && rm -rf /var/lib/apt/lists/*
# curl only serves the healthcheck.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates libssl3 curl \
&& rm -rf /var/lib/apt/lists/* \
&& useradd --uid 10001 --user-group --no-create-home --shell /usr/sbin/nologin app
# eMudhra (Mozilla bug 2083449, Oct 2026): fail the build if the image still
# trusts the compromised root. Also keeps a cached layer with the old store
# from being reused.
RUN test ! -e /usr/share/ca-certificates/mozilla/emSign_ECC_Root_CA_-_G3.crt
WORKDIR /app
COPY --from=builder /app/target/dx/compliance-dashboard/release/web/compliance-dashboard /app/compliance-dashboard
COPY --from=builder /app/target/dx/compliance-dashboard/release/web/public /app/public
ENV IP=0.0.0.0
# Sessions live in Mongo, so the dashboard writes nothing to its filesystem.
USER app
EXPOSE 8080
ENTRYPOINT ["./compliance-dashboard"]
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD curl -fsS "http://127.0.0.1:${PORT:-8080}/health" || exit 1
ENTRYPOINT ["./compliance-dashboard"]
+4 -1
View File
@@ -8,8 +8,11 @@ COPY docs/ .
RUN npm run build
FROM nginx:alpine
# Patched Alpine packages (the nginx base lags behind, e.g. brotli in Oct 2026).
RUN apk upgrade --no-cache
RUN rm /etc/nginx/conf.d/default.conf
COPY docs/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/.vitepress/dist /usr/share/nginx/html
# base is /docs/ (see docs/.vitepress/config.mts) — the site lives under /docs/
COPY --from=builder /app/.vitepress/dist /usr/share/nginx/html/docs
EXPOSE 80
+19 -8
View File
@@ -2,25 +2,36 @@ FROM rust:1.94-bookworm AS builder
WORKDIR /app
COPY . .
# compliance-agent (a workspace member) depends on the private tramiton-core git
# compliance-agent (a workspace member) depends on the private firmwerk git
# repo, so the workspace resolve needs it even to build the mcp binary.
# Authenticate the fetch with a PAT passed as a BuildKit secret.
RUN --mount=type=secret,id=tramiton_token \
if [ -s /run/secrets/tramiton_token ]; then \
RUN --mount=type=secret,id=git_token \
if [ -s /run/secrets/git_token ]; then \
git config --global \
url."https://sharang:$(cat /run/secrets/tramiton_token)@gitea.meghsakha.com/".insteadOf \
"ssh://git@gitea.meghsakha.com:22222/"; \
url."https://platform-ci:$(cat /run/secrets/git_token)@git.breakpilot.com/".insteadOf \
"ssh://git@git.breakpilot.com:22222/"; \
fi && \
CARGO_NET_GIT_FETCH_WITH_CLI=true cargo build --release -p compliance-mcp
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates libssl3 && rm -rf /var/lib/apt/lists/*
# curl only serves the healthcheck.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates libssl3 curl \
&& rm -rf /var/lib/apt/lists/* \
&& useradd --uid 10001 --user-group --no-create-home --shell /usr/sbin/nologin app
# eMudhra (Mozilla bug 2083449, Oct 2026): fail the build if the image still
# trusts the compromised root. Also keeps a cached layer with the old store
# from being reused.
RUN test ! -e /usr/share/ca-certificates/mozilla/emSign_ECC_Root_CA_-_G3.crt
COPY --from=builder /app/target/release/compliance-mcp /usr/local/bin/compliance-mcp
ENV MCP_PORT=8090
# The MCP server writes nothing to its filesystem.
USER app
EXPOSE 8090
ENV MCP_PORT=8090
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl -fsS "http://127.0.0.1:${MCP_PORT}/health" || exit 1
ENTRYPOINT ["compliance-mcp"]
+55 -19
View File
@@ -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++, mobsfscan for Android and iOS apps |
| **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 |
@@ -146,6 +146,28 @@ docker compose up -d
This starts MongoDB, SearXNG, the agent (port 3001), and the dashboard (port 8080).
### Nightly scan regression
Every night CI scans the fixture corpus with the agent image built from `main`
and compares the results with the baselines in `fixtures/nightly/baselines/`
(`.gitea/workflows/nightly.yml`). The corpus is the demo targets
(`fixtures/demo-targets/targets.json`, seeded by the agent itself) plus the
nightly-only fixtures (`fixtures/nightly/targets.json`: CODESYS archives, a
ladder diagram, a live PLC endpoint, a corrupt archive), which the harness
onboards through the API. The real CODESYS sample is not committed; point
`NIGHTLY_CODESYS_SAMPLE` at it or its target is skipped. To run it against any
agent in dev mode (use a fresh database: a rescan of an unchanged repo skips
most stages, so it records less than a first scan):
```bash
NIGHTLY_AGENT_URL=http://localhost:3001 \
cargo test -p compliance-agent --test nightly -- --nocapture
```
After an intended change to scan results, re-bless with `NIGHTLY_BLESS=1` (or
run the workflow by hand with "bless" ticked) and commit the baseline diff with
the change. The report lands in `target/nightly/report.md`.
## REST API
The agent exposes a REST API on port 3001:
@@ -154,43 +176,57 @@ The agent exposes a REST API on port 3001:
|--------|----------|-------------|
| `GET` | `/api/v1/health` | Health check |
| `GET` | `/api/v1/stats/overview` | Summary statistics and trends |
| `GET` | `/api/v1/repositories` | List tracked repositories |
| `POST` | `/api/v1/repositories` | Add a repository to track |
| `POST` | `/api/v1/repositories/:id/scan` | Trigger a manual scan |
| `GET` | `/api/v1/cve-history?days=30[&target=][&project=][&per_target=true]` | Open CVEs with a fixed version per day (UTC) by severity, for the tenant, a target or a project, with the open critical/high findings |
| `GET` | `/api/v1/targets/{id}/top-updates` | The package updates that close the most of a target's open CVEs with a fix |
| `GET` | `/api/v1/targets` | List targets (Prüfobjekte), each with its newest scan run |
| `POST` | `/api/v1/targets` | Create a target |
| `GET` / `PATCH` / `DELETE` | `/api/v1/targets/{id}` | Read, update (name, type, artifacts, `scan_config` incl. `issue_tracker`) or delete a target |
| `POST` | `/api/v1/targets/{id}/artifacts` | Add a git repository, URL or text artifact |
| `POST` | `/api/v1/targets/{id}/artifacts/upload` | Upload a file artifact (multipart, up to 512 MiB) |
| `PUT` | `/api/v1/targets/{id}/artifacts/{artifact_id}/archive-password` | Set the password of a password-protected archive |
| `POST` | `/api/v1/targets/{id}/scan` | Trigger a manual scan |
| `GET` | `/api/v1/targets/{id}/compliance` | CRA Annex I status of a target |
| `GET` | `/api/v1/targets/{id}/evidence-pack` | Evidence pack (ZIP) |
| `POST` | `/api/v1/targets/{id}/findings` | Add a finding from a manual test |
| `POST` | `/api/v1/targets/{id}/findings/import` | Import SARIF 2.1.0 or ZAP JSON |
| `GET` | `/api/v1/findings` | List findings (filterable) |
| `GET` | `/api/v1/findings/:id` | Get finding with code evidence |
| `PATCH` | `/api/v1/findings/:id/status` | Update finding status |
| `GET` | `/api/v1/findings/{id}` | Get finding with code evidence |
| `PATCH` | `/api/v1/findings/{id}/status` | Update finding status (with `reason` where required) |
| `PATCH` | `/api/v1/findings/bulk-status` | Update the status of several findings |
| `GET` | `/api/v1/sbom` | List dependencies |
| `GET` | `/api/v1/issues` | List cross-tracker issues |
| `GET` | `/api/v1/sbom/export` | Export a target's SBOM (CycloneDX 1.5 or SPDX 2.3) |
| `GET` | `/api/v1/issues` | List cross-tracker issues (search `q`, `status=open\|closed`, `repo_id`) |
| `GET` | `/api/v1/scan-runs` | Scan execution history |
| `GET` | `/api/v1/graph/:repo_id` | Code knowledge graph |
| `POST` | `/api/v1/graph/:repo_id/build` | Trigger graph build |
| `GET` | `/api/v1/graph/{repo_id}` | Code knowledge graph |
| `POST` | `/api/v1/graph/{repo_id}/build` | Trigger graph build |
| `GET` | `/api/v1/dast/targets` | List DAST targets |
| `POST` | `/api/v1/dast/targets` | Add DAST target |
| `GET` | `/api/v1/dast/findings` | List DAST findings |
| `POST` | `/api/v1/chat/:repo_id` | RAG-powered code chat |
| `POST` | `/api/v1/chat/{repo_id}` | RAG-powered code chat |
| `POST` | `/api/v1/help/chat` | Documentation-grounded help chat |
| `POST` | `/api/v1/pentest/sessions` | Create pentest session |
| `POST` | `/api/v1/pentest/sessions/:id/export` | Export encrypted pentest report |
| `POST` | `/webhook/github` | GitHub webhook (HMAC-SHA256) |
| `POST` | `/webhook/gitlab` | GitLab webhook (token verify) |
| `POST` | `/webhook/gitea` | Gitea webhook |
| `POST` | `/api/v1/pentest/sessions/{id}/export` | Export encrypted pentest report |
| `POST` | `/webhook/{tenant_id}/github/{repo_id}` | GitHub webhook (HMAC-SHA256) |
| `POST` | `/webhook/{tenant_id}/gitlab/{repo_id}` | GitLab webhook (token verify) |
| `POST` | `/webhook/{tenant_id}/gitea/{repo_id}` | Gitea webhook |
## Dashboard Pages
| Page | Description |
|------|-------------|
| **Overview** | Stat cards, severity distribution, AI chat cards, MCP status |
| **Repositories** | Add/manage tracked repos, trigger scans, webhook config |
| **Findings** | Filterable table by severity, type, status, scanner |
| **Finding Detail** | Code evidence, remediation, suggested fix, linked issue |
| **Übersicht** (Overview) | Figures, CRA status by target, most severe open findings; AI chat and MCP cards outside source-only deployments |
| **Prüfobjekte** (Targets) | Targets with last scan, CRA status and findings; **Prüfung starten** |
| **Neues Prüfobjekt** (Onboard) | Wizard: type, artifacts (git, zip/tar/tar.gz, PLC project, firmware image), review, first scan |
| **Target page** | CRA status, SBOM figures, open findings, scan runs, edit, evidence pack, manual findings |
| **Findings** | Filterable table by target, severity, type, status |
| **Finding Detail** | Code evidence, CRA refs, remediation, status with reason and history, linked issue |
| **SBOM** | Dependency inventory with vulnerability badges, license summary |
| **Issues** | Cross-tracker view (GitHub + GitLab + Jira + Gitea) |
| **Code Graph** | Interactive architecture visualization, impact analysis |
| **AI Chat** | RAG-powered Q&A about repository code |
| **DAST** | Dynamic scanning targets, findings, and scan history |
| **Pentest** | AI-driven pentest sessions, attack chain visualization |
| **MCP Servers** | Model Context Protocol server management |
| **MCP Servers** | Model Context Protocol server management (reached from the overview's MCP card; no sidebar entry) |
| **Help Chat** | Floating assistant (available on every page) for product Q&A |
## Project Structure
+4
View File
@@ -1 +1,5 @@
avoid-breaking-exported-api = false
# Tests may unwrap: a panic is how a test fails. Production code keeps the
# workspace-wide deny on unwrap_used / expect_used.
allow-unwrap-in-tests = true
allow-expect-in-tests = true
+32 -14
View File
@@ -1,13 +1,16 @@
[package]
name = "compliance-agent"
version = "0.1.0"
version = "0.4.17"
edition = "2021"
[lints]
workspace = true
[dependencies]
compliance-core = { workspace = true, features = ["mongodb", "telemetry", "axum"] }
# The OpenAPI description of the API, generated from the handlers (#1006).
utoipa = "6"
utoipa-axum = "0.3"
compliance-core = { workspace = true, features = ["mongodb", "telemetry", "axum", "secrets"] }
control-map = { workspace = true }
compliance-graph = { path = "../compliance-graph" }
compliance-dast = { path = "../compliance-dast" }
@@ -15,21 +18,26 @@ compliance-dast = { path = "../compliance-dast" }
# used by the Werkbank runner.
werkbank-exec = { path = "../werkbank-exec" }
# Native firmware build/target detection for bare-metal & RTOS artifacts.
# Same-company IP, used directly (not via CLI) so the whole tramiton suite is
# available to the onboarding classifier. NOTE: CI must be able to fetch this
# Same-company IP, used directly (not via CLI) so the whole firmwerk suite is
# available to the onboarding classifier. Repo: git.breakpilot.com/platform/firmwerk;
# crates are firmwerk-* from tag v0.6.0 (declared-dependency SBOM, #38).
# NOTE: CI must be able to fetch this
# private repo (see the git-auth step in .gitea/workflows/ci.yml).
tramiton-core = { git = "ssh://git@gitea.meghsakha.com:22222/sharang/tramiton.git", tag = "v0.4.1" }
# tramiton-repro drives the reproducible build (NixBackend seal_and_build) that
# yields a sealed lock; `libraries_from_inputs` is the analysis-only fallback.
tramiton-repro = { git = "ssh://git@gitea.meghsakha.com:22222/sharang/tramiton.git", tag = "v0.4.1" }
# tramiton-sbom renders the bill of materials from a sealed lock (+ binary SCA).
tramiton-sbom = { git = "ssh://git@gitea.meghsakha.com:22222/sharang/tramiton.git", tag = "v0.4.1" }
firmwerk-core = { git = "ssh://git@git.breakpilot.com:22222/platform/firmwerk.git", tag = "v0.6.0" }
# firmwerk-repro drives the reproducible build (NixBackend seal_and_build) that
# yields a sealed lock.
firmwerk-repro = { git = "ssh://git@git.breakpilot.com:22222/platform/firmwerk.git", tag = "v0.6.0" }
# firmwerk-sbom renders the bill of materials from a sealed lock or, without a
# build, from the analysed plan (+ binary SCA).
firmwerk-sbom = { git = "ssh://git@git.breakpilot.com:22222/platform/firmwerk.git", tag = "v0.6.0" }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
chrono = { workspace = true }
# Calendar days and months of metering in Europe/Berlin (t72).
chrono-tz = "0.10"
mongodb = { workspace = true }
reqwest = { workspace = true }
thiserror = { workspace = true }
@@ -45,23 +53,33 @@ octocrab = "0.44"
tokio-cron-scheduler = "0.13"
dotenvy = "0.15"
hmac = "0.12"
# Constant-time comparison of the GitLab webhook token.
subtle = "2.6"
walkdir = "2"
# Gradle version catalogs (libs.versions.toml) in mobile and JVM projects.
toml = "0.8"
# Read-only XML tree parsing for PLCopen project files (POU extraction).
roxmltree = "0.20"
# kas project files (Yocto layer pins); already in the tree through firmwerk-core.
yaml-rust2 = { version = "0.13", default-features = false }
base64 = "0.22"
urlencoding = "2"
futures-util = "0.3"
jsonwebtoken = "9"
zip = { workspace = true }
aes-gcm = { workspace = true }
tar = { workspace = true }
# Yocto image SPDX archives (`*.spdx.tar.zst`); already in the tree via zip.
zstd = "0.14"
flate2 = { workspace = true }
tokio-tungstenite = { version = "0.26", features = ["rustls-tls-webpki-roots"] }
futures-core = "0.3"
dashmap = { workspace = true }
tokio-stream = { workspace = true }
rand = { workspace = true }
# PE/ELF headers of committed binaries (hardening, #495). The same version and
# features firmwerk-sbom already pulls in, so it adds nothing to the build.
object = { version = "0.36", default-features = false, features = ["read", "std"] }
[dev-dependencies]
compliance-core = { workspace = true, features = ["mongodb", "axum"] }
compliance-core = { workspace = true, features = ["mongodb", "axum", "secrets"] }
tower = { version = "0.5", features = ["util"] }
reqwest = { workspace = true }
serde_json = { workspace = true }
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+136
View File
@@ -0,0 +1,136 @@
{
"source": "https://learn.microsoft.com/lifecycle/products/microsoft-net-framework and https://dotnet.microsoft.com/platform/support/policy/dotnet-core",
"endoflife_products": [
"dotnet",
"dotnetfx"
],
"checked_on": "2026-10-05",
"notes": "Microsoft's end of support per target framework moniker. Monikers not listed are supported (.NET Framework 4.7 to 4.8.1 follow the Windows they ship with).",
"frameworks": [
{
"moniker": "net11",
"end_of_support": "2011-07-12",
"product": ".NET Framework 1.1"
},
{
"moniker": "net20",
"end_of_support": "2011-07-12",
"product": ".NET Framework 2.0"
},
{
"moniker": "net30",
"end_of_support": "2011-07-12",
"product": ".NET Framework 3.0"
},
{
"moniker": "net35",
"end_of_support": "2029-01-09",
"product": ".NET Framework 3.5 SP1"
},
{
"moniker": "net40",
"end_of_support": "2016-01-12",
"product": ".NET Framework 4.0"
},
{
"moniker": "net403",
"end_of_support": "2016-01-12",
"product": ".NET Framework 4.0.3"
},
{
"moniker": "net45",
"end_of_support": "2016-01-12",
"product": ".NET Framework 4.5"
},
{
"moniker": "net451",
"end_of_support": "2016-01-12",
"product": ".NET Framework 4.5.1"
},
{
"moniker": "net452",
"end_of_support": "2022-04-26",
"product": ".NET Framework 4.5.2"
},
{
"moniker": "net46",
"end_of_support": "2022-04-26",
"product": ".NET Framework 4.6"
},
{
"moniker": "net461",
"end_of_support": "2022-04-26",
"product": ".NET Framework 4.6.1"
},
{
"moniker": "net462",
"end_of_support": "2027-01-12",
"product": ".NET Framework 4.6.2"
},
{
"moniker": "netcoreapp1.0",
"end_of_support": "2019-06-27",
"product": ".NET Core 1.0"
},
{
"moniker": "netcoreapp1.1",
"end_of_support": "2019-06-27",
"product": ".NET Core 1.1"
},
{
"moniker": "netcoreapp2.0",
"end_of_support": "2018-10-01",
"product": ".NET Core 2.0"
},
{
"moniker": "netcoreapp2.1",
"end_of_support": "2021-08-21",
"product": ".NET Core 2.1"
},
{
"moniker": "netcoreapp2.2",
"end_of_support": "2019-12-23",
"product": ".NET Core 2.2"
},
{
"moniker": "netcoreapp3.0",
"end_of_support": "2020-03-03",
"product": ".NET Core 3.0"
},
{
"moniker": "netcoreapp3.1",
"end_of_support": "2022-12-13",
"product": ".NET Core 3.1"
},
{
"moniker": "net5.0",
"end_of_support": "2022-05-10",
"product": ".NET 5"
},
{
"moniker": "net6.0",
"end_of_support": "2024-11-12",
"product": ".NET 6"
},
{
"moniker": "net7.0",
"end_of_support": "2024-05-14",
"product": ".NET 7"
},
{
"moniker": "net8.0",
"end_of_support": "2026-11-10",
"product": ".NET 8"
},
{
"moniker": "net9.0",
"end_of_support": "2026-11-10",
"product": ".NET 9"
},
{
"moniker": "net10.0",
"end_of_support": "2028-11-14",
"product": ".NET 10"
}
]
}
+14
View File
@@ -0,0 +1,14 @@
{
"android": {
"oldest_patched_api": 29,
"oldest_patched_release": "Android 10",
"endoflife_product": "android",
"notes": "Below this API level no Android release receives security updates."
},
"ios": {
"oldest_patched": "15.0",
"endoflife_product": "ios",
"notes": "The oldest iOS release that still receives security updates: iOS 15 got 15.8.8 in May 2026, while iOS 14 was last updated in October 2021 and the older iOS 12 line in January 2026, both now end of life (endoflife.date). Judged conservatively: below it is certainly unpatched."
},
"checked_on": "2026-10-05"
}
+163
View File
@@ -0,0 +1,163 @@
{
"source": "https://wiki.yoctoproject.org/wiki/Releases",
"dates_source": "https://endoflife.date/yocto",
"endoflife_product": "yocto",
"checked_on": "2026-10-09",
"notes": "Codename, version, LTS and support status from the Yocto Project releases wiki (page last updated 2026-09-10). The wiki gives months only; the exact release and end-of-life days are endoflife.date's, which agree with the wiki's months except Walnascar (wiki: EOL since November 2025, endoflife.date: 2025-12-07). For Thud and older, which endoflife.date does not list, the end of life is the last day of the month of the release's last point release (wiki), and the release day the first of its month. Releases are added once they are released. Oldest first.",
"releases": [
{
"codename": "jethro",
"version": "2.0",
"lts": false,
"released": "2015-11-01",
"end_of_life": "2017-01-31"
},
{
"codename": "krogoth",
"version": "2.1",
"lts": false,
"released": "2016-04-01",
"end_of_life": "2017-07-31"
},
{
"codename": "morty",
"version": "2.2",
"lts": false,
"released": "2016-11-01",
"end_of_life": "2018-07-31"
},
{
"codename": "pyro",
"version": "2.3",
"lts": false,
"released": "2017-05-01",
"end_of_life": "2018-07-31"
},
{
"codename": "rocko",
"version": "2.4",
"lts": false,
"released": "2017-10-01",
"end_of_life": "2018-11-30"
},
{
"codename": "sumo",
"version": "2.5",
"lts": false,
"released": "2018-04-01",
"end_of_life": "2019-04-30"
},
{
"codename": "thud",
"version": "2.6",
"lts": false,
"released": "2018-11-01",
"end_of_life": "2019-10-31"
},
{
"codename": "warrior",
"version": "2.7",
"lts": false,
"released": "2019-05-01",
"end_of_life": "2020-06-01"
},
{
"codename": "zeus",
"version": "3.0",
"lts": false,
"released": "2019-10-22",
"end_of_life": "2020-08-01"
},
{
"codename": "dunfell",
"version": "3.1",
"lts": true,
"released": "2020-04-21",
"end_of_life": "2024-04-30"
},
{
"codename": "gatesgarth",
"version": "3.2",
"lts": false,
"released": "2020-11-03",
"end_of_life": "2021-05-01"
},
{
"codename": "hardknott",
"version": "3.3",
"lts": false,
"released": "2021-04-19",
"end_of_life": "2022-04-20"
},
{
"codename": "honister",
"version": "3.4",
"lts": false,
"released": "2021-10-25",
"end_of_life": "2022-05-01"
},
{
"codename": "kirkstone",
"version": "4.0",
"lts": true,
"released": "2022-04-25",
"end_of_life": "2026-04-27"
},
{
"codename": "langdale",
"version": "4.1",
"lts": false,
"released": "2022-10-23",
"end_of_life": "2023-05-27"
},
{
"codename": "mickledore",
"version": "4.2",
"lts": false,
"released": "2023-05-03",
"end_of_life": "2023-11-05"
},
{
"codename": "nanbield",
"version": "4.3",
"lts": false,
"released": "2023-11-09",
"end_of_life": "2024-06-09"
},
{
"codename": "scarthgap",
"version": "5.0",
"lts": true,
"released": "2024-04-29",
"end_of_life": "2028-04-30"
},
{
"codename": "styhead",
"version": "5.1",
"lts": false,
"released": "2024-10-16",
"end_of_life": "2025-05-16"
},
{
"codename": "walnascar",
"version": "5.2",
"lts": false,
"released": "2025-05-07",
"end_of_life": "2025-12-07"
},
{
"codename": "whinlatter",
"version": "5.3",
"lts": false,
"released": "2025-12-15",
"end_of_life": "2026-06-15"
},
{
"codename": "wrynose",
"version": "6.0",
"lts": true,
"released": "2026-05-13",
"end_of_life": "2030-04-30"
}
]
}
+21
View File
@@ -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");
});
+57
View File
@@ -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"])
+278 -1
View File
@@ -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
@@ -115,3 +116,279 @@ rules:
- pattern: 'crypto.createCipheriv("des-ecb", ...)'
- 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,
# credentials compiled into every device, broken crypto and predictable
# randomness. Memory-safety defects that need data flow (out-of-bounds
# writes, uninitialised reads) come from cppcheck, not from these patterns.
- id: cra-ai-20-c-unbounded-string-function
languages: [c, cpp]
severity: ERROR
message: $FN() writes without a bound on the destination — input longer than the buffer overflows it (CWE-120). Use a bounded call (snprintf, strncpy/strlcpy with the buffer size).
metadata:
cwe: ["CWE-120: Buffer Copy without Checking Size of Input"]
control: cra-ai-20
patterns:
- pattern: $FN(...)
- metavariable-regex:
metavariable: $FN
regex: ^(std::)?(gets|strcpy|strcat|sprintf|vsprintf|wcscpy|wcscat)$
- id: cra-ai-20-c-scanf-unbounded-string
languages: [c, cpp]
severity: ERROR
message: A "%s" conversion without a field width reads unbounded input into a fixed buffer (CWE-120). Give the conversion a width, e.g. "%15s".
metadata:
cwe: ["CWE-120: Buffer Copy without Checking Size of Input"]
control: cra-ai-20
patterns:
- pattern-either:
- pattern: scanf($FMT, ...)
- pattern: sscanf($SRC, $FMT, ...)
- pattern: fscanf($FILE, $FMT, ...)
- metavariable-regex:
metavariable: $FMT
regex: ^".*%s.*"$
- id: cra-ai-20-c-non-literal-format-string
languages: [c, cpp]
severity: WARNING
message: The format string is not a literal — text an attacker controls can read or write memory through format specifiers (CWE-134). Print it with a literal format, e.g. printf("%s", text).
metadata:
cwe: ["CWE-134: Use of Externally-Controlled Format String"]
control: cra-ai-20
patterns:
- pattern-either:
- pattern: printf($FMT, ...)
- pattern: vprintf($FMT, ...)
- pattern: fprintf($F, $FMT, ...)
- pattern: sprintf($B, $FMT, ...)
- pattern: snprintf($B, $N, $FMT, ...)
- pattern: syslog($P, $FMT, ...)
# C++ reaches the same functions through std::.
- pattern: std::printf($FMT, ...)
- pattern: std::fprintf($F, $FMT, ...)
- pattern: std::sprintf($B, $FMT, ...)
- pattern: std::snprintf($B, $N, $FMT, ...)
# Not a literal, and not an upper-case macro (`#define GET_REQUEST
# "GET / HTTP/1.1"`): a macro like that expands to a literal.
- metavariable-regex:
metavariable: $FMT
regex: ^(?![A-Z][A-Z0-9_]*$)[^"]
- id: cra-ai-8-c-hardcoded-credential
languages: [c, cpp]
severity: ERROR
message: A credential ($NAME) is written into the firmware source — every device ships the same secret, and it can be read out of the image (CWE-798). Provision it per device at production or first boot.
metadata:
cwe: ["CWE-798: Use of Hard-coded Credentials"]
control: cra-ai-8
patterns:
- pattern-either:
- pattern: $TYPE $NAME = "$VALUE";
- pattern: $TYPE *$NAME = "$VALUE";
- pattern: $TYPE $NAME[] = "$VALUE";
- pattern: $TYPE $NAME[$N] = "$VALUE";
# The usual embedded style: a macro in a config header
# (`#define WIFI_PASS "..."`), which semgrep's C patterns do not see.
- pattern-regex: '(?m)^[ \t]*#[ \t]*define[ \t]+(?P<NAME>\w+)[ \t]+"(?P<VALUE>[^"]*)"'
- metavariable-regex:
metavariable: $NAME
regex: (?i).*((^|_)pass($|_)|passw|pwd|secret|api_?key|token|psk|credential).*
# Six characters or more, and not a placeholder left for the installer.
- metavariable-regex:
metavariable: $VALUE
regex: ^(?!(?i:changeme|change_me|password|secret|admin|x{3,}|your_\w*|<[^>]*>|\*+)$).{6,}$
- id: cra-ai-13-c-broken-hash-or-cipher
languages: [c, cpp]
severity: WARNING
message: $FN uses a broken algorithm (MD5, SHA-1 or DES) that protects neither integrity nor confidentiality (CWE-327). Use SHA-256 or better, and AES-GCM or ChaCha20-Poly1305.
metadata:
cwe: ["CWE-327: Use of a Broken or Risky Cryptographic Algorithm"]
control: cra-ai-13
patterns:
- pattern: $FN(...)
- metavariable-regex:
metavariable: $FN
regex: ^(MD5|MD5_Init|MD5_Update|MD5_Final|SHA1|SHA1_Init|SHA1_Update|SHA1_Final|DES_\w+|mbedtls_md5\w*|mbedtls_sha1\w*|mbedtls_des_\w+|wc_Md5\w*|wc_InitSha|wc_ShaUpdate|wc_ShaFinal|wc_Des_\w+)$
- id: cra-ai-16-c-predictable-random
languages: [c, cpp]
severity: WARNING
message: rand() is predictable, so $NAME can be guessed (CWE-338). Take keys, nonces and tokens from the MCU's hardware RNG or a DRBG.
metadata:
cwe: ["CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)"]
control: cra-ai-16
patterns:
- pattern-either:
- pattern: $NAME = rand();
- pattern: $NAME = rand() % $M;
- pattern: $NAME = ($T) rand();
- pattern: $TYPE $NAME = rand();
- pattern: $TYPE $NAME = rand() % $M;
- metavariable-regex:
metavariable: $NAME
regex: (?i).*(key|nonce|iv|token|salt|secret|challenge|session).*
@@ -0,0 +1,258 @@
// Test cases for cra_semgrep_csharp.yaml: `semgrep --test compliance-agent/rules`.
// Each `ruleid:` line must be found by that rule; each `ok:` line must not.
using System;
using System.Data.SqlClient;
using System.Diagnostics;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Security.Cryptography;
using System.Web;
using System.Web.UI;
using System.Xml;
using Newtonsoft.Json;
namespace Plant.Tests
{
public class SqlCases
{
public void Run(SqlConnection conn, string id, PlantContext db)
{
// ruleid: cra-ai-20-csharp-sql-string
var cmd = new SqlCommand("SELECT * FROM Orders WHERE Id = " + id, conn);
// ruleid: cra-ai-20-csharp-sql-string
var cmd2 = new SqlCommand($"DELETE FROM Orders WHERE Id = {id}", conn);
string sql = "SELECT * FROM Users WHERE Name = '" + id + "'";
// ruleid: cra-ai-20-csharp-sql-string
var cmd3 = new SqlCommand(sql, conn);
var sql2 = "SELECT * FROM Lines WHERE Code = '" + id + "'";
// ruleid: cra-ai-20-csharp-sql-string
var cmd4 = new SqlCommand(sql2, conn);
// ruleid: cra-ai-20-csharp-sql-string
cmd.CommandText = String.Format("UPDATE Orders SET State = {0}", id);
// ruleid: cra-ai-20-csharp-sql-string
db.Database.ExecuteSqlCommand("DELETE FROM Log WHERE Day < " + id);
// ruleid: cra-ai-20-csharp-sql-string
var rows = db.Orders.FromSqlRaw($"SELECT * FROM Orders WHERE Id = {id}");
// ok: cra-ai-20-csharp-sql-string
var safe = new SqlCommand("SELECT * FROM Orders WHERE Id = @id", conn);
safe.Parameters.AddWithValue("@id", id);
// ok: cra-ai-20-csharp-sql-string
var constant = new SqlCommand("SELECT * FROM Orders " + "ORDER BY Id", conn);
// ok: cra-ai-20-csharp-sql-string
var interpolated = db.Orders.FromSqlInterpolated($"SELECT * FROM Orders WHERE Id = {id}");
}
}
public class ProcessCases
{
public void Run(string host, string path)
{
// ruleid: cra-ai-20-csharp-process-start
Process.Start("cmd.exe", "/c ping " + host);
var psi = new ProcessStartInfo("tool.exe");
// ruleid: cra-ai-20-csharp-process-start
psi.Arguments = $"--target {host}";
// ok: cra-ai-20-csharp-process-start
Process.Start("notepad.exe");
// ok: cra-ai-20-csharp-process-start
Process.Start(path);
var startInfo = new ProcessStartInfo();
// ruleid: cra-ai-20-csharp-process-start
startInfo.FileName = path + "\\tool.exe";
var dialog = new SaveFileDialog();
// ok: cra-ai-20-csharp-process-start
dialog.FileName = path + ".csv";
}
}
public class DeserializationCases
{
public object Run(Stream input)
{
// ruleid: cra-ai-20-csharp-unsafe-deserialization
var formatter = new BinaryFormatter();
// ruleid: cra-ai-20-csharp-unsafe-deserialization
var ndcs = new NetDataContractSerializer();
// ruleid: cra-ai-20-csharp-unsafe-deserialization
var los = new LosFormatter();
// ruleid: cra-ai-20-csharp-unsafe-deserialization
var settings = new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.All };
// ok: cra-ai-20-csharp-unsafe-deserialization
var safeSettings = new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.None };
// ok: cra-ai-20-csharp-unsafe-deserialization
var dcs = new DataContractSerializer(typeof(Order));
return formatter.Deserialize(input);
}
}
public class XmlCases
{
public void Unsafe(string xml, string file)
{
XmlDocument doc;
doc = new XmlDocument();
// ruleid: cra-ai-20-csharp-xxe
doc.LoadXml(xml);
var doc2 = new XmlDocument();
// ruleid: cra-ai-20-csharp-xxe
doc2.Load(file);
var reader = new XmlTextReader(file);
// ruleid: cra-ai-20-csharp-xxe
while (reader.Read()) { }
var settings = new XmlReaderSettings();
// ruleid: cra-ai-20-csharp-xxe
settings.DtdProcessing = DtdProcessing.Parse;
// ruleid: cra-ai-20-csharp-xxe
settings.XmlResolver = new XmlUrlResolver();
}
public void Safe(string xml)
{
XmlDocument doc;
doc = new XmlDocument();
doc.XmlResolver = null;
// ok: cra-ai-20-csharp-xxe
doc.LoadXml(xml);
var doc2 = new XmlDocument();
doc2.XmlResolver = null;
// ok: cra-ai-20-csharp-xxe
doc2.LoadXml(xml);
var doc3 = new XmlDocument { XmlResolver = null };
// ok: cra-ai-20-csharp-xxe
doc3.LoadXml(xml);
var reader = new XmlTextReader(xml);
reader.DtdProcessing = DtdProcessing.Prohibit;
// ok: cra-ai-20-csharp-xxe
while (reader.Read()) { }
var settings = new XmlReaderSettings();
// ok: cra-ai-20-csharp-xxe
settings.DtdProcessing = DtdProcessing.Prohibit;
}
}
public class FileController
{
public HttpRequest Request;
public byte[] Download()
{
// ruleid: cra-ai-20-csharp-path-traversal
var path = Path.Combine(@"C:\Plant\Reports", Request.QueryString["file"]);
// ruleid: cra-ai-20-csharp-path-traversal
var text = File.ReadAllText(@"C:\Plant\Logs\" + Request["name"]);
// ok: cra-ai-20-csharp-path-traversal
var safe = Path.Combine(@"C:\Plant\Reports", Path.GetFileName(Request.QueryString["file"]));
return File.ReadAllBytes(safe);
}
}
public class CryptoCases
{
public void Run(byte[] data)
{
// ruleid: cra-ai-13-csharp-broken-hash-or-cipher
var md5 = MD5.Create();
// ruleid: cra-ai-13-csharp-broken-hash-or-cipher
var sha1 = new SHA1CryptoServiceProvider();
// ruleid: cra-ai-13-csharp-broken-hash-or-cipher
var des = new DESCryptoServiceProvider();
// ruleid: cra-ai-13-csharp-broken-hash-or-cipher
var tdes = TripleDES.Create();
// ok: cra-ai-13-csharp-broken-hash-or-cipher
var sha256 = SHA256.Create();
var aes = Aes.Create();
// ruleid: cra-ai-13-csharp-ecb-mode
aes.Mode = CipherMode.ECB;
// ok: cra-ai-13-csharp-ecb-mode
aes.Mode = CipherMode.CBC;
}
}
public class TlsCases
{
public void Run()
{
// ruleid: cra-ai-15-csharp-cert-validation-disabled
ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, errors) => true;
// ruleid: cra-ai-15-csharp-cert-validation-disabled
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
var handler = new HttpClientHandler();
// ruleid: cra-ai-15-csharp-cert-validation-disabled
handler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
// ok: cra-ai-15-csharp-cert-validation-disabled
handler.ServerCertificateCustomValidationCallback = (msg, cert, chain, errors) => errors == System.Net.Security.SslPolicyErrors.None;
}
}
public class CredentialCases
{
// ruleid: cra-ai-8-csharp-hardcoded-credential
private const string DbPassword = "Plant#2019!";
// ruleid: cra-ai-8-csharp-hardcoded-credential
private static readonly string ApiSecret = "sk_live_51HxQ2a";
// ok: cra-ai-8-csharp-hardcoded-credential
private const string PasswordLabel = "Enter your password";
// ok: cra-ai-8-csharp-hardcoded-credential
private const string AdminPassword = "changeme";
public void Run(Config config)
{
// ruleid: cra-ai-8-csharp-hardcoded-credential
config.SmtpPassword = "mail-pa55word";
// ruleid: cra-ai-8-csharp-hardcoded-credential
var plcPassword = "Siemens#S7-1500";
// ok: cra-ai-8-csharp-hardcoded-credential
config.SmtpPassword = "";
// ok: cra-ai-8-csharp-hardcoded-credential
config.UserName = "operator1";
}
}
}
@@ -0,0 +1,266 @@
# Prüfwerk's own semgrep rules for C# (.NET Framework and .NET), #445. Written
# for Prüfwerk, not adapted from any third-party rule set (the Semgrep registry
# rules may not be used for a service offered to others).
# Same conventions as cra_semgrep.yaml: each rule id is `cra-ai-<n>-<slug>`,
# keyed back to its control via the `control-map` LUT, with its CWE and
# control in the metadata. Keep patterns tight: a false positive that the
# judge refutes marks the whole finding a false positive.
# Test cases: cra_semgrep_csharp.cs (`semgrep --test compliance-agent/rules`).
rules:
# --- cra-ai-20: injection and unsafe input handling --------------------------
- id: cra-ai-20-csharp-sql-string
languages: [csharp]
severity: ERROR
message: SQL text is built from strings (concatenation, interpolation or String.Format) and run as a command — SQL injection (CWE-89). Pass the values as parameters (SqlParameter, AddWithValue, FromSqlInterpolated).
metadata:
cwe: ["CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')"]
control: cra-ai-20
pattern-either:
# The SQL text is built right in the call.
- patterns:
- pattern-either: &sql-sinks
- patterns:
- pattern-either:
- pattern: new $CMD($Q, ...)
- pattern: new $CMD($Q)
- metavariable-regex:
metavariable: $CMD
regex: ^(SqlCommand|OleDbCommand|OdbcCommand|OracleCommand|MySqlCommand|NpgsqlCommand|SQLiteCommand|SqliteCommand|SqlDataAdapter|OleDbDataAdapter)$
- pattern: $X.CommandText = $Q
- pattern: $X.ExecuteSqlCommand($Q, ...)
- pattern: $X.ExecuteSqlRaw($Q, ...)
- pattern: $X.ExecuteSqlRawAsync($Q, ...)
- pattern: $X.FromSqlRaw($Q, ...)
- pattern: $X.SqlQuery($Q, ...)
- pattern: $X.SqlQuery<$T>($Q, ...)
- metavariable-pattern:
metavariable: $Q
patterns: &built-string
- pattern-either:
- pattern: '"..." + $E'
- pattern: $E + "..."
- pattern: String.Format(...)
- pattern: string.Format(...)
- pattern-regex: (?s)^(\$@?|@\$)".*\{
- pattern-not: '"..." + "..."'
# The SQL text is built into a variable first.
- patterns:
- pattern-either:
- pattern-inside: |
$TY $Q = $INIT;
...
- pattern-inside: |
var $Q = $INIT;
...
- pattern-inside: |
$Q = $INIT;
...
- pattern-either: *sql-sinks
- metavariable-pattern:
metavariable: $INIT
patterns: *built-string
- id: cra-ai-20-csharp-process-start
languages: [csharp]
severity: WARNING
message: A process is started with a command line built from strings — command injection if any part comes from outside (CWE-78). Start a fixed program with an argument list (ProcessStartInfo.ArgumentList) and validate the values.
metadata:
cwe: ["CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')"]
control: cra-ai-20
patterns:
- pattern-either:
- pattern: Process.Start($ARG, ...)
- pattern: Process.Start($FILE, $ARG, ...)
- pattern: new ProcessStartInfo($ARG, ...)
- pattern: new ProcessStartInfo($FILE, $ARG, ...)
- pattern: $P.Arguments = $ARG
# Only a ProcessStartInfo's: a file dialog's FileName is no command.
- patterns:
- pattern-either:
- pattern-inside: |
$PT $P = new ProcessStartInfo(...);
...
- pattern-inside: |
var $P = new ProcessStartInfo(...);
...
- pattern-inside: |
$P = new ProcessStartInfo(...);
...
- pattern: $P.FileName = $ARG
- metavariable-pattern:
metavariable: $ARG
patterns:
- pattern-either:
- pattern: '"..." + $E'
- pattern: $E + "..."
- pattern: String.Format(...)
- pattern: string.Format(...)
- pattern: String.Concat(...)
- pattern-regex: (?s)^(\$@?|@\$)".*\{
- pattern-not: '"..." + "..."'
- id: cra-ai-20-csharp-unsafe-deserialization
languages: [csharp]
severity: ERROR
message: $TYPE deserializes type information from its input, so data from outside can run code (CWE-502). Use a serializer bound to known types (System.Text.Json, DataContractSerializer, JSON.NET with TypeNameHandling.None).
metadata:
cwe: ["CWE-502: Deserialization of Untrusted Data"]
control: cra-ai-20
pattern-either:
- patterns:
- pattern: new $TYPE(...)
- metavariable-regex:
metavariable: $TYPE
regex: ^(BinaryFormatter|NetDataContractSerializer|LosFormatter|SoapFormatter|ObjectStateFormatter)$
- patterns:
- pattern: TypeNameHandling.$TYPE
- metavariable-regex:
metavariable: $TYPE
regex: ^(All|Auto|Objects|Arrays)$
- id: cra-ai-20-csharp-xxe
languages: [csharp]
severity: WARNING
message: XML is parsed with DTD processing or an external resolver enabled — external entities can read local files or reach internal hosts (XXE, CWE-611). Set XmlResolver = null and DtdProcessing = DtdProcessing.Prohibit (the default only from .NET Framework 4.5.2 on).
metadata:
cwe: ["CWE-611: Improper Restriction of XML External Entity Reference"]
control: cra-ai-20
pattern-either:
- pattern: $X.XmlResolver = new XmlUrlResolver(...)
- pattern: $X.DtdProcessing = DtdProcessing.Parse
- pattern: $X.ProhibitDtd = false
- patterns:
- pattern-either:
- pattern-inside: |
$D = new XmlDocument();
...
- pattern-inside: |
$DT $D = new XmlDocument();
...
- pattern-inside: |
var $D = new XmlDocument();
...
- pattern-inside: |
$D = new XmlTextReader(...);
...
- pattern-inside: |
$DT $D = new XmlTextReader(...);
...
- pattern-inside: |
var $D = new XmlTextReader(...);
...
- pattern-not-inside: |
$D.XmlResolver = null;
...
- pattern-not-inside: |
$D.DtdProcessing = DtdProcessing.Prohibit;
...
- pattern-not-inside: |
var $D = new $T { ..., XmlResolver = null, ... };
...
- pattern-not-inside: |
$DT $D = new $T { ..., XmlResolver = null, ... };
...
- pattern-either:
- pattern: $D.Load(...)
- pattern: $D.LoadXml(...)
- pattern: $D.Read()
- id: cra-ai-20-csharp-path-traversal
languages: [csharp]
severity: WARNING
message: A file path is built from request input — "..\" in it reaches files outside the intended folder (path traversal, CWE-22). Take only the file name (Path.GetFileName) and check the full path stays under the base folder.
metadata:
cwe: ["CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')"]
control: cra-ai-20
patterns:
- pattern-either:
- pattern: File.$M(..., <... Request.$P ...>, ...)
- pattern: File.$M(..., <... Request[$K] ...>, ...)
- pattern: Path.Combine(..., <... Request.$P ...>, ...)
- pattern: Path.Combine(..., <... Request[$K] ...>, ...)
- pattern: new FileStream(<... Request.$P ...>, ...)
- pattern: new FileStream(<... Request[$K] ...>, ...)
- pattern-not: File.$M(..., <... Path.GetFileName(...) ...>, ...)
- pattern-not: Path.Combine(..., <... Path.GetFileName(...) ...>, ...)
# --- cra-ai-13: Verschlüsselung sensibler Daten ------------------------------
- id: cra-ai-13-csharp-broken-hash-or-cipher
languages: [csharp]
severity: WARNING
message: $ALG is a broken algorithm (MD5, SHA-1, DES, 3DES or RC2) that protects neither integrity nor confidentiality (CWE-327). Use SHA-256 or better, and AES-GCM.
metadata:
cwe: ["CWE-327: Use of a Broken or Risky Cryptographic Algorithm"]
control: cra-ai-13
pattern-either:
- patterns:
- pattern: $ALG.Create(...)
- metavariable-regex:
metavariable: $ALG
regex: ^(MD5|SHA1|DES|TripleDES|RC2)$
- patterns:
- pattern: new $ALG(...)
- metavariable-regex:
metavariable: $ALG
regex: ^(MD5CryptoServiceProvider|MD5Cng|SHA1CryptoServiceProvider|SHA1Managed|SHA1Cng|DESCryptoServiceProvider|TripleDESCryptoServiceProvider|TripleDESCng|RC2CryptoServiceProvider|HMACMD5|HMACSHA1)$
- id: cra-ai-13-csharp-ecb-mode
languages: [csharp]
severity: WARNING
message: ECB mode encrypts equal blocks to equal ciphertext, so the structure of the data shows through (CWE-327). Use AES-GCM, or CBC with a random IV and a MAC.
metadata:
cwe: ["CWE-327: Use of a Broken or Risky Cryptographic Algorithm"]
control: cra-ai-13
pattern: CipherMode.ECB
# --- cra-ai-15: Transport-Schutz ---------------------------------------------
- id: cra-ai-15-csharp-cert-validation-disabled
languages: [csharp]
severity: ERROR
message: TLS certificate validation is switched off (the callback accepts every certificate), so anyone on the network path can read and change the traffic (CWE-295). Remove the callback, or pin the expected certificate.
metadata:
cwe: ["CWE-295: Improper Certificate Validation"]
control: cra-ai-15
pattern-either:
- pattern: HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
- patterns:
- pattern-either:
- pattern: $X.ServerCertificateValidationCallback = $F
- pattern: $X.ServerCertificateValidationCallback += $F
- pattern: $X.ServerCertificateCustomValidationCallback = $F
- pattern: $X.RemoteCertificateValidationCallback = $F
- metavariable-pattern:
metavariable: $F
pattern-either:
- pattern: (...) => true
- pattern: |
delegate { return true; }
- pattern: |
delegate (...) { return true; }
- pattern: |
(...) => { return true; }
# --- cra-ai-8: Keine Default-Passwörter --------------------------------------
- id: cra-ai-8-csharp-hardcoded-credential
languages: [csharp]
severity: ERROR
message: A credential ($NAME) is written into the source — every installation shares it, and it can be read out of the assembly (CWE-798). Load it from protected configuration or a secret store.
metadata:
cwe: ["CWE-798: Use of Hard-coded Credentials"]
control: cra-ai-8
patterns:
- pattern-either:
- pattern: $TYPE $NAME = "$VALUE";
- pattern: var $NAME = "$VALUE";
- pattern: $NAME = "$VALUE"
- pattern: const string $NAME = "$VALUE";
- metavariable-regex:
metavariable: $NAME
regex: (?i)^(.*\.)?\w*(password|passwd|pwd|secret|apikey|api_key|privatekey|private_key|accesskey|access_key|connectionpassword|encryptionkey|aeskey|secretkey|clientsecret)\w*$
- metavariable-regex:
metavariable: $NAME
regex: (?i)^(?!.*(hint|label|prompt|field|name|param|header|policy|length|regex|pattern|format|path|file|url|uri|key(name|id)|placeholder)).*$
# Six characters or more, and not a placeholder left for the installer.
- metavariable-regex:
metavariable: $VALUE
regex: ^(?!(?i:changeme|change_me|password|secret|admin|x{3,}|your_\w*|<[^>]*>|\*+|\{\d+\}|\$\{.*\}|%\w+%)$).{6,}$
+15
View File
@@ -0,0 +1,15 @@
// Test cases for cra_semgrep_objc.yaml: `semgrep --test compliance-agent/rules`.
// Each `ruleid:` line must be found by that rule; each `ok:` line must not.
#import <Foundation/Foundation.h>
void storeLogin(NSString *password, NSString *name) {
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
// ruleid: cra-ai-14-objc-secret-in-userdefaults
[[NSUserDefaults standardUserDefaults] setObject:password forKey:@"pumpPassword"];
// ruleid: cra-ai-14-objc-secret-in-userdefaults
[userDefaults setValue:name forKey:@"auth_token"];
// ok: cra-ai-14-objc-secret-in-userdefaults
[userDefaults setObject:name forKey:@"lastUser"];
// ok: cra-ai-14-objc-secret-in-userdefaults
[cache setObject:password forKey:@"pumpPassword"];
}
@@ -0,0 +1,16 @@
# Prüfwerk's own semgrep rules for Objective-C (iOS apps), as regex patterns:
# semgrep has no Objective-C parser. Same conventions and provenance as
# cra_semgrep_swift.yaml, whose Swift rules these mirror.
# Test cases: cra_semgrep_objc.m (`semgrep --test compliance-agent/rules`).
rules:
# --- cra-ai-14: data at rest -------------------------------------------------
- id: cra-ai-14-objc-secret-in-userdefaults
languages: [regex]
severity: WARNING
message: A password, token or key is stored in NSUserDefaults, an unencrypted plist in the app container that backups and device extraction read (CWE-312). Store it in the Keychain (kSecClassGenericPassword, with a ThisDeviceOnly accessibility).
metadata:
cwe: ["CWE-312: Cleartext Storage of Sensitive Information"]
control: cra-ai-14
paths:
include: ["*.m", "*.mm"]
pattern-regex: (?i)\[\s*(?:\[\s*NSUserDefaults\s+standardUserDefaults\s*\]|\[\s*\[\s*NSUserDefaults\s+alloc\s*\]\s*initWithSuiteName:[^\]]*\]|\w*defaults)\s+set(?:Object|Value):[^\]\n]*(?:passw|passcode|token|secret|api_?key|credential|private_?key|session_?id)[^\]\n]*\]
@@ -0,0 +1,31 @@
// Test cases for cra_semgrep_swift.yaml: `semgrep --test compliance-agent/rules`.
// Each `ruleid:` line must be found by that rule; each `ok:` line must not.
import SwiftUI
func storeLogin(password: String, authToken: String, name: String) {
// ruleid: cra-ai-14-swift-secret-in-userdefaults
UserDefaults.standard.set(password, forKey: "pump_password")
// ruleid: cra-ai-14-swift-secret-in-userdefaults
UserDefaults.standard.set(authToken, forKey: Keys.session)
// ruleid: cra-ai-14-swift-secret-in-userdefaults
UserDefaults(suiteName: "group.pump")?.set(authToken, forKey: "auth")
let defaults = UserDefaults.standard
// ruleid: cra-ai-14-swift-secret-in-userdefaults
defaults.set(name, forKey: "apiKey")
// ok: cra-ai-14-swift-secret-in-userdefaults
UserDefaults.standard.set(name, forKey: "lastUser")
// ok: cra-ai-14-swift-secret-in-userdefaults
UserDefaults.standard.set(true, forKey: "didShowPasswordHint")
// ok: cra-ai-14-swift-secret-in-userdefaults
cache.set(password, forKey: "pump_password")
}
struct SettingsView: View {
// ruleid: cra-ai-14-swift-secret-in-appstorage
@AppStorage("refreshToken") var refreshToken: String = ""
// ruleid: cra-ai-14-swift-secret-in-appstorage
@AppStorage("pump.cfg") var apiKey = ""
// ok: cra-ai-14-swift-secret-in-appstorage
@AppStorage("units") var units: String = "metric"
var body: some View { Text(units) }
}
@@ -0,0 +1,72 @@
# Prüfwerk's own semgrep rules for Swift (iOS apps; Objective-C is in
# cra_semgrep_objc.yaml). Written for Prüfwerk, not
# adapted from any third-party rule set (the Semgrep registry rules may not be
# used for a service offered to others). mobsfscan already covers ATS, the
# Keychain accessibility, weak hashes and ciphers, TLS and web views; these
# rules cover what it does not.
# Same conventions as cra_semgrep.yaml: each rule id is `cra-ai-<n>-<slug>`,
# keyed back to its control via the `control-map` LUT, with its CWE and
# control in the metadata. Keep patterns tight: a false positive that the
# judge refutes marks the whole finding a false positive.
# Test cases: cra_semgrep_swift.swift (`semgrep --test compliance-agent/rules`).
rules:
# --- cra-ai-14: data at rest -------------------------------------------------
- id: cra-ai-14-swift-secret-in-userdefaults
languages: [swift]
severity: WARNING
message: A password, token or key is stored in UserDefaults, an unencrypted plist in the app container that backups and device extraction read (CWE-312). Store it in the Keychain (kSecClassGenericPassword, with a ThisDeviceOnly accessibility).
metadata:
cwe: ["CWE-312: Cleartext Storage of Sensitive Information"]
control: cra-ai-14
patterns:
- pattern-either:
# The key names the secret ...
- patterns:
- pattern-either: &userdefaults-set
- pattern: 'UserDefaults.standard.set($V, forKey: $K)'
- pattern: 'UserDefaults(suiteName: $S)?.set($V, forKey: $K)'
- pattern: 'UserDefaults(suiteName: $S)!.set($V, forKey: $K)'
- patterns:
- pattern-either:
- pattern-inside: |
let $D = UserDefaults.standard
...
- pattern-inside: |
let $D = UserDefaults(suiteName: $S)
...
- pattern: '$D.set($V, forKey: $K)'
- metavariable-regex:
metavariable: $K
regex: &secret (?i).*(passw|passcode|token|secret|api_?key|credential|private_?key|session_?id)
# ... or the stored value does.
- patterns:
- pattern-either: *userdefaults-set
- metavariable-regex:
metavariable: $V
regex: *secret
# A flag or a count is not the secret, even if its key names one.
- metavariable-regex:
metavariable: $V
regex: ^(?!(true|false|nil|-?\d+(\.\d+)?|Date\(\))$)
- id: cra-ai-14-swift-secret-in-appstorage
languages: [swift]
severity: WARNING
message: A password, token or key is kept in @AppStorage, which stores it in UserDefaults, an unencrypted plist in the app container that backups and device extraction read (CWE-312). Store it in the Keychain instead.
metadata:
cwe: ["CWE-312: Cleartext Storage of Sensitive Information"]
control: cra-ai-14
pattern-either:
- patterns:
- pattern-either: &appstorage
- pattern: |
@AppStorage($K) var $X: $T = $E
- pattern: |
@AppStorage($K) var $X = $E
- metavariable-regex:
metavariable: $K
regex: *secret
- patterns:
- pattern-either: *appstorage
- metavariable-regex:
metavariable: $X
regex: *secret
+53
View File
@@ -0,0 +1,53 @@
# Prüfwerk's gitleaks configuration: gitleaks' own rules plus the ones below.
# Always passed with --config, so a `.gitleaks.toml` in a scanned repository
# cannot switch rules off.
title = "Prüfwerk"
[extend]
useDefault = true
# Android release signing: a keystore or key password written into a Gradle
# build file signs every build with a secret everyone with the code has.
[[rules]]
id = "android-keystore-password"
description = "Android signing password in a Gradle build file"
regex = '''(?i)\b(?:storePassword|keyPassword)\b\s*(?:=|\()?\s*["']([^"'$\s]{4,})["']'''
path = '''(?i)\.gradle(?:\.kts)?$'''
secretGroup = 1
keywords = ["storepassword", "keypassword"]
# The same, kept in gradle.properties (RELEASE_STORE_PASSWORD=…).
[[rules]]
id = "android-signing-password-property"
description = "Android signing password in gradle.properties"
regex = '''(?im)^\s*[\w.]*(?:store|key|keystore|signing)[\w.]*password\s*[=:]\s*([^\s$]{4,})\s*$'''
path = '''(?i)(?:^|/)gradle\.properties$'''
secretGroup = 1
keywords = ["password"]
# The API key in a Firebase configuration (google-services.json,
# GoogleService-Info.plist). It identifies the app rather than authorising
# anything on its own, but it must be restricted to the app in the Google
# Cloud console; reported at low severity.
[[rules]]
id = "firebase-config-api-key"
description = "Firebase API key in the app's Firebase configuration"
regex = '''(AIza[\w-]{35})'''
path = '''(?i)(?:^|/)(?:google-services\.json|GoogleService-Info\.plist)$'''
secretGroup = 1
keywords = ["aiza"]
# Firebase Storage download URLs (`…/o/<file>?alt=media&token=<uuid>`): the
# token makes one stored file publicly readable, it is meant to be shipped in
# the app with the file's URL, and it grants nothing else. gitleaks' generic
# rule reads it as an API key in every app that shows images this way. A line
# holding such a URL is not reported; a real key elsewhere on it is rare
# enough to accept. (`[allowlist]` rather than `[[allowlists]]`, which the
# gitleaks release in the image does not read yet.)
[allowlist]
description = "Firebase Storage download URLs"
regexTarget = "line"
regexes = [
'''firebasestorage\.googleapis\.com/v0/b/[^/\s"']+/o/[^?\s"']+\?alt=media&(?:amp;)?token=[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}''',
]
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 raptor
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+38
View File
@@ -0,0 +1,38 @@
0xdea semgrep-rules (C/C++)
===========================
Upstream: https://github.com/0xdea/semgrep-rules
Commit: dae50da6e6e629750f1daec73a01ef9206a372ab
Version: v2.0.0 + 20 commits (2026-09-25)
Licence: MIT
Copyright: Copyright (c) 2022 raptor (Marco Ivaldi)
Prüfwerk runs these rules with its own semgrep invocation (--metrics=off,
local files only). upstream/ holds the selected files unchanged, with
their semgrep tests. pack.yaml is what the agent runs: the same rules with
ids prefixed by '0xdea-', re-serialised into one file, without
the rules listed below. Both are produced by scripts/vendor-semgrep-rules.py.
Selected from upstream: rules/c/**
Rules in the pack: 35 (from 49 files)
Not selected:
- rules/noisy/: upstream marks these unsuitable for general use
Left out
--------
- 0xdea-raptor-argv-envp-access (rules/c/argv-envp-access.yaml): 43 hits on every argv/getenv read; an audit aid, not a weakness
- 0xdea-raptor-format-string-bugs (rules/c/format-string-bugs.yaml): FP storm: 61 hits in lwIP, all literal formats joined with a macro ("%s"NEWLINE); our cra-ai-20-c-non-literal-format-string covers the real case
- 0xdea-raptor-high-entropy-assignment (rules/c/high-entropy-assignment.yaml): 14 hits, sampled hits are base64 tables and exception-name strings; gitleaks covers committed secrets
- 0xdea-raptor-integer-truncation (rules/c/integer-truncation.yaml): 23 hits in lwIP, sampled hits assign small constants (`x = 1`)
- 0xdea-raptor-interesting-api-calls (rules/c/interesting-api-calls.yaml): FP storm: 718 hits in lwIP; lists every call of an "interesting" API for a manual audit
- 0xdea-raptor-mismatched-memory-management (rules/c/mismatched-memory-management.yaml): 36 hits in lwIP, sampled hits are plain matching malloc/free pairs
- 0xdea-raptor-missing-break-in-switch (rules/c/missing-break-in-switch.yaml): intended fallthrough in FreeRTOS-Kernel and lwIP; a review hint by upstream's own description (code quality / audit aid), not a weakness
- 0xdea-raptor-missing-default-in-switch (rules/c/missing-default-in-switch.yaml): 22 hits; a review hint by upstream's own description (code quality / audit aid), not a weakness
- 0xdea-raptor-missing-return (rules/c/missing-return.yaml): FP storm: 1514 hits in FreeRTOS-Kernel (port macros); a review hint by upstream's own description (code quality / audit aid), not a weakness
- 0xdea-raptor-pointer-subtraction (rules/c/pointer-subtraction.yaml): 16 hits in lwIP, all `len = end - start` length arithmetic
- 0xdea-raptor-signed-unsigned-conversion (rules/c/signed-unsigned-conversion.yaml): FP storm: 221 hits in FreeRTOS-Kernel and lwIP, nearly all benign casts
- 0xdea-raptor-suspicious-assert (rules/c/suspicious-assert.yaml): FP storm: 176 hits in FreeRTOS-Kernel and lwIP (configASSERT/LWIP_ASSERT on sizes)
- 0xdea-raptor-typos (rules/c/typos.yaml): FP storm: 989 hits in FreeRTOS-Kernel and lwIP; a review hint by upstream's own description (code quality / audit aid), not a weakness
- 0xdea-raptor-write-into-stack-buffer (rules/c/write-into-stack-buffer.yaml): 27 hits on every write into a stack array; an audit aid, not a weakness
+1
View File
@@ -0,0 +1 @@
https://github.com/0xdea/semgrep-rules dae50da6e6e629750f1daec73a01ef9206a372ab
File diff suppressed because it is too large. Load diff
+281
View File
@@ -0,0 +1,281 @@
[
{
"id": "0xdea-raptor-command-injection",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-78"
},
{
"id": "0xdea-raptor-double-free",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-415"
},
{
"id": "0xdea-raptor-incorrect-order-setuid-setgid",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-696"
},
{
"id": "0xdea-raptor-incorrect-unsigned-comparison",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-697"
},
{
"id": "0xdea-raptor-incorrect-use-of-free",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-590"
},
{
"id": "0xdea-raptor-incorrect-use-of-memset",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-683"
},
{
"id": "0xdea-raptor-incorrect-use-of-sizeof",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-467"
},
{
"id": "0xdea-raptor-incorrect-use-of-strncat",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-787"
},
{
"id": "0xdea-raptor-insecure-api-access-stat",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-367"
},
{
"id": "0xdea-raptor-insecure-api-alloca",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-676"
},
{
"id": "0xdea-raptor-insecure-api-ato",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-839"
},
{
"id": "0xdea-raptor-insecure-api-gets",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-242"
},
{
"id": "0xdea-raptor-insecure-api-mktemp-tmpnam-tempnam",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-377"
},
{
"id": "0xdea-raptor-insecure-api-rand-srand",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-338"
},
{
"id": "0xdea-raptor-insecure-api-scanf",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-676"
},
{
"id": "0xdea-raptor-insecure-api-signal",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-364"
},
{
"id": "0xdea-raptor-insecure-api-sprintf-vsprintf",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-676"
},
{
"id": "0xdea-raptor-insecure-api-strcpy-strcat",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-676"
},
{
"id": "0xdea-raptor-integer-wraparound",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-190"
},
{
"id": "0xdea-raptor-memory-address-exposure",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-209"
},
{
"id": "0xdea-raptor-mismatched-memory-management-cpp",
"languages": [
"cpp"
],
"cwe": "CWE-762"
},
{
"id": "0xdea-raptor-off-by-one",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-193"
},
{
"id": "0xdea-raptor-overlapping-source-destination",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-1260"
},
{
"id": "0xdea-raptor-putenv-stack-var",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-686"
},
{
"id": "0xdea-raptor-regex-dos",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-1333"
},
{
"id": "0xdea-raptor-ret-stack-address",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-562"
},
{
"id": "0xdea-raptor-unchecked-ret-malloc",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-252"
},
{
"id": "0xdea-raptor-unchecked-ret-scanf",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-252"
},
{
"id": "0xdea-raptor-unchecked-ret-setuid-seteuid",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-252"
},
{
"id": "0xdea-raptor-unsafe-ret-snprintf-vsnprintf",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-131"
},
{
"id": "0xdea-raptor-unsafe-ret-strlcpy-strlcat",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-131"
},
{
"id": "0xdea-raptor-unsafe-strlen",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-190"
},
{
"id": "0xdea-raptor-unterminated-string-strncpy",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-170"
},
{
"id": "0xdea-raptor-use-after-free",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-416"
},
{
"id": "0xdea-raptor-use-of-source-size-in-copy",
"languages": [
"c",
"cpp"
],
"cwe": "CWE-806"
}
]
@@ -0,0 +1,28 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <stdlib.h>
#define CMD_MAX 512
int main(int argc, char **argv)
{
char cmd[CMD_MAX] = "/usr/bin/cat ";
// ruleid: raptor-argv-envp-access
strcat(cmd, argv[1]);
system(cmd);
return 0;
}
int main(int c, char **v)
{
char cmd[CMD_MAX] = "/usr/bin/cat ";
// this should arguably trigger the detection, but it doesn't because the rule is currently extremely
// simple and only looks for "argv" and "envp" as variable names, not for the actual parameters of main()
// todoruleid: raptor-argv-envp-access
strcat(cmd, v[1]);
system(cmd);
return 0;
}
@@ -0,0 +1,31 @@
rules:
- id: raptor-argv-envp-access
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- audit
vulnerability_class: Other Security
likelihood: LOW
impact: LOW
confidence: MEDIUM
technology:
- c
- cpp
cwe:
- "CWE-15: External Control of System or Configuration Setting"
owasp:
- A05:2025 - Injection
references:
- https://www.gnu.org/software/libc/manual/html_node/Program-Arguments.html
message: >-
The program accesses command-line arguments or environment variables,
which are controlled by potential attackers.
severity: INFO
languages:
- c
- cpp
patterns:
- pattern-either:
- pattern: argv
- pattern: envp
@@ -0,0 +1,103 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
void invoke1(char *string)
{
char buf[] = "uname -a; id";
// ok: raptor-command-injection
system(buf);
// ok: raptor-command-injection
system("whoami");
// ruleid: raptor-command-injection
system(string);
}
void invoke2(char *string)
{
char buf[] = "uname -a; id";
// ok: raptor-command-injection
popen(buf, "r");
// ok: raptor-command-injection
popen("whoami", "r");
// ruleid: raptor-command-injection
popen(string, "r");
}
int send_mail(char *user)
{
char buf[1024];
FILE *fp;
snprintf(buf, sizeof(buf), "/usr/bin/sendmail -s \"hi\" %s", user);
// ruleid: raptor-command-injection
fp = popen(buf, "w");
if (fp == NULL)
return 1;
// ...
}
enum
{
BUFFERSIZE = 512
};
void test_001(const char *input)
{
char cmdbuf[BUFFERSIZE];
int len_wanted = snprintf(cmdbuf, BUFFERSIZE,
"any_cmd '%s'", input);
if (len_wanted >= BUFFERSIZE)
{
/* Handle error */
}
else if (len_wanted < 0)
{
/* Handle error */
}
// ruleid: raptor-command-injection
else if (system(cmdbuf) == -1)
{
/* Handle error */
}
}
void test_002(const char *input)
{
char cmdbuf[BUFFERSIZE];
int len_wanted = snprintf(cmdbuf, BUFFERSIZE,
"any_cmd '%s'", input);
// ruleid: raptor-command-injection
system(cmdbuf);
}
void test_003(const char *input)
{
// ok: raptor-command-injection
storer->store_binary(Clocks->system());
}
void test_004(const char *input)
{
// ok: raptor-command-injection
storer->store_binary(Clocks::system());
// ok: raptor-command-injection
double passed_server_time = max(Clocks::system() - old_server_time, 0.0);
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,40 @@
rules:
- id: raptor-command-injection
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Command Injection
likelihood: MEDIUM
impact: HIGH
confidence: HIGH
technology:
- c
- cpp
cwe:
- "CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')"
- "CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')"
- "CWE-676: Use of Potentially Dangerous Function"
owasp:
- A05:2025 - Injection
references:
- https://g.co/kgs/PCHQjJ
- https://www.sei.cmu.edu/downloads/sei-cert-c-coding-standard-2016-v01.pdf
message: >-
The software constructs an OS command using externally-influenced input,
but it does not neutralize or incorrectly neutralizes special elements
that could modify the intended OS command.
severity: ERROR
languages:
- c
- cpp
# NOTE: add path injection rule for `execlp`, `execvp`, and `execvP`.
# NOTE: add argument injection (e.g., in the `exec` functions family).
patterns:
- pattern-either:
- pattern: system(...)
- pattern: popen(...)
- pattern: p2open(...)
- pattern: wordexp(...)
- pattern-not: $_("...", ...)
@@ -0,0 +1,96 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <stdlib.h>
#define MEMSIZE 256
#define BUFSIZE1 128
#define BUFSIZE2 256
void alloc_and_free1()
{
int bailout = 1;
char *ptr = (char *)malloc(MEMSIZE);
// this should be caught but it isn't, due to a documented limitation in semgrep
// https://semgrep.dev/docs/writing-rules/pattern-syntax/#ellipses-and-statement-blocks
// todoruleid: raptor-double-free
if (bailout)
free(ptr);
free(ptr);
// ruleid: raptor-double-free
free(ptr);
}
void alloc_and_free2()
{
char *ptr = (char *)malloc(MEMSIZE);
free(ptr);
ptr = NULL;
// ok: raptor-double-free
free(ptr);
}
void alloc_and_free3()
{
char *ptr = (char *)malloc(MEMSIZE);
free(ptr);
ptr = (char *)malloc(MEMSIZE);
// ok: raptor-double-free
free(ptr);
}
void double_free(int argc, char **argv)
{
char *buf1R1;
char *buf2R1;
char *buf1R2;
buf1R1 = (char *)malloc(BUFSIZE2);
buf2R1 = (char *)malloc(BUFSIZE2);
free(buf1R1);
free(buf2R1);
buf1R2 = (char *)malloc(BUFSIZE1);
strncpy(buf1R2, argv[1], BUFSIZE1 - 1);
// ruleid: raptor-double-free
free(buf2R1);
free(buf1R2);
}
Packet *getNextPacket()
{
// ...
Packet *y = (Packet *)malloc(1024);
retval = waitForPacket(y);
if (retval == OK)
{
return y;
}
else
{
return NULL;
}
}
int bad()
{
// ...
free(logData);
pkt = getNextPacket();
if (!pkt)
{
return NULL;
}
logPktData(pkt);
// ruleid: raptor-double-free
free(logData);
processPacket(pkt);
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,55 @@
rules:
- id: raptor-double-free
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Memory Issues
likelihood: MEDIUM
impact: HIGH
confidence: MEDIUM
technology:
- c
- cpp
cwe:
- "CWE-415: Double Free"
owasp:
- A10:2025 - Mishandling of Exceptional Conditions
references:
- https://github.com/struct/mms
- https://www.sei.cmu.edu/downloads/sei-cert-c-coding-standard-2016-v01.pdf
- https://docs.microsoft.com/en-us/cpp/sanitizers/asan-error-examples
- https://dustri.org/b/playing-with-weggli.html
message: >-
The software calls free() twice on the same memory address, potentially
leading to memory corruption. This corruption can cause the program to
crash or cause two later calls to malloc() to return the same pointer.
severity: ERROR
languages:
- c
- cpp
# NOTE: C++ `delete` and `delete[]` operators and custom wrappers to `free` are not covered.
# NOTE: `realloc` is not covered.
# NOTE: variations on the `free` argument are not covered.
patterns:
- pattern: |
$FREE1($PTR);
...
$FREE2($PTR);
- pattern-not: |
$FREE1($PTR);
...
$PTR = ...;
...
$FREE2($PTR);
- metavariable-pattern:
metavariable: $FREE1
pattern: free
# more patterns could be added here to cover other ways to free memory
- metavariable-pattern:
metavariable: $FREE2
pattern: free
# more patterns could be added here to cover other ways to free memory
# improve output readability
- focus-metavariable: $FREE2
@@ -0,0 +1,108 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <syslog.h>
#define BUFSIZE 256
void build_string(char *string)
{
char buf[BUFSIZE];
// ruleid: raptor-format-string-bugs
snprintf(buf, BUFSIZE, string);
// ok: raptor-format-string-bugs
snprintf(buf, BUFSIZE, "%s", string);
}
void print_stuff(char *string)
{
char buf[BUFSIZE];
// ruleid: raptor-format-string-bugs
printf(string);
// ok: raptor-format-string-bugs
printf("%s\n", string);
}
void log_stuff(char *string)
{
char buf[BUFSIZE];
// ruleid: raptor-format-string-bugs
syslog(LOG_ERR, string);
// ok: raptor-format-string-bugs
syslog(LOG_ERR, "%s", string);
}
void log_error(char *fmt, ...)
{
char buf[BUFSIZE];
va_list ap;
va_start(ap, fmt);
// ruleid: raptor-format-string-bugs
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
// ruleid: raptor-format-string-bugs
syslog(LOG_NOTICE, buf);
}
void printWrapper(char *string)
{
// ruleid: raptor-format-string-bugs
printf(string);
}
namespace basic_tests
{
void test_001()
{
const char *env_001 = getenv("PATH");
// ruleid: raptor-format-string-bugs
printf(env_001, 1);
// ok: raptor-format-string-bugs
printf("%s", env_001);
// ruleid: raptor-format-string-bugs
scanf(env_001, &d);
}
}
int test_002(int argc, char **argv)
{
int d = 0;
// ruleid: raptor-format-string-bugs
scanf(argv[1], &d);
}
int test_003(int argc, char **argv)
{
static const size_t n_quads = 300;
sord_free(NULL); // Shouldn't crash
SordWorld *world = sord_world_new();
// ok: raptor-format-string-bugs
fprintf(stderr, "expected ");
// ruleid: raptor-format-string-bugs
fprintf(stderr, argv[1]);
return finished(world, sord, EXIT_SUCCESS);
}
int main(int argc, char **argv)
{
char buf[5012];
memcpy(buf, argv[1], 5012);
printWrapper(argv[1]);
return 0;
}
@@ -0,0 +1,122 @@
rules:
- id: raptor-format-string-bugs
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Memory Issues
likelihood: MEDIUM
impact: HIGH
confidence: MEDIUM
technology:
- c
- cpp
cwe:
- "CWE-134: Use of Externally-Controlled Format String"
owasp:
- A05:2025 - Injection
references:
- https://julianor.tripod.com/bc/formatstring-1.2.pdf
- http://phrack.org/issues/70/13.html#article
- https://g.co/kgs/PCHQjJ
- https://www.sei.cmu.edu/downloads/sei-cert-c-coding-standard-2016-v01.pdf
message: >-
The software uses a function that accepts a format string as an argument,
but the format string originates from an external source. This can lead
to buffer overflows, denial of service, or data representation problems.
severity: ERROR
languages:
- c
- cpp
# NOTE: generic `va_list` matching for custom wrappers is not covered.
# NOTE: `dprintf` in C++ has a different signature; this rule may cause false positives with it.
# NOTE: `#define` format specifiers are not excluded due to Semgrep limitations; perhaps we could implement this with symbolic propagation (Semgrep Pro experimental feature)?
# NOTE: some obsolete Microsoft-specific functions, such as `_ftprintf`, `_sntprintf`, `_snwprintf`, `_sntscanf`, etc., are not covered.
pattern-either:
# format string in 1st arg
- patterns:
- pattern-either:
# printf family
- pattern: printf(...)
- pattern: vprintf(...)
- pattern: wprintf(...)
- pattern: vwprintf(...)
- pattern: vcprintf(...)
- pattern: vcwprintf(...)
- pattern: vscprintf(...)
- pattern: vscwprintf(...)
- pattern: printk(...)
# scanf family
- pattern: scanf(...)
- pattern: __isoc99_scanf(...)
- pattern: vscanf(...)
- pattern: __isoc99_vscanf(...)
- pattern: wscanf(...)
- pattern: vwscanf(...)
# err/warn family
- pattern: warn(...)
- pattern: vwarn(...)
- pattern: warnx(...)
- pattern: vwarnx(...)
- pattern-not: $_("...", ...)
- pattern-not: $_(gettext(...), ...)
- pattern-not: $_(dgettext(...), ...)
- pattern-not: $_(dcgettext(...), ...)
# format string in 2nd arg
- patterns:
- pattern-either:
# printf family
- pattern: fprintf(...)
- pattern: vfprintf(...)
- pattern: fwprintf(...)
- pattern: vfwprintf(...)
- pattern: sprintf(...)
- pattern: vsprintf(...)
- pattern: asprintf(...)
- pattern: vasprintf(...)
- pattern: dprintf(...)
- pattern: vdprintf(...)
- pattern: wsprintf(...)
# scanf family
- pattern: fscanf(...)
- pattern: __isoc99_fscanf(...)
- pattern: vfscanf(...)
- pattern: __isoc99_vfscanf(...)
- pattern: fwscanf(...)
- pattern: vfwscanf(...)
- pattern: sscanf(...)
- pattern: __isoc99_sscanf(...)
- pattern: vsscanf(...)
- pattern: __isoc99_vsscanf(...)
- pattern: swscanf(...)
- pattern: vswscanf(...)
# syslog family
- pattern: syslog(...)
- pattern: vsyslog(...)
# err/warn family
- pattern: err(...)
- pattern: verr(...)
- pattern: errx(...)
- pattern: verrx(...)
- pattern: warnc(...)
- pattern: vwarnc(...)
- pattern-not: $_($_, "...", ...)
- pattern-not: $_($_, gettext(...), ...)
- pattern-not: $_($_, dgettext(...), ...)
- pattern-not: $_($_, dcgettext(...), ...)
# format string in 3rd arg
- patterns:
- pattern-either:
# printf family
- pattern: snprintf(...)
- pattern: vsnprintf(...)
- pattern: swprintf(...)
- pattern: vswprintf(...)
# err/warn family
- pattern: errc(...)
- pattern: verrc(...)
- pattern-not: $_($_, $_, "...", ...)
- pattern-not: $_($_, $_, gettext(...), ...)
- pattern-not: $_($_, $_, dgettext(...), ...)
- pattern-not: $_($_, $_, dcgettext(...), ...)
@@ -0,0 +1,20 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
int hush_hush()
{
// ruleid: raptor-high-entropy-assignment
char *secret = "d3a447630194bd4b";
// ok: raptor-high-entropy-assignment
char *public = "Hello, world!";
// ...
return 0;
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,34 @@
rules:
- id: raptor-high-entropy-assignment
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- audit
vulnerability_class: Hard-coded Secrets
likelihood: LOW
impact: MEDIUM
confidence: MEDIUM
technology:
- c
- cpp
cwe:
- "CWE-540: Inclusion of Sensitive Information in Source Code"
owasp:
- A06:2025 - Insecure Design
references:
- https://semgrep.dev/docs/writing-rules/metavariable-analysis
- https://github.com/semgrep/semgrep/pull/4672
message: >-
Entropy, or randomness, is a common approach for detecting secret
strings. If an assignment has high entropy, it might involve a
secret that should not be accessible to users.
severity: INFO
languages:
- c
- cpp
patterns:
- pattern: $_ = "$X"
- metavariable-analysis:
analyzer: entropy
metavariable: $X
@@ -0,0 +1,101 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <unistd.h>
void drop_priv_bad()
{
// ruleid: raptor-incorrect-order-setuid-setgid
setuid(getuid());
setgid(getgid());
}
void drop_priv_ok()
{
// ok: raptor-incorrect-order-setuid-setgid
setgid(getgid());
setuid(getuid());
}
void bad1()
{
// ruleid: raptor-incorrect-order-setuid-setgid
seteuid(getuid());
// ...
setuid(getuid());
}
void good1()
{
// ok: raptor-incorrect-order-setuid-setgid
seteuid(getuid());
// ...
seteuid(0);
// ...
setuid(getuid());
}
void bad2()
{
int user1 = 500, user2 = 501;
/* become user1 */
// ruleid: raptor-incorrect-order-setuid-setgid
seteuid(user1);
process_log1();
/* become user2 */
seteuid(user2);
process_log2();
/* become root again */
seteuid(0);
}
void good2()
{
int user1 = 500, user2 = 501;
/* become user1 */
// ok: raptor-incorrect-order-setuid-setgid
seteuid(user1);
process_log1();
/* become user2 */
seteuid(0);
seteuid(user2);
process_log2();
/* become root again */
seteuid(0);
}
void drop_priv_conditional_bad(int uid, int gid)
{
// ruleid: raptor-incorrect-order-setuid-setgid
if (uid != -1 && setuid(uid))
{
fprintf(stderr, "Failed to set uid\n");
}
if (gid != -1)
{
setgid(gid);
}
}
void drop_priv_conditional_ok(int uid, int gid)
{
// ok: raptor-incorrect-order-setuid-setgid
if (gid != -1 && setgid(gid))
{
fprintf(stderr, "Failed to set gid\n");
}
if (uid != -1)
{
setuid(uid);
}
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,94 @@
rules:
- id: raptor-incorrect-order-setuid-setgid
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Improper Authorization
likelihood: MEDIUM
impact: HIGH
confidence: MEDIUM
technology:
- c
- cpp
cwe:
- "CWE-696: Incorrect Behavior Order"
owasp:
- A01:2025 - Broken Access Control
references:
- https://www.usenix.org/legacy/events/sec02/full_papers/chen/chen.pdf
- https://g.co/kgs/PCHQjJ
- https://github.com/struct/mms
message: >-
A compromised process might be able to regain elevated group privileges
if set(e)gid() is called after set(e)uid(). A similar case is when
privileges are temporarily dropped with seteuid() and then setuid() or
seteuid() are called from while under unprivileged user.
severity: ERROR
languages:
- c
- cpp
pattern-either:
# setuid/setgid
- patterns:
- pattern: |
<... setuid(...) ...>;
...
<... setgid(...) ...>;
- pattern-not: |
<... setuid(0) ...>;
...
<... setgid(...) ...>;
# seteuid/setegid
- patterns:
- pattern: |
<... seteuid(...) ...>;
...
<... setegid(...) ...>;
- pattern-not: |
<... seteuid(0) ...>;
...
<... setegid(...) ...>;
- pattern-not-inside: |
<... seteuid(...) ...>;
...
<... seteuid(0) ...>;
...
<... setegid(...) ...>;
# seteuid/setuid
- patterns:
- pattern: |
<... seteuid(...) ...>;
...
<... setuid(...) ...>;
- pattern-not: |
<... seteuid(0) ...>;
...
<... setuid(...) ...>;
- pattern-not-inside: |
<... seteuid(...) ...>;
...
<... seteuid(0) ...>;
...
<... setuid(...) ...>;
# seteuid/seteuid
- patterns:
- pattern: |
<... seteuid(...) ...>;
...
<... seteuid(...) ...>;
- pattern-not: |
<... seteuid(0) ...>;
...
<... seteuid(...) ...>;
- pattern-not: |
<... seteuid(...) ...>;
...
<... seteuid(0) ...>;
- pattern-not-inside: |
<... seteuid(...) ...>;
...
<... seteuid(0) ...>;
...
<... seteuid(...) ...>;
@@ -0,0 +1,42 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
int bad1()
{
size_t uvar;
// ruleid: raptor-incorrect-unsigned-comparison
if (uvar < 0)
return 1;
return 0;
}
int bad2()
{
size_t uvar;
// ruleid: raptor-incorrect-unsigned-comparison
if (uvar <= 0)
return 1;
return 0;
}
int good1()
{
size_t uvar;
// ok: raptor-incorrect-unsigned-comparison
if (uvar > 0)
return 1;
return 0;
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,52 @@
rules:
- id: raptor-incorrect-unsigned-comparison
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- audit
vulnerability_class: Improper Validation
likelihood: LOW
impact: MEDIUM
confidence: HIGH
technology:
- c
- cpp
cwe:
- "CWE-697: Incorrect Comparison"
owasp:
- A10:2025 - Mishandling of Exceptional Conditions
references:
- https://g.co/kgs/PCHQjJ
message: >-
Checking if an unsigned variable is negative makes no sense and is
usually a good indication that something is probably wrong with the
code.
severity: WARNING
languages:
- c
- cpp
# NOTE: some types are not covered.
# NOTE: incorrect unsigned assigments are not covered.
pattern-either:
# < (always false)
- pattern: (unsigned short $_) < 0
- pattern: (unsigned short int $_) < 0
- pattern: (unsigned int $_) < 0
- pattern: (unsigned long $_) < 0
- pattern: (unsigned long int $_) < 0
- pattern: (size_t $_) < 0
# <=
- pattern: (unsigned short $_) <= 0
- pattern: (unsigned short int $_) <= 0
- pattern: (unsigned int $_) <= 0
- pattern: (unsigned long $_) <= 0
- pattern: (unsigned long int $_) <= 0
- pattern: (size_t $_) <= 0
# >= (always true)
- pattern: (unsigned short $_) >= 0
- pattern: (unsigned short int $_) >= 0
- pattern: (unsigned int $_) >= 0
- pattern: (unsigned long $_) >= 0
- pattern: (unsigned long int $_) >= 0
- pattern: (size_t $_) >= 0
@@ -0,0 +1,55 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <string.h>
#define SIZE 256
void wrong()
{
record_t bar[MAX_SIZE];
/* do something interesting with bar */
// ruleid: raptor-incorrect-use-of-free
free(bar);
}
void right()
{
record_t *bar = (record_t *)malloc(MAX_SIZE * sizeof(record_t));
/* do something interesting with bar */
// ok: raptor-incorrect-use-of-free
free(bar);
}
int check_auth(char *login, char *passwd)
{
char *cpass;
char *message;
int i = 0;
int stat = STATUS_INVALID;
struct passwd *pwd;
if ((pwd = getpwnam(login)) == NULL)
return (STATUS_UNKNOWN);
hisuid = pwd->pw_uid;
haveuid = 1;
if (hisuid < MIN_UNIX_UID)
return (STATUS_BLOCKED);
if (authenticate(login, passwd, &i, &message) == 0)
{
stat = STATUS_OK;
}
// ruleid: raptor-incorrect-use-of-free
free(&message);
return (stat);
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,86 @@
rules:
- id: raptor-incorrect-use-of-free
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Memory Issues
likelihood: MEDIUM
impact: HIGH
confidence: MEDIUM
technology:
- c
- cpp
cwe:
- "CWE-590: Free of Memory not on the Heap"
owasp:
- A10:2025 - Mishandling of Exceptional Conditions
references:
- https://github.com/shellphish/how2heap/blob/master/glibc_2.23/house_of_spirit.c
message: >-
The software calls free() on a pointer to memory that has a short
lifetime and was not allocated using associated heap allocation
functions such as malloc(), calloc(), or realloc().
severity: ERROR
languages:
- c
- cpp
# NOTE: this rule only covers `free` called on stack-allocated buffers (and possibly static variables); it does not cover other instances of `free` called on non-heap-allocated buffers; it also does not cover `alloca` and custom wrappers to `free`.
# NOTE: multi-dimensional arrays and other ways to create an array are not covered.
# NOTE: refer also to `raptor-mismatched-memory-management.yaml`.
pattern-either:
- patterns:
- pattern: free($PTR)
- pattern-either:
# array
- pattern-inside: |
$_ $PTR[$_];
...
- pattern-inside: |
$_ $PTR[$_] = ...;
...
- pattern-inside: |
$_ $PTR[] = ...;
...
# pointer to array
- pattern-inside: |
$_ $ARR[$_];
...
$PTR = $ARR;
...
- pattern-inside: |
$_ $ARR[$_] = ...;
...
$PTR = $ARR;
...
- pattern-inside: |
$_ $ARR[] = ...;
...
$PTR = $ARR;
...
- patterns:
# address of local variable
- pattern: free(&$VAR)
- pattern-either:
- pattern-inside: |
$_ $VAR;
...
- pattern-inside: |
$_ $VAR = ...;
...
- pattern-inside: |
$_ $VAR[$_];
...
- pattern-inside: |
$_ $VAR[$_] = ...;
...
- pattern-inside: |
$_ $VAR[] = ...;
...
- pattern-inside: |
$_ * $VAR;
...
- pattern-inside: |
$_ * $VAR = ...;
...
@@ -0,0 +1,55 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <string.h>
#define SIZE 256
int test1()
{
char buf[1024];
// ruleid: raptor-incorrect-use-of-memset
memset(buf, sizeof(buf), 0);
// ruleid: raptor-incorrect-use-of-memset
memset(buf, sizeof(buf), 'A');
// ok: raptor-incorrect-use-of-memset
memset(buf, 0, sizeof(buf));
return 0;
}
int test2()
{
char buf[SIZE];
// ruleid: raptor-incorrect-use-of-memset
memset(buf, SIZE, 0);
// ok: raptor-incorrect-use-of-memset
memset(buf, 0, SIZE);
return 0;
}
void test3()
{
// ...
if (!StartServiceCtrlDispatcher(steDispatchTable))
{
char szString[1024];
// ruleid: raptor-incorrect-use-of-memset
memset(szString, sizeof(szString), '\0');
SvcFormatMessage(szString, sizeof(szString));
SvcDebugOut(szString, 0);
}
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,37 @@
rules:
- id: raptor-incorrect-use-of-memset
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Mishandled Sensitive Information
likelihood: MEDIUM
impact: MEDIUM
confidence: HIGH
technology:
- c
- cpp
cwe:
- "CWE-683: Function Call With Incorrect Order of Arguments"
owasp:
- A04:2025 - Cryptographic Failures
references:
- https://lkml.org/lkml/2009/11/11/336
- https://bugs.mysql.com/bug.php?id=23181
message: >-
The invocation of memset() is easy to get wrong. The second argument
is the character and the third argument is the size, but sometimes
these arguments are in the wrong order. This results in a no-op.
severity: ERROR
languages:
- c
- cpp
# NOTE: refer also to `c.lang.security.insecure-use-memset.insecure-use-memset` and `cpp.lang.correctness.memset-removal.memset-removal` for a different potential flaw involving `memset` optimization.
pattern-either:
- pattern: memset($_, $_, 0)
- pattern: memset($_, $_, '\0')
- pattern: memset($_, sizeof(...), $_)
- pattern: memset_explicit($_, $_, 0)
- pattern: memset_explicit($_, $_, '\0')
- pattern: memset_explicit($_, sizeof(...), $_)
@@ -0,0 +1,184 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
void bad1()
{
double *foo;
// ruleid: raptor-incorrect-use-of-sizeof
foo = (double *)malloc(sizeof(foo));
}
void good1()
{
double *foo;
// ok: raptor-incorrect-use-of-sizeof
foo = (double *)malloc(sizeof(*foo));
}
void bad2(char *buf)
{
size_t size;
// ruleid: raptor-incorrect-use-of-sizeof
size = sizeof(buf);
}
void good2()
{
char buf[256];
size_t size;
// ok: raptor-incorrect-use-of-sizeof
size = sizeof(buf);
}
void bad3()
{
AnObj *o = (AnObj *)malloc(sizeof(AnObj));
// ruleid: raptor-incorrect-use-of-sizeof
memset(o, 0x0, sizeof(o));
}
char *read_username(int sockfd)
{
char *buffer, *style, userstring[1024];
int i;
buffer = (char *)malloc(1024);
if (!buffer)
{
error("buffer allocation failed: %m");
return NULL;
}
if (read(sockfd, userstring, sizeof(userstring) - 1) <= 0)
{
free(buffer);
error("read failure: %m");
return NULL;
}
userstring[sizeof(userstring) - 1] = '\0';
style = strchr(userstring, ':');
if (style)
*style++ = '\0';
sprintf(buffer, "username=%.32s", userstring);
if (style)
// ruleid: raptor-incorrect-use-of-sizeof
snprintf(buffer, sizeof(buffer) - strlen(buffer) - 1, ", style=%s\n", style);
return buffer;
}
char *username = "admin";
char *pass = "password";
int AuthenticateUser(char *inUser, char *inPass)
{
// ruleid: raptor-incorrect-use-of-sizeof
printf("Sizeof username = %d\n", sizeof(username));
// ruleid: raptor-incorrect-use-of-sizeof
printf("Sizeof pass = %d\n", sizeof(pass));
// ruleid: raptor-incorrect-use-of-sizeof
if (strncmp(username, inUser, sizeof(username)))
{
printf("Auth failure of username using sizeof\n");
return (AUTH_FAIL);
}
// ruleid: raptor-incorrect-use-of-sizeof
if (!strncmp(pass, inPass, sizeof(pass)))
{
printf("Auth success of password using sizeof\n");
return (AUTH_SUCCESS);
}
else
{
printf("Auth fail of password using sizeof\n");
return (AUTH_FAIL);
}
}
// https://github.com/openresty/memc-nginx-module/commit/1e5e8655b3783d29dec1a9941bb6571989cf7dbb
ngx_int_t
ngx_http_memc_create_incr_decr_cmd_request(ngx_http_request_t *r)
{
size_t len;
ngx_buf_t *b;
ngx_http_memc_ctx_t *ctx;
ngx_chain_t *cl;
uintptr_t escape;
ngx_http_variable_value_t *key_vv;
ngx_http_variable_value_t *value_vv;
ctx = ngx_http_get_module_ctx(r, ngx_http_memc_module);
/* prepare the "key" argument */
key_vv = ctx->memc_key_vv;
if (key_vv == NULL || key_vv->not_found || key_vv->len == 0)
{
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
"the \"$memc_key\" variable is not set");
return NGX_ERROR;
}
escape = 2 * ngx_escape_uri(NULL, key_vv->data, key_vv->len,
NGX_ESCAPE_MEMCACHED);
/* prepare the "value" argument */
value_vv = ctx->memc_value_vv;
/* XXX validate if $memc_value_vv is a valid uint64 string */
// this should be caught but it isn't, due to a known issue in semgrep
// https://github.com/semgrep/semgrep/issues/11327
// todoruleid: raptor-incorrect-use-of-sizeof
len = ctx->cmd_str.len + sizeof(' ') + key_vv->len + escape + sizeof(' ') + value_vv->len + sizeof(CRLF) - 1;
b = ngx_create_temp_buf(r->pool, len);
if (b == NULL)
{
return NGX_ERROR;
}
cl = ngx_alloc_chain_link(r->pool);
if (cl == NULL)
{
return NGX_ERROR;
}
// ...
return NGX_OK;
}
int main(int argc, char **argv)
{
int authResult;
if (argc < 3)
{
ExitError("Usage: Provide a username and password");
}
authResult = AuthenticateUser(argv[1], argv[2]);
if (authResult != AUTH_SUCCESS)
{
ExitError("Authentication failed");
}
else
{
DoAuthenticatedTask(argv[1]);
}
return 0;
}
@@ -0,0 +1,121 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <cstdint>
#include <cstddef>
#include <iostream>
struct Foo
{
uint64_t a;
uint8_t b;
size_t get_size() const
{
// ruleid: raptor-incorrect-use-of-sizeof
return sizeof(this);
}
size_t get_size() const
{
// ok: raptor-incorrect-use-of-sizeof
return sizeof(*this);
}
};
void test_001_fn(int arr[])
{
// ruleid: raptor-incorrect-use-of-sizeof
for (size_t i = 0; i < sizeof(arr) / sizeof(arr[0]); ++i)
{
arr[i] = 0;
}
// ruleid: raptor-incorrect-use-of-sizeof
for (size_t i = 0; i < sizeof(arr) / 2; ++i)
{
arr[i] = 0;
}
// ruleid: raptor-incorrect-use-of-sizeof
for (size_t i = 0; i < 3 * sizeof(arr); ++i)
{
arr[i] = 0;
}
}
void test_001(int arr[])
{
// ruleid: raptor-incorrect-use-of-sizeof
for (size_t i = 0; i < sizeof(arr); ++i)
{
arr[i] = 0;
}
}
void test_002()
{
const FooType *foo_ptr = get_foo();
// ruleid: raptor-incorrect-use-of-sizeof
std::cout << sizeof(foo_ptr);
// ruleid: raptor-incorrect-use-of-sizeof
std::cout << sizeof(foo_ptr + 0);
// ruleid: raptor-incorrect-use-of-sizeof
std::cout << sizeof(0 + foo_ptr);
// ruleid: raptor-incorrect-use-of-sizeof
std::cout << (sizeof(foo_ptr) / sizeof(foo_ptr[0]));
// ok: raptor-incorrect-use-of-sizeof
std::cout << sizeof(*foo_ptr);
}
void test_002_pad()
{
int a = 1;
const FooType *foo_ptr = get_foo();
// ruleid: raptor-incorrect-use-of-sizeof
std::cout << sizeof(foo_ptr);
// ruleid: raptor-incorrect-use-of-sizeof
std::cout << (sizeof(foo_ptr) / sizeof(foo_ptr[0]));
// ok: raptor-incorrect-use-of-sizeof
std::cout << sizeof(*foo_ptr);
}
void test_002_atofat()
{
int a = 1;
const FooType **foo_ptr = get_foo();
// ok: raptor-incorrect-use-of-sizeof
std::cout << sizeof(*foo_ptr);
// ok: raptor-incorrect-use-of-sizeof
std::cout << (sizeof(*foo_ptr) / sizeof(foo_ptr[0]));
// ok: raptor-incorrect-use-of-sizeof
std::cout << sizeof(**foo_ptr);
}
void test_003(void *foo, int *int_ptr)
{
// ruleid: raptor-incorrect-use-of-sizeof
std::cout << sizeof(int_ptr);
// ruleid: raptor-incorrect-use-of-sizeof
std::cout << (sizeof(int_ptr) / sizeof(int_ptr[0]));
// ok: raptor-incorrect-use-of-sizeof
std::cout << sizeof(*int_ptr);
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,78 @@
rules:
- id: raptor-incorrect-use-of-sizeof
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Memory Issues
likelihood: MEDIUM
impact: MEDIUM
confidence: MEDIUM
technology:
- c
- cpp
cwe:
- "CWE-467: Use of sizeof() on a Pointer Type"
owasp:
- A10:2025 - Mishandling of Exceptional Conditions
references:
- https://g.co/kgs/PCHQjJ
- https://github.com/struct/mms
- https://dustri.org/b/playing-with-weggli.html
- https://mastodon.gamedev.place/@amonakov/111577826195014479
- https://github.com/semgrep/semgrep/issues/11327
message: >-
The code calls sizeof() on a pointer type, which always returns
the wordsize (8 on 64-bit architectures). This can produce an
unexpected result if the programmer intended to determine how
much memory has been allocated.
severity: WARNING
languages:
- c
- cpp
# NOTE: another relevant pattern would be `sizeof('...')`, but unfortunately that's currently not supported by Semgrep.
pattern-either:
# type-based patterns (some types are missing)
- patterns:
- pattern: sizeof((char * $_))
- pattern-not: sizeof("...")
# NOTE: sizeof of character literals is still not supported by Semgrep as of 2025-11-22
# - pattern: sizeof('...')
- pattern: sizeof((int * $_))
- pattern: sizeof((float * $_))
- pattern: sizeof((double * $_))
# other patterns
- patterns:
- pattern-either:
- pattern: sizeof($PTR)
- pattern: sizeof($PTR + $_)
- pattern: sizeof($_ + $PTR)
- pattern-either:
- pattern-inside: |
$_ * $PTR;
...
- pattern-inside: |
$_ * $PTR = ...;
...
# function calls
- patterns:
- pattern-either:
- pattern: sizeof($PTR)
- pattern: sizeof($PTR + $_)
- pattern: sizeof($_ + $PTR)
- pattern-either:
- pattern-inside: |
$_ $_(..., $_ * $PTR, ...) {
...
}
- pattern-inside: |
$_ $_(..., $_ $PTR[$_], ...) {
...
}
- pattern-inside: |
$_ $_(..., $_ $PTR[], ...) {
...
}
# c++ `this` pattern
- pattern: sizeof(this)
@@ -0,0 +1,62 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <string.h>
int copy_data(char *username)
{
char buf[1024];
strcpy(buf, "username is: ");
// ruleid: raptor-incorrect-use-of-strncat
strncat(buf, username, sizeof(buf));
log("%s\n", buf);
return 0;
}
int copy_data2(char *username)
{
char buf[1024];
strcpy(buf, "username is: ");
// ruleid: raptor-incorrect-use-of-strncat
strncat(buf, username, 1024);
log("%s\n", buf);
return 0;
}
int copy_data3(char *username)
{
char buf[1024];
strcpy(buf, "username is: ");
// ruleid: raptor-incorrect-use-of-strncat
strncat(buf, username, sizeof(buf) - strlen(buf));
log("%s\n", buf);
return 0;
}
int good(char *username)
{
char buf[1024];
strcpy(buf, "username is: ");
// ok: raptor-incorrect-use-of-strncat
strncat(buf, username, sizeof(buf) - strlen(buf) - 1);
log("%s\n", buf);
return 0;
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,50 @@
rules:
- id: raptor-incorrect-use-of-strncat
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Memory Issues
likelihood: MEDIUM
impact: HIGH
confidence: HIGH
technology:
- c
- cpp
cwe:
- "CWE-787: Out-of-bounds Write"
- "CWE-193: Off-by-one Error"
owasp:
- A10:2025 - Mishandling of Exceptional Conditions
references:
- https://g.co/kgs/PCHQjJ
message: >-
The strncat() function is nearly as dangerous as strcat(), in that it's
quite easy to misuse. The first common mistake is supplying the size of
the entire buffer instead of the size remaining in the buffer. A more
subtle mistake can be made: the size parameter needs to be the amount of
space left in the buffer less one; otherwise, the NUL byte is written
one byte past the end of the buffer.
severity: ERROR
languages:
- c
- cpp
pattern-either:
# size of array
- patterns:
- pattern: strncat($DST, $_, $LEN)
- pattern-either:
- pattern-inside: |
$_ $DST[$LEN];
...
- pattern-inside: |
$_ $DST[$LEN] = ...;
...
# sizeof operator
- pattern: strncat($DST, $_, sizeof($DST))
# strlen function
- pattern: strncat($DST, $_, strlen($DST))
# off-by-one
# see also off-by-one.yaml for a slightly different pattern
- pattern: strncat($DST, $_, sizeof($DST) - strlen($DST))
@@ -0,0 +1,150 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/stat.h>
#define MEMSIZE 256
void bad1()
{
// ruleid: raptor-insecure-api-access-stat
int res = access("/tmp/userfile", R_OK);
if (res != 0)
die("access");
int fd = open("/tmp/userfile", O_RDONLY);
// ...
}
void bad2(char *file)
{
struct stat statb;
int fd;
errno = 0;
// ruleid: raptor-insecure-api-access-stat
if (lstat(file, &statb) < 0)
goto out;
if (!(statb.st_mode & S_IFREG) || statb.st_mode & 077)
goto out;
if ((fd = open(file, O_RDWR | O_SYNC, 0)) < 0)
goto out;
}
void bad3(char *fname)
{
struct stat stbl;
int fd = open(fname, O_RDONLY);
if (fd == -1)
perror("open");
// ruleid: raptor-insecure-api-access-stat
if (lstat(fname, &stbl) != 0)
die("file not there");
if (!S_ISREG(stbl.st_mode))
die("its a symlink");
// ...
}
void test_001()
{
const char *original_key = "path/to/file/filename";
const char *mirror_key = "path/to/another/file/filename";
// ruleid: raptor-insecure-api-access-stat
if ((access(original_key, F_OK) == 0) && (access(mirror_key, F_OK) == 0))
{
copy_file("/bin/cp %s %s", original_key, mirror_key);
unlink(original_key);
}
}
void test_002()
{
const char *original_key = "path/to/file/filename";
// ruleid: raptor-insecure-api-access-stat
if (access(original_key, W_OK) == 0)
{
FILE *fp = fopen(original_key, "wb");
}
}
void test_001_stack_overflow()
{
struct stat buf;
FILE *fp;
char data[2560];
// ruleid: raptor-insecure-api-access-stat
if (stat(file.c_str(), &buf) == 0)
{
// Open the file for reading
fp = fopen(file.c_str(), "r");
if (fp == NULL)
{
char message[2560];
sprintf(message, "File '%s' Cound Not be Opened", file.c_str());
// DISPLAY_MSG_ERROR( this, message, "GetFileContents", "System" );
throw message;
}
// Read the file
MvString s, ss;
while (fgets(data, sizeof(data), fp) != (char *)0)
{
s = data;
s.trimBoth();
if (s.compare(0, 5, "GROUP") == 0)
{
// size_t t = s.find_last_of( ":" );
size_t t = s.find(":");
if (t != string::npos)
{
ss = s.substr(t + 1).c_str();
ss.trimBoth();
ss = ss.substr(1, ss.length() - 3).c_str();
group_list.push_back(ss);
}
}
}
// Close the file
fclose(fp);
}
}
void ok()
{
int fd = open("file.txt", O_RDONLY);
if (fd == -1)
{
perror("open");
return -1;
}
struct stat st;
// ok: raptor-insecure-api-access-stat
if (fstat(fd, &st) == -1)
{
perror("fstat");
close(fd);
return -1;
}
// Now safely use st.st_mode, st.st_size, etc. on the already-open fd
// ...
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,39 @@
rules:
- id: raptor-insecure-api-access-stat
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- audit
vulnerability_class: Dangerous Method or Function
likelihood: MEDIUM
impact: MEDIUM
confidence: HIGH
technology:
- c
- cpp
cwe:
- "CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition"
owasp:
- A10:2025 - Mishandling of Exceptional Conditions
references:
- https://g.co/kgs/PCHQjJ
- https://labs.snyk.io/resources/leaky-vessels-container-vuln-deep-dive/
message: >-
The software checks the state of a resource before using it, but the
resource's state can change between the check and the use in a way that
invalidates the results of the check. This can cause the software to
perform invalid actions when the resource is in an unexpected state.
severity: WARNING
languages:
- c
- cpp
# NOTE: `_stat` and `_lstat` are not covered.
# NOTE: refer also to `cpp.lang.security.filesystem.*` for stricter check/action patterns.
pattern-either:
- pattern: access(...)
- pattern: faccessat(...)
- pattern: faccessat2(...)
- pattern: stat(...)
- pattern: lstat(...)
- pattern: fstatat(...)
@@ -0,0 +1,42 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <stdlib.h>
#define MEMSIZE 256
void allocate_memory1()
{
// ruleid: raptor-insecure-api-alloca
char *buf = alloca(MEMSIZE);
// ...
}
void allocate_memory2()
{
// ok: raptor-insecure-api-alloca
char *buf = malloc(MEMSIZE);
// ...
}
void allocate_memory2()
{
int end_limit = get_nmbr_obj_from_db();
int i;
int *base = NULL;
int *p = base;
for (i = 0; i < end_limit; i++)
{
// ruleid: raptor-insecure-api-alloca
*p = alloca(sizeof(int *));
p = *p;
}
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,32 @@
rules:
- id: raptor-insecure-api-alloca
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Dangerous Method or Function
likelihood: MEDIUM
impact: HIGH
confidence: HIGH
technology:
- c
- cpp
cwe:
- "CWE-676: Use of Potentially Dangerous Function"
- "CWE-1325: Improperly Controlled Sequential Memory Allocation"
owasp:
- A06:2025 - Insecure Design
references:
- https://nullprogram.com/blog/2019/10/28/
- https://docs.microsoft.com/en-us/cpp/sanitizers/asan-error-examples
message: >-
Use of alloca() is unsafe because it cannot ensure that the pointer
returned points to a valid and usable block of memory. The allocation
made may exceed the bounds of the stack, or even go further into other
objects in memory, and alloca() cannot determine such an error.
severity: ERROR
languages:
- c
- cpp
pattern: alloca(...)
@@ -0,0 +1,22 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <stdlib.h>
int converter_bad(const char *numstr)
{
// ruleid: raptor-insecure-api-ato
return atoi(numstr);
}
int converter_good(const char *numstr)
{
// ok: raptor-insecure-api-ato
return strtol(numstr, NULL, 10);
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,39 @@
rules:
- id: raptor-insecure-api-ato
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- audit
vulnerability_class: Dangerous Method or Function
likelihood: LOW
impact: MEDIUM
confidence: HIGH
technology:
- c
- cpp
cwe:
- "CWE-839: Numeric Range Comparison Without Minimum Check"
owasp:
- A10:2025 - Mishandling of Exceptional Conditions
references:
- https://rules.sonarsource.com/c/type/Bug/RSPEC-989
- https://wiki.sei.cmu.edu/confluence/display/c/ERR34-C.+Detect+errors+when+converting+a+string+to+a+number
- https://github.com/vixie/cron/commit/9cc8ab1087bb9ab861dd5595c41200683c9f6712
message: >-
The atoi(), atol(), atof(), and similar functions don't handle errors.
They don't check for integer overflow and can return a negative value.
They have undefined behavior if the value of the result cannot be
represented. They return 0 (or 0.0) if the string does not represent
an integer (or decimal), which is indistinguishable from a correctly
formatted, zero-denoting input string.
severity: INFO
languages:
- c
- cpp
# NOTE: some function variants are missing.
pattern-either:
- pattern: atoi(...)
- pattern: atol(...)
- pattern: atof(...)
- pattern: atoll(...)
@@ -0,0 +1,43 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#define BUFSIZE 256
void get_string()
{
char buf[BUFSIZE];
// ruleid: raptor-insecure-api-gets
gets(buf);
}
void test_001()
{
char buf[BUFFER_SIZE];
// ruleid: raptor-insecure-api-gets
if (gets(buf) == NULL)
{
// ...
}
}
void foo()
{
char buf[64];
// ruleid: raptor-insecure-api-gets
gets(buf);
}
void foo()
{
char buf[64];
// ok: raptor-insecure-api-gets
fgets(buf, 63, stdin);
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,30 @@
rules:
- id: raptor-insecure-api-gets
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Dangerous Method or Function
likelihood: HIGH
impact: HIGH
confidence: HIGH
technology:
- c
- cpp
cwe:
- "CWE-242: Use of Inherently Dangerous Function"
- "CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')"
owasp:
- A10:2025 - Mishandling of Exceptional Conditions
references:
- https://g.co/kgs/PCHQjJ
message: >-
The gets() function is always unsafe because it does not perform bounds
checking on the size of its input. An attacker can easily send
arbitrarily-sized input to gets() and overflow the destination buffer.
severity: ERROR
languages:
- c
- cpp
pattern: gets(...)
@@ -0,0 +1,28 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <unistd.h>
void open_tmpfile1(char *path)
{
// ruleid: raptor-insecure-api-mktemp-tmpnam-tempnam
char *filename = mktemp(path);
FILE *tmp = fopen(filename, "wb+");
// do something
}
void open_tmpfile2(char *path, char *data, size_t len)
{
// ok: raptor-insecure-api-mktemp-tmpnam-tempnam
int fd = mkstemp(path);
write(fd, data, len);
// do something
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,37 @@
rules:
- id: raptor-insecure-api-mktemp-tmpnam-tempnam
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- audit
vulnerability_class: Dangerous Method or Function
likelihood: MEDIUM
impact: MEDIUM
confidence: HIGH
technology:
- c
- cpp
cwe:
- "CWE-377: Insecure Temporary File"
- "CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition"
owasp:
- A10:2025 - Mishandling of Exceptional Conditions
references:
- https://g.co/kgs/PCHQjJ
message: >-
Creating and using insecure temporary files can leave application and
system data vulnerable to attack.
severity: WARNING
languages:
- c
- cpp
pattern-either:
- pattern: mktemp(...)
- pattern: tmpnam(...)
- pattern: tempnam(...)
- pattern: tmpnam_r(...)
# - pattern: _mktemp(...)
# - pattern: _tmpnam(...)
# - pattern: _tempnam(...)
# - pattern: GetTempFileName(...)
@@ -0,0 +1,56 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
enum
{
len = 12
};
void func_bad(void)
{
char id[len];
int r;
int num;
// ...
// ruleid: raptor-insecure-api-rand-srand
r = rand();
num = snprintf(id, len, "ID%-d", r);
// ...
}
void func_good(void)
{
char id[len];
int r;
int num;
// ...
struct timespec ts;
if (timespec_get(&ts, TIME_UTC) == 0)
{
/* handle error */
}
// ok: raptor-insecure-api-rand-srand
srandom(ts.tv_nsec ^ ts.tv_sec);
// ...
// ok: raptor-insecure-api-rand-srand
r = random();
num = snprintf(id, len, "ID%-d", r);
// ...
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,44 @@
rules:
- id: raptor-insecure-api-rand-srand
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Cryptographic Issues
likelihood: MEDIUM
impact: MEDIUM
confidence: HIGH
technology:
- c
- cpp
cwe:
- "CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)"
- "CWE-330: Use of Insufficiently Random Values"
owasp:
- A04:2025 - Cryptographic Failures
references:
- https://www.sei.cmu.edu/downloads/sei-cert-c-coding-standard-2016-v01.pdf
message: >-
The rand() PRNG should not be used in applications intended to be
portable when good randomness is needed. Instead, the use of random()
is recommended.
severity: WARNING
languages:
- c
- cpp
# NOTE: `rand_r` and other non-standard PRNGs are not covered.
# NOTE: improperly seeded strong PRNGs are not covered.
# NOTE: refer also to `cpp.lang.security.rng.*`, `cpp.lang.security.crypto.*`, and `gitlab.flawfinder.*`.
pattern-either:
- pattern: rand(...)
- pattern: srand(...)
- pattern: drand48(...)
- pattern: erand48(...)
- pattern: lrand48(...)
- pattern: nrand48(...)
- pattern: mrand48(...)
- pattern: jrand48(...)
- pattern: lcong48(...)
- pattern: srand48(...)
- pattern: seed48(...)
@@ -0,0 +1,236 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#define BUFSIZE 256
#define FMT "whatever"
void read_string(char *string)
{
char buf[BUFSIZE];
int number;
char fmt[] = "whatever";
// ruleid: raptor-insecure-api-scanf
scanf("%s", buf);
// ok: raptor-insecure-api-scanf
scanf("%d", &number);
// ruleid: raptor-insecure-api-scanf
sscanf(string, "string: %s", buf);
// ruleid: raptor-insecure-api-scanf
scanf(FMT, buf);
// ruleid: raptor-insecure-api-scanf
scanf(fmt, buf);
// ruleid: raptor-insecure-api-scanf
scanf(buf);
}
void test_func()
{
char last_name[20];
printf("Enter your last name: ");
// ruleid: raptor-insecure-api-scanf
scanf("%s", last_name);
}
int read_ident(int sockfd)
{
int sport, cport;
char user[32], rtype[32], addinfo[32];
char buffer[1024];
if (read(sockfd, buffer, sizeof(buffer)) <= 0)
{
perror("read: %m");
return 1;
}
buffer[sizeof(buffer) - 1] = '\0';
// ruleid: raptor-insecure-api-scanf
sscanf(buffer, "%d:%d:%s:%s:%s", &sport, &cport, rtype, user, addinfo);
// ...
}
// https://github.com/pedrib/PoC/blob/master/advisories/Pwn2Own/Tokyo_2019/tokyo_drift/tokyo_drift.md
undefined4 sa_setBlockName(char *block_name, int len)
{
int scanf_res;
char *__src;
char scanf_str[1024];
undefined4 scanf_int;
scanf_int = 0;
scanf_str._0_4_ = 0;
memset(scanf_str + 4, 0, 0x3fc);
print_debug(3, "%s(%d);\n", "sa_setBlockName", 0x42d);
if (len != 0)
{
// ruleid: raptor-insecure-api-scanf
scanf_res = sscanf(block_name, "%d%s", &scanf_int, scanf_str);
/* if ((scanf_res == 2) && (__src = strstr(block_name, s), __src != NULL)) {
// ...
} */
}
return 0;
}
// https://www.synacktiv.com/en/publications/pwn2own-austin-2021-defeating-the-netgear-r6700v3.html
int updating_database(int a1, const char *update_server)
{
// ...
char line[1020]; // [sp+894h] [bp-4FCh] BYREF
char db_checksum_val[256]; // [sp+D94h] [bp+4h] BYREF
char db_checksum[256]; // [sp+E94h] [bp+104h] BYREF
// ...
v7 = fopen("/tmp/circleinfo.txt", "r");
if (v7)
{
line[0] = 0;
while (fgets(line, 1024, v7))
{
// ruleid: raptor-insecure-api-scanf
if (sscanf(line, "%s %s", db_checksum, db_checksum_val) == 2 && !strcmp(db_checksum, "db_checksum"))
{
// ...
break;
}
}
}
return 0;
}
void test_003(void)
{
char buf[BUFFER_SIZE];
// ruleid: raptor-insecure-api-scanf
if (1 != fscanf(stdin, "%s", buf))
{
// ...
}
}
void test_003_valist(void)
{
char buf[BUFFER_SIZE];
// ruleid: raptor-insecure-api-scanf
if (1 != fscanf(stdin, "%d%d%s", 1, 2, buf))
{
// ...
}
}
void test_003_stmt(void)
{
char buf[BUFFER_SIZE];
// ruleid: raptor-insecure-api-scanf
fscanf(stdin, "%d%d%s", 1, 2, buf);
}
void test_004(void)
{
char buf[BUFFER_SIZE];
// ok: raptor-insecure-api-scanf
if (1 != fscanf(stdin, "%d", buf))
{
// ...
}
}
void test_007(wchar_t *name)
{
char filename[128];
// ruleid: raptor-insecure-api-scanf
fwscanf(stdin, L"foo%sbar", filename);
}
void foo()
{
char buf[128];
int n;
// ruleid: raptor-insecure-api-scanf
fscanf(stdin, "%dfoo%sbar", n, buf);
// ruleid: raptor-insecure-api-scanf
fscanf(stdin, "%sbar", n, buf);
// ruleid: raptor-insecure-api-scanf
fscanf(stdin, "foo%s", n, buf);
}
void foo()
{
char buf[128];
int n;
// ok: raptor-insecure-api-scanf
fscanf(stdin, "%dfoo%10sbar", n, buf);
}
void foo()
{
char buf[128];
int n;
// sized format specifiers aren't parsed yet
// todoruleid: raptor-insecure-api-scanf
fscanf(stdin, "%dfoo%1024sbar", n, buf);
}
void foo()
{
char buf[128];
// ruleid: raptor-insecure-api-scanf
fscanf(stdin, "%sfoo%%s", buf);
// ruleid: raptor-insecure-api-scanf
fscanf(stdin, "%sfoo%%%s", buf);
}
void foo()
{
char buf[64];
va_list ap;
va_start(ap, buf);
// ruleid: raptor-insecure-api-scanf
vscanf("%s", ap);
va_end(ap);
}
void foo()
{
char buf[64];
va_list ap;
va_start(ap, buf);
// ruleid: raptor-insecure-api-scanf
vfscanf(stdin, "%s", ap);
va_end(ap);
}
void foo(char *str)
{
char buf[0];
// ruleid: raptor-insecure-api-scanf
sscanf(str, "%s", buf);
// ok: raptor-insecure-api-scanf
sscanf("constant string", "%s", buf);
va_list ap;
va_start(ap, fmt);
// ruleid: raptor-insecure-api-scanf
vsscanf(str, "%s", buf);
va_end(ap);
va_list ap;
va_start(ap, fmt);
// ok: raptor-insecure-api-scanf
vsscanf("constant string", "%s", buf);
va_end(ap);
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,61 @@
rules:
- id: raptor-insecure-api-scanf
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Dangerous Method or Function
likelihood: HIGH
impact: HIGH
confidence: HIGH
technology:
- c
- cpp
cwe:
- "CWE-676: Use of Potentially Dangerous Function"
- "CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')"
- "CWE-787: Out-of-bounds Write"
owasp:
- A10:2025 - Mishandling of Exceptional Conditions
references:
- https://g.co/kgs/PCHQjJ
message: >-
A buffer overflow condition exists when a program attempts to put
more data in a buffer than it can hold, or when a program attempts to
put data in a memory area outside of the boundaries of a buffer.
severity: ERROR
languages:
- c
- cpp
patterns:
- pattern-either:
- pattern: scanf($FMT, ...)
- pattern: __isoc99_scanf($FMT, ...)
- pattern: vscanf($FMT, ...)
- pattern: __isoc99_vscanf($FMT, ...)
- pattern: fscanf($_, $FMT, ...)
- pattern: __isoc99_fscanf($_, $FMT, ...)
- pattern: vfscanf($_, $FMT, ...)
- pattern: __isoc99_vfscanf($_, $FMT, ...)
- pattern: sscanf($_, $FMT, ...)
- pattern: __isoc99_sscanf($_, $FMT, ...)
- pattern: vsscanf($_, $FMT, ...)
- pattern: __isoc99_vsscanf($_, $FMT, ...)
- pattern: wscanf($FMT, ...)
- pattern: vwscanf($FMT, ...)
- pattern: fwscanf($_, $FMT, ...)
- pattern: vfwscanf($_, $FMT, ...)
- pattern: swscanf($_, $FMT, ...)
- pattern: vswscanf($_, $FMT, ...)
# exclude string literals as source
- pattern-not: sscanf("...", $FMT, ...)
- pattern-not: __isoc99_sscanf("...", $FMT, ...)
- pattern-not: vsscanf("...", $FMT, ...)
- pattern-not: __isoc99_vsscanf("...", $FMT, ...)
- pattern-not: swscanf("...", $FMT, ...)
- pattern-not: vswscanf("...", $FMT, ...)
- metavariable-regex:
metavariable: $FMT
# NOTE: some format string specifiers are not handled
regex: '(".*%l?s.*"|".*%S.*"|[a-zA-Z_][a-zA-Z0-9_]*)'
@@ -0,0 +1,47 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
char *logMessage;
void handler(int sigNum)
{
syslog(LOG_NOTICE, "%s\n", logMessage);
free(logMessage);
sleep(10);
exit(0);
}
int bad_main(int argc, char *argv[])
{
logMessage = strdup(argv[1]);
// ruleid: raptor-insecure-api-signal
signal(SIGHUP, handler);
// ruleid: raptor-insecure-api-signal
signal(SIGTERM, handler);
sleep(10);
return 0;
}
int good_main(int argc, char *argv[])
{
logMessage = strdup(argv[1]);
struct sigaction sa;
sa.sa_handler = handler;
// ok: raptor-insecure-api-signal
sigaction(SIGHUP, &sa, NULL);
// ok: raptor-insecure-api-signal
sigaction(SIGTERM, &sa, NULL);
sleep(10);
return 0;
}
@@ -0,0 +1,35 @@
rules:
- id: raptor-insecure-api-signal
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- audit
vulnerability_class: Dangerous Method or Function
likelihood: MEDIUM
impact: MEDIUM
confidence: HIGH
technology:
- c
- cpp
cwe:
- "CWE-364: Signal Handler Race Condition"
- "CWE-479: Signal Handler Use of a Non-reentrant Function"
- "CWE-828: Signal Handler with Functionality that is not Asynchronous-Safe"
owasp:
- A10:2025 - Mishandling of Exceptional Conditions
references:
- https://lcamtuf.coredump.cx/signals.txt
message: >-
The signal() API should be regarded as deprecated. When possible,
sigaction() should be used instead, because it allows to precisely
specify the desired behavior in case two signals arrive shortly after
each other thus preventing many race conditions.
severity: WARNING
languages:
- c
- cpp
pattern-either:
- pattern: signal(...)
- pattern: gsignal(...)
- pattern: ssignal(...)
@@ -0,0 +1,72 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#define BUFSIZE 256
#define FMT "whatever"
void copy_string(char *string, int number)
{
char buf[BUFSIZE];
char fmt[] = "whatever";
// ruleid: raptor-insecure-api-sprintf-vsprintf
sprintf(buf, "string: %s\n", string);
// ok: raptor-insecure-api-sprintf-vsprintf
sprintf(buf, "number: %d\n", number);
// ruleid: raptor-insecure-api-sprintf-vsprintf
sprintf(buf, FMT, string);
// ruleid: raptor-insecure-api-sprintf-vsprintf
sprintf(buf, fmt, string);
// ruleid: raptor-insecure-api-sprintf-vsprintf
sprintf(buf, string);
}
static void
WriteToLog(jrun_request *r, const char *szFormat, ...)
{
server_rec *s = (server_rec *)r->context;
va_list list;
char szBuf[2048];
strcpy(szBuf, r->stringRep);
va_start(list, szFormat);
// ruleid: raptor-insecure-api-sprintf-vsprintf
vsprintf(strchr(szBuf, '\0'), szFormat, list);
va_end(list);
#if MODULE_MAGIC_NUMBER > 19980401
ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_NOTICE, s, "%s", szBuf);
#else
log_error(szBuf, s);
#endif
#ifdef WIN32
strcat(szBuf, "\r\n");
OutputDebugString(szBuf);
#endif
}
void test_005(const char *name)
{
char filename[128];
// ruleid: raptor-insecure-api-sprintf-vsprintf
sprintf(filename, "%s", name);
}
void test_006(const char *name)
{
char filename[128];
// ok: raptor-insecure-api-sprintf-vsprintf
sprintf(filename, "%d", name);
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,38 @@
rules:
- id: raptor-insecure-api-sprintf-vsprintf
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Dangerous Method or Function
likelihood: HIGH
impact: HIGH
confidence: HIGH
technology:
- c
- cpp
cwe:
- "CWE-676: Use of Potentially Dangerous Function"
- "CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')"
- "CWE-787: Out-of-bounds Write"
owasp:
- A10:2025 - Mishandling of Exceptional Conditions
references:
- https://g.co/kgs/PCHQjJ
message: >-
A buffer overflow condition exists when a program attempts to put
more data in a buffer than it can hold, or when a program attempts to
put data in a memory area outside of the boundaries of a buffer.
severity: ERROR
languages:
- c
- cpp
patterns:
- pattern-either:
- pattern: sprintf($_, $FMT, ...)
- pattern: vsprintf($_, $FMT, ...)
- metavariable-regex:
metavariable: $FMT
# NOTE: some format string specifiers are not handled
regex: '(".*%l?s.*"|".*%S.*"|[a-zA-Z_][a-zA-Z0-9_]*)'
@@ -0,0 +1,150 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <string.h>
#define BUFSIZE 256
void copy_append_string1(char *string1, char *string2)
{
char buf[BUFSIZE];
// ruleid: raptor-insecure-api-strcpy-strcat
strcpy(buf, string1);
// ruleid: raptor-insecure-api-strcpy-strcat
strcat(buf, string2);
}
int copy_append_string2(const char *string1, const char *string2,
char *buf, size_t bufsz)
{
if (!string1 || !string2 || !buf || bufsz == 0)
return -1;
// ok: raptor-insecure-api-strcpy-strcat
if (strlcpy(buf, string1, bufsz) >= bufsz)
return -1; // truncation
// ok: raptor-insecure-api-strcpy-strcat
if (strlcat(buf, string2, bufsz) >= bufsz)
return -1; // truncation
return 0;
}
void copy_string(char *string)
{
char buf[BUFSIZE];
// ruleid: raptor-insecure-api-strcpy-strcat
stpcpy(buf, string);
}
void test_func()
{
struct hostent *clienthp;
char hostname[MAX_LEN];
// ...
int count = 0;
for (count = 0; count < MAX_CONNECTIONS; count++)
{
int clientlen = sizeof(struct sockaddr_in);
int clientsocket = accept(serversocket, (struct sockaddr *)&clientaddr, &clientlen);
if (clientsocket >= 0)
{
clienthp = gethostbyaddr((char *)&clientaddr.sin_addr.s_addr, sizeof(clientaddr.sin_addr.s_addr), AF_INET);
// ruleid: raptor-insecure-api-strcpy-strcat
strcpy(hostname, clienthp->h_name);
logOutput("Accepted client connection from host ", hostname);
// ...
close(clientsocket);
}
}
close(serversocket);
// ...
}
char *read_command(int sockfd)
{
char username[32], buffer[1024];
int n;
if ((n = read(sockfd, buffer, sizeof(buffer) - 1) <= 0))
return NULL;
buffer[n] = '\0';
switch (buffer[0])
{
case 'U':
// ruleid: raptor-insecure-api-strcpy-strcat
strcpy(username, &buffer[1]);
break;
// ...
}
}
int process_email(char *email)
{
char username[32], domain[128], *delim;
int c;
delim = strchr(email, '@');
if (!delim)
return -1;
*delim++ = '\0';
if (strlen(email) >= sizeof(username))
return -1;
// ruleid: raptor-insecure-api-strcpy-strcat
strcpy(username, email);
if (strlen(delim) >= sizeof(domain))
return -1;
// ruleid: raptor-insecure-api-strcpy-strcat
strcpy(domain, delim);
if (!strchr(delim, '.'))
// ruleid: raptor-insecure-api-strcpy-strcat
strcat(domain, default_domain);
// ...
}
void process_address(int sockfd)
{
char username[256], domain[256], netbuf[256], *ptr;
read_data(sockfd, netbuf, sizeof(netbuf));
ptr = strchr(netbuf, ':');
if (ptr)
*ptr++ = '\0';
// ruleid: raptor-insecure-api-strcpy-strcat
strcpy(username, netbuf);
if (ptr)
// ruleid: raptor-insecure-api-strcpy-strcat
strcpy(domain, ptr);
// ...
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,47 @@
rules:
- id: raptor-insecure-api-strcpy-strcat
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Dangerous Method or Function
likelihood: HIGH
impact: HIGH
confidence: HIGH
technology:
- c
- cpp
cwe:
- "CWE-676: Use of Potentially Dangerous Function"
- "CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')"
- "CWE-787: Out-of-bounds Write"
owasp:
- A10:2025 - Mishandling of Exceptional Conditions
references:
- https://g.co/kgs/PCHQjJ
message: >-
A buffer overflow condition exists when a program attempts to put
more data in a buffer than it can hold, or when a program attempts to
put data in a memory area outside of the boundaries of a buffer.
severity: ERROR
languages:
- c
- cpp
# NOTE: some functions, such as `_fstrcpy` and `_fstrcat`, are not covered.
patterns:
- pattern-either:
- pattern: strcpy(...)
- pattern: stpcpy(...)
- pattern: strcat(...)
- pattern: wcscpy(...)
- pattern: wcpcpy(...)
- pattern: wcscat(...)
- pattern: _mbscpy(...)
- pattern: _mbscat(...)
- pattern: strccpy(...)
- pattern: strcadd(...)
- pattern: streadd(...)
- pattern: strecpy(...)
- pattern: strtrns(...)
- pattern-not: $_($_, "...", ...)
@@ -0,0 +1,53 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
void assign_int(int int_var)
{
// ruleid: raptor-integer-truncation
char char_var = int_var;
short short_var;
int int_var2;
// ruleid: raptor-integer-truncation
short_var = int_var;
// ok: raptor-integer-truncation
int_var2 = int_var + 1;
}
void assign_long(long long_var)
{
short short_var;
// ruleid: raptor-integer-truncation
int int_var = long_var + 1;
// ruleid: raptor-integer-truncation
short_var = long_var;
// ok: raptor-integer-truncation
long long_var2 = long_var + 1;
}
void test_func()
{
int intPrimitive;
short shortPrimitive;
intPrimitive = (int)(~((int)0) ^ (1 << (sizeof(int) * 8 - 1)));
// ruleid: raptor-integer-truncation
shortPrimitive = intPrimitive;
printf("Int MAXINT: %d\nShort MAXINT: %d\n", intPrimitive, shortPrimitive);
}
// ruleid: raptor-integer-truncation
char func(void)
{
int a = 42;
return a;
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,133 @@
rules:
- id: raptor-integer-truncation
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Other Security
likelihood: MEDIUM
impact: MEDIUM
confidence: LOW
technology:
- c
- cpp
cwe:
- "CWE-197: Numeric Truncation Error"
- "CWE-681: Incorrect Conversion between Numeric Types"
owasp:
- A10:2025 - Mishandling of Exceptional Conditions
references:
- https://g.co/kgs/PCHQjJ
- https://github.com/struct/mms
message: >-
Truncation errors occur when a primitive is cast to a primitive of a
smaller size and data is lost in the conversion. The value cannot be
trusted and the application will be in an undefined state.
severity: WARNING
languages:
- c
- cpp
# NOTE: the deep expression operator is necessary to catch some matches because C/C++ integer promotions do not seem entirely supported by Semgrep; this may generate lots of false positives.
# NOTE: some types (e.g., pointers) and use cases (e.g., comparisons) are not covered.
pattern-either:
# char: assignments
- patterns:
- pattern-either:
- pattern: (char $_) = <... (short $_) ...>
- pattern: (char $_) = <... (short int $_) ...>
- pattern: (char $_) = <... (unsigned short $_) ...>
- pattern: (char $_) = <... (unsigned short int $_) ...>
- pattern: (char $_) = <... (int $_) ...>
- pattern: (char $_) = <... (unsigned $_) ...>
- pattern: (char $_) = <... (unsigned int $_) ...>
- pattern: (char $_) = <... (long $_) ...>
- pattern: (char $_) = <... (long int $_) ...>
- pattern: (char $_) = <... (unsigned long $_) ...>
- pattern: (char $_) = <... (unsigned long int $_) ...>
- pattern-not: $_ = 0
# char: function return
- patterns:
- pattern-either:
- pattern: |
char $FUN(...)
{
...
return (short $_);
}
- pattern: |
char $FUN(...)
{
...
return (int $_);
}
- pattern: |
char $FUN(...)
{
...
return (long $_);
}
# improve output readability
- focus-metavariable: $FUN
# short: assignments
- patterns:
- pattern-either:
- pattern: (short $_) = <... (unsigned short $_) ...>
- pattern: (short int $_) = <... (unsigned short int $_) ...>
- pattern: (short $_) = <... (int $_) ...>
- pattern: (short $_) = <... (unsigned $_) ...>
- pattern: (short int $_) = <... (unsigned int $_) ...>
- pattern: (short $_) = <... (long $_) ...>
- pattern: (short int $_) = <... (long int $_) ...>
- pattern: (short $_) = <... (unsigned long $_) ...>
- pattern: (short int $_) = <... (unsigned long int $_) ...>
- pattern: (unsigned short $_) = <... (int $_) ...>
- pattern: (unsigned short int $_) = <... (unsigned int $_) ...>
- pattern: (unsigned short $_) = <... (long $_) ...>
- pattern: (unsigned short int $_) = <... (long int $_) ...>
- pattern: (unsigned short $_) = <... (unsigned long $_) ...>
- pattern: (unsigned short int $_) = <... (unsigned long int $_) ...>
- pattern-not: $_ = 0
# short: function return
- patterns:
- pattern-either:
- pattern: |
short $FUN(...)
{
...
return (int $_);
}
- pattern: |
short $FUN(...)
{
...
return (long $_);
}
# improve output readability
- focus-metavariable: $FUN
# int: assignments
- patterns:
- pattern-either:
- pattern: (int $_) = <... (unsigned $_) ...>
- pattern: (int $_) = <... (unsigned int $_) ...>
- pattern: (int $_) = <... (long $_) ...>
- pattern: (int $_) = <... (long int $_) ...>
- pattern: (int $_) = <... (unsigned long $_) ...>
- pattern: (int $_) = <... (unsigned long int $_) ...>
- pattern-not: $_ = 0
# int: function return
- patterns:
- pattern: |
int $FUN(...)
{
...
return (long $_);
}
# improve output readability
- focus-metavariable: $FUN
# long: assignments
- patterns:
- pattern-either:
- pattern: (long $_) = <... (unsigned long $_) ...>
- pattern: (long int $_) = <... (unsigned long int $_) ...>
- pattern-not: $_ = 0
@@ -0,0 +1,310 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <stdlib.h>
#include <stdckdint.h> // C23
void bad1()
{
img_t table_ptr;
int num_imgs;
// ...
num_imgs = get_num_imgs();
// ruleid: raptor-integer-wraparound
table_ptr = (img_t *)malloc(sizeof(img_t) * num_imgs);
// ...
}
int good1(void)
{
int num_imgs = get_num_imgs();
size_t alloc_size;
if (num_imgs <= 0)
return -1;
if (ckd_mul(&alloc_size, (size_t)num_imgs, sizeof(img_t)))
return -1; // overflow
// ok: raptor-integer-wraparound
img_t *table_ptr = malloc(alloc_size);
if (!table_ptr)
return -1;
// ...
free(table_ptr);
return 0;
}
int good2(void)
{
int num_imgs = get_num_imgs();
if (num_imgs <= 0)
return -1;
if ((size_t)num_imgs > SIZE_MAX / sizeof(img_t))
return -1; // overflow
// the rule doesn't currently check for this pattern of overflow prevention, but it arguably should
// todook: raptor-integer-wraparound
img_t *table_ptr = malloc((size_t)num_imgs * sizeof(img_t));
if (!table_ptr)
return -1;
// ...
free(table_ptr);
return 0;
}
// https://vulncat.fortify.com/
void bad2()
{
int nresp = packet_get_int();
if (nresp > 0)
{
// ruleid: raptor-integer-wraparound
response = malloc(nresp * sizeof(char *));
for (int i = 0; i < nresp; i++)
response[i] = packet_get_string(NULL);
}
}
// https://fromdayzerotozeroday.com/
void bad3(n)
{
// ruleid: raptor-integer-wraparound
char *const new_connector = (char *)realloc(parser->m_groupConnector, parser->m_groupSize *= 2);
// ruleid: raptor-integer-wraparound
int *const new_scaff_index = (int *)realloc(dtd->scaffIndex, parser->m_groupSize * sizeof(int));
n *= 2;
// ruleid: raptor-integer-wraparound
char *buf = (char *)malloc(n)
}
u_char *make_table(unsigned int width, unsigned int height, u_char *init_row)
{
unsigned int n;
int i;
u_char *buf;
n = width * height;
// ruleid: raptor-integer-wraparound
buf = (char *)malloc(n);
if (!buf)
return NULL;
for (i = 0; i < height; i++)
memcpy(&buf[i * width], init_row, width);
return buf;
}
// http://www.phrack.org/issues/60/10.html#article
int myfunction(int *array, int len)
{
int *myarray, i;
// ruleid: raptor-integer-wraparound
myarray = malloc(len * sizeof(int));
if (myarray == NULL)
{
return -1;
}
for (i = 0; i < len; i++)
{
myarray[i] = array[i];
}
return myarray;
}
static int
set_cursor(struct tfb_softc *sc, struct wsdisplay_cursor *p)
{
u_int v, index = 0, count = 0, icount = 0;
uint8_t r[2], g[2], b[2], image[512], mask[512];
int error, s;
v = p->which;
if (v & WSDISPLAY_CURSOR_DOCMAP)
{
index = p->cmap.index; // p->cmap.index is u_int
count = p->cmap.count; // p->cmap.count is u_int
// ruleid: raptor-integer-wraparound
if (index >= 2 || (index + count) > 2)
return (EINVAL);
error = copyin(p->cmap.red, &r[index], count);
}
}
void **ht_get_all(ht_t self, int want_key)
{
// ruleid: raptor-integer-wraparound
void **ret = (void **)calloc(self->num_keys + 1, sizeof(void *));
if (ret)
{
void **tail = ret;
size_t i;
for (i = 0; i < self->num_buckets; i++)
{
ht_entry_t curr;
for (curr = self->buckets[i]; curr; curr = curr->next)
{
*tail++ = (want_key ? curr->key : curr->value);
}
}
}
return ret;
}
dl_status dl_start(dl_t self)
{
// ...
plist_t dict = plist_new_dict();
// ...
char *xml = NULL;
uint32_t xml_length = 0;
plist_to_xml(dict, &xml, &xml_length);
plist_free(dict);
size_t length = 16 + xml_length;
// ruleid: raptor-integer-wraparound
char *packet = (char *)calloc(length, sizeof(char));
if (!packet)
{
return DL_ERROR;
}
// ...
}
// https://cc-sw.com/using-codeql-and-semgrep-to-assist-vulnerability-research-part-1-of-6/
CURLcode Curl_ntlm_core_mk_nt_hash(struct Curl_easy *data,
const char *password,
unsigned char *ntbuffer /* 21 bytes */)
{
size_t len = strlen(password);
// ruleid: raptor-integer-wraparound
unsigned char *pw = len ? malloc(len * 2) : strdup("");
CURLcode result;
if (!pw)
return CURLE_OUT_OF_MEMORY;
}
// https://cc-sw.com/using-codeql-and-semgrep-to-assist-vulnerability-research-part-1-of-6/
static int
defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *attId, XML_Bool isCdata,
XML_Bool isId, const XML_Char *value, XML_Parser parser)
{
DEFAULT_ATTRIBUTE *temp;
int count = type->allocDefaultAtts * 2;
// ruleid: raptor-integer-wraparound
temp = (DEFAULT_ATTRIBUTE *)realloc(type->defaultAtts,
(count * sizeof(DEFAULT_ATTRIBUTE)));
if (temp == NULL)
return 0;
type->allocDefaultAtts = count;
type->defaultAtts = temp;
}
// https://cc-sw.com/using-codeql-and-semgrep-to-assist-vulnerability-research-part-1-of-6/
static enum XML_Error
doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end,
int tok, const char *next, const char **nextPtr, XML_Bool haveMore,
XML_Bool allowClosingDoctype, enum XML_Account account)
{
case XML_ROLE_GROUP_OPEN:
if (parser->m_prologState.level >= parser->m_groupSize)
{
if (parser->m_groupSize)
{
// ruleid: raptor-integer-wraparound
char *const new_connector = (char *)realloc(
parser->m_groupConnector, parser->m_groupSize *= 2);
}
}
// ...
return XML_ERROR_NONE;
}
// https://cc-sw.com/using-codeql-and-semgrep-to-assist-vulnerability-research-part-1-of-6/
int test_propagation()
{
lVar2 = sVar1 * 2;
// ruleid: raptor-integer-wraparound
data = (void *)(*(code *)malloc)(lVar2);
// ...
return 0;
}
// https://cc-sw.com/using-codeql-and-semgrep-to-assist-vulnerability-research-part-1-of-6/
int more_operands()
{
// ruleid: raptor-integer-wraparound
__s = (char *)(*(code *)malloc)(sVar7 * 3 + 1);
// ...
return 0;
}
// https://cc-sw.com/using-codeql-and-semgrep-to-assist-vulnerability-research-part-1-of-6/
int printbuf_memappend(printbuf *p, char *buf, int size)
{
if (p->size <= iVar2)
{
iVar3 = p->size * 2; // Integer overflow
if (iVar3 <= iVar2 + 8)
{
iVar3 = iVar2 + 9;
}
// ruleid: raptor-integer-wraparound
__ptr = (char *)realloc(__ptr, (long)iVar3); // Alloc call
}
}
#include <windows.h>
#include <iostream>
int windows_example()
{
int nresp = 1073741824; // 2^30, close to INT_MAX
size_t size = nresp * sizeof(char *); // Overflow occurs here!
// If sizeof(char*) == 4, then nresp * 4 = 4,294,967,296
// But this exceeds UINT32_MAX (4,294,967,295), so it wraps to 0
if (size == 0)
{
std::cerr << "Integer overflow detected! Size is 0." << std::endl;
return 1;
}
// ruleid: raptor-integer-wraparound
LPVOID ptr = VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
if (ptr == NULL)
{
std::cerr << "VirtualAlloc failed. Size may be invalid due to overflow." << std::endl;
return 1;
}
std::cout << "Memory allocated successfully at: " << ptr << std::endl;
VirtualFree(ptr, 0, MEM_RELEASE);
return 0;
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,214 @@
rules:
- id: raptor-integer-wraparound
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Memory Issues
likelihood: MEDIUM
impact: HIGH
confidence: MEDIUM
technology:
- c
- cpp
cwe:
- "CWE-190: Integer Overflow or Wraparound"
- "CWE-128: Wrap-around Error"
- "CWE-131: Incorrect Calculation of Buffer Size"
owasp:
- A10:2025 - Mishandling of Exceptional Conditions
references:
- https://www.sei.cmu.edu/downloads/sei-cert-c-coding-standard-2016-v01.pdf
- http://www.phrack.org/issues/60/10.html#article
- https://docs.microsoft.com/en-us/cpp/sanitizers/asan-error-examples
- https://dustri.org/b/playing-with-weggli.html
message: >-
The software performs a calculation that can produce an integer
overflow or wraparound, when the logic assumes that the resulting
value will always be larger than the original value. This can
introduce other weaknesses when the calculation is used for resource
management or execution control.
severity: WARNING
languages:
- c
- cpp
# NOTE: only multiplication and sum with two operands are covered; other arithmetic operations should also be considered (e.g., left shift, even subtraction), as well as any operation with more than two operands.
# NOTE: some allocation functions such as `kmalloc`, `HeapAlloc`, and custom wrappers are not covered.
# NOTE: there might exist other buggy input validation patterns not covered here, including the same patterns with a different order of operands.
# NOTE: consider excluding `strlen` patterns to avoid false positives (at the cost of some false negatives).
# NOTE: we should do some tests with the deep expression operator, refer also to `cpp.lang.security.memory.integer-overflow-allocation.integer-overflow-allocation`.
# NOTE: a dedicated rule for C++ operators such as `new` should be implemented.
pattern-either:
# malloc, valloc (multiplication)
- patterns:
- pattern-either:
- pattern: $FUN($_ * $_)
- pattern: $FUN($_ *= $_)
- metavariable-pattern:
metavariable: $FUN
pattern-either:
- pattern: malloc
- pattern: valloc
- patterns:
- pattern: $FUN($N)
- pattern-either:
- pattern-inside: |
$N = $_ * $_;
...
- pattern-inside: |
$N *= $_;
...
- metavariable-pattern:
metavariable: $FUN
pattern-either:
- pattern: malloc
- pattern: valloc
# malloc, valloc (sum)
- patterns:
- pattern-either:
- pattern: $FUN($_ + $_)
- pattern: $FUN($_ += $_)
- metavariable-pattern:
metavariable: $FUN
pattern-either:
- pattern: malloc
- pattern: valloc
- patterns:
- pattern: $FUN($N)
- pattern-either:
- pattern-inside: |
$N = $_ + $_;
...
- pattern-inside: |
$N += $_;
...
- metavariable-pattern:
metavariable: $FUN
pattern-either:
- pattern: malloc
- pattern: valloc
# calloc, realloc, reallocf, aligned_alloc, VirtualAlloc (multiplication)
- patterns:
- pattern-either:
- pattern: $FUN($_, $_ * $_, ...)
- pattern: $FUN($_, $_ *= $_, ...)
- metavariable-pattern:
metavariable: $FUN
pattern-either:
- pattern: calloc
- pattern: realloc
- pattern: reallocf
- pattern: aligned_alloc
- pattern: VirtualAlloc
- patterns:
- pattern: $FUN($_, $N, ...)
- pattern-either:
- pattern-inside: |
$N = $_ * $_;
...
- pattern-inside: |
$N *= $_;
...
- metavariable-pattern:
metavariable: $FUN
pattern-either:
- pattern: calloc
- pattern: realloc
- pattern: reallocf
- pattern: aligned_alloc
- pattern: VirtualAlloc
# calloc, realloc, reallocf, aligned_alloc, VirtualAlloc (sum)
- patterns:
- pattern-either:
- pattern: $FUN($_, $_ + $_, ...)
- pattern: $FUN($_, $_ += $_, ...)
- metavariable-pattern:
metavariable: $FUN
pattern-either:
- pattern: calloc
- pattern: realloc
- pattern: reallocf
- pattern: aligned_alloc
- pattern: VirtualAlloc
- patterns:
- pattern: $FUN($_, $N, ...)
- pattern-either:
- pattern-inside: |
$N = $_ + $_;
...
- pattern-inside: |
$N += $_;
...
- metavariable-pattern:
metavariable: $FUN
pattern-either:
- pattern: calloc
- pattern: realloc
- pattern: reallocf
- pattern: aligned_alloc
- pattern: VirtualAlloc
# calloc (multiplication in 1st arg)
- patterns:
- pattern-either:
- pattern: $FUN($_ * $_, $_)
- pattern: $FUN($_ *= $_, $_)
- metavariable-pattern:
metavariable: $FUN
pattern-either:
- pattern: calloc
- patterns:
- pattern: $FUN($N, $_)
- pattern-either:
- pattern-inside: |
$N = $_ * $_;
...
- pattern-inside: |
$N *= $_;
...
- metavariable-pattern:
metavariable: $FUN
pattern-either:
- pattern: calloc
# calloc (sum in 1st arg)
- patterns:
- pattern-either:
- pattern: $FUN($_ + $_, $_)
- pattern: $FUN($_ += $_, $_)
- metavariable-pattern:
metavariable: $FUN
pattern-either:
- pattern: calloc
- patterns:
- pattern: $FUN($N, $_)
- pattern-either:
- pattern-inside: |
$N = $_ + $_;
...
- pattern-inside: |
$N += $_;
...
- metavariable-pattern:
metavariable: $FUN
pattern-either:
- pattern: calloc
# buggy input validation (sum)
# consider integer promotion (i.e., uint16_t are not vulnerable on 32-bit systems)
- pattern: $X > $MAX || ($X + $_) > $MAX
- pattern: $X >= $MAX || ($X + $_) > $MAX
- pattern: $X > $MAX || ($X + $_) >= $MAX
- pattern: $X >= $MAX || ($X + $_) >= $MAX
- pattern: $X < $MAX && ($X + $_) < $MAX
- pattern: $X <= $MAX && ($X + $_) < $MAX
- pattern: $X < $MAX && ($X + $_) <= $MAX
- pattern: $X <= $MAX && ($X + $_) <= $MAX
# buggy input validation (multiplication)
# consider integer promotion (i.e., uint16_t are not vulnerable on 32-bit systems)
- pattern: $X > $MAX || ($X * $_) > $MAX
- pattern: $X >= $MAX || ($X * $_) > $MAX
- pattern: $X > $MAX || ($X * $_) >= $MAX
- pattern: $X >= $MAX || ($X * $_) >= $MAX
- pattern: $X < $MAX && ($X * $_) < $MAX
- pattern: $X <= $MAX && ($X * $_) < $MAX
- pattern: $X < $MAX && ($X * $_) <= $MAX
- pattern: $X <= $MAX && ($X * $_) <= $MAX
@@ -0,0 +1,340 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#define BUFSIZE 256
void drop_priv_perm()
{
// ruleid: raptor-interesting-api-calls
setuid(getuid());
}
void drop_priv_temp()
{
// ruleid: raptor-interesting-api-calls
seteuid(getuid());
}
void copy_append_string(char *string1, char *string2)
{
char buf[BUFSIZE];
// ruleid: raptor-interesting-api-calls
strcpy(buf, string1);
// ruleid: raptor-interesting-api-calls
strcat(buf, string2);
}
void copy_string(char *string)
{
char buf[BUFSIZE];
// ruleid: raptor-interesting-api-calls
stpcpy(buf, string);
}
void copy_string1(char *string)
{
char buf[BUFSIZE];
// ruleid: raptor-interesting-api-calls
strncpy(buf, string, BUFSIZE);
}
void copy_string2(char *string)
{
char buf[BUFSIZE];
// ruleid: raptor-interesting-api-calls
stpncpy(buf, string, BUFSIZE);
}
void get_string()
{
char buf[BUFSIZE];
// ruleid: raptor-interesting-api-calls
gets(buf);
}
void memory_copy()
{
// ...
// ruleid: raptor-interesting-api-calls
memcpy(&(((char *)p_buf)[serialization_buffer_offset]),
serialized_context_buffer,
serialized_context_size);
// ...
// ruleid: raptor-interesting-api-calls
memcpy(&(((char *)p_buf)[serialization_buffer_offset]),
serialized_profiles_context_buffer,
cfl_sds_len(serialized_profiles_context_buffer));
// ...
// ruleid: raptor-interesting-api-calls
memcpy((void *)str->wrapped.buf, src, 3 * length + 1);
// ...
if (net_setup == NULL)
{
flb_net_setup_init(&stream->net);
}
else
{
// ok: raptor-interesting-api-calls
memcpy(&stream->net, net_setup, sizeof(struct flb_net_setup));
}
// ...
crc = __bswap_32(crc32(0, (const Bytef *)data, len));
// ok: raptor-interesting-api-calls
memcpy((char *)c->block_data + outlen, &crc, 4);
c->used_size = outlen + 4;
// ...
// ok: raptor-interesting-api-calls
memcpy(&load_command, pcmd, sizeof load_command);
// ...
// chose not to use pattern-not: $FUN($_, $_, <... sizeof(...) ...>, ...)
// ruleid: raptor-interesting-api-calls
memcpy(temp, sysconfig->sortlist,
sizeof(*channel->sortlist) * sysconfig->nsortlist);
}
// https://cc-sw.com/semgrep-guide-for-a-security-engineer-part-6-of-6/
static int service_attr_req(sdp_req_t *req, sdp_buf_t *buf)
{
sdp_cont_state_t *cstate = NULL;
// ...
if (cstate)
{
sdp_buf_t *pCache = sdp_get_cached_rsp(cstate);
SDPDBG("Obtained cached rsp : %p", pCache);
if (pCache)
{
short sent = MIN(max_rsp_size, pCache->data_size - cstate->cStateValue.maxBytesSent);
pResponse = pCache->data;
// ruleid: raptor-interesting-api-calls
memcpy(buf->data, pResponse + cstate->cStateValue.maxBytesSent, sent); // Out-of-bound read here
buf->data_size += sent;
cstate->cStateValue.maxBytesSent += sent;
// ...
}
// ...
}
}
static int call_clone3(uint64_t flags, size_t size, enum test_mode test_mode)
{
struct __clone_args args = {
.flags = flags,
.exit_signal = SIGCHLD,
};
struct clone_args_extended
{
struct __clone_args args;
__aligned_u64 excess_space[2];
} args_ext;
pid_t pid = -1;
int status;
memset(&args_ext, 0, sizeof(args_ext));
if (size > sizeof(struct __clone_args))
args_ext.excess_space[1] = 1;
if (size == 0)
size = sizeof(struct __clone_args);
switch (test_mode)
{
case CLONE3_ARGS_NO_TEST:
/*
* Uses default 'flags' and 'SIGCHLD'
* assignment.
*/
break;
case CLONE3_ARGS_ALL_0:
args.flags = 0;
args.exit_signal = 0;
break;
case CLONE3_ARGS_INVAL_EXIT_SIGNAL_BIG:
args.exit_signal = 0xbadc0ded00000000ULL;
break;
case CLONE3_ARGS_INVAL_EXIT_SIGNAL_NEG:
args.exit_signal = 0x0000000080000000ULL;
break;
case CLONE3_ARGS_INVAL_EXIT_SIGNAL_CSIG:
args.exit_signal = 0x0000000000000100ULL;
break;
case CLONE3_ARGS_INVAL_EXIT_SIGNAL_NSIG:
args.exit_signal = 0x00000000000000f0ULL;
break;
}
memcpy(&args_ext.args, &args, sizeof(struct __clone_args));
// currently commented-out in the rule to avoid too much noise
// todoruleid: raptor-interesting-api-calls
pid = sys_clone3((struct __clone_args *)&args_ext, size);
if (pid < 0)
{
ksft_print_msg("%s - Failed to create new process\n",
strerror(errno));
return -errno;
}
if (pid == 0)
{
ksft_print_msg("I am the child, my PID is %d\n", getpid());
_exit(EXIT_SUCCESS);
}
ksft_print_msg("I am the parent (%d). My child's pid is %d\n",
getpid(), pid);
if (waitpid(-1, &status, __WALL) < 0)
{
ksft_print_msg("Child returned %s\n", strerror(errno));
return -errno;
}
if (WEXITSTATUS(status))
return WEXITSTATUS(status);
return 0;
}
static pid_t sys_clone3(struct clone_args *args)
{
// ruleid: raptor-interesting-api-calls
return syscall(__NR_clone3, args, sizeof(struct clone_args));
}
int test_exec(void)
{
// ok: raptor-interesting-api-calls
void *system_wide = system_path(ETC_GITATTRIBUTES);
printf("Main program started\n");
char *argv[] = {"jim", "jams", NULL};
char *envp[] = {"some", "environment", NULL};
// ruleid: raptor-interesting-api-calls
if (execve("./sub", argv, envp) == -1)
perror("Could not execve");
// ruleid: raptor-interesting-api-calls
execlp(path, "emacsclient", "-e", man_page.buf, (char *)NULL);
// ruleid: raptor-interesting-api-calls
execl(SHELL_PATH, SHELL_PATH, "-c", shell_cmd.buf, (char *)NULL);
// ruleid: raptor-interesting-api-calls
execv(user_argv[0], (char *const *)user_argv);
// ruleid: raptor-interesting-api-calls
return system("echo 3 | sudo tee /proc/sys/vm/drop_caches");
return 1;
}
void test_spawn(int argc, char *argv[])
{
pid_t child;
int fd_count, fd_map[10];
struct inheritance inherit;
const char *c_argv[10], *c_envp[10];
char buf[256];
int nbytes;
int c_stdin[2], c_stdout[2], c_stderr[2]; /* Pipes for child
* communication */
/* Create pipes to communicate with child via stdin/stdout/stderr */
// ruleid: raptor-interesting-api-calls
if (pipe(c_stdin) || pipe(c_stdout) || pipe(c_stderr))
{
perror("Bad pipe");
exit(-1);
}
/* Set up file descriptor map for child process */
fd_map[0] = dup(c_stdin[0]); /* child stdin is read end of pipe */
fd_map[1] = dup(c_stdout[1]); /* child stdout is write end of pipe */
fd_map[2] = dup(c_stderr[1]); /* child stderr is write end of pipe */
fd_count = 3;
/* Close unused end of pipes for the parent */
close(c_stdin[0]);
close(c_stdout[1]);
close(c_stderr[1]);
/* Build the argument structure for child arguments.
* [0] is the program name */
c_argv[0] = "spawnc";
c_argv[1] = "arg1";
c_argv[2] = "arg2";
c_argv[3] = NULL;
/* Build the environment structure which defines the child's
* environment variables */
c_envp[0] = "TEST_ENV=YES";
c_envp[1] = "BPX_SHAREAS=NO";
c_envp[2] = NULL;
/* Spawn the child process */
// ruleid: raptor-interesting-api-calls
child = spawnp("spawnc", fd_count, fd_map, &inherit, c_argv, c_envp);
// ruleid: raptor-interesting-api-calls
child = spawn("/usr/bin/spawnc", fd_count, fd_map, &inherit, c_argv, c_envp);
if (child == -1)
{
perror("Error on spawn");
exit(-1);
}
else
printf("Spawned %i\n", child);
/* Test interaction with the child process */
printf("parent: Asking child, \"what are you doing?\\n\"\n");
// ruleid: raptor-interesting-api-calls
strcpy(buf, "child from parent: what are you doing?\n");
if (write(c_stdin[1], buf, sizeof(buf)) == -1)
{
perror("write stdout");
exit(-1);
}
memset(buf, 0, 255); /* Just zeroing out the buffer */
printf("parent: reading from child now\n");
// ruleid: raptor-interesting-api-calls
if ((nbytes = read(c_stdout[0], buf, 255)) == -1)
{
perror("read error:");
exit(-1);
}
printf("parent: child says, \"%s\"\n", buf);
/* Cleanup pipes before exiting */
close(c_stdin[1]);
close(c_stdout[0]);
close(c_stderr[0]);
exit(0);
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,263 @@
rules:
- id: raptor-interesting-api-calls
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- audit
vulnerability_class: Dangerous Method or Function
likelihood: MEDIUM
impact: MEDIUM
confidence: MEDIUM
technology:
- c
- cpp
cwe:
- "CWE-676: Use of Potentially Dangerous Function"
owasp:
- A08:2025 - Software or Data Integrity Failures
references:
- https://github.com/0xdea/rhabdomancer
- https://github.com/0xdea/ghidra-scripts/blob/main/Rhabdomancer.java
- https://github.com/x509cert/banned/blob/master/banned.h
- https://g.co/kgs/PCHQjJ
- https://www.sei.cmu.edu/downloads/sei-cert-c-coding-standard-2016-v01.pdf
- https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/28719-banned-api-usage-use-updated-function-replacement
- https://docs.oracle.com/cd/E37838_01/html/E61050/gnclc.html
message: >-
Locate all calls to interesting and potentially insecure API
functions (candidate points). The auditor can backtrace from these
candidate points to find pathways allowing access from untrusted
input.
severity: WARNING
languages:
- c
- cpp
# NOTE: `goto`, `try/catch`, `sem/mutex`, `new/delete`, and `static_cast/reinterpret_cast` are not covered.
# NOTE: not all Microsoft-specific obsolete functions are covered.
# NOTE: consider excluding some matches for `strncpy`, `snprintf`, and similar functions where the length parameter is known at compile time (see `memcpy` below for an example). See also another possible approach described at https://cc-sw.com/semgrep-guide-for-a-security-engineer-part-6-of-6/. Beware of possible false negatives, though.
# NOTE: consider checking for format string specifiers that match the `(".*%l?s.*"|".*%S.*"|[a-zA-Z_][a-zA-Z0-9_]*)` regex.
# NOTE: consider extracting some patterns into separate rules to focus on the most interesting API calls (copy operations, exec functions, etc.).
# NOTE: nonlocking stdio functions (https://linux.die.net/man/3/fgets_unlocked) are not covered.
# NOTE: refer also to https://semgrep.dev/r?lang=C
pattern-either:
# priv
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*set\w*(u|g)id\s*$|^\w*(init|set)groups\s*$|^\w*Impersonate\w*\s*$'
# strcpy
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*str\w?(cpy|add)(_s)?(_l)?\s*$|^\w*stpn?cpy(_s)?(_l)?\s*$|^\w*(wc|mb|ftc|tc)s\w?cpy(_s)?(_l)?\s*$|^\w*wcpn?cpy(_s)?(_l)?\s*$'
# strcat
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*str\w?cat(_s)?(_l)?\s*$|^\w*(wc|mb|ftc|tc)s\w?cat(_s)?(_l)?\s*$'
# strtok
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*strtok(_r)?(_s)?(_l)?\s*$|^\w*(wc|mb)stok(_r)?(_s)?(_l)?\s*$|^\w*str(find|rspn|trns)\s*$'
# more string parsing (too noisy?)
# - patterns:
# - pattern: $FUN(...)
# - metavariable-regex:
# metavariable: $FUN
# regex: '(?i)^\w*strr?chr\s*$|^\w*memchr\s*$|^\w*str(str|sep)\s*$|^\w*strc?spn\s*$|^\w*(str|wcs)pbrk\s*$'
# strlen (too noisy)
# - patterns:
# - pattern: $FUN(...)
# - metavariable-regex:
# metavariable: $FUN
# regex: '(?i)^\w*(str|wcs|mbs)n?len\s*$'
# printf
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*s\w*printf(_s)?(_l)?\w*\s*$'
# more printf (should be covered by the format-string-bugs rule)
# - patterns:
# - pattern: $FUN(...)
# - metavariable-regex:
# metavariable: $FUN
# regex: '(?i)^\w*printf\w*\s*$|^\w*err\w*\s*$|^\w*warn\w*\s*$|^\w*syslog\w*\s*$'
# scanf
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*scanf(_s)?(_l)?\s*$'
# get
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*get(s|ws(_l)?|ts|tws|c|char|pw|pass|wd|cwd|login(_r)?|groups|hostname|domainname|opt|opt_long)\s*$|^\w*cuserid\s*$'
# environment
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*(get|set|put|unset)env\s*$|^\w*g_get_(home|tmp)_dir\s*$'
# memcpy
- patterns:
- pattern: $FUN($_, $_, $LEN, ...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*mem(c|p)?cpy(_s)?\s*$|^\w*memmove(_s)?\s*$|^\w*bcopy\s*$|^\w*CopyMemory\s*$'
# exclude length known at compile time (sizeof macro) - imperfect match with `memccpy`, but that's acceptable
- pattern-not: $FUN($_, $_, sizeof(...), ...)
# - pattern-not: $FUN($_, $_, <... sizeof(...) ...>, ...)
# exclude length known at compile time (numeric literal)
- metavariable-regex:
metavariable: $LEN
regex: '^(?!\s*(?:0[xX][0-9A-Fa-f]+|0[bB][01]+|0[0-7]*|[1-9][0-9]*)[uUlL]*\s*$).+'
# memset (too noisy, mostly irrelevant unless you use it to erase sensitive data)
# - patterns:
# - pattern: $FUN(...)
# - metavariable-regex:
# metavariable: $FUN
# regex: '(?i)^\w*memset(_explicit)?\s*$|^\w*(explicit_)?bzero\s*$'
# alloc
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*alloc(a|f)?\s*$|^\w*alloc_?array\s*$'
# free (too noisy)
# - patterns:
# - pattern: $FUN(...)
# - metavariable-regex:
# metavariable: $FUN
# regex: '(?i)^\w*free\s*$'
# exec
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*exec(l|v)?(p|e)?e?\s*$|^\w*system\s*$|^\w*spawn\w?\s*$|^\w*wordexp\s*$|^\w*WinExec\s*$|^\w*ShellExecute(A|ExA|W|ExW)?\s*$|^\w*CreateProcess(A|AsUserA|W|AsUserW|WithLogonW|WithTokenW)?\s*$'
# i/o
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*open(at)?(64)?\s*$|^\w*pipe\s*$|^\w*read\s*$|^\w*recv(from)?\s*$|^\w*copylist\s*$|^\w*dbminit\s*$|^\w*LoadLibrary(A|ExA|W|ExW)?\s*$'
# more i/o (too noisy)
# - patterns:
# - pattern: $FUN(...)
# - metavariable-regex:
# metavariable: $FUN
# regex: '(?i)^\w*connect\s*$|^\w*write\s*$|^\w*hton(l|s)\s*$|^\w*ntoh(l|s)\s*$|^\w*dup2?\s*$'
# proc
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*fork\s*$'
# more proc (too noisy)
# - patterns:
# - pattern: $FUN(...)
# - metavariable-regex:
# metavariable: $FUN
# regex: '(?i)^\w*clone3?\s*$'
# rand
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*rand(_r|48)?\s*$'
# tmp
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*mk\w?temp(64)?\s*$|^\w*te?mpnam(_r)?\s*$|^\w*tmpfile\s*$|^\w*GetTempFileName(A|W)?\s*$'
# file
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*(mk|ch)(dir|nod)(at)?\s*$|^\w*creat\s*$|^\w*link(at)?\s*$|^\w*rename(at)?\s*$|^\w*access(at|at2|_ok)?\s*$|^\w*stat(at)?\s*$|^\w*ch(own|mod|root)(at)?\s*$|^\w*realpath\s*$|^\w*readlink(at)?\s*$|^\w*(tty|pts)name_r\s*$'
# more file
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*locale\s*$|^\w*(make|split)path\s*$|^\w*fattach\s*$|^\w*ftw\s*$|^\w*truncate\s*$|^\w*u(mask|limit)\s*$|^\w*AddAccessAllowedAce\s*$'
# conf
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*confstr\s*$|^\w*utmpx?name\s*$'
# string conversions
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*mbs(nr|r)?towcs(_l)?\s*$|^\w*wcs(nr|r)?tombs(_l)?\s*$|^\w*OemToCharW\s*$|^\w*MultiByteToWideChar\s*$'
# character conversions (mostly irrelevant)
# - patterns:
# - pattern: $FUN(...)
# - metavariable-regex:
# metavariable: $FUN
# regex: '(?i)^\w*mbr?towc(_l)?\s*$|^\w*wcr?tomb(_l)?\s*$'
# inet
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*inet_(ntop|pton)\s*$'
# signals (too noisy)
# - patterns:
# - pattern: $FUN(...)
# - metavariable-regex:
# metavariable: $FUN
# regex: '(?i)^\w*kill\s*$|^\w*signal\s*$|^\w*sigaction\s*$|^\w*(set|long)jmp\s*$'
# time
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*cftime\s*$'
# syscall
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*syscall\s*$'
# kernel
- patterns:
- pattern: $FUN(...)
- metavariable-regex:
metavariable: $FUN
regex: '(?i)^\w*copy_(from|to)_user\s*$|^\w*(get|put)_user\s*$|^\w*copy(in|out)\s*$|^\w*cdev_init\s*$'
# more kernel (too noisy)
# - patterns:
# - pattern: $FUN(...)
# - metavariable-regex:
# metavariable: $FUN
# regex: '(?i)^\w*ioctl\w*\s*$|^\w*m(re|un)?map\s*$'
# more kernel (too noisy)
# - patterns:
# - pattern: $FUN(...)
# - metavariable-regex:
# metavariable: $FUN
# regex: '(?i)^\w*cpu_to_(b|l)e(16|32|64)(p|s)?\s*$|^\w*(b|l)e(16|32|64)(p|s)?_to_cpu\s*$|^\w*xb_get_(32|64|bytes|word_array|bitmap)\s*$'
# assert (should be covered by suspicious-assert rule)
# - patterns:
# - pattern: $FUN(...)
# - metavariable-regex:
# metavariable: $FUN
# regex: '(?i)^\w*assert\w*\s*$'
# switch (too noisy)
# - pattern: |
# switch ($VAR) { }
@@ -0,0 +1,51 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#define BUFSIZE 256
#define FMT "whatever"
void print_address(char *string)
{
char buf[BUFSIZE];
char fmt[] = "whatever";
// ruleid: raptor-memory-address-exposure
printf("address: %p\n", buf);
// ruleid: raptor-memory-address-exposure
sprintf(buf, "address: %x\n", string);
// ok: raptor-memory-address-exposure
sprintf(buf, FMT, string);
// ok: raptor-memory-address-exposure
sprintf(buf, fmt, string);
// ok: raptor-memory-address-exposure
sprintf(buf, string);
}
char *genUniqueVal(Node *n)
{
char *buf = (char *)malloc(32);
if (!buf)
return NULL;
memset(buf, 0x0, 32);
uint32_t uval = &buf;
if (uval == 0)
{
uval = drand();
}
// ruleid: raptor-memory-address-exposure
snprintf(buf, 32, "%x", uval);
return buf;
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,77 @@
rules:
- id: raptor-memory-address-exposure
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- audit
vulnerability_class: Mishandled Sensitive Information
likelihood: LOW
impact: MEDIUM
confidence: LOW
technology:
- c
- cpp
cwe:
- "CWE-209: Generation of Error Message Containing Sensitive Information"
- "CWE-497: Exposure of Sensitive System Information to an Unauthorized Control Sphere"
owasp:
- A04:2025 - Cryptographic Failures
references:
- https://github.com/struct/mms
message: >-
The software generates an error message that includes sensitive
information about its environment, users, or associated data.
In particular, exposure of memory addresses might defeat ASLR.
severity: INFO
languages:
- c
- cpp
# NOTE: `#define` format specifiers are not considered due to Semgrep limitations, perhaps we could implement this with symbolic propagation (Semgrep Pro experimental feature)?
patterns:
- pattern-either:
# format string in 1st arg
- pattern: printf($FMT, ...)
- pattern: vprintf($FMT, ...)
- pattern: wprintf($FMT, ...)
- pattern: vwprintf($FMT, ...)
- pattern: vcprintf($FMT, ...)
- pattern: vcwprintf($FMT, ...)
- pattern: vscprintf($FMT, ...)
- pattern: vscwprintf($FMT, ...)
- pattern: printk($FMT, ...)
- pattern: warn($FMT, ...)
- pattern: vwarn($FMT, ...)
- pattern: warnx($FMT, ...)
- pattern: vwarnx($FMT, ...)
# format string in 2nd arg
- pattern: fprintf($_, $FMT, ...)
- pattern: vfprintf($_, $FMT, ...)
- pattern: fwprintf($_, $FMT, ...)
- pattern: vfwprintf($_, $FMT, ...)
- pattern: sprintf($_, $FMT, ...)
- pattern: vsprintf($_, $FMT, ...)
- pattern: asprintf($_, $FMT, ...)
- pattern: vasprintf($_, $FMT, ...)
- pattern: dprintf($_, $FMT, ...)
- pattern: vdprintf($_, $FMT, ...)
- pattern: wsprintf($_, $FMT, ...)
- pattern: syslog($_, $FMT, ...)
- pattern: vsyslog($_, $FMT, ...)
- pattern: err($_, $FMT, ...)
- pattern: verr($_, $FMT, ...)
- pattern: errx($_, $FMT, ...)
- pattern: verrx($_, $FMT, ...)
- pattern: warnc($_, $FMT, ...)
- pattern: vwarnc($_, $FMT, ...)
# format string in 3rd arg
- pattern: snprintf($_, $_, $FMT, ...)
- pattern: vsnprintf($_, $_, $FMT, ...)
- pattern: swprintf($_, $_, $FMT, ...)
- pattern: vswprintf($_, $_, $FMT, ...)
- pattern: errc($_, $_, $FMT, ...)
- pattern: verrc($_, $_, $FMT, ...)
- metavariable-regex:
metavariable: $FMT
# NOTE: some format string specifiers are not handled
regex: '(".*%\w*x.*"|".*%\w*X.*"|".*%\w*p.*")'
@@ -0,0 +1,81 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <stdlib.h>
void bad1()
{
BarObj *ptr = new BarObj()
// ruleid: raptor-mismatched-memory-management-cpp
free(ptr);
}
void good1()
{
BarObj *ptr = new BarObj()
// ok: raptor-mismatched-memory-management-cpp
delete ptr;
}
class A
{
void bad2();
void good2();
};
void A::bad2()
{
int *ptr;
ptr = (int *)malloc(sizeof(int));
// ruleid: raptor-mismatched-memory-management-cpp
delete ptr;
}
void A::good2()
{
int *ptr;
ptr = (int *)malloc(sizeof(int));
// ok: raptor-mismatched-memory-management-cpp
free(ptr);
}
class B
{
void bad3(bool);
void good3();
};
void B::bad3(bool heap)
{
int localArray[2] = {11, 22};
int *p = localArray;
if (heap)
{
p = new int[2];
}
// ruleid: raptor-mismatched-memory-management-cpp
delete[] p;
}
void B::good3()
{
int localArray[2] = {11, 22};
int *p = localArray;
p = new (std::nothrow) int[2];
// ok: raptor-mismatched-memory-management-cpp
delete[] p;
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,67 @@
rules:
- id: raptor-mismatched-memory-management-cpp
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Memory Issues
likelihood: LOW
impact: MEDIUM
confidence: LOW
technology:
- cpp
cwe:
- "CWE-762: Mismatched Memory Management Routines"
owasp:
- A06:2025 - Insecure Design
references:
- https://github.com/struct/mms
- https://docs.microsoft.com/en-us/cpp/sanitizers/asan-error-examples
message: >-
The software attempts to return a memory resource to the system, but
it calls a release function that is not compatible with the function
that was originally used to allocate that resource.
Due to inherent limitations of Semgrep, this rule might generate many
false positives and should therefore be customized for your codebase.
severity: INFO
languages:
- cpp
# NOTE: `valloc`, `reallocf`, `aligned_alloc`, and custom wrappers are not covered.
# NOTE: overloaded operators, `VirtualAlloc/VirtualFree`, and `mmap/munmap` are not covered.
pattern-either:
# free
- patterns:
- pattern: free($PTR)
- pattern-not-inside: |
$PTR = malloc(...);
...
- pattern-not-inside: |
$PTR = calloc(...);
...
- pattern-not-inside: |
$PTR = realloc(...);
...
- pattern-not-inside: |
$PTR = strdup(...);
...
- pattern-not-inside: |
$PTR = strndup(...);
...
# delete[]
- patterns:
- pattern: delete[]($PTR)
- pattern-not-inside: |
$PTR = new $_[$_];
...
# delete
- patterns:
- pattern: delete($PTR)
- pattern-not-inside: |
$PTR = new $_;
...
- patterns:
- pattern: delete($PTR)
- pattern-inside: |
$PTR = new $_[$_];
...
@@ -0,0 +1,28 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <stdlib.h>
void bad1()
{
int localArray[2] = {11, 22};
int *p = localArray;
// ruleid: raptor-mismatched-memory-management
free(p);
}
void good1()
{
int *ptr;
ptr = (int *)malloc(sizeof(int));
// ok: raptor-mismatched-memory-management
free(ptr);
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,51 @@
rules:
- id: raptor-mismatched-memory-management
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- vuln
vulnerability_class: Memory Issues
likelihood: LOW
impact: MEDIUM
confidence: LOW
technology:
- c
- cpp
cwe:
- "CWE-762: Mismatched Memory Management Routines"
owasp:
- A06:2025 - Insecure Design
references:
- https://github.com/struct/mms
message: >-
The software attempts to return a memory resource to the system, but
it calls a release function that is not compatible with the function
that was originally used to allocate that resource.
Due to inherent limitations of Semgrep, this rule might generate many
false positives and should therefore be customized for your codebase.
severity: INFO
languages:
- c
- cpp
# NOTE: `valloc`, `reallocf`, `aligned_alloc`, and custom wrappers are not covered.
# NOTE: `VirtualAlloc/VirtualFree` and `mmap/munmap` are not covered.
pattern-either:
# free
- patterns:
- pattern: free($PTR)
- pattern-not-inside: |
$PTR = malloc(...);
...
- pattern-not-inside: |
$PTR = calloc(...);
...
- pattern-not-inside: |
$PTR = realloc(...);
...
- pattern-not-inside: |
$PTR = strdup(...);
...
- pattern-not-inside: |
$PTR = strndup(...);
...
@@ -0,0 +1,141 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#define FAIL 0
#define PASS 1
void bad1(char *data)
{
int result = security_check(data);
// ruleid: raptor-missing-break-in-switch
switch (result)
{
case FAIL:
printf("Security check failed!\n");
case PASS:
printf("Security check passed.\n");
break;
default:
printf("Unknown error (%d), exiting...\n", result);
exit(1);
}
}
void good1(char *data)
{
int result = security_check(data);
// ok: raptor-missing-break-in-switch
switch (result)
{
case FAIL:
printf("Security check failed!\n");
exit(1);
case PASS:
printf("Security check passed.\n");
break;
default:
printf("Unknown error (%d), exiting...\n", result);
exit(1);
}
}
struct object *init_object(int type)
{
struct object *obj;
if (!(obj = (struct object *)malloc(sizeof(struct object))))
return NULL;
obj->type = type;
// ruleid: raptor-missing-break-in-switch
switch (type)
{
case OBJ_STR:
obj->un.str = alloc_string();
case OBJ_INT:
obj->un.num = alloc_int();
break;
case OBJ_BOOL:
obj->un.bool = alloc_bool();
break;
}
return obj;
}
void printMessage(int month)
{
// ruleid: raptor-missing-break-in-switch
switch (month)
{
case 1:
printf("January");
case 2:
printf("February");
case 3:
printf("March");
case 4:
printf("April");
case 5:
printff("May");
case 6:
printf("June");
case 7:
printf("July");
case 8:
printf("August");
case 9:
printf("September");
case 10:
printf("October");
case 11:
printf("November");
case 12:
printf("December");
}
printf(" is a great month");
}
char *escape_string(char *string)
{
char *output, *dest;
int escape = 0;
// there's also an incorrect use of sizeof() here
if (!(output = dest = (char *)calloc(strlen(string + 1, sizeof(string)))))
die("calloc: %m");
while (*string)
{
// ruleid: raptor-missing-break-in-switch
switch (*cp)
{
case '\\':
if (escape)
{
*dest++ = '\\';
escape = 0;
}
else
escape = 1;
break;
case '\n':
*dest++ = ' ';
default:
*string = *dest++;
}
string++;
}
return output;
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,66 @@
rules:
- id: raptor-missing-break-in-switch
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- audit
vulnerability_class: Other Security
likelihood: LOW
impact: LOW
confidence: LOW
technology:
- c
- cpp
cwe:
- "CWE-484: Omitted Break Statement in Switch"
owasp:
- A08:2025 - Software or Data Integrity Failures
references:
- https://g.co/kgs/PCHQjJ
- https://github.com/struct/mms
- https://github.com/returntocorp/semgrep/issues/4939
message: >-
The software omits a break statement within a switch or similar
construct, causing code associated with multiple conditions to
execute. This can cause problems when the programmer only intended to
execute code associated with one condition.
severity: INFO
languages:
- c
- cpp
# NOTE: we should also check for default blocks that miss the `break/return/exit/goto` or equivalent statement/function call.
patterns:
- pattern: |
switch ($VAR) { case $VAL1: ... case $VAL2: ... }
# break
- pattern-not: |
switch ($VAR) { case $VAL1: ... break; case $VAL2: ... }
- pattern-not: |
switch ($VAR) { case $VAL1: break; case $VAL2: ... }
# exit
- pattern-not: |
switch ($VAR) { case $VAL1: ... exit($_); case $VAL2: ... }
- pattern-not: |
switch ($VAR) { case $VAL1: exit($_); case $VAL2: ... }
# return
- pattern-not: |
switch ($VAR) { case $VAL1: ... return; case $VAL2: ... }
- pattern-not: |
switch ($VAR) { case $VAL1: return; case $VAL2: ... }
- pattern-not: |
switch ($VAR) { case $VAL1: ... return $_; case $VAL2: ... }
- pattern-not: |
switch ($VAR) { case $VAL1: return $_; case $VAL2: ... }
# goto
- pattern-not: |
switch ($VAR) { case $VAL1: ... goto $_; case $VAL2: ... }
- pattern-not: |
switch ($VAR) { case $VAL1: goto $_; case $VAL2: ... }
# throw (C++)
# - pattern-not: |
# switch ($VAR) { case $VAL1: ... throw $_; case $VAL2: ... }
# - pattern-not: |
# switch ($VAR) { case $VAL1: throw $_; case $VAL2: ... }
# improve output readability
- focus-metavariable: $VAR
@@ -0,0 +1,128 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#define FAIL 0
#define PASS 1
void bad1(char *data)
{
int result = security_check(data);
// ruleid: raptor-missing-default-in-switch
switch (result)
{
case FAIL:
printf("Security check failed!\n");
exit(1);
break;
case PASS:
printf("Security check passed.\n");
break;
}
}
void good1(char *data)
{
int result = security_check(data);
// ok: raptor-missing-default-in-switch
switch (result)
{
case FAIL:
printf("Security check failed!\n");
exit(1);
break;
case PASS:
printf("Security check passed.\n");
break;
default:
printf("Unknown error (%d), exiting...\n", result);
exit(1);
}
}
void bad2(Pkt packet)
{
// ruleid: raptor-missing-default-in-switch
switch (packet->id)
{
case 1:
initAuth(packet);
break;
case 2:
initReset(packet);
break;
case 3:
initDisconnect(packet);
break;
}
processPacket(packet);
}
struct object *init_object(int type)
{
struct object *obj;
if (!(obj = (struct object *)malloc(sizeof(struct object))))
return NULL;
obj->type = type;
// ruleid: raptor-missing-default-in-switch
switch (type)
{
case OBJ_STR:
obj->un.str = alloc_string();
break;
case OBJ_INT:
obj->un.num = alloc_int();
break;
case OBJ_BOOL:
obj->un.bool = alloc_bool();
break;
}
return obj;
}
void test()
{
// ruleid: raptor-missing-default-in-switch
switch (foo() + x + y)
{
case 1:
break;
case 2:
break;
}
// ok: raptor-missing-default-in-switch
switch (foo() + x + y)
{
case 1:
break;
default:
break;
case 2:
break;
}
// ok: raptor-missing-default-in-switch
switch (foo() + x + y)
{
case 1:
break;
case 2:
break;
default:
break;
}
}
int main()
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,36 @@
rules:
- id: raptor-missing-default-in-switch
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- audit
vulnerability_class: Other Security
likelihood: LOW
impact: LOW
confidence: LOW
technology:
- c
- cpp
cwe:
- "CWE-478: Missing Default Case in Multiple Condition Expression"
owasp:
- A08:2025 - Software or Data Integrity Failures
references:
- https://g.co/kgs/PCHQjJ
- https://github.com/struct/mms
- https://github.com/returntocorp/semgrep/issues/4939
message: >-
The code does not have a default case in an expression with multiple
conditions, such as a switch statement.
severity: INFO
languages:
- c
- cpp
patterns:
- pattern: |
switch ($VAR) { }
- pattern-not: |
switch ($VAR) { default: ... }
# improve output readability
- focus-metavariable: $VAR
@@ -0,0 +1,28 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
// ok: raptor-missing-return
int bad();
// ok: raptor-missing-return
int baddie(int foo);
// ruleid: raptor-missing-return
int bad1(void)
{
printf("Hello, World!");
}
// ok: raptor-missing-return
void good1(void)
{
printf("Hello, World!");
}
// ok: raptor-missing-return
int main(int argc, char **argv)
{
printf("Hello, World!");
return 0;
}
@@ -0,0 +1,43 @@
rules:
- id: raptor-missing-return
metadata:
author: Marco Ivaldi <raptor@0xdeadbeef.info>
category: security
subcategory:
- audit
vulnerability_class: Other Security
likelihood: LOW
impact: LOW
confidence: LOW
technology:
- c
- cpp
cwe:
- "CWE-393: Return of Wrong Status Code"
- "CWE-394: Unexpected Status Code or Return Value"
owasp:
- A08:2025 - Software or Data Integrity Failures
references:
- https://stackoverflow.com/questions/10858391/why-do-programs-in-c-compile-even-when-the-return-statement-is-missing
message: >-
A non-void function does not have a return statement. Hence, its
return value can be considered undefined.
severity: INFO
languages:
- c
- cpp
# NOTE: C++ class declarations should also be excluded, but apparently this pattern is not supported by Semgrep.
patterns:
- pattern: $_ $FUN(...) { ... }
# exclude function declarations
- pattern-not: $_ $FUN(...);
# exclude functions with return statement
- pattern-not: $_ $FUN(...) { ... return $_; }
# exclude main function
- pattern-not: int main(...) { ... }
# exclude void functions
- pattern-not: void $FUN(...) { ... }
# improve output readability
- focus-metavariable: $FUN
# exclude else if (commented-out for performance reasons)
# - pattern-not: ... if ($COND) { ... }
@@ -0,0 +1,390 @@
// Marco Ivaldi <raptor@0xdeadbeef.info>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#define BUFSIZE 256
void bad1(char *string)
{
char buf[BUFSIZE];
strncpy(buf, string, BUFSIZE);
// ruleid: raptor-off-by-one
buf[BUFSIZE] = '\0';
}
void good1(char *string)
{
char buf[BUFSIZE];
strncpy(buf, string, BUFSIZE);
// ok: raptor-off-by-one
buf[BUFSIZE - 1] = '\0';
}
void bad2(char *string)
{
char firstname[20];
char lastname[20];
char fullname[40];
fullname[0] = '\0';
// ruleid: raptor-off-by-one
strncat(fullname, firstname, 40);
}
void good2(char *string)
{
char firstname[20];
char lastname[20];
char fullname[40];
fullname[0] = '\0';
// ok: raptor-off-by-one
strncat(fullname, firstname, sizeof(fullname) - strlen(fullname) - 1);
}
void bad3(char *string)
{
char filename[BUFSIZE];
// commented-out because of too many false positives: raptor-off-by-one
for (int i = 0; i <= BUFSIZE; i++)
{
char c = getc();
if (c == 'EOF')
{
filename[i] = '\0';
}
filename[i] = getc(stdin);
}
}
void good3(char *string)
{
char filename[BUFSIZE];
// ok: raptor-off-by-one
for (int i = 0; i < BUFSIZE; i++)
{
char c = getc();
if (c == 'EOF')
{
filename[i] = '\0';
}
filename[i] = getc(stdin);
}
}
void test_func()
{
int id_sequence[3];
id_sequence[0] = 123;
id_sequence[1] = 234;
id_sequence[2] = 345;
// ruleid: raptor-off-by-one
id_sequence[3] = 456;
}
void processRawStr(uint8_t *s, size_t sz)
{
uint8_t buf[1024];
memset(buf, 0x0, sizeof(buf));
memcpy(buf, s, sizeof(buf));
// ruleid: raptor-off-by-one
buf[sizeof(buf)] = '\0';
// ...
}
void process_string(char *src)
{
char dest[32];
// commented-out because of too many false positives: raptor-off-by-one
for (i = 0; src[i] && (i <= sizeof(dest)); i++)
dest[i] = src[i];
// ...
return;
}
void get_user(char *user)
{
char buf[1024];
// ruleid: raptor-off-by-one
if (strlen(user) > sizeof(buf))
die("error: user string too long\n");
strcpy(buf, user);
// ...
}
int get_mac(int fd, struct session *session)
{
unsigned int i, n;
n = read_network_integer(fd);
if (n > MAX_MAC)
return 1;
// commented-out because of too many false positives: raptor-off-by-one
for (i = 0; i <= n; i++)
session->mac[i] = read_network_integer(fd);
return 0;
}
int variant1(int argc, char *argv[])
{
char buf[10];
// ruleid: raptor-off-by-one
*(buf + 10) = 'A';
return 0;
}
int variant2(int argc, char *argv[])
{
char bStr[10];
// commented-out because of too many false positives: raptor-off-by-one
for (unsigned i = 1; i <= 10; ++i)
{
bStr[i] = (char)i + 'a';
}
return 0;
}
static LabelText *text_create(char *orig_str, int char_width)
{
int i, j;
char line[256]; /* a line should not exceed this length */
int pos;
int last_space;
int new_line;
LabelText *text = 0;
char *str = 0;
text = calloc(1, sizeof(LabelText));
str = strdup(orig_str);
if (char_width > 0)
{
for (i = 0; i < strlen(str); i++)
if (str[i] == 10)
text->count++;
// ruleid: raptor-off-by-one
if (str[strlen(str) - 1] != 10)
text->count++;
}
return NULL;
}
static LabelText *text_create2(char *orig_str, int char_width)
{
int i, j;
char line[256]; /* a line should not exceed this length */
int pos;
int last_space;
int new_line;
LabelText *text = 0;
char *str = 0;
int length;
text = calloc(1, sizeof(LabelText));
str = strdup(orig_str);
length = strlen(str);
if (char_width > 0)
{
for (i = 0; i < strlen(str); i++)
if (str[i] == 10)
text->count++;
// ruleid: raptor-off-by-one
if (str[strlen(str) - 1] != 10)
text->count++;
}
return NULL;
}
void addLineAfter(struct line *whichLine, char *data)
{
struct line *temp = whichLine->next;
struct line *newLine = (struct line *)malloc(sizeof(struct line));
temp->prev = newLine;
whichLine->next = newLine;
newLine->next = temp;
newLine->prev = whichLine;
// ruleid: raptor-off-by-one
newLine->data = (char *)malloc(strlen(data));
strcpy(newLine->data, data);
newLine->length = strlen(data);
countTabs(newLine);
currentBuffer->numLines++;
}
void addLineAfter_fixed(struct line *whichLine, char *data)
{
struct line *temp = whichLine->next;
struct line *newLine = (struct line *)malloc(sizeof(struct line));
temp->prev = newLine;
whichLine->next = newLine;
newLine->next = temp;
newLine->prev = whichLine;
// ok: raptor-off-by-one
newLine->data = (char *)malloc(strlen(data) + 1);
strcpy(newLine->data, data);
newLine->length = strlen(data);
countTabs(newLine);
currentBuffer->numLines++;
}
void flawed_strdup(const char *input)
{
char *copy;
// ruleid: raptor-off-by-one
copy = (char *)malloc(strlen(input));
strcpy(copy, input);
return copy;
}
void ok_strdup(const char *input)
{
char *copy;
// ok: raptor-off-by-one
copy = (char *)malloc(strlen(input) + 1);
strcpy(copy, input);
return copy;
}
void flawed_strdup2(const char *input)
{
char *copy;
int len = strlen(input);
// ruleid: raptor-off-by-one
copy = (char *)malloc(len);
strcpy(copy, input);
return copy;
}
void ok_strdup2(const char *input)
{
char *copy;
int len = strlen(input);
// ok: raptor-off-by-one
copy = (char *)malloc(len + 1);
strcpy(copy, input);
return copy;
}
int two_dimensions(int argc, char *argv[])
{
char buffer[1][256];
// ruleid: raptor-off-by-one
buffer[0][256] = '!';
// ruleid: raptor-off-by-one
buffer[1][1] = '!';
// ok: raptor-off-by-one
buffer[0][255] = '!';
return 0;
}
void f(const char *str)
{
// ruleid: raptor-off-by-one
char *buffer = malloc(strlen(str));
free(buffer);
}
void f(const char *str)
{
// ok: raptor-off-by-one
char *buffer = malloc(strlen(str) + 1);
free(buffer);
}
void f(const char *str)
{
// ok: raptor-off-by-one
char *buffer = malloc(strlen(str) + 1);
free(buffer);
}
void f(const char *str)
{
size_t len = strlen(str);
// ruleid: raptor-off-by-one
char *buffer = malloc(len);
free(buffer);
}
void f(const char *str)
{
size_t len = strlen(str);
// ok: raptor-off-by-one
char *buffer = malloc(len + 1);
free(buffer);
}
void f(const char *str)
{
size_t len;
len = strlen(str);
// ruleid: raptor-off-by-one
char *buffer = malloc(len);
free(buffer);
}
void f(const char *str)
{
size_t len = strlen(str);
len += 1;
// todook: raptor-off-by-one
char *buffer = malloc(len);
free(buffer);
}
void f(const char *str)
{
size_t len = strlen(str);
if (nondet)
{
len += 1;
}
// ruleid: raptor-off-by-one
char *buffer = malloc(len);
free(buffer);
}
void f(const char *str)
{
size_t len = strlen(str);
if (len)
{
// ruleid: raptor-off-by-one
char *buffer = malloc(len);
free(buffer);
}
}
int main()
{
printf("Hello, World!");
return 0;
}
Loaded 100 of 1386 files, more files were not shown because too many files have changed in this diff. Show more