You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(slsa): add RequireAttestation configuration for strict SLSA verification
Add support for LEEWAY_SLSA_REQUIRE_ATTESTATION environment variable and
--slsa-require-attestation CLI flag to control behavior when SLSA
attestations are missing or invalid.
When RequireAttestation=true (strict mode):
- Missing/invalid attestation → skip download, build locally
- Enables self-healing for cross-PR attestation mismatches
- Auto-enabled when provenance.slsa=true in WORKSPACE.yaml
When RequireAttestation=false (permissive mode, default):
- Missing/invalid attestation → download without verification (with warning)
- Provides graceful degradation and backward compatibility
Changes:
- Add EnvvarSLSARequireAttestation constant to cmd/root.go and pkg/leeway/workspace.go
- Add --slsa-require-attestation flag to build command
- Update parseSLSAConfig() to read and apply RequireAttestation setting
- Update ApplySLSADefaults() to auto-enable RequireAttestation with SLSA L3
- Enhance documentation in pkg/leeway/cache/types.go
- Update implementation comments in pkg/leeway/cache/remote/s3.go
The actual RequireAttestation logic in downloadWithSLSAVerification() was
already implemented; this commit adds the configuration mechanism.
Co-authored-by: Ona <no-reply@ona.com>
cmd.Flags().Bool("in-flight-checksums", false, "Enable checksumming of cache artifacts to prevent TOCTU attacks")
206
207
cmd.Flags().String("report", "", "Generate a HTML report after the build has finished. (e.g. --report myreport.html)")
207
208
cmd.Flags().String("report-segment", os.Getenv(EnvvarSegmentKey), "Report build events to segment using the segment key (defaults to $LEEWAY_SEGMENT_KEY)")
0 commit comments