ci: generate coverage badge with locked coverage-badge, drop tj-actions - #355
Merged
Conversation
tj-actions had a supply chain compromise in March 2025 and the coverage-badge-py action is only a thin wrapper around the coverage-badge pip package. Add coverage-badge to poetry dev dependencies so it is locked in poetry.lock, and generate the badge with poetry run instead of the action. Pin setuptools <82 in the dev group because coverage-badge 1.1.2 imports pkg_resources, which was removed in setuptools 82. Closes #347
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the CI coverage-badge generation pipeline by removing the dependency on tj-actions/coverage-badge-py@v2 (supply-chain risk) and generating the badge directly via a locked Poetry dev dependency.
Changes:
- Replace the
tj-actions/coverage-badge-py@v2workflow step withpoetry run coverage-badge -o report/coverage.svg. - Add
coverage-badgeto the Poetry dev dependency group so it is locked viapoetry.lock. - Pin
setuptools <82in dev dependencies to keeppkg_resourcesavailable forcoverage-badge.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
pyproject.toml |
Adds coverage-badge and pins setuptools <82 in dev dependencies to ensure deterministic, compatible badge generation. |
poetry.lock |
Locks coverage-badge and setuptools versions for reproducible CI installs. |
.github/workflows/generate-coverage-badge.yml |
Removes tj-actions usage and runs coverage-badge directly via Poetry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #347
What
tj-actions/coverage-badge-py@v2from the Generate Coverage Badge workflow. The tj-actions org had a supply chain compromise in March 2025, and the action is only a thin wrapper around thecoverage-badgepip package.coverage-badge ^1.1.2to poetry dev dependencies so the version is locked inpoetry.lock. The badge step becomespoetry run coverage-badge -o report/coverage.svg.setuptools <82in the dev group:coverage-badgeimportspkg_resourcesat startup, which was removed in setuptools 82, and its own metadata puts no upper bound on setuptools.Verification
tj-actionsreference remains in.github/(grep clean).poetry run coverage-badge -o report/coverage.svgproduces a valid SVG.