Skip to content

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

Merged
sairenchristianbuerano merged 8 commits into
trustabl:mainfrom
sheel-PBM:feat/report-only-security-hub
Aug 27, 2026
Merged

feat: report-only trials and Security Hub ASFF export#48
sairenchristianbuerano merged 8 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
Contributor

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
Contributor 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.

@sairenchristianbuerano

Copy link
Copy Markdown
Collaborator

Thanks @sheel-PBM. Flagging that this is being read rather than sitting unlooked-at.

We are reviewing all 52 open PRs together instead of one at a time. 31 of them edit scan/trustabl-scan.sh, so merge order decides as much as any individual verdict — GitHub reports almost all of these as mergeable, but that is each PR against main in isolation, not against each other. The first merge makes most of the rest conflict.

Queued. This is one of the larger changes in the queue and touches several files, so it gets read after the single-purpose fixes land.

The order we are working to: the test harness in #1 first, since twelve PRs depend on it and nothing is verifiable without it, then the fixes that close fail-open paths, then behaviour changes, then docs. A verdict on this one follows once its cluster is read.

Apologies for the wait, and thanks for the contribution.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sairenchristianbuerano
sairenchristianbuerano merged commit 9fd3060 into trustabl:main Aug 27, 2026
4 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.

2 participants