Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ jobs:
name: dependency audit
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
extras: ${{ steps.optional-dependencies.outputs.extras }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand All @@ -137,6 +139,47 @@ jobs:
-r requirements/container.lock
python -m pip_audit --no-deps --disable-pip \
-r requirements/build.lock
- name: Discover optional dependency stacks
id: optional-dependencies
shell: bash
run: |
python - <<'PY' >> "$GITHUB_OUTPUT"
import json
import tomllib
from pathlib import Path

project = tomllib.loads(Path("pyproject.toml").read_text(encoding="utf-8"))
extras = sorted(project["project"]["optional-dependencies"])
print(f"extras={json.dumps(extras, separators=(',', ':'))}")
PY

optional-dependency-audit:
name: optional dependency audit (${{ matrix.extra }})
runs-on: ubuntu-latest
timeout-minutes: 30
needs: dependency-audit
strategy:
fail-fast: false
matrix:
extra: ${{ fromJSON(needs.dependency-audit.outputs.extras) }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- name: Audit ${{ matrix.extra }} dependency stack
env:
EXTRA: ${{ matrix.extra }}
shell: bash
run: |
set -euo pipefail
requirements_file="$RUNNER_TEMP/shadowshield-extra.txt"
printf '.[%s]\n' "$EXTRA" > "$requirements_file"
python -m pip install --upgrade "pip==26.1.2" "pip-audit==2.10.1"
python -m pip_audit --strict --progress-spinner off \
-r "$requirements_file"

workflow-lint:
name: workflow lint
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to ShadowShield are documented here. The format is based on
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Supply chain and CI
- Added a strict, dynamically discovered CI matrix that resolves and audits every
declared optional dependency stack, including development and combined `all`
graphs, so new extras cannot silently bypass vulnerability scanning.

## [0.6.3] — 2026-07-25

Post-launch reliability, request-intake, observability, performance, and
Expand Down
5 changes: 3 additions & 2 deletions docs/PRODUCTION_READINESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ must be resolved before exposing the optional HTTP control plane publicly.
| Correctness | Ready | 320 unit/integration cases; strict mypy; Ruff lint/format; CodeQL extended scanning |
| Packaging | Ready | Hash-locked build environment, byte-for-byte repeat build gate, Twine validation, installed-wheel smoke test |
| Runtime security | Ready with configuration | Early API-key/Bearer auth, bounded/deadlined body intake, detector-failure policy, restricted CORS, immutable protection floor, non-root read-only container |
| Supply chain | Ready | Digest/SHA-pinned build inputs, PyPI OIDC, exact-green-main release gates, immutable image/evidence handling, pre-push vulnerability gate, anonymous GHCR digest pull, registry-verified SLSA and CycloneDX attestations |
| Supply chain | Ready | Digest/SHA-pinned build inputs, PyPI OIDC, exact-green-main release gates, base/lock/per-extra vulnerability gates, immutable image/evidence handling, anonymous GHCR digest pull, registry-verified SLSA and CycloneDX attestations |
| Observability | Ready for single process | Content-free telemetry, detector-error counters, Prometheus endpoint, bounded in-memory event feed |
| Detection quality | Beta | Curated adversarial: 100%/0% FPR; blind v1–v3 aggregate: 22.2%/20%; v3: 30%/30%; deepset core: 23.3%/0% |
| Scale / HA | Not yet | Counters, events, configuration, and rate limits are process-local |
Expand Down Expand Up @@ -79,6 +79,8 @@ must be resolved before exposing the optional HTTP control plane publicly.
- [x] Make benchmark evidence fail visibly on warmup, readiness, or detector
errors and report class-conditional per-slice confusion metrics with 95%
Wilson confidence intervals.
- [x] Resolve and vulnerability-audit every declared optional dependency stack
independently in CI, including development and combined `all` graphs.

## P1 — launch procedure (operator-owned)

Expand Down Expand Up @@ -112,7 +114,6 @@ must be resolved before exposing the optional HTTP control plane publicly.
promoted, already-scanned OCI artifacts.
9. Pin optional model revisions, pre-cache them for offline production startup,
and bound model-loading time.
10. Add vulnerability-audit matrices for every supported optional dependency stack.

## Go / no-go gates

Expand Down