Skip to content

chore: update harden-runner to v2.23.0 (int) - #515

Merged
h0x0er merged 1 commit into
intfrom
jatin/harden-runner-v2.23.0-int
Nov 25, 2026
Merged

h0x0er merged 1 commit into
intfrom
jatin/harden-runner-v2.23.0-int

Conversation

@h0x0er

@h0x0er h0x0er commented Nov 25, 2026

Copy link
Copy Markdown
Member

Updates step-security/harden-runner to v2.23.0 in all workflows, pinned to commit SHA aebdcf6156ab6691adf63218240e476564a1ed4c.

@step-security-bot-int step-security-bot-int left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please find StepSecurity AI-CodeWise code comments below.

Code Comments

.github/workflows/codeql-analysis.yml

  • [High]Pin specific versions of dependencies to immutable commit hashes
    While the patch updates the 'step-security/harden-runner' action from one commit hash to another, it is important that the commit hash used is immutable and verified. Using SHA commit hashes for GitHub Actions is recommended by GitHub documentation to avoid supply chain attacks from third-party action updates (https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions). Confirm that the commit hash 'aebdcf6156ab6691adf63218240e476564a1ed4c' is immutable and thoroughly reviewed before use. Avoid using branch names or tags that can move. This change already pins to a commit SHA which is appropriate.
  • [Medium]Limit the egress-policy scope to minimize network exposure
    The 'harden-runner' step specifies 'egress-policy: audit'. According to the minimal privilege principle from OWASP Application Security (https://owasp.org/www-project-top-ten/), policies should minimize open network access to only necessary endpoints to reduce attack surface. Review and tighten the 'egress-policy' setting if possible. Instead of 'audit', consider restrictive policies that only allow specific egress traffic required for the action and workflow operation. Update the 'egress-policy' parameter accordingly.
  • [Low]Verify action compatibility before upgrading versions
    Upgrading to a newer commit hash of an external action may introduce breaking changes or incompatible behavior. Following semantic versioning and release notes from maintainers helps prevent unexpected failures (https://semver.org/). Test the new version 'v2.23.0' of 'step-security/harden-runner' in a controlled environment before pushing to production workflows. Review changelogs and documentation of the action for any breaking changes.

.github/workflows/dependency-review.yml

  • [High]Pin third-party GitHub Actions to a specific, immutable commit SHA to ensure reproducible and secure workflows
    Referencing GitHub Actions via commit SHA rather than a branch or tag ensures that the exact same version of the action is used every time the workflow runs. This practice prevents unexpected changes or malicious code injections because the action cannot be altered after the SHA is set. (Source: GitHub Docs - "Workflow syntax for GitHub Actions", https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-specific-commit-sha-for-an-action). Continue using immutable commit SHAs to reference actions, as seen here referencing @aebdcf6156ab6691adf63218240e476564a1ed4c, and avoid using floating tags or branch names (e.g., 'latest' or 'v2').
  • [Medium]Add versioning information or commit message annotations in the workflow to document updates to third-party actions
    Maintaining clear versioning or comments about the action upgrade helps future maintainers understand why the upgrade was made and which vulnerabilities or features are addressed. This aligns with best practices around change management and auditability. (Source: OWASP ASVS 14.1.5 - "Use version control for all code and configuration files"). Add a comment above the 'uses: step-security/harden-runner@aebdcf6' line indicating the action version, the reason for upgrade, or relevant release notes.
  • [Low]Define the egress-policy parameter explicitly and ensure that 'audit' mode aligns with organizational security policies
    Egress policies control outbound network connections for the runner. Using 'audit' mode means the runner logs egress but does not block it. Confirming this matches the security posture prevents misconfigurations that could allow unintended data leakage. (Source: CIS Controls v8 - Control 14.4 Authorized use of Administrative Privileges). Review organizational policies related to network egress and confirm 'audit' is appropriate; if stricter controls are needed, consider enforcing a block or limit policy instead.

.github/workflows/int.yml

.github/workflows/release.yml

  • [Medium]Pin GitHub Action dependencies to specific commit SHAs, not tags or floating references
    Using a floating tag like 'v2.8.0' instead of a specific commit SHA can lead to non-deterministic builds if the tag is moved or updated. Pinning to a commit hash ensures reproducible and secure workflows as described in GitHub's official documentation on pinning actions: https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions. Ensure you always pin GitHub Actions to a specific commit SHA instead of tags or branches. In this patch, you correctly moved from a tag to a commit SHA, which is the recommended best practice.

  • [Low]Explicitly specify semantic versioning for the used GitHub Action in addition to the commit SHA for better clarity
    While pinning to a commit SHA is most secure, including the semantic version in comments or as part of the usage string helps maintain readability and clarity about which version is used. This practice is recommended in community best practices for action versioning. Add a comment to explicitly mention the semantic version alongside the SHA as shown:

  • uses: step-security/harden-runner@aebdcf6 # v2.23.0

.github/workflows/code-review.yml

  • [High]Pin to an explicit version tag instead of a commit SHA for better traceability and reproducibility
    Using a commit SHA directly for the GitHub Action version can make it harder to track which version is in use and could lead to accidental upgrades if the action is repointed. According to the GitHub Actions best practices, it is recommended to use a semantic version or explicit release tag to improve maintainability and security auditing (GitHub Docs: https://docs.github.com/en/actions/using-workflows/reusing-workflows#best-practices-for-reusing-workflows). Change the 'uses' field from the commit SHA to an explicit version tag such as 'step-security/harden-runner@v2.23.0' to maintain clarity on the version and facilitate easier upgrades and audits.
  • [Medium]Add explicit versions for all dependent actions to prevent unintended changes
    While the patch updates the harden-runner action version, make sure that all GitHub actions used in the workflow specify explicit versions to avoid silent upgrades. This aligns with the principle of immutable dependencies for security and stability (OWASP Dependency Management: https://owasp.org/www-project-dependency-check/). Review the entire workflow's actions usage and replace any floating tags like 'latest' or commit SHAs without version tags to explicit releases or fixed commit SHAs.
  • [Medium]Document the reason for the specific settings passed to the hardened runner action
    Explicitly documenting disabling sudo and blocking egress gives maintainers better context about security policies in place. Clear documentation reduces errors due to misunderstandings (SEI CERT: https://wiki.sei.cmu.edu/confluence/display/c/Code+Security+Best+Practices). Add comments above or alongside the action to explain why 'disable-sudo' is set to true and 'egress-policy' is set to block, describing the security objective behind these configurations.
  • [Low]Add a hash or checksum verification if the action supports it to avoid tampering
    Ensuring action integrity by verifying a cryptographic hash prevents supply-chain attacks as recommended by GitHub security best practices (GitHub Blog: https://github.blog/2021-03-09-improving-github-actions-security-with-verification/). If supported, include a verified digest or checksum for 'step-security/harden-runner@v2.23.0' or the commit SHA to guarantee that the action used is exactly what is expected.

Feedback

We appreciate your feedback in helping us improve the service! To provide feedback, please use emojis on this comment. If you find the comments helpful, give them a 👍. If they aren't useful, kindly express that with a 👎. If you have questions or detailed feedback, please create n GitHub issue in StepSecurity/AI-CodeWise.

@h0x0er
h0x0er merged commit 30915d3 into int Nov 25, 2026
5 of 6 checks passed
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.

2 participants