Commit Graph
15 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 c08e8fb7f4 feat(sbom): CVEs for FreeRTOS, lwIP, Mbed TLS and wolfSSL in firmware trees
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 9m22s
A microcontroller project vendors its RTOS, TCP/IP stack and TLS library
as source. No manifest names them, so no SBOM listed their versions and
no CVE was ever matched against them, although that is where the
published vulnerabilities of an embedded product are.

- embedded_versions: reads each library's version from the header that
  states it (tskKERNEL_VERSION_NUMBER, LWIP_VERSION_*,
  MBEDTLS_VERSION_STRING, LIBWOLFSSL_VERSION_STRING), vendor directories
  included, into SBOM entries (`embedded`, with the library's license).
- nvd_cpe: the NVD matching the CODESYS runtime used, made generic. Every
  CVE of a product is fetched by CPE and its affected ranges matched
  here. FreeRTOS kernel CVEs are filed under the `o` part and its TCP/IP
  stack under `a`, so the products are asked for with `cpe:2.3:*:`.
- The scan adds the entries before the CVE stage and matches them in NVD
  after OSV. The CODESYS match now uses the same code.

Verified against NVD: all four CPE names return CVEs; a trimmed real
FreeRTOS response is a unit-test fixture (10.0.1, 10.3.1, 10.5.1, 10.6.2).
Nightly target fw-embedded-libs (FreeRTOS 10.3.1, lwIP 2.1.2, Mbed TLS
2.16.2; version defines only) finds the three libraries and 49 CVEs;
no other baseline changed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-09-23 17:03:28 +02:00
sharang dae80043e6 fix(firmware): produce the firmware SBOM when detection finds firmware (#341)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 13s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
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 / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
CI / Deploy Dashboard (push) Successful in 4m33s
CI / Deploy Agent (push) Successful in 6m4s
CI / Deploy MCP (push) Successful in 2m10s
2026-09-23 13:08:06 +00:00
sharang fbf3a7cf29 feat(sast): C/C++ SAST for microcontroller firmware (#334) (#339)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 6s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 6m55s
2026-09-23 13:07:50 +00:00
sharang c6d2d07999 fix(sbom): stop resolving tenant manifests in shared deployments (#330) (#333)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 57s
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 3m41s
CI / Deploy Dashboard (push) Successful in 5m26s
CI / Deploy Agent (push) Successful in 6m48s
2026-09-23 08:59:35 +00:00
sharang 44a48957c1 feat(ci): JavaScript/TypeScript and Python fixtures for the nightly (#310) (#331)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 3m53s
2026-09-23 08:15:00 +00:00
sharang fe2414a3c0 feat(scans): scan uploaded source archives like repositories (#325) (#329)
CI / Deploy Agent (push) Successful in 3m53s
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
2026-09-23 07:22:05 +00:00
sharang f90bfcc5c6 fix(scans): stop offering scans nothing runs, and record them (#319) (#328)
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 53s
CI / Check (push) Skipped
CI / Deploy MCP (push) Successful in 3m39s
CI / Deploy Dashboard (push) Successful in 5m21s
CI / Deploy Agent (push) Successful in 6m43s
2026-09-22 21:05:31 +00:00
sharang 27e8c866ba fix(sbom): firmware SBOMs list what the manifests declare (#317) (#327)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 4m31s
CI / Deploy Dashboard (push) Successful in 2m47s
CI / Deploy MCP (push) Successful in 1m50s
2026-09-22 20:34:06 +00:00
sharang 42c7b09151 feat(ci): firmware and RTOS fixtures for the nightly scan regression (#313) (#326)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 3m59s
2026-09-22 05:36:10 +00:00
sharang d4cbdc822a feat(ci): PLC fixtures for the nightly scan regression (#314) (#324)
CI / Check (push) Skipped
CI / Deploy Agent (push) Successful in 7m50s
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (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 / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy MCP (push) Successful in 3m35s
CI / Deploy Dashboard (push) Successful in 5m18s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 7m0s
2026-09-21 21:21:20 +00:00
sharang bc4553d576 chore: replace every remaining "tramiton" with Firmwerk (#300)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Dashboard (push) Successful in 5m10s
CI / Deploy Docs (push) Successful in 1m7s
CI / Deploy Agent (push) Successful in 6m50s
CI / Deploy MCP (push) Successful in 2m25s
2026-09-21 11:38:35 +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 Agent (push) Successful in 6m58s
CI / Deploy Docs (push) Successful in 1m8s
CI / Deploy MCP (push) Successful in 3m53s
CI / Deploy Dashboard (push) Successful in 5m34s
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
sharang 8dcdad9fe7 feat(fixtures): curated demo targets + seed script + golden PLC baselines (#187) (#232)
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) Failing after 18s
CI / Deploy Docs (push) Successful in 1m11s
2026-08-31 15:58:16 +00:00