-
Notifications
You must be signed in to change notification settings - Fork 4
Fix label-check and auto-assign on fork PRs #40
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| name: Label Check | ||
|
|
||
| # pull_request_target (not pull_request) so the job gets a write token on | ||
| # fork-submitted PRs too; plain pull_request runs from forks are read-only | ||
| # and cannot add labels. Safe because the called workflow only reads the PR | ||
| # body and never checks out or executes PR code. The "edited" type re-runs | ||
| # the check when the template checkboxes are changed. | ||
| on: | ||
| pull_request_target: | ||
| types: [opened, edited, reopened, synchronize] | ||
|
|
||
| permissions: | ||
| pull-requests: write | ||
| issues: write | ||
| contents: read | ||
|
|
||
| jobs: | ||
| label-check: | ||
| name: Label Check | ||
| uses: ApolloAutomation/Workflows/.github/workflows/label-check.yml@main | ||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: ApolloAutomation/PUMP-1
Length of output: 1999
🌐 Web query:
ApolloAutomation/Workflows#24 hardening pin commit SHA label-check reusable workflow💡 Result:
There is no public GitHub issue
#24in the ApolloAutomation/Workflows repository, as this repository does not appear to exist [1][2]. Apollo Automation is a home automation hardware company [3], and its GitHub organization (ApolloAutomation) focuses on device firmware and integration tools [1][3]. The query appears to conflate a common supply-chain security best practice—hardening reusable workflows by pinning actions and internal references to commit SHAs—with the "Apollo" name. Pinning to full-length commit SHAs is a critical security measure to prevent supply-chain attacks, as it ensures that workflow code is immutable and cannot be altered by force-pushing tags or branches [4][5][6]. If you are implementing this hardening pattern in your own workflows, current industry best practices involve [4][5][6][7]: 1. Pinning all actions and reusable workflows to full 40-character commit SHAs (e.g., uses: actions/checkout@de0fac2e...). 2. Performing audit checks on the call graph to ensure that transitive reusable workflows are also pinned to SHAs [4]. 3. Avoiding mutable references like branches (main, master) or tags (v1, v2) in production CI/CD pipelines [8][5][6]. For context, Apollo Automation's GitHub organization does exist [1], but its repository structure is dedicated to hardware projects like AIR-1, MSR-1, and MSR-2 [1], rather than generic workflow automation libraries [1][3]. Additionally, there is a separate entity/project named "Apollo-Workflows" that focuses on academic or scientific workflow choreography [9][10], but it is unrelated to Apollo Automation's hardware business [3].Citations:
🏁 Script executed:
Repository: ApolloAutomation/PUMP-1
Length of output: 1020
Pin external
uses:refs inpull_request_targetworkflows to immutable commit SHAs.github/workflows/label-check.ymluses the external reusable workflowApolloAutomation/Workflows/.github/workflows/label-check.yml@main, and.github/workflows/autoassign.ymlusespozil/auto-assign-issue@v2, both underpull_request_targetwith write permissions—pin theseuses:references to full commit SHAs (and ensure transitive reusable workflows/actions are pinned too).🧰 Tools
🪛 zizmor (1.25.2)
[error] 20-20: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Source: Linters/SAST tools