Skip to content

Commit 50f9e46

Browse files
committed
Update documentation audit state
1 parent bc3cd53 commit 50f9e46

8 files changed

Lines changed: 132 additions & 116 deletions

File tree

README.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ Tagged releases (`v*`) are built by the [Release workflow](.github/workflows/rel
207207
| `RELEASE_MANIFEST.json` | Machine-readable release manifest (binaries, SBOMs, provenance, build metadata) |
208208
| `secai-os-*.iso.sig` | Cosign signature for the bootable ISO |
209209
| `secai-os-*-usb.raw.xz.sig` | Cosign signature for the portable USB image |
210+
| `secai-os-*.qcow2(.sig)` | Optional KVM/QEMU disk image and signature when a self-hosted KVM runner is configured |
211+
| `secai-os-*.ova(.sig)` | Optional VirtualBox/VMware appliance and signature when a self-hosted KVM runner is configured |
210212

211213
Go services shipped as release binaries: `airlock`, `registry`, `tool-firewall`, `gpu-integrity-watch`, `mcp-firewall`, `policy-engine`, `runtime-attestor`, `integrity-monitor`, `incident-recorder`.
212214

@@ -226,19 +228,20 @@ For Windows users writing the portable USB image:
226228
To build portable USB or VM media locally from the OCI image:
227229

228230
```bash
229-
bash scripts/build-usb-image.sh # produces output/secai-os-<version>-x86_64-usb.raw(.xz)
230-
bash scripts/vm/build-qcow2.sh # produces output/secai-os.qcow2
231-
bash scripts/vm/build-ova.sh # produces output/secai-os.ova
231+
bash scripts/build-usb-image.sh # produces output/secai-os-<version>-x86_64-usb.raw(.xz)
232+
bash scripts/vm/build-qcow2.sh # creates output/secai-os.qcow2 and prints the virt-install command
233+
bash scripts/vm/build-qcow2.sh --ci # runs virt-install unattended on a KVM build runner
234+
bash scripts/vm/build-ova.sh # converts output/secai-os.qcow2 to output/secai-os.ova
232235
```
233236

234-
Requires a Linux host with `virt-install`, `qemu-img`, and `libvirt`.
237+
The USB builder uses a digest-pinned bootc-image-builder image by default. VM builds require a Linux host with `virt-install`, `virsh`, `qemu-img`, and `libvirt`.
235238

236239
### Verify a Release
237240

238241
```bash
239242
# Download and verify checksums
240-
curl -sSfL https://github.com/SecAI-Hub/SecAI_OS/releases/download/v0.1.0/SHA256SUMS -o SHA256SUMS
241-
curl -sSfL https://github.com/SecAI-Hub/SecAI_OS/releases/download/v0.1.0/SHA256SUMS.sig -o SHA256SUMS.sig
243+
curl -sSfL https://github.com/SecAI-Hub/SecAI_OS/releases/latest/download/SHA256SUMS -o SHA256SUMS
244+
curl -sSfL https://github.com/SecAI-Hub/SecAI_OS/releases/latest/download/SHA256SUMS.sig -o SHA256SUMS.sig
242245
cosign verify-blob --key cosign.pub --signature SHA256SUMS.sig SHA256SUMS
243246
sha256sum -c SHA256SUMS
244247

@@ -312,13 +315,14 @@ All CI jobs are defined in [`.github/workflows/ci.yml`](.github/workflows/ci.yml
312315

313316
| Job | Workflow Link | What It Proves |
314317
|-----|--------------|---------------|
315-
| `go-build-and-test` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | 413 Go tests across 9 services with `-race` (build, test, vet) |
316-
| `python-test` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | 998 Python tests (unit/integration + adversarial/acceptance), ruff lint, bandit security scan (enforced on HIGH/HIGH), mypy type checking |
318+
| `go-build-and-test` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | 428 Go tests across 9 services with `-race` (build, test, vet) |
319+
| `python-test` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | 1,132 Python tests (unit/integration + adversarial/acceptance), ruff lint, bandit security scan (enforced on HIGH/HIGH), mypy type checking |
320+
| `appsec-lint` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | Hadolint for container build files and Semgrep project security rules |
317321
| `security-regression` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | Adversarial test suite: prompt injection, policy bypass, containment, recovery |
318322
| `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 |
319323
| `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)) |
320324
| `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) |
321-
| `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.) |
325+
| `shellcheck` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | Static analysis of production shell entrypoints (first-boot, service build, MOK generation, verify-release, etc.) |
322326
| `policy-validate` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | YAML schema validation for all policy and recipe files |
323327
| `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) |
324328
| `docs-validation` | [View job](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/ci.yml) | Broken link detection, required docs presence, test-counts.json format validation |
@@ -334,7 +338,7 @@ All CI jobs are defined in [`.github/workflows/ci.yml`](.github/workflows/ci.yml
334338
| [API Reference](docs/api.md) | HTTP API for all services |
335339
| [Policy Schema](docs/policy-schema.md) | Full policy.yaml schema reference |
336340
| [Security Status](docs/security-status.md) | Implementation status of all 54 milestones |
337-
| [Test Matrix](docs/test-matrix.md) | Test coverage: 1,411 tests across Go and Python (see [test-counts.json](docs/test-counts.json)) |
341+
| [Test Matrix](docs/test-matrix.md) | Test coverage: 1,560 tests across Go and Python (see [test-counts.json](docs/test-counts.json)) |
338342
| [Compatibility Matrix](docs/compatibility-matrix.md) | GPU, VM, and hardware support |
339343
| [Security Test Matrix](docs/security-test-matrix.md) | Security feature test coverage |
340344
| [FAQ](docs/faq.md) | Common questions |
@@ -452,18 +456,18 @@ Privacy: Tor-routed, PII stripped, injection detection, privacy-preserving query
452456
## Running Tests
453457

454458
```bash
455-
# Go tests (413 total across 9 services)
459+
# Go tests (428 total across 9 services)
456460
for svc in airlock registry tool-firewall gpu-integrity-watch mcp-firewall \
457461
policy-engine runtime-attestor integrity-monitor incident-recorder; do
458462
(cd services/$svc && go test -v -race ./...)
459463
done
460464

461-
# Python tests (923 total)
462-
pip install pytest flask requests pyyaml
463-
python -m pytest tests/ -v
465+
# Python tests (1,132 total)
466+
python -m pip install -r requirements-ci.txt
467+
PYTHONPATH=services python -m pytest tests/ -v
464468

465469
# Shell script linting
466-
shellcheck files/system/usr/libexec/secure-ai/*.sh files/scripts/*.sh
470+
make shellcheck
467471
```
468472

469473
See [docs/test-matrix.md](docs/test-matrix.md) for full breakdown.
@@ -560,7 +564,7 @@ services/
560564
search-mediator/ Python -- Tor-routed web search (:8485)
561565
ui/ Python/Flask -- Web UI (:8480)
562566
common/ Python -- Shared utilities (audit, auth, mlock)
563-
tests/ 998 Python tests, 413 Go tests (1,411 total)
567+
tests/ 1,132 Python tests, 428 Go tests (1,560 total)
564568
docs/ Architecture, API, threat model, install guides
565569
schemas/ OpenAPI spec, JSON Schema for config files
566570
examples/ Task-oriented walkthroughs

docs/audit-quick-path.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,9 @@ Expected: verification succeeds with no errors. Output shows the signing certifi
188188
Verify that Software Bill of Materials can be generated for each service:
189189

190190
```bash
191-
# Install syft if not present
192-
# curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
191+
# Install Syft from a trusted package source or a pinned upstream release.
192+
# CI uses a pinned Anchore SBOM action instead of executing the moving
193+
# install.sh script from the upstream main branch.
193194

194195
# Generate and inspect SBOMs for Go services
195196
for svc in airlock registry tool-firewall gpu-integrity-watch mcp-firewall \
@@ -200,7 +201,7 @@ for svc in airlock registry tool-firewall gpu-integrity-watch mcp-firewall \
200201
done
201202

202203
# Generate SBOMs for Python services
203-
for svc in agent ui quarantine common; do
204+
for svc in agent ui quarantine common diffusion-worker search-mediator; do
204205
if [ -d "services/${svc}" ]; then
205206
syft dir:services/${svc} -o cyclonedx-json=sbom-${svc}.json
206207
echo "OK: ${svc}$(jq '.components | length' sbom-${svc}.json) components"

docs/install/dev.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This guide covers running SecAI OS services locally for development and testing,
77
## Prerequisites
88

99
- **Go 1.25+** for building Go services
10-
- **Python 3.11+** for running Python services (quarantine, UI, search-mediator)
10+
- **Python 3.12 recommended** for running Python services. CI and lockfiles use Python 3.12; package metadata still allows Python 3.11 where scanner compatibility requires it.
1111
- **pip** for Python dependency management
1212
- **git** for version control
1313
- **make** (optional, for convenience targets)
@@ -102,11 +102,11 @@ make test-go
102102
PYTHONPATH=services python -m pytest tests/ -v
103103

104104
# Specific test suites
105-
python -m pytest tests/test_quarantine_pipeline.py -v
106-
python -m pytest tests/test_ui.py -v
107-
python -m pytest tests/test_memory_protection.py -v
108-
python -m pytest tests/test_differential_privacy.py -v
109-
python -m pytest tests/test_traffic_analysis.py -v
105+
PYTHONPATH=services python -m pytest tests/test_quarantine_pipeline.py -v
106+
PYTHONPATH=services python -m pytest tests/test_ui.py -v
107+
PYTHONPATH=services python -m pytest tests/test_memory_protection.py -v
108+
PYTHONPATH=services python -m pytest tests/test_differential_privacy.py -v
109+
PYTHONPATH=services python -m pytest tests/test_traffic_analysis.py -v
110110
```
111111

112112
---

docs/install/quickstart.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Get SecAI OS running in the fewest steps possible. Choose the path that fits you
1212
| **Sandbox Stack** | ~10 min | Easy | Evaluate the control plane on an existing workstation |
1313
| **Development** | ~10 min | Easy | Service development only (no OS features) |
1414

15-
> **Note on release media:** The release pipeline builds both an installer ISO and a portable USB image (`*-usb.raw.xz`). Pre-built VM images (OVA/QCOW2) still require build infrastructure not yet provisioned. The bootstrap path remains the recommended production install, but the portable USB artifact is the right choice when you want to boot and evaluate directly from removable media. See [Artifact Availability](#artifact-availability) for details.
15+
> **Note on release media:** The release pipeline builds both an installer ISO and a portable USB image (`*-usb.raw.xz`). Pre-built VM images (OVA/QCOW2) are optional release artifacts and only appear when the repository has a self-hosted KVM runner configured. The bootstrap path remains the recommended production install, but the portable USB artifact is the right choice when you want to boot and evaluate directly from removable media. See [Artifact Availability](#artifact-availability) for details.
1616
1717
---
1818

@@ -127,14 +127,18 @@ If you want a self-contained VM image without installing Fedora first, you can b
127127
git clone https://github.com/SecAI-Hub/SecAI_OS.git
128128
cd SecAI_OS
129129

130-
# Build QCOW2 (requires: virt-install, qemu-img, libvirt)
130+
# Create the QCOW2 disk and a signed-first kickstart.
131+
# The script prints the virt-install command to complete the install.
131132
bash scripts/vm/build-qcow2.sh
132133

133-
# Optionally convert to OVA for VirtualBox/VMware
134+
# On a self-hosted KVM runner, run the install unattended.
135+
bash scripts/vm/build-qcow2.sh --ci
136+
137+
# After the QCOW2 install completes, optionally convert to OVA for VirtualBox/VMware.
134138
bash scripts/vm/build-ova.sh
135139
```
136140

137-
The build scripts pull the signed OCI image and create a bootable disk with root + encrypted vault partitions. Credentials are randomly generated and printed at build time.
141+
The QCOW2 builder installs the SecAI signing policy in the kickstart before the first image pull and rebases with `ostree-image-signed:docker://`. It creates root + encrypted vault partitions, writes the temporary kickstart with mode `0600`, and randomly generates temporary VM/vault credentials that are printed at build time. Change those credentials immediately after first boot.
138142

139143
**2. Start the VM**
140144

@@ -238,7 +242,7 @@ make verify-release
238242
| **ISO signature** | [GitHub Releases](https://github.com/SecAI-Hub/SecAI_OS/releases/latest) | `.iso.sig` file for verification |
239243
| **Portable USB image** | Release workflow artifact (90-day retention) | Built in CI as `secai-os-*-usb.raw.xz`; flash directly to removable media |
240244
| **Portable USB signature** | [GitHub Releases](https://github.com/SecAI-Hub/SecAI_OS/releases/latest) | `.raw.xz.sig` file for verification |
241-
| **QCOW2 / OVA** | `scripts/vm/build-qcow2.sh` / `build-ova.sh` | Build locally; CI build requires self-hosted KVM runner |
245+
| **QCOW2 / OVA** | Release workflow artifact when `HAS_KVM_RUNNER=true`, or `scripts/vm/build-qcow2.sh` / `build-ova.sh` locally | Optional; CI build requires self-hosted KVM runner |
242246

243247
The installer ISO and portable USB image are produced by every tagged release and are available as [workflow artifacts](https://github.com/SecAI-Hub/SecAI_OS/actions/workflows/release.yml) with 90-day retention. Their cosign signatures are published to GitHub Releases for verification. For permanent hosting, an external storage solution is still needed.
244248

0 commit comments

Comments
 (0)