Files
pruefwerk/docker/agent-entrypoint.sh
T
Sharang ParnerkarandClaude Opus 5 832729b61d
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 6m45s
chore: replace every remaining "tramiton" with Firmwerk
The firmware engine was renamed to Firmwerk (git deps and crate names already
moved in #240/#245), but 65 references to the old name were left across 15
files. None remain now.

- Code: `TramitonNative` -> `FirmwerkNative`, `ExternalSystem::Tramiton` ->
  `ExternalSystem::Firmwerk` (serialized as `firmwerk`), a local flag.
- Values the classifier writes: fact `source` and `detected_by` now say
  `firmwerk`. These are free-form strings nothing matches on; stored targets
  pick up the new value on their next classification.
- Prose (doc comments, docs, the demo fixture's description) says "Firmwerk";
  identifiers, stored values, log text and CLI commands say `firmwerk`.

No serde alias is kept for the enum: `external_refs` is only ever created
empty and nothing writes an `ExternalRef`, so no stored document can hold the
old value.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-09-21 13:25:06 +02:00

35 lines
1.4 KiB
Bash

#!/usr/bin/env bash
# Seed the nix store on first start, then run the agent.
#
# The firmware-SBOM pipeline drives a real `nix` build (Firmwerk NixBackend).
# The image ships the store as a bootstrap tarball rather than baking /nix, so a
# persistent /nix volume (mounted empty on first deploy) gets populated once and
# then survives redeploys. Seeding is best-effort: if it fails, the agent still
# starts and firmware SBOMs fall back to analysis-only.
if [ ! -e /nix/store ]; then
echo "agent-entrypoint: seeding /nix store from image bootstrap..."
mkdir -p /nix
if tar -C / -xzf /opt/nix-bootstrap.tar.gz; then
echo "agent-entrypoint: /nix store seeded."
else
echo "agent-entrypoint: WARN nix seed failed; firmware SBOM will use analysis-only fallback."
fi
fi
# Seed the OSCAL control-catalog snapshot. The image ships a catalog snapshot so
# control mapping works without the breakpilot-compliance backend
# (BREAKPILOT_BASE_URL unset). Copy-if-absent, so a snapshot refreshed from a
# live backend (or a mounted volume) always wins.
SNAP_DIR="${BREAKPILOT_SNAPSHOT_DIR:-/data/compliance-scanner/oscal}"
if [ -d /opt/breakpilot/oscal-snapshot ]; then
mkdir -p "$SNAP_DIR"
for f in /opt/breakpilot/oscal-snapshot/*.json; do
[ -e "$f" ] || continue
if [ ! -e "$SNAP_DIR/$(basename "$f")" ]; then
cp "$f" "$SNAP_DIR/" && echo "agent-entrypoint: seeded $(basename "$f") into $SNAP_DIR"
fi
done
fi
exec compliance-agent "$@"