Skip to content

fix: Phase 1 security hardening — sentinel constant, OIDC warnings, skip_rekor#54

Merged
avrabe merged 1 commit intomainfrom
feat/phase1-security-hardening
Mar 17, 2026
Merged

fix: Phase 1 security hardening — sentinel constant, OIDC warnings, skip_rekor#54
avrabe merged 1 commit intomainfrom
feat/phase1-security-hardening

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Mar 17, 2026

Summary

Phase 1 of the STPA-Sec implementation plan — immediate security hardening of shipped code.

1.1 Replace magic string sentinel with constant

  • Added REKOR_SKIPPED_UUID constant and is_rekor_skipped() helper in rekor.rs
  • Verifier now uses the helper instead of inline string comparison
  • Eliminates fragile coupling between signer sentinel and verifier guard

1.2 OIDC issuer validation improvements

  • Warning when not configured: log::warn! emitted when no --expected-issuer or WSC_EXPECTED_OIDC_ISSUER is set, with guidance
  • URL normalization: Trailing slash stripped before comparison to prevent false rejections (https://accounts.google.com vs https://accounts.google.com/)

1.3 Loud skip_rekor warning

  • log::error! + stderr banner when skip_rekor=true: "this module cannot pass keyless verification"
  • Updated doc comment explaining DD-2 fail-closed incompatibility
  • Uses REKOR_SKIPPED_UUID constant instead of inline string

Test plan

  • cargo test — 591 tests pass
  • CI: all checks should pass

🤖 Generated with Claude Code

…kip_rekor

Three improvements from STPA-Sec implementation plan Phase 1:

1. Replace magic string "skipped" with REKOR_SKIPPED_UUID constant and
   is_rekor_skipped() helper function. Eliminates fragile string coupling
   between signer and verifier.

2. Add loud warning when OIDC issuer validation is not configured (log::warn
   with guidance to set --expected-issuer). Add URL normalization for
   trailing slash comparison to prevent false rejections.

3. Emit log::error + stderr banner when skip_rekor=true, explicitly
   stating the module cannot pass keyless verification. Updated doc
   comments to reflect DD-2 fail-closed incompatibility.

Fixes: SC-5
Refs: AS-6, AS-13, DD-2, UCA-12

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@avrabe avrabe merged commit c7a5f9d into main Mar 17, 2026
12 checks passed
@avrabe avrabe deleted the feat/phase1-security-hardening branch March 17, 2026 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant