Skip to content

Commit 74c51c2

Browse files
SecAI-Hubclaude
andcommitted
Update release docs for M47: enforced CI gates, Go 1.25, mypy
- README: add M47 milestone, update CI evidence table (mypy, enforced vuln scanning, waiver mechanism) - CONTRIBUTING: Go 1.25+, all 9 services, 399 Go + 718 Python tests, mypy/ruff instructions - release-policy: enforced quality gates for stable/candidate, dependency enforcement column, waiver review in release prep - security-status: add M47 row (CI enforcement hardening) - support-lifecycle: Go 1.23→1.25 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2137636 commit 74c51c2

5 files changed

Lines changed: 63 additions & 35 deletions

File tree

CONTRIBUTING.md

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ how to set up your development environment, run tests, and submit changes.
77

88
| Tool | Minimum Version | Purpose |
99
|---|---|---|
10-
| Go | 1.22+ | Build Go services (registry, tool-firewall, airlock) |
10+
| Go | 1.25+ | Build Go services (9 services, see below) |
1111
| Python | 3.11+ | Build Python services (quarantine, UI, search mediator) |
1212
| shellcheck | Latest | Lint shell scripts |
1313
| git | 2.x | Version control |
@@ -30,9 +30,10 @@ cd SecAI_OS
3030
### 2. Build Go Services
3131

3232
```bash
33-
cd services/registry && go build ./... && cd ../..
34-
cd services/tool-firewall && go build ./... && cd ../..
35-
cd services/airlock && go build ./... && cd ../..
33+
for svc in airlock registry tool-firewall gpu-integrity-watch mcp-firewall \
34+
policy-engine runtime-attestor integrity-monitor incident-recorder; do
35+
(cd "services/$svc" && go build ./...)
36+
done
3637
```
3738

3839
### 3. Install Python Dependencies
@@ -54,39 +55,59 @@ shellcheck files/system/usr/libexec/secure-ai/*.sh
5455

5556
## Running Tests
5657

57-
### Go Tests (26 tests)
58+
### Go Tests (399 tests across 9 services)
59+
60+
```bash
61+
for svc in airlock registry tool-firewall gpu-integrity-watch mcp-firewall \
62+
policy-engine runtime-attestor integrity-monitor incident-recorder; do
63+
(cd "services/$svc" && go test -v -race ./...)
64+
done
65+
```
66+
67+
### Python Tests (718 tests)
5868

5969
```bash
60-
cd services/registry && go test ./... -v && cd ../..
61-
cd services/tool-firewall && go test ./... -v && cd ../..
62-
cd services/airlock && go test ./... -v && cd ../..
70+
pip install -r requirements-ci.txt
71+
PYTHONPATH=services python -m pytest tests/ -v
6372
```
6473

65-
### Python Tests (595+ tests)
74+
### Type Checking (mypy)
6675

6776
```bash
68-
pytest tests/ -v
77+
pip install -r requirements-ci.txt
78+
mypy --ignore-missing-imports \
79+
services/common/ services/agent/agent/ \
80+
services/quarantine/quarantine/ services/ui/ui/
6981
```
7082

7183
### Shell Linting
7284

7385
```bash
74-
shellcheck files/system/usr/libexec/secure-ai/*.sh
86+
shellcheck files/system/usr/libexec/secure-ai/*.sh files/scripts/*.sh
7587
```
7688

7789
### Run Everything
7890

7991
```bash
80-
# Go
81-
for svc in registry tool-firewall airlock; do
82-
(cd "services/$svc" && go test ./... -v)
92+
# Go (9 services, 399 tests)
93+
for svc in airlock registry tool-firewall gpu-integrity-watch mcp-firewall \
94+
policy-engine runtime-attestor integrity-monitor incident-recorder; do
95+
(cd "services/$svc" && go test -v -race ./...)
8396
done
8497

85-
# Python
86-
pytest tests/ -v
98+
# Python (718 tests)
99+
PYTHONPATH=services python -m pytest tests/ -v
100+
101+
# Type check
102+
mypy --ignore-missing-imports \
103+
services/common/ services/agent/agent/ \
104+
services/quarantine/quarantine/ services/ui/ui/
105+
106+
# Lint
107+
ruff check services/ tests/ --select E,F,W --ignore E501,E402
87108

88109
# Shell
89-
shellcheck files/system/usr/libexec/secure-ai/*.sh
110+
shellcheck files/system/usr/libexec/secure-ai/*.sh files/scripts/*.sh
90111
```
91112

92113
## Coding Standards

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Every model passes through the same fully automatic pipeline:
156156
| **Updates** | Cosign-verified rpm-ostree, staged workflow, greenboot auto-rollback |
157157
| **Supply Chain** | Per-service CycloneDX SBOMs, SLSA3 provenance attestation, cosign-signed checksums |
158158

159-
See [docs/threat-model.md](docs/threat-model.md) for threat classes, residual risks, and security invariants. See [docs/security-status.md](docs/security-status.md) for implementation status of all 46 milestones.
159+
See [docs/threat-model.md](docs/threat-model.md) for threat classes, residual risks, and security invariants. See [docs/security-status.md](docs/security-status.md) for implementation status of all 47 milestones.
160160

161161
### Verify Image Signatures
162162

@@ -219,11 +219,11 @@ All CI jobs are defined in [`.github/workflows/ci.yml`](.github/workflows/ci.yml
219219
| Job | Workflow Link | What It Proves |
220220
|-----|--------------|---------------|
221221
| `go-build-and-test` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | 399 Go tests across 9 services with `-race` (build, test, vet) |
222-
| `python-test` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | 718 Python tests split into unit/integration + adversarial/acceptance, ruff lint, bandit security scan |
222+
| `python-test` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | 718 Python tests (unit/integration + adversarial/acceptance), ruff lint, bandit security scan (enforced on HIGH/HIGH), mypy type checking |
223223
| `security-regression` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | Adversarial test suite: prompt injection, policy bypass, containment, recovery |
224224
| `supply-chain-verify` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | SBOM generation via Syft, cosign availability, provenance keywords in release/build workflows |
225225
| `test-count-check` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | Prevents documented test counts from drifting below actual (source of truth: [test-counts.json](docs/test-counts.json)) |
226-
| `dependency-audit` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | Go vulnerability scanning (govulncheck) + Python dependency audit (pip-audit) |
226+
| `dependency-audit` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | Enforced Go vulnerability scanning (govulncheck) + Python dependency audit (pip-audit) with [waiver mechanism](.github/vuln-waivers.json) |
227227
| `shellcheck` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | Static analysis of all shell scripts (first-boot, build, verify-release, etc.) |
228228
| `policy-validate` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | YAML schema validation for all policy and recipe files |
229229
| `check-pins` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | Verifies all GitHub Actions are pinned to specific commit SHAs (not tags) |
@@ -239,7 +239,7 @@ All CI jobs are defined in [`.github/workflows/ci.yml`](.github/workflows/ci.yml
239239
| [Threat Model](docs/threat-model.md) | Threat classes, invariants, residual risks |
240240
| [API Reference](docs/api.md) | HTTP API for all services |
241241
| [Policy Schema](docs/policy-schema.md) | Full policy.yaml schema reference |
242-
| [Security Status](docs/security-status.md) | Implementation status of all 46 milestones |
242+
| [Security Status](docs/security-status.md) | Implementation status of all 47 milestones |
243243
| [Test Matrix](docs/test-matrix.md) | Test coverage: 1,117 tests across Go and Python (see [test-counts.json](docs/test-counts.json)) |
244244
| [Compatibility Matrix](docs/compatibility-matrix.md) | GPU, VM, and hardware support |
245245
| [Security Test Matrix](docs/security-test-matrix.md) | Security feature test coverage |
@@ -376,7 +376,7 @@ See [docs/test-matrix.md](docs/test-matrix.md) for full breakdown.
376376
## Roadmap
377377

378378
<details>
379-
<summary>All 46 project milestones (click to expand)</summary>
379+
<summary>All 47 project milestones (click to expand)</summary>
380380

381381
- [x] **Milestone 0** -- Threat model, dataflow, invariants, policy files
382382
- [x] **Milestone 1** -- Bootable OS, encrypted vault, GPU drivers
@@ -425,6 +425,7 @@ See [docs/test-matrix.md](docs/test-matrix.md) for full breakdown.
425425
- [x] **Milestone 44** -- Auditability and documentation hardening: test-count drift CI check, CI evidence links and badges, M4/M5 terminology disambiguation, audit quick-path doc, recovery runbook, verify-release script, security/product roadmap split
426426
- [x] **Milestone 45** -- Production readiness hardening: incident persistence (file-backed), graceful shutdown for all Go services, HTTP timeouts, systemd production hardening, first-boot validation, audit log rotation, CI vulnerability scanning, production operations guide
427427
- [x] **Milestone 46** -- Operational maturity: bootstrap trust gap fix (cosign verify before rebase), CI runs on all changes (removed paths-ignore for .md), Python quality gates (ruff + bandit + split test suites), docs-validation CI job, production-readiness checklist, SLOs, release channel policy, support lifecycle, sample verification output
428+
- [x] **Milestone 47** -- CI enforcement hardening: enforced vulnerability scanning (govulncheck + pip-audit + bandit fail on HIGH/HIGH) with waiver mechanism, mypy type checking for security-sensitive services, pinned reproducible Python CI dependencies, Go 1.23→1.25 (12 stdlib CVE fixes), verification-first bootstrap docs
428429

429430
</details>
430431

docs/release-policy.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ vMAJOR.MINOR.PATCH
2929
- **Tag format:** `v1.2.3`
3030
- **Image tag:** `ghcr.io/secai-hub/secai_os:latest`, `ghcr.io/secai-hub/secai_os:v1.2.3`
3131
- **Cadence:** As needed (security patches within 72 hours, features monthly)
32-
- **Quality gate:** Full [production-readiness checklist](production-readiness-checklist.md) must pass
32+
- **Quality gate:** Full [production-readiness checklist](production-readiness-checklist.md) must pass; all CI jobs green including enforced vulnerability scanning and mypy type checks
3333
- **Supply chain:** Cosign-signed, SBOM-attested, SLSA3 provenance
3434
- **Rollback:** Automatic via Greenboot; manual via `rpm-ostree rollback`
3535

@@ -40,7 +40,7 @@ This is the only channel recommended for production use.
4040
- **Tag format:** `v1.2.3-rc.1`
4141
- **Image tag:** `ghcr.io/secai-hub/secai_os:candidate`
4242
- **Cadence:** Before each stable release
43-
- **Quality gate:** CI must pass; first-boot-check must pass; manual smoke testing required
43+
- **Quality gate:** CI must pass (including enforced govulncheck, pip-audit, bandit, mypy); first-boot-check must pass; manual smoke testing required
4444
- **Purpose:** Final validation before stable promotion
4545
- **Not for production use**
4646

@@ -63,9 +63,12 @@ This is the only channel recommended for production use.
6363
# Ensure main is clean
6464
git checkout main && git pull
6565

66-
# Verify CI is green
66+
# Verify CI is green (all 18 jobs must pass, including enforced vulnerability scans)
6767
gh run list --workflow=ci.yml --limit=1
6868

69+
# Check for unexpired vulnerability waivers that may need review
70+
cat .github/vuln-waivers.json
71+
6972
# Update version references (if any hardcoded)
7073
# Update CHANGELOG.md with release notes
7174
```
@@ -156,14 +159,16 @@ Security patches are always released as patch versions (e.g., v1.2.3 → v1.2.4)
156159

157160
## Dependency Update Policy
158161

159-
| Dependency Type | Update Frequency | Breaking Changes |
160-
|----------------|-----------------|------------------|
161-
| Go standard library | With Go version updates (semi-annual) | Major version only |
162-
| Go third-party | Monthly or on CVE | Patch/minor: auto; major: manual review |
163-
| Python packages | Monthly or on CVE | Pin to compatible ranges |
164-
| System packages (rpm-ostree) | With Fedora rebases | Follow Fedora release cycle |
165-
| GitHub Actions | Via Dependabot (auto-PR) | Review + CI must pass |
166-
| Container base image | With Fedora Atomic updates | Follow uBlue release cycle |
162+
| Dependency Type | Update Frequency | Breaking Changes | Enforcement |
163+
|----------------|-----------------|------------------|-------------|
164+
| Go standard library | With Go version updates (semi-annual) | Major version only | govulncheck fails CI on unwaived vulns |
165+
| Go third-party | Monthly or on CVE | Patch/minor: auto; major: manual review | govulncheck fails CI on unwaived vulns |
166+
| Python packages | Monthly or on CVE | Pinned in `requirements-ci.txt` | pip-audit fails CI on unwaived vulns |
167+
| System packages (rpm-ostree) | With Fedora rebases | Follow Fedora release cycle | -- |
168+
| GitHub Actions | Via Dependabot (auto-PR) | Review + CI must pass | check-pins verifies SHA pinning |
169+
| Container base image | With Fedora Atomic updates | Follow uBlue release cycle | cosign signature verification |
170+
171+
Vulnerability waivers for reviewed/accepted findings are tracked in [`.github/vuln-waivers.json`](../.github/vuln-waivers.json) with mandatory expiry dates. Expired waivers automatically re-fail CI.
167172

168173
---
169174

docs/security-status.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Security Implementation Status
22

3-
This document is split into two sections. The first section covers **Security Assurance Controls** -- all implemented milestones (M0 through M46) that satisfy the M5 security assurance acceptance criteria. Every control listed there is complete and tested. The second section is the **Product Feature Roadmap**, which tracks planned product capabilities (Agent Mode Phases 2 and 3). These are product enhancements, not security assurance requirements; the M5 security posture is fully met without them.
3+
This document is split into two sections. The first section covers **Security Assurance Controls** -- all implemented milestones (M0 through M47) that satisfy the M5 security assurance acceptance criteria. Every control listed there is complete and tested. The second section is the **Product Feature Roadmap**, which tracks planned product capabilities (Agent Mode Phases 2 and 3). These are product enhancements, not security assurance requirements; the M5 security posture is fully met without them.
44

55
Last updated: 2026-03-14
66

@@ -59,6 +59,7 @@ All M5 security assurance criteria are met. The controls below have been impleme
5959
| Auditability and documentation hardening | Implemented | M44 | Test-count drift CI check with single source of truth (docs/test-counts.json), CI evidence links and GitHub Actions badges in README, M4/M5 terminology disambiguation (project milestones vs M5 security assurance level), operator verification column in M5 control matrix, external audit quick-path doc, recovery runbook with concrete curl commands, verify-release.sh auditor script, sample release bundle doc, security-status split into assurance controls vs product roadmap |
6060
| Production readiness hardening | Implemented | M45 | Incident recorder file-backed persistence (survives restarts), graceful shutdown (SIGTERM/SIGINT with connection draining) for all 9 Go services, HTTP server timeouts for mcp-firewall and gpu-integrity-watch, systemd production hardening (TimeoutStartSec, TimeoutStopSec, StartLimitInterval, StartLimitBurst) for all 12 daemon units, first-boot health validation script, audit log rotation via logrotate, CI dependency vulnerability scanning (govulncheck + pip-audit), production operations guide (upgrade, key rotation, capacity limits, monitoring) |
6161
| Operational maturity | Implemented | M46 | Bootstrap trust gap fix (cosign verify before unverified rebase, documented trust gap rationale), CI runs on all changes (removed blanket paths-ignore for .md files), Python quality gates (ruff lint + bandit security scan + split test suites into unit/integration and adversarial/acceptance), docs-validation CI job (broken link detection, required docs check, test-counts.json validation), production-readiness checklist (formal release gate), SLOs (availability/latency/correctness targets + alerting thresholds), release channel policy (stable/candidate/dev + versioning + upgrade paths + security patch SLA), support lifecycle (hardware matrix, driver versions, support windows, deprecation policy, scope boundaries), CI evidence table with all 10 job descriptions and workflow links, sample verification output for verify-release.sh |
62+
| CI enforcement hardening | Implemented | M47 | Enforced vulnerability scanning: bandit fails CI on HIGH-severity/HIGH-confidence findings, govulncheck fails on unwaived Go vulns, pip-audit fails on unwaived Python vulns. Waiver mechanism (`.github/vuln-waivers.json`) with mandatory expiry dates for reviewed/accepted findings. mypy type checking gate for security-sensitive services (common, agent, quarantine, ui). Pinned reproducible Python CI dependencies (`requirements-ci.txt`). Go 1.23→1.25 upgrade fixing 12 stdlib CVEs (crypto/tls, crypto/x509, encoding/asn1, net/url, os). Flask 3.1.1→3.1.3 (GHSA-68rp-wp8r-4726). Verification-first bootstrap documentation (signed rebase as default quickstart, unverified bootstrap moved to labeled recovery section). |
6263

6364
---
6465

docs/support-lifecycle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Last updated: 2026-03-14
6868

6969
| Component | Version | Pinned | Notes |
7070
|-----------|---------|--------|-------|
71-
| Go (services) | 1.23 | Yes (go.mod) | 9 Go services |
71+
| Go (services) | 1.25 | Yes (go.mod) | 9 Go services |
7272
| Python | 3.12 | Yes (Fedora 42 default) | 6 Python services |
7373
| llama.cpp | Latest stable | Via build | LLM inference engine |
7474
| Flask | 3.x | Via pip | Web UI framework |

0 commit comments

Comments
 (0)