Skip to content

chore(ISV-7504): pin CI actions to SHA hash - #18

Open
bclindner wants to merge 1 commit into
mainfrom
ISV-7504
Open

chore(ISV-7504): pin CI actions to SHA hash#18
bclindner wants to merge 1 commit into
mainfrom
ISV-7504

Conversation

@bclindner

Copy link
Copy Markdown

Signed-off-by: Brian Lindner blindner@redhat.com

@qodo-redhat-openshift-ecosystem

Copy link
Copy Markdown

PR Summary by Qodo

Pin GitHub Actions in CI/CD workflow to commit SHAs

⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Pin all GitHub Actions used in CI/CD to immutable commit SHAs.
• Add version comments to keep action intent readable while hardening supply-chain security.
• Apply pins consistently across build, image, and deploy jobs.
Diagram

graph TD
  W["CI/CD workflow"] --> C["actions/checkout (SHA)"] --> PN["pnpm/action-setup (SHA)"] --> N["actions/setup-node (SHA)"] --> PO["snok/install-poetry (SHA)"]
  W --> L["podman-login (SHA)"]
  W --> A["ansible-playbook (SHA)"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Keep using version tags (e.g., @v4) without SHA pinning
  • ➕ Automatic receipt of upstream bug/security fixes
  • ➕ Less maintenance overhead updating SHAs
  • ➖ Weaker supply-chain guarantees (tag can move / compromised release)
  • ➖ Harder to audit exactly what ran in historical CI
2. Automate pinning/updates with tooling (e.g., pinact + Dependabot)
  • ➕ Retains immutable SHAs while reducing manual update work
  • ➕ Creates reviewable PRs when upstream action versions change
  • ➖ Adds an additional tool/workflow to maintain
  • ➖ May increase PR churn if not tuned

Recommendation: Pinning actions to SHAs (as done here) is the best default for CI supply-chain hardening, and the added version comments preserve readability. If maintenance burden becomes noticeable, consider layering automation (pinning updater + Dependabot) to keep SHAs current via routine PRs.

Files changed (1) +11 / -11

Other (1) +11 / -11
ci-cd.yamlPin CI/CD GitHub Actions to commit SHAs +11/-11

Pin CI/CD GitHub Actions to commit SHAs

• Replaces floating action tags (e.g., @v4/@v1.4.1) with specific commit SHAs across all jobs. Adds inline comments indicating the intended action versions to keep the workflow readable while ensuring immutability.

.github/workflows/ci-cd.yaml

@qodo-redhat-openshift-ecosystem

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

Signed-off-by: Brian Lindner <blindner@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant