ReviewOS

stacks/ts-cloud

Build a security posture center with deployment policy gates and supply-chain scanning

#145
Closed chris opened this 2 months ago ·
2 months ago

Roadmap relationship

Outcome

Unify configuration security, host posture, identity findings, secret scanning, container/software supply-chain checks, and deploy policy into an actionable dashboard with explainable severity and controlled exceptions.

Current gap

ts-cloud has pre-deploy secret scanning and some host security views, but findings are not persisted, correlated, assigned, waived with expiry, or enforced through a central policy. Container image scanning, SBOMs, signature/provenance checks, and credential/IAM validation are incomplete.

User experience

  • Show posture by project/environment/service with severity, affected resource, evidence, first/last seen, remediation, owner, and status.
  • Policy-gated deploys explain exactly which checks failed and offer safe remediation links; authorized waivers require a reason and expiry.
  • Distinguish failed, skipped, unavailable, unsupported, and stale checks.
  • Provide a production-change review screen summarizing security-impacting diffs.

Scope

  • Persist normalized findings from secret scans, host checks, dependency/container scans, TLS/firewall checks, and provider security services where available.
  • Generate SBOMs for built artifacts/images, scan known vulnerabilities, and support optional image signature/provenance verification.
  • Define policy rules by environment and severity for block, warn, or record-only behavior.
  • Add exception workflow, assignment, comments/links, expiry, recurrence, and export.
  • Integrate existing audit work in #126 rather than creating a separate action log.

Technical direction

  • Use pluggable scanners with timeouts, version metadata, deterministic fingerprints, and sanitized evidence.
  • Run untrusted artifact inspection with bounded resources and without exposing deployment credentials.
  • Record the exact policy/scanner versions used for each deploy decision.
  • Wire the currently permissive credential/IAM validation path to real capability checks where provider APIs support it.

Safety and operability

  • Never upload proprietary source or SBOM contents to third parties without explicit configuration.
  • Redact secrets from findings and scan logs; treat generated reports as sensitive.
  • Waivers cannot silently outlive their expiry and all policy changes/waivers are audited.
  • Scanner outages follow explicit fail-open/fail-closed policy per environment.

Acceptance criteria

  • A production deploy can be blocked by a reproducible critical finding and proceed after remediation or an authorized time-limited waiver.
  • An image build produces an SBOM and vulnerability summary linked to its release.
  • Repeated scans update the same finding lifecycle instead of creating unbounded duplicates.
  • The posture page works when individual scanners/providers are unavailable.

Verification

  • Finding fingerprint/lifecycle, policy evaluation, waiver expiry, redaction, timeout, and fail-mode tests.
  • Fixture-based secret, SBOM, vulnerable image, TLS, and host-posture integration tests.
  • End-to-end blocked-deploy and remediated-redeploy scenarios.

Non-goals

  • Building a proprietary vulnerability database.
  • Replacing specialized cloud security consoles.
  • Treating a clean scan as a guarantee that software is secure.
9 days ago

Implemented the security posture center and production policy gates end to end.

Delivered:

  • persisted normalized findings, scanner runs, policies, decisions, assignments, comments, references, expiring waivers, recurrence, redacted exports, and audit events
  • bounded local source, Trivy image, Syft SBOM, host posture, and AWS IAM capability checks with explicit unavailable/unsupported/skipped/stale states
  • environment/scanner/severity rules with fail-open/fail-closed behavior and version-pinned deployment decisions
  • responsive /security dashboard with finding filters, remediation workflow, scanner health, policy editor, waiver management, change review, export, and decision history
  • production gates across dashboard mutations and CLI deploy flows; skip flags are recorded and do not bypass policy
  • container build-context gate plus post-push image gate before ECS update
  • release-linked CycloneDX SBOM, vulnerability summary, and SLSA/in-toto provenance, including manifest fallback when Syft is unavailable
  • operator documentation covering policy semantics, local-only execution, artifacts, waivers, APIs, and remediation

Commits: 21b9f00, a8068a1, d52c5b8, 229588a, 68ed391, 1aeb06f, d7a16af, d3f409a, 64061fa.

Verification:

  • bun test: 2,560 passed, 0 failed, 2 skipped, 2 todo, 6,845 assertions across 323 files
  • bunx tsc --noEmit: clean
  • dashboard build: 40/40 routes successful, 0 failures
  • docs build: 32 pages successful

Sign in to comment on this issue.