Skip to content

feat: report-only trials and Security Hub ASFF export - #48

Open
sheel-PBM wants to merge 7 commits into
trustabl:mainfrom
sheel-PBM:feat/report-only-security-hub
Open

feat: report-only trials and Security Hub ASFF export#48
sheel-PBM wants to merge 7 commits into
trustabl:mainfrom
sheel-PBM:feat/report-only-security-hub

Conversation

@sheel-PBM

@sheel-PBM sheel-PBM commented Aug 24, 2026

Copy link
Copy Markdown

Summary

Implements two gaps the repo already documents:

  1. docs/EVALUATION.md step 1 — “scan without gating first.” Omitting SEVERITY_THRESHOLD does not do that (the binary still exits 1 on medium+), and || true also swallows exit 2 (dead scanner). REPORT_ONLY=true publishes artifacts without gating; scanner/I/O errors still fail.
  2. codepipeline/README.md — Security Hub import was marked not in v0.1.0. Every scan now writes trustabl.asff.json. SECURITY_HUB=true imports it with aws securityhub batch-import-findings (fail-closed). ASFF mapping uses the engine’s ScanResult fields (rule_id, file_path, explanation, suggested_fix).

Review path: scan/trustabl-scan.sh (REPORT_ONLY / SECURITY_HUB) and scan/to-asff.sh. The rest is wiring and docs.

Distinct from the docs-only report-only PRs (#27, #36, #41). Does not take the jq-install change (#44).

Test plan

  • bash test/test-asff.sh (offline: ASFF shape, empty findings, --import fail-closed)
  • CodeBuild default env: still gates; trustabl.asff.json in artifacts
  • REPORT_ONLY=true + medium+ findings: build succeeds
  • REPORT_ONLY=true + scanner exit 2: build fails
  • SECURITY_HUB=true without CLI/IAM: build fails
  • SECURITY_HUB=true with Hub enabled: findings in Security Hub

sheel-PBM and others added 6 commits August 24, 2026 15:33
Evaluation-guide step 1 told people to omit the severity threshold (or
`|| true`), which still fails on medium+ findings and swallows scanner
errors. Add REPORT_ONLY so artifacts publish without gating, while exit 2
still fails the build.

The CodePipeline README listed Security Hub as not in v0.1.0. Emit
trustabl.asff.json and optionally import it when SECURITY_HUB=true.
SECURITY_HUB=true now works on CodeCatalyst as well as CodePipeline, and
ASFF types no longer claim these findings are CVEs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Match the Security Hub CLI example more closely and run the offline
converter tests on every push so reviewers can see a green check.

Co-authored-by: Cursor <cursoragent@cursor.com>
The converter looked for file/message/fix. The engine emits file_path,
explanation, and suggested_fix. Prefer those so Security Hub import is not
an empty title with a generic description on a real scan.

Co-authored-by: Cursor <cursoragent@cursor.com>
Leave install fail-closed to trustabl#44 and repo-wide CI to the dedicated
lint PRs. This change is REPORT_ONLY plus Security Hub ASFF only.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@sheel-PBM

Copy link
Copy Markdown
Author

@sairenchristianbuerano @trustabl Implements EVALUATION.md step 1 (REPORT_ONLY=true — artifacts without gating; scanner/I/O errors still fail) and the CodePipeline README Security Hub gap (trustabl.asff.json + SECURITY_HUB=true). Distinct from the docs-only report-only PRs (#27, #36, #41). Local bash -n, shellcheck -S error, and test/test-asff.sh pass.

Lint is action_required on the first-time fork workflow (run 32799639160) — not a lint failure.

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