← Back to Pull requests

[Security] Pin GitHub Actions to a full-length commit SHA #141

Merged
chouetz merged 1 files (2 lines) on Nov 18, 2026 13:27 UTC
View on GitHub
chouetz chouetz commented on Nov 18, 2026 13:20 UTC
Author

Pin GitHub Actions to SHA hashes

This automated PR pins third-party GitHub Actions references from mutable tag versions (e.g., @v4) to their corresponding SHA hashes (e.g., @abc123...). The original tag is preserved as a comment for readability. Your workflows will work exactly the same way. Internal actions (under the DataDog organization) are not pinned.

Read https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions for more details and info on how to configure this for entire repos.

Why pin GitHub Actions?

Git tags are mutable: they can be moved to point to different commits at any time. A compromised or malicious action maintainer could update a tag to inject arbitrary code into your CI workflows (see the tj-actions incident). Pinning to SHA hashes ensures you always run the exact code you reviewed, protecting your repository from supply chain attacks such as the tj-actions incident.

What if something breaks?

If a pinned action doesn't work for your use case, you can push a commit directly to this branch to fix it. As a last resort, reach out to #sdlc-security on Slack.

Set up Dependabot or Renovate for automatic updates

Once actions are pinned to SHA hashes, you should configure Dependabot or Renovate to receive weekly update PRs when new versions are available.

In the case of Dependabot, create or update .github/dependabot.yml:

version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"
    groups:
      github-actions:
        patterns:
          - "*"
    open-pull-requests-limit: 10

Dependabot will automatically propose PRs that update both the SHA hash and the version comment like in this example.

---
This PR was automatically generated by the GitHub Actions Pinning tool, owned by #sdlc-security.

Diff: 2 lines (+1 / -1) across 1 files Reviewer: tbavelier Review duration: 7m
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.43) × (1 − Review Confidence (0.67)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 2 lines diff across 1 files
0.43
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.61 · 1 substantive comment(s)
0.61
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
66%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Rapid Merge rapid_merge
0.100
Diff Size diff_size
0.066
Sensitive Paths sensitive_paths
0.043
Real PR Conversation Timeline
3 items
tbavelier tbavelier approved these changes on Nov 18, 2026 13:26 UTC
Approved Reviewer

Approved these changes.

datadog-datadog-us1-prod[bot] datadog-datadog-us1-prod[bot] commented on Nov 18, 2026 13:27 UTC
Bot

<a target='_blank' href='https://app.datadoghq.com/ci/pipeline-executions?query=ci_level%3Ajob+%40ci.status%3Aerror+%40git.commit.sha%3A3b855b60c9ce6f5c1b5767aae5dbe4ec6d02c30a&referrer=pr-comment&start=1795006202000'><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.datadoghq.com/static/images/pr_comments/software_delivery/badges_header/pipelines-error.svg"/><img src="https://static.datadoghq.com/static/images/pr_comments/software_delivery/badges_header/pipelines-error-light.svg" alt="Pipelines" align="center" /></picture></a>

✨ <a href="https://app.datadoghq.com/api/ui/code-annotation/fix-with-bitsai?head_sha=3b855b60c9ce6f5c1b5767aae5dbe4ec6d02c30a&amp;pr_number=141&amp;repo_id=github.com%2Fdatadog%2Fdatadog-csi-driver"><b>Unblock PR with BitsAI</b></a>

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 2 Pipeline jobs failed

<blockquote>
<div>

<details open>
<summary>DataDog/datadog-csi-driver | e2e_tests: [arm64, arm64] — 🔧 Needs a code fix, caused by this PR</summary>

<a href="https://app.datadoghq.com/ci/pull-request/Z2l0aHViLmNvbS9kYXRhZG9nL2RhdGFkb2ctY3NpLWRyaXZlci8xNDE=?referrer=pr-comment&amp;buildId=AwAAAaHu1mdYPN5bZQAAABhBYUh1MW1kWUFBREUtQl83THlrLUNFcFEAAAAkMDFhMWVlZDYtNmY5Yi00ZGNkLThlMTEtYTRjZGVlMmE4NDk0AAAALg&amp;ciFailurePanel=job">View more details</a> · <a href="https://gitlab.ddbuild.io/DataDog/datadog-csi-driver/-/jobs/2270028336">View in GitLab</a>
</details>

<details open>
<summary>pull request linter | build</summary>

<a href="https://app.datadoghq.com/ci/pull-request/Z2l0aHViLmNvbS9kYXRhZG9nL2RhdGFkb2ctY3NpLWRyaXZlci8xNDE=?referrer=pr-comment&amp;buildId=AwAAAaHu0OFIfAobWgAAABhBYUh1ME9GSUFBQmc3TG9NU3VNLXdNRVgAAAAkMDFhMWVlZDQtODAzMi00ZmE0LWFmZWQtZWY1NThhY2JjZDZlAACKKg&amp;ciFailurePanel=job">View more details</a> · <a href="https://github.com/DataDog/datadog-csi-driver/actions/runs/44312658187/job/134830525322">View in GitHub Actions</a>
</details>
</div>
</blockquote>

Useful? React with 👍 / 👎

<sub>
This comment will be updated automatically if new data arrives. <br />
🔗 Commit SHA: 3b855b6 | <a href="https://docs.datadoghq.com/integrations/guide/source-code-integration/#pr-comments">Docs</a> | <a href="https://app.datadoghq.com/ci/pull-request/Z2l0aHViLmNvbS9kYXRhZG9nL2RhdGFkb2ctY3NpLWRyaXZlci8xNDE=?referrer=pr-comment">View more details</a> | Give us <a href="https://dd.enterprise.slack.com/archives/C07E3U2QRMM">feedback</a>!
</sub>

Reviewers
Assignees
chouetz chouetz
Labels
risk: low confidence: 66.6% reviewed sensitive_module
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 42.7% (MEDIUM) · Higher = larger blast radius
42.7%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 66.6% · Lower = rushed or shallow review
66.6%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 14.2% · Safe to merge
14.2%