Repository navigation
Description
Summary
Since PR #7817 introduced pin-ci-job-identity.sh (v0.44.0 scaffold), all poll jobs fail at the identity-pinning step. The script calls GET /api/v4/projects/:id with JOB-TOKEN authentication, but this endpoint returns {"message":"404 Project Not Found"}. The endpoint is not listed in GitLab's CI job token access documentation and has no job_token_allowed: true in its route settings (lib/api/projects.rb in GitLab source).
Root cause
pin-ci-job-identity.sh makes three JOB-TOKEN-authenticated API calls after the initial GET /api/v4/job (which succeeds). Diagnostic logging with HTTP status codes and response bodies shows:
INFO: GET /job with JOB-TOKEN succeeded — project_id=143182 pipeline_id=18135424 ref=main
INFO: testing JOB-TOKEN auth against three API endpoints for project 143182
WARN: GET /projects/143182 with JOB-TOKEN — HTTP 404 — falling back to CI variables
WARN: response body: {"message":"404 Project Not Found"}
WARN: GET /projects/143182/repository/branches/main with JOB-TOKEN — HTTP 404
WARN: response body: {"message":"404 Project Not Found"}
INFO: GET /projects/143182/pipelines/18135424 with JOB-TOKEN — HTTP 200 OK
| Endpoint | HTTP | Notes |
|---|---|---|
GET /api/v4/job |
200 | Correctly returns project_id, pipeline_id, ref |
GET /api/v4/projects/:id |
404 | "Project Not Found" — not listed in GitLab JOB-TOKEN docs |
GET /api/v4/projects/:id/repository/branches/:branch |
404 | "Project Not Found" — listed in GitLab docs (Branches API), but the underlying project resolution fails first |
GET /api/v4/projects/:id/pipelines/:id |
200 | Works |
The branches endpoint 404 is not independent — the response body is "Project Not Found" (not branch not found), indicating the project resolution step rejects JOB-TOKEN before the branch lookup runs. The same project returns 200 with a personal access token.
Observed behaviour
fullsend slash poll (pipeline 18131668 / job 62521240) and fullsend event poll (pipeline 18131669 / job 62521241) fail identically:
fullsend version 0.44.0
$ . "${CI_PROJECT_DIR:-.}/.gitlab/ci/scripts/run-poll-job.sh"
curl: (22) The requested URL returned error: 404
curl: (22) The requested URL returned error: 404
curl: (22) The requested URL returned error: 404
curl: (22) The requested URL returned error: 404
ERROR: cannot read pinned project 143182 — aborting (fail-closed)
The four curl lines are --retry 3 --retry-delay 2 --retry-all-errors exhausted on GET /api/v4/projects/143182 with JOB-TOKEN.
- GitLab: self-hosted EE 19.2.7
- fullsend: v0.44.0
Related
- ADR 0125: in-job security gate hardening (agent + poll scripts) #7769 (in-job security gate hardening epic)
- PR fix(#7769): pin GitLab job identity to CI_JOB_TOKEN record #7817 (introduced
pin-ci-job-identity.sh) - poll state CAS broken on self-hosted GitLab EE: start_sha rejected for existing branches #7892 (prior self-hosted EE incompatibility —
start_shaCAS, now fixed)
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
waynesun09 commentedon Oct 2, 2026
/fs-triage
fullsend-ai-triage commentedon Oct 2, 2026
🤖 Finished Triage · ✅ Success · Started 11:28 AM UTC · Completed 11:31 AM UTC
Commit:
406b794· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $0.46
fullsend-ai-triage commentedon Oct 2, 2026
Thank you for the detailed diagnostics — the endpoint-by-endpoint breakdown with HTTP statuses and response bodies makes this straightforward to act on.
This traces back to ADR 0125's own Caveats section, which flags verifying
CI_JOB_TOKENrunning-job-identity behavior against the target GitLab version as an open, ship-gating item before the fast-path shipped — this issue appears to be exactly that gap surfacing forGET /api/v4/projects/:idon self-hosted EE 19.2.7. No open PR currently addresses this, and the two referenced issues (#7769, the hardening epic, and #7892, a prior self-hosted EE incompatibility in the same gate) are both already closed, so there are no outstanding blockers here.A plausible fix direction: since the project/pipeline/ref identity is already pinned from the trusted
GET /jobJOB-TOKEN response before the failing call, the subsequent project-detail and branch-protection lookups may not need JOB-TOKEN auth at all — the already-provisioned Poller-role PAT could serve those reads instead, preserving fail-closed semantics without relying on an endpoint self-hosted EE apparently doesn't expose to JOB-TOKEN callers.Labels: Matches this repo's pattern for confirmed, high-impact self-hosted GitLab EE defects in the CI identity/dispatch gate family (e.g. #7892, #7409): a critical, security-relevant bug in the dispatch/CI pipeline area, ready for automatic fix dispatch.
Next steps:
/fs-code— agent creates a PR to implement this issue/fs-code <your instruction>— agent implements with your specific guidancefullsend-ai-coder commentedon Oct 2, 2026
🤖 Finished Code · ✅ Success · Started 11:34 AM UTC · Completed 11:51 AM UTC
Commit:
406b794· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5 · Effort: high · Cost: $3.03
fix(fullsend-ai#7965): fall back to Poller PAT when JOB-TOKEN 404s on…
Merge pull request fullsend-ai#7967 from fullsend-ai/agent/7965-gitla…