Repository navigation
fix(security): accept ClickUp's compact-JWS client_id at its OAuth endpoint - #16816
iamwhatever wants to merge 1 commit into
Conversation
Design Review (Opus 5.5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Nothing shows a real ClickUp-issued Watch
[DESIGN-REVIEWED] 11e1c46 Description read[DESCRIPTION-READ] 1124eb996a4f6a36c1bca5f34c1c14effe4c62846f5dfb743eb7c32ccb97898c That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS At ClickUp's endpoint, the signature segment can still carry 32–512 random-looking bytes chosen by the URL's author; a maintainer should confirm that this stated residual is acceptable. What this change shipsInventory (5 items) — 5 justifiedIntent: authorize ClickUp's MCP server through the ACP OAuth banner, even though its registration issues a
[FIRST-PRINCIPLES-REVIEWED] 11e1c46 Description read[DESCRIPTION-READ] 8857232f0e52c889a06e4891462a0ce0bf8118b94ef042a682a557016a88c802 That sha256 names the PR description this verdict read. Recompute it with |
c918053 to
ee1f7ac
Compare
Security Scope Review -- 🟡 CONCERNSWhich legitimate operations does Verdict basis: the reviewer's own judgement; no confirmed regression. Security scope review -- adjudicated candidates
No candidate flipped from allowed to refused. Scope-Verdict: CONCERNS TIGHTENING: Nothing in this diff gets stricter. The change loosens the OAuth consent-URL banner gate ( ADJUDICATED: 13 candidates, 0 confirmed newly-refused. None of the shell deny tiers changed: in PLATFORM COVERAGE: I wrote posix rows (curl to the ClickUp and GitLab metadata, UNADJUDICATED: The guard is the OAuth banner credential gate (
On every path the URL goes through
Those last two would be refused by the new [SCOPE-REVIEWED] 11e1c46 |
GPT 6.1 Review — 🔴 changes requested (blocking)GPT 6.1 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- src/kiro_crew/security/exfil.py:1737 -- Percent-encoded credentials bypass the decoded-JWS scan
Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 still blocks. I ran the finding's own example and it gets through.
False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
e228c9b to
82a0ec4
Compare
Maintainer handoff — security review needs a human callThis PR re-lands @zachary-povey's #12796 (accept a compact-JWS 1. The three Opus findings, and how each was fixedEach was a genuine security defect, reproduced at the blocking head, and addressed in turn:
The recurring shape is the concern: the carve-out blanks the whole 2. Open design question (raised by Opus)The carve-out currently applies at every approved OAuth authorization endpoint (and operator-added ones), not only the endpoint that issues compact-JWS identifiers. For example 3. What is solid and worth keeping
4. CreditThank you, @zachary-povey, for the original fix in #12796 and for the thorough boundary tests — the authorship is preserved in this PR's git history ( |
82a0ec4 to
b5f488d
Compare
Sensitive Change ReviewSensitive files changed:
How to clear this check:
Only the author's comment counts this way. A reviewer can instead |
|
Rebased onto current
No code changes beyond the rebase. Pushed with |
b5f488d to
6dbf9b1
Compare
|
Follow-up to the maintainer handoff above: the maintainer chose pin the carve-out to the issuer. New head
|
Sensitive change review
|
8d22bc5 to
2ea29e6
Compare
2ea29e6 to
b7e5ddb
Compare
b7e5ddb to
0ad30fc
Compare
…dpoint ClickUp's MCP dynamic client registration issues a client_id shaped like a compact JWS. The fixed-credential signature matches any eyJ three-segment base64url run, so the ACP banner gate refused ClickUp's consent URL and the server could not be authorized. Blank that client_id before every credential scan, but only at https://mcp.clickup.com/oauth/authorize (no port, no fragment, not an operator endpoint) and only when the value is pure base64url with two dots, an optional mcp-client- label, a JOSE header whose alg fixes the signature's exact length, and a JSON-object payload that is not a dashboard link token. Every segment and the decoded header and payload still face the fixed-credential scan, and the decoded text faces the bare-secret scan. Every other endpoint keeps refusing a JWS-shaped client_id. Add ClickUp's endpoint to the approved list and describe the carve-out in the security spec. Tests pin the endpoint, parameter, shape and signature-length boundaries, and keep refused a bearer JWT at GitHub, an alg=none header with a bare secret, a credential or bare secret inside the decoded payload, and a dashboard link token inside client_id in any position. Co-authored-by: Zachary Povey <64191599+zachary-povey@users.noreply.github.com>
0ad30fc to
11e1c46
Compare
|
Closing: the compact-JWS client_id payload is free text, so a credential can be hidden in it under any encoding, and per-encoding scans do not converge (five GPT rounds). Reopen with an allowlist of ClickUp's real claim keys and value shapes once a real ClickUp client_id sample is available. |
Problem / Motivation
Goal: Let ClickUp's MCP server, whose dynamic client registration issues a compact-JWS
client_id, be authorized through the ACP OAuth banner.The banner-safety gate's fixed-credential signature matches any
eyJ-prefixed three-segment base64url run, so ClickUp's consent URL (https://mcp.clickup.com/oauth/authorize, from its RFC 8414 metadata) is refused as carrying a credential and no banner renders.Why it matters
ClickUp's MCP server cannot be authorized today. A JWS-shaped
client_idis indistinguishable by shape from a bearer JWT, so the exemption has to be pinned to the issuer that needs it rather than granted at every approved endpoint.Not a goal
oauth_endpoints.jsonentry gains it.client_id.What changed (motivation → approach → change)
client_idat ClickUp's endpoint is rejected as a credential.exfil._blank_clickup_jws_client_idblanks theclient_idvalue before every credential scan, only when the URL ishttps://mcp.clickup.com/oauth/authorize(no port, no fragment) and the value is pure base64url with two dots, its header (after an optionalmcp-client-label, ≤256 chars) is a JOSE object whosealgfixes the signature's exact length, and its payload (≤1024 chars) is a JSON object that is not a dashboard link token. Every segment and the decoded header and payload face the fixed-credential scan; the decoded text faces the bare-secret scan. The decoded header and payload may hold no backslash and no repeated key, and every JSON key and string value is scanned. The signature segment is base64url-decoded and refused if its bytes hold a fixed credential or any 12-byte printable ASCII run. Residual: 32 markerless random bytes in the signature (more for longer algs) cannot be told from a real digest; that slot is not bare-secret scanned because a real HS256 signature trips that heuristic ~25% of the time. ClickUp's endpoint joins the approved list._PACKAGE_LINE_BUDGET28,844 → 28,979 (main's own raises since then included) with a justification paragraph (the +75 lines are the pinned carve-out). The security spec (docs/system-specs/modules/security.md) describes the carve-out.Backwards compatibility
Compatible: only ClickUp's endpoint accepts something it refused before; every other URL gets the same verdict as on
main.Removes nothing: no capability, path, key or validator is removed.
Tests
test/test_mcp_oauth_banner.py::TestJwsClientIdCarveOut:client_id, and an opaque one.http, case-variant param name, and an operator-approved endpoint (assume_approved_endpoint=True).%2Eseparators, a marker in any segment, a signature that does not fit itsalgexactly (short bare secret, 56 KB,NONE, non-stringalg), an unknown label, a credential or bare secret inside the decoded payload, a\u-escaped,\/-split, key-position or nested credential, a repeated key or any backslash, and a credential or 12-byte printable run hidden in the decoded signature.alg=noneheader with a bare secret (GitHub and ClickUp); an unsigned header; a dashboard link token insideclient_id(as payload+signature, reordered, or nested in a claim).stateor an unknown param is still caught beside a JWSclient_id; a deeply nested header returns a verdict instead of raising.test/oauth_url_corpus.py— ClickUp regression entry (synthetic JWS, no real credential).Local: 518 passed across the OAuth/exfil test files, plus
test_security_gate_liveness.py.Manual verification
N/A — unit coverage sufficient; the gate is a pure function of the URL.
Related Issues
Fixes #16815
Pattern harvest
Not generalizable: a one-off identifier form pinned to its single issuer.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Credit: this fix builds on the work of @zachary-povey in #12796 (
Co-authored-by:trailer preserved). Supersedes #12796.