Skip to content

Replace deprecated Codecov bash uploader with pinned codecov-action#5384

Open
frenck wants to merge 2 commits into
mainfrom
frenck/pin-codecov-uploader
Open

Replace deprecated Codecov bash uploader with pinned codecov-action#5384
frenck wants to merge 2 commits into
mainfrom
frenck/pin-codecov-uploader

Conversation

@frenck

@frenck frenck commented Jul 12, 2026

Copy link
Copy Markdown
Member

Proposed change

The pytest workflow uploaded coverage with the deprecated Codecov bash uploader, piped straight into a shell without pinning (curl -sfSL https://codecov.io/bash | bash -). That was the exact vector of the 2021 Codecov supply chain compromise, and it is the only unpinned thing in an otherwise fully SHA-pinned workflow.

This replaces it with codecov/codecov-action pinned by commit SHA (v7.0.0), consistent with how all other actions in this workflow are pinned. Uploads are tokenless, which is fine for a public repository. The human readable coverage report (scripts/coverage) moved to its own step so it stays visible in the CI logs. Also adds the missing trailing newline to the file.

Note: the upload step only runs on the Python 3.14 leg, unchanged from before.

Type of change

  • Enhancement (CI hardening, non-breaking)

Checklist

  • The change is tested and works locally (YAML validated).
  • There is no commented out code in this PR.

Copilot AI review requested due to automatic review settings July 12, 2026 19:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Hardens the CI coverage upload in the pytest workflow by removing the deprecated, unpinned Codecov bash uploader (curl ... | bash) and replacing it with a commit-SHA-pinned codecov/codecov-action.

Changes:

  • Adds a dedicated step to print the human-readable coverage report in CI logs (only on the Python 3.14 matrix leg).
  • Replaces the deprecated Codecov bash uploader with codecov/codecov-action pinned to a specific commit SHA.
  • Configures the action to upload coverage.xml.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +101 to +103
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
files: coverage.xml

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't needed, as tokenless upload has been enabled.

scripts/coverage
curl -sfSL https://codecov.io/bash | bash - No newline at end of file
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this set fail_ci_if_error: true?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants