Skip to content

fix(security): pin dependencies - #1

Open
itv-github-actions-pinner[bot] wants to merge 1 commit into
mainfrom
security/sha-pin
Open

fix(security): pin dependencies#1
itv-github-actions-pinner[bot] wants to merge 1 commit into
mainfrom
security/sha-pin

Conversation

@itv-github-actions-pinner

Copy link
Copy Markdown

🔒 Security Enhancement: Pin GitHub Actions to Commit SHAs

This automated Pull Request 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 ITV organization) are not pinned.

Read GitHub docs on secure use of third-party actions and ITV's GitHub Actions Security Policy 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 GitHub Actions Supply Chain Attack). 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.

Example Changes

Before:

uses: actions/checkout@v4.1.1

After:

uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11  # v4.1.1

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.
Alternatively, reach out to #cyber-security on Slack for any issues.

Keep pins up to date

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

In the case of Renovate, add to your renovate.json:

{
  "extends": ["helpers:pinGitHubActionDigestsToSemver"],
  "enabledManagers": ["github-actions"]
}

This PR was automatically generated to enhance our security posture.

@github-actions

Copy link
Copy Markdown

Latest scan for commit: ebfc7a4 | Updated: 2026-07-23 21:12:37 UTC

Security Scan Results

Scan Metadata

  • Project: ASH
  • Scan executed: 2026-07-23T21:12:18+00:00
  • ASH version: 3.2.2

Summary

Scanner Results

The table below shows findings by scanner, with status based on severity thresholds and dependencies:

Column Explanations:

Severity Levels (S/C/H/M/L/I):

  • Suppressed (S): Security findings that have been explicitly suppressed/ignored and don't affect the scanner's pass/fail status
  • Critical (C): The most severe security vulnerabilities requiring immediate remediation (e.g., SQL injection, remote code execution)
  • High (H): Serious security vulnerabilities that should be addressed promptly (e.g., authentication bypasses, privilege escalation)
  • Medium (M): Moderate security risks that should be addressed in normal development cycles (e.g., weak encryption, input validation issues)
  • Low (L): Minor security concerns with limited impact (e.g., information disclosure, weak recommendations)
  • Info (I): Informational findings for awareness with minimal security risk (e.g., code quality suggestions, best practice recommendations)

Other Columns:

  • Time: Duration taken by each scanner to complete its analysis
  • Action: Total number of actionable findings at or above the configured severity threshold that require attention

Scanner Results:

  • PASSED: Scanner found no security issues at or above the configured severity threshold - code is clean for this scanner
  • FAILED: Scanner found security vulnerabilities at or above the threshold that require attention and remediation
  • MISSING: Scanner could not run because required dependencies/tools are not installed or available
  • SKIPPED: Scanner was intentionally disabled or excluded from this scan
  • ERROR: Scanner encountered an execution error and could not complete successfully

Severity Thresholds (Thresh Column):

  • CRITICAL: Only Critical severity findings cause scanner to fail
  • HIGH: High and Critical severity findings cause scanner to fail
  • MEDIUM (MED): Medium, High, and Critical severity findings cause scanner to fail
  • LOW: Low, Medium, High, and Critical severity findings cause scanner to fail
  • ALL: Any finding of any severity level causes scanner to fail

Threshold Source: Values in parentheses indicate where the threshold is configured:

  • (g) = global: Set in the global_settings section of ASH configuration
  • (c) = config: Set in the individual scanner configuration section
  • (s) = scanner: Default threshold built into the scanner itself

Statistics calculation:

  • All statistics are calculated from the final aggregated SARIF report
  • Suppressed findings are counted separately and do not contribute to actionable findings
  • Scanner status is determined by comparing actionable findings to the threshold
Scanner S C H M L I Time Action Result Thresh
bandit 0 0 0 0 0 0 835ms 0 PASSED MED (g)
cdk-nag 0 0 0 0 0 0 9.4s 0 PASSED MED (g)
cfn-nag 0 0 0 0 0 0 72ms 0 PASSED MED (g)
checkov 0 0 0 0 0 0 6.4s 0 PASSED MED (g)
detect-secrets 0 0 0 0 0 0 253ms 0 PASSED MED (g)
grype 0 0 0 0 0 0 57.5s 0 PASSED MED (g)
npm-audit 0 0 0 0 0 0 238ms 0 PASSED MED (g)
opengrep 0 0 0 0 0 0 16.8s 0 PASSED MED (g)
semgrep 0 0 0 0 0 0 <1ms 0 MISSING MED (g)
syft 0 0 0 0 0 0 3.2s 0 PASSED MED (g)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants