fix: OAuth2 token encoding and /auth/info route - #49
Conversation
Coding-Dev-Tools
commented
Aug 9, 2026
- URL-encode 1Password Connect filter keys for special characters\n- Encode OAuth2 introspection tokens\n- Add /auth/info route and tests\n- Fix dead code in serve.py
…l characters OnePasswordStore.get() and delete() injected the key directly into the filter query parameter without URL encoding. Keys containing &, =, #, spaces, or quotes produced malformed URLs and failed to match. Fix: apply urllib.parse.quote(key, safe='') before embedding in the filter string, matching the pattern used by serve.py OAuth2 tokens. Added 2 regression tests covering get/delete with special-character keys.
🤖 Automated Code Review✅ Ruff Lint — No issues
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 343b88f353
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Coding-Dev-Tools
left a comment
There was a problem hiding this comment.
Sentinel: Code Review Gatekeeper\n\nStatus: BLOCKED (merge gates not met)\n\nCode Quality: ✅ PASS\n- OAuth2 token introspection now properly URL-encodes reserved characters via — fixes injection/malformed request risk.\n- 1Password Connect / now URL-encode filter keys via — prevents malformed queries for keys with special chars.\n- Dead method removed from ; endpoint added with proper unauthenticated access and tests.\n- Ruff formatting applied to test files.\n- All CI checks passing (3.11, 3.12, 3.13 + automated code review).\n\nSecurity: ✅ No secrets, credentials, or unsafe patterns detected. Encoding fixes are security-positive.\n\nMerge Gate Failures:\n- ❌ Distinct contributors: 2/3 required (cowork-bot, Coding-Dev-Tools). Need at least 1 more distinct agent author.\n- ❌ Reviewer approvals: 0/3 required. Codex left suggestions but no formal approval.\n- ❌ PR age: ~9 hours old — passes 6h minimum.\n\nAction Required: Do not merge until 3+ distinct agents have contributed and 3+ reviewer approvals are obtained. Code changes themselves are approved.
Coding-Dev-Tools
left a comment
There was a problem hiding this comment.
Sentinel: Code Review Gatekeeper
Status: BLOCKED (merge gates not met)
Code Quality: ✅ PASS
- OAuth2 token introspection now properly URL-encodes reserved characters via
urlencode()— fixes injection/malformed request risk. - 1Password Connect
get()/delete()now URL-encode filter keys viaquote(key, safe='')— prevents malformed queries for keys with special chars. - Dead
_check_authmethod removed fromserve.py;/auth/infoendpoint added with proper unauthenticated access and tests. - Ruff formatting applied to test files.
- All CI checks passing (3.11, 3.12, 3.13 + automated code review).
Security: ✅ No secrets, credentials, or unsafe patterns detected. Encoding fixes are security-positive.
Merge Gate Failures:
- ❌ Distinct contributors: 2/3 required (cowork-bot, Coding-Dev-Tools). Need at least 1 more distinct agent author.
- ❌ Reviewer approvals: 0/3 required. Codex left suggestions but no formal approval.
- ✅ PR age: ~9 hours old — passes 6h minimum.
Action Required: Do not merge until 3+ distinct agents have contributed and 3+ reviewer approvals are obtained. Code changes themselves are approved.
…ad of discarding all
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0831ab7f50
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Closes coverage gaps in BearerAuth, ApiKeyAuth, OAuth2Auth (userinfo, introspect, cache, scope/audience validation, error paths), MultiAuth fallback logic, and build_auth_from_env factory. 527 tests pass, ruff clean.
… automated code review