Skip to content

ci(codecov): upload with OIDC instead of CODECOV_TOKEN - #8

Closed
idelsink wants to merge 1 commit into
mainfrom
chore/OP-3890-codecov-oidc
Closed

idelsink wants to merge 1 commit into
mainfrom
chore/OP-3890-codecov-oidc

Conversation

@idelsink

@idelsink idelsink commented Nov 13, 2026 •

Copy link
Copy Markdown

Why

OP-3890: the org secret CODECOV_TOKEN is not rotated. Instead, every repo uploads to Codecov with OIDC, and then the token is deleted. aignostics/peng-dev-random#255 proved that an OIDC upload works for this org. Reference: aignostics/pdd-mapper#89.

How

  • test.yaml already passed no token. The upload step used codecov/codecov-action@v3, a tag that runs on a removed Node runtime. It now uses the v7.1.1 commit pin with use_oidc: true.
  • The test job gets a permissions block: contents: read and id-token: write. Before, it had none and used the repo default. This is narrower than the default.
  • The repo is public. A PR from a fork gets no OIDC token, so its upload fails to authenticate. The owner accepted this.
  • No actions.lock, no docs that name the token.

After all repos in OP-3890 merge, the org secret CODECOV_TOKEN is deleted.

Verified

  • git grep -i codecov_token returns nothing.
  • pinact run --check on test.yaml passes for the changed step. It still lists the actions/checkout@v4 and actions/setup-python@v5 tags, which this change does not touch.
  • actionlint and zizmor 1.32.0 (--offline --persona pedantic): every finding on the changed lines is gone, and no new finding.
  • No CI run exercises the upload: the repo is a fork and GitHub shows the Test workflow as disabled_fork, so it does not run on the PR.

Not verified

  • The scheduled run (cron: 0 5 1,15 * *) does not run on a PR.
  • No upload with OIDC ran at all (see Verified). The first real upload happens when the Test workflow runs after the merge, if it is enabled.
  • Fork PRs get no OIDC token and are not tested.
  • Build / package fails because the org policy requires SHA pins and Build uses actions/checkout@v4. It also fails on main and is not part of this change.
  • The repo pre-commit hooks (black, flake8, isort) could not install on this machine (an old isort env), so I committed with SKIP=black,flake8,isort. The change has no Python file.

@idelsink idelsink added the 🤖 stage: agent working Owner: agent. Agents build, verify and review this PR. Agents may push and edit. label Nov 13, 2026
@ox-security

ox-security Bot commented Nov 13, 2026

Copy link
Copy Markdown

OX Security Logo

OX Security reviewed this pull request — nothing to fix.

✔ No issues found

Branch chore/OP-3890-codecov-oidc → main

View scan in OX Security →

@idelsink

Copy link
Copy Markdown
Author

Closing: this fork uses no Codecov token or other secret (codecov-action@v3 without a token), and its Test workflow is disabled (disabled_fork), so the change would never run. Not needed for removing the org secret CODECOV_TOKEN (OP-3890).

@idelsink idelsink closed this Nov 13, 2026
@idelsink
idelsink deleted the chore/OP-3890-codecov-oidc branch November 13, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖 stage: agent working Owner: agent. Agents build, verify and review this PR. Agents may push and edit.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant