This repository was archived by the owner on Nov 3, 2025. It is now read-only.
Fix template injection in code coverage action - #683
Merged
Merged
Conversation
Address these zizmor findings:
```console
$ zizmor .github/workflows/code-coverage.yaml
2025-02-02T00:10:03.694628Z INFO zizmor: skipping impostor-commit: can't run without a GitHub API token
2025-02-02T00:10:03.694659Z INFO zizmor: skipping ref-confusion: can't run without a GitHub API token
2025-02-02T00:10:03.694670Z INFO zizmor: skipping known-vulnerable-actions: can't run without a GitHub API token
2025-02-02T00:10:03.723952Z INFO audit: zizmor: 🌈 completed .github/workflows/code-coverage.yaml
warning[artipacked]: credential persistence through GitHub Actions artifacts
--> .github/workflows/code-coverage.yaml:22:9
|
22 | - name: Checkout repository
| _________-
23 | | uses: actions/checkout@v4.2.2
| |_____________________________________- does not set persist-credentials: false
|
= note: audit confidence → Low
error[template-injection]: code injection via template expansion
--> .github/workflows/code-coverage.yaml:83:9
|
83 | - name: Check missed lines
| ^^^^^^^^^^^^^^^^^^^^^^^^ this step
84 | shell: python
85 | / run: |
86 | | import json
... |
122 | | is_ok = branch_coverage["linesMissed"] <= trunk_coverage["linesMissed"]
123 | | exit(0) if is_ok else exit(1)
| |________________________________________^ github.ref_name may expand into attacker-controllable code
|
= note: audit confidence → High
5 findings (3 suppressed): 0 unknown, 0 informational, 0 low, 1 medium, 1 high
```
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Address these zizmor findings:
This terraform change has already been deployed org-wide:
.github/workflows/code-coverage.yamlinartichoke/bobaboba#265.github/workflows/code-coverage.yamlin `artichoke/fo… focaccia#256.github/workflows/code-coverage.yamlin `artichoke/in… intaglio#297.github/workflows/code-coverage.yamlin `artichoke/po… posix-space#106.github/workflows/code-coverage.yamlin `artichoke/ra… rand_mt#264.github/workflows/code-coverage.yamlin `artichoke/ra… raw-parts#154.github/workflows/code-coverage.yamlinartichoke/roeroe#202.github/workflows/code-coverage.yamlin `artichoke/st… strftime-ruby#165