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
13 changes: 13 additions & 0 deletions .github/workflows/bdd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: BDD Tests

on:
push:
branches: ["main", "master"]
pull_request:

jobs:
bdd:
name: BDD tests
uses: RedHatInsights/processing-tools/.github/workflows/bdd.yaml@master
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

What do GitHub Actions security best practices recommend for referencing reusable workflows in another repository: pinning to a branch like master, a tag, or a full commit SHA?

💡 Result:

GitHub Actions security guidance recommends pinning reusable workflows to a full commit SHA (immutable) rather than a mutable branch like master/main. While {ref} can be a branch name, release tag, or SHA, GitHub explicitly notes that using the commit SHA is the safest option for stability and security. [1] GitHub also generally recommends SHA-pinning dependencies to reduce the risk of a compromised/moved tag or branch being pulled automatically. [2]

Answer: Prefer full commit SHA; avoid pinning to master/main. Tags are allowed, but SHA is the security-best-practice choice. [1][2]

Sources:
[1] GitHub Docs – Reusing workflows (reusable workflow refs; “commit SHA is the safest option”)
[2] GitHub Changelog – Recommendation to pin GitHub Actions dependencies to a specific commit SHA


Pin the reusable workflow to a full commit SHA.

Using @master allows upstream changes to alter this repository's CI behavior without review. GitHub Actions security best practices recommend pinning reusable workflows to a full commit SHA for stability and security.

Suggested change
-    uses: RedHatInsights/processing-tools/.github/workflows/bdd.yaml@master
+    uses: RedHatInsights/processing-tools/.github/workflows/bdd.yaml@<full_commit_sha>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/bdd.yaml at line 11, The reusable workflow reference
currently uses a floating ref "uses:
RedHatInsights/processing-tools/.github/workflows/bdd.yaml@master"; replace the
"@master" ref with the full commit SHA of the upstream commit you want to pin so
the workflow is deterministically versioned. Update the string in the
.github/workflows/bdd.yaml file to use the specific commit hash (e.g.,
.../bdd.yaml@<FULL_COMMIT_SHA>) and commit that change so CI uses the pinned
reusable workflow.

with:
service: inference-service
30 changes: 0 additions & 30 deletions .github/workflows/bdd.yml

This file was deleted.

Loading