Summary
This issue is created by StepSecurity related to security issues in changed-files-vulnerability-without-hr.yml . The platform has identified 2 vulnerabilities (1 critical, 0 high, 0 medium, 1 low).
Remediation Overview
The platform can generate remediations for a few vulnerabilities. For such vulnerabilities, you can find the fixed workflow file in the Suggested Fix For Auto-Remediable Issues section. You can manually deploy these changes or create a pull request by commenting @stepsecurity-int pull-request create on this issue.
If you’d like an automated pull request with the fixed workflow file, comment:
@stepsecurity-int pull-request create
Other issues require manual investigation and changes.
Once a vulnerability has been remediated, ✅ will appear in the title. Note that it may take up to 24 hours for these issues to be updated.
Please review the individual vulnerability section below and follow the recommended resolution steps.
Security Checks Details
❌ Actions should be pinned to a full-length commit SHA
-
Severity: Critical
-
Description: GitHub Action tags and Docker tags are mutable. This poses a security risk. GitHub's Security Hardening guide recommends pinning actions to full length commit.
-
Resolution: Pin Actions to a full-length commit SHA..
-
Automated Remediation Available ?: true
-
References:
❌ Network and runtime security monitoring should be enabled for GitHub-hosted runners
-
Severity: Low
-
Description: This check passes if the step-security/harden-runner GitHub Action is used in a job that runs on a GitHub-hosted runner. Harden-Runner prevents exfiltration of code and CI/CD credentials, and detects tampering of files during build.
-
Resolution: Add the step-security/harden-runner GitHub Action to the job.
-
Automated Remediation Available ?: true
-
References:
Suggested Fix For Auto-Remediable Issues
Below is the updated workflow, which fixes the following security vulnerabilities:
# Vulnerability details at https://securitylab.github.com/advisories/GHSL-2023-271_changed-files/
name: "Changed-Files Vulnerability: Without Harden-Runner"
on:
pull_request:
branches:
- main
permissions:
pull-requests: read
jobs:
changed_files:
runs-on: ubuntu-latest
name: Test changed-files
steps:
-
+ name: Harden the runner (Audit all outbound calls)
+ uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
+ with:
+ egress-policy: audit
+ -
uses: actions/checkout@
+ 11bd71901bbe5b1630ceea73d27597364c9af683 #
v4
+ .2.2
with:
fetch-depth: 0
# Example 1
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@
+ 56284d80811fb5963a972b438f2870f175e5b7c8 #
v40
+ .2.3
- name: List all changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done
Additional Information
For more information, refer to the documentation page here.
Please don't make any changes in the description as the platform makes automated updates in description. Please use the comment section below to provide input.
Automated remediation commands and options
- Create a pull request with automated security fixes
@stepsecurity-int pull-request create
- Close this issue and prevent it from being reopened
@stepsecurity-int issue close <REASON>
- Update issue description with latest security check status
@stepsecurity-int issue force-update
- View all available commands and their usage
Which GitHub Actions security best practices were evaluated?
The workflow was evaluated for the following GitHub Actions security best practices:
- Network & runtime security monitoring
- Token permissions
- Third‐party GitHub Actions usage & pinning
Summary
This issue is created by StepSecurity related to security issues in changed-files-vulnerability-without-hr.yml . The platform has identified 2 vulnerabilities (1 critical, 0 high, 0 medium, 1 low).
Remediation Overview
The platform can generate remediations for a few vulnerabilities. For such vulnerabilities, you can find the fixed workflow file in the
Suggested Fix For Auto-Remediable Issuessection. You can manually deploy these changes or create a pull request by commenting@stepsecurity-int pull-request createon this issue.Other issues require manual investigation and changes.
Once a vulnerability has been remediated, ✅ will appear in the title. Note that it may take up to 24 hours for these issues to be updated.
Please review the individual vulnerability section below and follow the recommended resolution steps.
Security Checks Details
❌ Actions should be pinned to a full-length commit SHA
Severity: Critical
Description: GitHub Action tags and Docker tags are mutable. This poses a security risk. GitHub's Security Hardening guide recommends pinning actions to full length commit.
Resolution: Pin Actions to a full-length commit SHA..
Automated Remediation Available ?: true
References:
GitHub Security Guide
The Open Source Security Foundation (OpenSSF) Security Guide
❌ Network and runtime security monitoring should be enabled for GitHub-hosted runners
Severity: Low
Description: This check passes if the step-security/harden-runner GitHub Action is used in a job that runs on a GitHub-hosted runner. Harden-Runner prevents exfiltration of code and CI/CD credentials, and detects tampering of files during build.
Resolution: Add the step-security/harden-runner GitHub Action to the job.
Automated Remediation Available ?: true
References:
GitHub Security Guide
The Open Source Security Foundation (OpenSSF) Security Guide
Suggested Fix For Auto-Remediable Issues
Below is the updated workflow, which fixes the following security vulnerabilities:
Actions should be pinned to a full-length commit SHA
Network and runtime security monitoring should be enabled for GitHub-hosted runners
# Vulnerability details at https://securitylab.github.com/advisories/GHSL-2023-271_changed-files/ name: "Changed-Files Vulnerability: Without Harden-Runner" on: pull_request: branches: - main permissions: pull-requests: read jobs: changed_files: runs-on: ubuntu-latest name: Test changed-files steps: - + name: Harden the runner (Audit all outbound calls) + uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4 + with: + egress-policy: audit + - uses: actions/checkout@ + 11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + .2.2 with: fetch-depth: 0 # Example 1 - name: Get changed files id: changed-files uses: tj-actions/changed-files@ + 56284d80811fb5963a972b438f2870f175e5b7c8 # v40 + .2.3 - name: List all changed files run: | for file in ${{ steps.changed-files.outputs.all_changed_files }}; do echo "$file was changed" doneAdditional Information
For more information, refer to the documentation page here.
Please don't make any changes in the description as the platform makes automated updates in description. Please use the comment section below to provide input.
Automated remediation commands and options
@stepsecurity-int helpWhich GitHub Actions security best practices were evaluated?
The workflow was evaluated for the following GitHub Actions security best practices: