Skip to content

fix(agent): const-time bearer + scope gates#389

Merged
intendednull merged 1 commit into
mainfrom
audit/agent-sec
Apr 26, 2026
Merged

fix(agent): const-time bearer + scope gates#389
intendednull merged 1 commit into
mainfrom
audit/agent-sec

Conversation

@intendednull
Copy link
Copy Markdown
Owner

Fixes

closes #301 #304 #305 #311

Test plan

  • cargo check -p willow-agent — pass
  • cargo fmt -p willow-agent — clean
  • cargo clippy -p willow-agent -- -D warnings — pass

Generated by Claude Code

Closes #301, #304, #305, #311.

- server.rs:235 bearer compare now uses subtle::ConstantTimeEq
  with length pre-check (timing-side-channel safe).
- server.rs:166 read_resource gates on scope.allows_resource
  before delegating, matching call_tool's rejection pattern.
- main.rs adds --scope {messaging,read,full}, defaulting to
  Messaging (least privilege) instead of Full via Default.

Verified: cargo check / fmt / clippy -D warnings (willow-agent).
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.

[SEC-V-01] Bearer token compared with non-constant-time ==

2 participants