---
id: ci-security-and-supply-chain
prd: docs/work/prds/ci-security-and-supply-chain.prd.md
title: CI security + supply-chain enforcement stack
type: epic
status: done
features: [scripts, tooling, docs]
created: 2026-05-14T00:00:00Z
updated: 2026-05-14T19:21:52.308Z
---

## Goal

Implement a four-pillar CI security stack — Renovate-managed bumps + Action SHA pinning, Socket-based supply-chain-behavior detection, continuous trace revalidation extending ADR-022, and baseline GitHub-native gates — composed via a single failure-mode hierarchy that the sandcastle reviewer prompt enforces machine-readably for agent-driven PRs. Codifies ADR-023.

## Why

The repo's security posture has zero security tooling. ADR-022 + the library-evaluation epic close the adoption-time gate for new dependencies but not the drift gate. Six post-adoption threats remain uncovered: CVE disclosures, supply-chain behavior compromise, maintainer-account compromise, GitHub Actions supply-chain (major-tag pinning), license drift, and EU-residency drift. This epic closes all six via the four-pillar stack.

## Stories

- [x] [01 — Trace schema extensions (socketRisk + lastRevalidated)](01-trace-schema-extensions/_story.md)
- [x] [02 — Socket integration (skill + CI)](02-socket-integration/_story.md)
- [x] [03 — Renovate adoption](03-renovate-adoption/_story.md)
- [x] [04 — Major-bump re-evaluation flow](04-major-bump-reevaluation/_story.md)
- [x] [05 — Trace revalidation workflow](05-trace-revalidation-workflow/_story.md)
- [x] [06 — CodeQL workflow + pnpm audit signatures](06-codeql-and-audit-signatures/_story.md)
- [x] [07 — Gitleaks pre-commit hook](07-gitleaks-precommit/_story.md)
- [x] [08 — Sandcastle reviewer prompt update](08-reviewer-prompt-update/_story.md)
- [x] [09 — CI security guide + CLAUDE.md](09-ci-security-guide-and-docs/_story.md)
