Skip to content

Commit 913dd16

Browse files
leodidoona-agent
andcommitted
docs(slsa): document RequireAttestation modes and configuration
Add comprehensive documentation for SLSA cache verification modes: README.md changes: - Add new section "SLSA Cache Verification Modes" explaining: - Permissive Mode (RequireAttestation=false): Downloads without verification when attestation is missing, provides graceful degradation - Strict Mode (RequireAttestation=true): Skips download and builds locally when attestation is missing, enables self-healing for cross-PR mismatches - Add LEEWAY_SLSA_REQUIRE_ATTESTATION to auto-enabled environment variables list - Add "Require attestation" to SLSA L3 feature list - Provide examples for overriding the mode via CLI flag and environment variable CLI help text changes (cmd/root.go): - Add LEEWAY_SLSA_REQUIRE_ATTESTATION to environment variables list - Brief description: "Require valid attestations; missing/invalid → build locally" Documentation now covers: - What: Clear explanation of both verification modes - Why: Use cases and benefits of each mode - How: Configuration methods with practical examples - When: Auto-enabled with SLSA L3, can be overridden Co-authored-by: Ona <no-reply@ona.com>
1 parent 9307d95 commit 913dd16

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,15 +533,41 @@ Once enabled, all packages carry an [attestation bundle](https://github.com/in-t
533533
When `provenance.slsa: true` is set, Leeway automatically enables all SLSA L3 runtime features to ensure build integrity and artifact distinguishability:
534534

535535
- ✅ **Cache verification**: Downloads are verified against Sigstore attestations
536+
- ✅ **Require attestation**: Missing/invalid attestations trigger local rebuilds (strict mode)
536537
- ✅ **In-flight checksums**: Build artifacts are checksummed during the build to prevent tampering
537538
- ✅ **Docker export mode**: Docker images go through the cache and signing flow (workspace default)
538539

539540
These features are automatically enabled by setting environment variables:
540541
- `LEEWAY_SLSA_CACHE_VERIFICATION=true`
542+
- `LEEWAY_SLSA_REQUIRE_ATTESTATION=true`
541543
- `LEEWAY_ENABLE_IN_FLIGHT_CHECKSUMS=true`
542544
- `LEEWAY_DOCKER_EXPORT_TO_CACHE=true`
543545
- `LEEWAY_SLSA_SOURCE_URI` (set from Git origin)
544546

547+
### SLSA Cache Verification Modes
548+
549+
When cache verification is enabled, Leeway can operate in two modes:
550+
551+
**Permissive Mode** (`LEEWAY_SLSA_REQUIRE_ATTESTATION=false`, default when manually enabling):
552+
- Missing/invalid attestation → Download artifact without verification (with warning)
553+
- Provides graceful degradation and backward compatibility
554+
- Useful during migration or when some artifacts lack attestations
555+
556+
**Strict Mode** (`LEEWAY_SLSA_REQUIRE_ATTESTATION=true`, auto-enabled with `provenance.slsa: true`):
557+
- Missing/invalid attestation → Skip download, build locally with correct attestation
558+
- Enforces strict security and enables self-healing (e.g., cross-PR attestation mismatches)
559+
- Recommended for production environments requiring SLSA L3 compliance
560+
561+
You can override the mode using:
562+
```bash
563+
# Disable strict mode temporarily
564+
leeway build :app --slsa-require-attestation=false
565+
566+
# Or via environment variable
567+
export LEEWAY_SLSA_REQUIRE_ATTESTATION=false
568+
leeway build :app
569+
```
570+
545571
### Configuration Precedence
546572

547573
The Docker export mode follows a clear precedence hierarchy (highest to lowest):

0 commit comments

Comments
 (0)