Skip to content

Check the runner's credential on the token exchange and deregister routes #43

Closed

Description

@waynesun09

The runner protocol's token exchange, POST /_apis/oauth2/token?runner_id=<id>, issues a runner token after checking only the grant type and that the runner exists. The runner's registration credential isn't checked. actions/runner sends a JWT client assertion, signed with the RSA key it registered.

The pipelines deregister routes don't take a runner credential either. They are reachable with a token from the exchange above.

To match GitHub:

  1. On the token exchange, verify the client_assertion JWT against the public key stored at registration. Check iss/sub (the runner's client id), aud, and the expiry, and answer 400 invalid_client when it fails.
  2. Require the runner's own token on the deregister routes, as on the other runner routes.
  3. Tests: a wrong key, an expired assertion and another runner's id are refused; config.sh registration, the message long-poll and config.sh remove still work end to end.

Found in the review of #29. Part of #39.

Activity

  1. fullsend-ai-triage commented on Nov 19, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 1:21 AM UTC · Completed 1:23 AM UTC

    Commit: 22d460a · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.27

  2. added
    bug
    ready-to-code
    on Nov 19, 2026
  3. fullsend-ai-triage commented on Nov 19, 2026

    @fullsend-ai-triage

    Triage notes:

    Proposed test case:

    register runner with known RSA key
    exchange with valid signed assertion -> 200 + access_token
    exchange with wrong key / expired / sub of another runner / wrong aud / no assertion -> 400 invalid_client
    DELETE deregister (repo and enterprise): no token -> 401/403; another runner's token -> 401/403; own token -> 200
    config.sh register -> long-poll -> config.sh remove still works end to end
    

    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
  4. fullsend-ai-coder commented on Nov 19, 2026

    @fullsend-ai-coder
    Contributor

    🤖 Finished Code · ✅ Success · Started 1:25 AM UTC · Completed 1:50 AM UTC

    Commit: 22d460a · View workflow run →

    Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $3.24

  5. added 2 commits that reference this issue on Nov 19, 2026
  6. added a commit that references this issue on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugready-to-code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions