Expose secret within the reusable workflow in order to use repos secrets#132
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Summary by CodeRabbit
WalkthroughThe PR declares an optional ChangesWorkflow Secret Parameter Addition
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
26d5137 to
70d2e4d
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with 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.
Inline comments:
In `@workflows_examples/gotests.yaml`:
- 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.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: 5eaf44b7-6c85-48f2-b427-e724b0c478a3
📒 Files selected for processing (2)
.github/workflows/gotests.yamlworkflows_examples/gotests.yaml
| jobs: | ||
| gotests: | ||
| uses: RedHatInsights/processing-tools/.github/workflows/gotests.yaml@v0.4.1 | ||
| uses: RedHatInsights/processing-tools/.github/workflows/gotests.yaml@v0.4.2 |
There was a problem hiding this comment.
🧩 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 -C2Repository: 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.
Description
Minor fix to use CODECOV_TOKEN secret and being able to push coverage results into the platform
Type of change
Testing steps
To be tested on repos