Skip to content

fix(scope): enforce scope violations on introspection failure and unsupported forges (#1622)#1643

Open
nextlevelshit wants to merge 1 commit into
mainfrom
fix/scope-enforcement-1622
Open

fix(scope): enforce scope violations on introspection failure and unsupported forges (#1622)#1643
nextlevelshit wants to merge 1 commit into
mainfrom
fix/scope-enforcement-1622

Conversation

@nextlevelshit
Copy link
Copy Markdown
Collaborator

Closes #1622.

Summary

Three token-scope enforcement gaps fixed (from audit-security F1 findings):

  • Finding 1 (HIGH): introspection failure now produces a ScopeViolation blocking execution (was warning+skip)
  • Finding 2 (MEDIUM): nil introspector (unsupported forge) now emits per-scope violations (was warn+return)
  • Finding 3 (MEDIUM): fine-grained PAT error message updated with actionable bypass hint
  • Escape hatch: WAVE_SKIP_SCOPE_CHECK=1 added for fine-grained PATs, unsupported forges, air-gapped/CI environments

Docs updated

  • docs/reference/environment.mdWAVE_SKIP_SCOPE_CHECK row added
  • docs/reference/manifest.md — introspection failure + fine-grained PAT + unsupported forge behavior documented
  • docs/concepts/personas.md — bypass hint added to token scope section

Test plan

  • go test ./internal/scope/... — 10/10 pass
  • golangci-lint run ./internal/scope/... — 0 issues
  • Live test: fine-grained PAT against codeberg.org — should surface violation with hint
  • Live test: WAVE_SKIP_SCOPE_CHECK=1 wave run ... — should bypass and warn

…1622)

- Finding 1 (HIGH): introspection failure → ScopeViolation (was warning+skip)
- Finding 2 (MED): nil introspector (unsupported forge) → per-scope violations (was warn+return)
- Finding 3 (MED): fine-grained PAT hint updated to reference WAVE_SKIP_SCOPE_CHECK=1
- WAVE_SKIP_SCOPE_CHECK=1 bypass added for fine-grained PATs, unsupported forges, air-gapped envs
- Docs: environment.md, manifest.md, concepts/personas.md
@nextlevelshit nextlevelshit force-pushed the fix/scope-enforcement-1622 branch from ff5c6ab to 15db164 Compare May 2, 2026 13:09
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.

fix(scope): 3 token-scope enforcement gaps — silent skips on error/unsupported

1 participant