Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/gotests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ name: Go tests

on:
workflow_call:
secrets:
CODECOV_TOKEN:
required: false
Comment thread
ikerreyes marked this conversation as resolved.

inputs:
coverage:
Expand Down
4 changes: 3 additions & 1 deletion workflows_examples/gotests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ on:

jobs:
gotests:
uses: RedHatInsights/processing-tools/.github/workflows/gotests.yaml@v0.4.1
uses: RedHatInsights/processing-tools/.github/workflows/gotests.yaml@v0.4.2
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether workflow references are pinned to immutable SHAs or mutable refs.
# Expected: no `uses:` entries ending with `@v`* / `@main` / `@master` for reusable workflows.
rg -nP --type=yaml '^\s*uses:\s*[^#\s]+/(?:\.github/workflows/[^@\s]+)@([A-Za-z0-9._-]+)\s*$' .github workflows_examples -C2

Repository: RedHatInsights/processing-tools

Length of output: 1688


Pin reusable workflow to an immutable commit SHA, not a mutable tag.

Using @v0.4.2 allows retagging and weakens supply-chain integrity for CI. Prefer @<full_sha> for deterministic and safer runs.

🔧 Proposed change
-    uses: RedHatInsights/processing-tools/.github/workflows/gotests.yaml@v0.4.2
+    uses: RedHatInsights/processing-tools/.github/workflows/gotests.yaml@<full_commit_sha>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@workflows_examples/gotests.yaml` at line 8, The workflow currently references
a mutable tag
"RedHatInsights/processing-tools/.github/workflows/gotests.yaml@v0.4.2" which
weakens CI supply-chain integrity; update the uses reference to the
corresponding immutable full commit SHA (replace "@v0.4.2" with
"@<full_commit_sha>") so the reusable workflow is pinned to a specific commit,
e.g., change the string in the uses key to
"RedHatInsights/processing-tools/.github/workflows/gotests.yaml@<full_sha>"
ensuring deterministic runs.

secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Loading