-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): pin third-party actions to full commit SHAs #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: hyperpolymath/nextgen-databases
Length of output: 6950
🏁 Script executed:
Repository: hyperpolymath/nextgen-databases
Length of output: 12499
🌐 Web query:
official gh actions-lock lockfile documentation and enforcement semantics for stale action versions or commit pins💡 Result:
<search_synthesis>
GitHub Actions does not have a native, built-in lockfile mechanism for workflow dependencies [1]. Instead, GitHub provides an official, standardized lockfile format and tooling ecosystem to address dependency pinning and verification [2][3]. The authoritative definition of this lockfile format is maintained in the github/actions-lockfile repository [2]. The lockfile is a YAML document typically located at.github/workflows/actions.lock [2][4]. It records the resolved transitive dependency graph for a repository&
#39;s workflows, allowing tools to audit and verify the exact action pins in use [2]. Key aspects of the enforcement and semantics include: 1. Enforcement: The primary tool for managing this lockfile is the gh-actions-lock CLI extension [3]. When workflows are onboarded to the lockfile, the system enforces that all dependencies are present in the lockfile and guarantees that the locked commit for an action is what is executed on the runner [3]. 2. Stale Action Versions and Commit Pins: - Pins to branches or mutable tags (e.g., main, v4) are recorded in the lockfile and are not re-resolved during standard runs [3]. - If a tag moves forward (e.g., a maintainer patches a release), the lockfile will detect a mismatch between the recorded SHA and the upstream ref [3][5]. - The tooling provides mechanisms to handle these mismatches: - --relock: Re-resolves refs that have moved and updates the lockfile to the new SHA [3]. - --accept-moved: Specifically allows re-resolving pins whose recorded commit is no longer reachable upstream [3]. - Suspicious pins (e.g., where the recorded commit is no longer reachable) are treated as errors by default to prevent potential impostor commit attacks [3]. 3. Security and Integrity: The lockfile system is designed to prevent forgery [3]. The recorded SHA must exist within the referenced branch, and repository identity is verified to block redirects and mismatches at runtime [3]. Locked actions must have a branch that the commit being locked exists within to mitigate impostor commit-style attacks [3]. While the github/actions-lockfile package provides the schema and parser, it is infrastructure and does not perform the resolution or vulnerability assessment itself; these tasks are handled by consuming tools like gh-actions-lock [2].</search_synthesis>
<source_evidence>
Citations:
🌐 Web query:
site:github.com/github/gh-actions-lock README workflow ref changed lock mismatch rejected startup locked commit executed💡 Result:
<search_synthesis>
The gh-actions-lock tool is a GitHub CLI extension designed to pin GitHub Actions dependencies to verified commits using a lockfile (.github/workflows/actions.lock) [1]. This ensures that the exact commit locked is what is executed on the runner [1]. Regarding the specific behaviors mentioned: Lock Mismatches and Identity: The tool records repository identity and blocks redirects and mismatches at runtime [1]. Workflows onboarded to the lockfile enforce that all dependencies are present in the lockfile, and the system verifies that the locked commit exists within the specified refs to prevent forgery and impostor commit attacks [1]. Rejected Refs: The tool rejects trailing
@refsyntax (e.g., $/actions/my-action@v1) in workflows, as the reference is always the running commit [1]. Workflow Ref Changes: Pins to branches or partial versions (like main or v4) are trusted from the lockfile and are not re-resolved during normal runs [1]. To update these to the current upstream commit, you must use the --relock flag [1]. If a pin is considered suspicious because the recorded commit is no longer reachable upstream, it will result in an error; in such cases, the --accept-moved flag can be used to re-resolve the dependency [1]. Startup and Execution: Workflows onboarded to the lockfile guarantee that the locked commit for an action is what is executed on the runner [1]. Locked actions must have a branch that the commit being locked exists within to enhance security [1].</search_synthesis>
<source_evidence>
Citations:
🏁 Script executed:
Repository: hyperpolymath/nextgen-databases
Length of output: 750
Synchronise the generated workflow lock manifest.
.github/workflows/actions.lockrecords older action versions for all three changed workflows. Regenerate it withgh actions-lockso it matches the workflow pins. Otherwise, lock enforcement can reject these workflows before their steps run because the requested commits are not the locked commits.github/codeql-action:v4.37.9→v4.38.0hyperpolymath/smtp-notify-action:v0.2.0→v0.3.0actions/setup-java:v6.0.0→v6.0.1This is a workflow availability issue, not a data-integration issue.
🤖 Prompt for AI Agents