Skip to content

report/suggest: enriched step summary + policy suggest from audit log#46

Merged
bokuweb merged 1 commit into
mainfrom
claude/friendly-visvesvaraya-a771ab
May 10, 2026
Merged

report/suggest: enriched step summary + policy suggest from audit log#46
bokuweb merged 1 commit into
mainfrom
claude/friendly-visvesvaraya-a771ab

Conversation

@bokuweb

@bokuweb bokuweb commented May 10, 2026

Copy link
Copy Markdown
Owner

Summary

Closes two step-security/harden-runner parity gaps that came up
in the gap analysis:

  • Enriched $GITHUB_STEP_SUMMARYreport::render_step_summary
    now writes per-destination Network / per-path Files / per-binary
    Processes top-N tables into the step summary. Denied rows are
    flagged with ❌ and sorted to the top of the truncated table so
    the offending destinations surface even when the long tail of
    benign opens fills the rest. Pipe characters in commands and
    paths are escaped so a hostile filename can't break the table.
  • coronarium policy suggest <audit.json> — new subcommand
    that reads a coronarium run --mode audit --log foo.json log
    and emits a starter policy.yml. network.allow gets one entry
    per host:port observed (hostname preferred over IP);
    file.allow gets one entry per parent directory observed;
    exec targets are surfaced as a commented # observed_exec:
    block so the operator can hand-pick what to deny — the
    suggester never auto-populates process.deny_exec. Reads from
    - as stdin too.

The remaining harden-runner gaps (SNI-based egress at the proxy,
workspace tamper detection, floating-tag → SHA-pin static check,
per-PID source attribution) are tracked under a new
"harden-runner parity gaps" section in CLAUDE.md so they don't
get lost. SaaS dashboard and automatic runner hardening are
explicitly listed as out-of-scope.

Side effect: Event gains a Deserialize derive (was
Serialize-only) so the audit log can round-trip through
policy suggest.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace — 14 new unit tests (8 in suggest,
    6 in report) on top of existing 80; all green
  • Smoke: echo '{...samples...}' | coronarium policy suggest -
    produces a sane YAML with hostname-keyed allow entries and
    a commented exec block

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented May 10, 2026

Copy link
Copy Markdown

coronarium report

metric count
observed 249
denied 4
lost 0

events by kind

kind count
exec 6
open 64
connect 2

denied samples (first 10)

kind detail
exec /usr/bin/whoami (/usr/bin/whoami)
connect 1.1.1.1:443
connect 8.8.8.8:443
📊 Open the full HTML report locally
rm -rf /tmp/coronarium-25630421820 && gh run download 25630421820 -R bokuweb/sakimori -n coronarium-report -D /tmp/coronarium-25630421820 && (open /tmp/coronarium-25630421820/coronarium-report.html 2>/dev/null || xdg-open /tmp/coronarium-25630421820/coronarium-report.html 2>/dev/null || echo "open file:///tmp/coronarium-25630421820/coronarium-report.html")

Requires the gh CLI. The command downloads the workflow artifact and opens the self-contained HTML report in your browser.

Closes two harden-runner parity gaps:

- `report::render_step_summary` now writes Network / Files / Processes
  top-N tables into `$GITHUB_STEP_SUMMARY` with denied rows flagged
  and sorted first, so reviewers can spot offending destinations on
  the run page without downloading the JSON log.
- New `coronarium policy suggest <log>` reads an audit-mode JSON log
  and emits a starter `policy.yml` (network.allow per host:port,
  file.allow per parent dir, exec targets surfaced as a commented
  observation block — never auto-denied).

Remaining harden-runner gaps (SNI egress, workspace tamper detection,
floating-tag pin check, per-PID source attribution) are tracked in
the new "harden-runner parity gaps" section of CLAUDE.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: bokuweb <[email protected]>
@bokuweb bokuweb force-pushed the claude/friendly-visvesvaraya-a771ab branch from c2fd129 to 54eb8e6 Compare May 10, 2026 13:49
@bokuweb bokuweb merged commit 2154090 into main May 10, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant