You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Missing version validation permits deletion or overwriting outside the tool cache, while removed checksum verification allows unverified executables to be installed and cached.
Restore the useLiteralKeys override to avoid lint errors
biome.json:13
Removing the useLiteralKeys override re-enables that recommended rule, but src/subscription.ts still contains accesses such as process.env["GITHUB_EVENT_PATH"] and body["ghes_server"]. These now produce lint errors in the Hygiene job's yarn lint step. Restore the override so the existing indexed-access syntax remains accepted.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The original scheduled audit still defaults to npm and runs npm ci, which will fail after package-lock.json is deleted, so it must be migrated to Yarn or removed.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The ESM declaration breaks every invocation of the CommonJS action bundle, while the retained npm audit workflow will fail after package-lock.json is removed.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The cleanup removes required third-party license notices without restoring them, and the existing scheduled npm audit will fail because package-lock.json is deleted.
Subscription upstream value: Set to hashicorp-contrib/setup-packer, which matches the original project owner/repo.
package.json author: "author": "step-security" is correctly set.
No repository field in package.json: Field absent — no check required.
dist folder: Present and updated.
actions_release.yml: Present and now includes script and yarn_version inputs to support the new yarn-based build.
All declared dependencies appear used: @actions/core, @actions/github, @actions/io, @actions/tool-cache, and axios are all referenced in the source.
❌ Failed Checks
Missing auto_cherry_pick.yml: The .github/workflows/ folder is required to contain auto_cherry_pick.yml, but no such file exists in this branch. This file must be added.
audit_package.yml not updated for yarn: The package manager has been switched from npm to yarn in this PR, but the existing .github/workflows/audit_package.yml does not pass script, package_manager, or yarn_version inputs to the reusable audit_fix.yml. The new audit_package_v3.0.1.yml correctly includes these inputs, but the old file is left broken. Either update audit_package.yml to match or remove it if it is superseded.
harden-runner removed from main.yml: Both the hygiene and test jobs previously used step-security/harden-runner@v2 with egress-policy: audit. This PR removes those steps entirely, eliminating runtime egress monitoring from the CI pipeline. The harden-runner should be restored, especially for a StepSecurity-maintained action.
⚠️ Warnings
README version text inconsistency (line 64): The prose says "it's safe to use the major version (v2) in your workflow" but every example in the README uses @v3. This should be corrected to v3. (Inline comment posted.)
Unpinned third-party actions in main.yml: actions/checkout@v7 and actions/setup-node@v7 were previously pinned to full SHAs (actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1, actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1). This PR removes those pins. SHA-pinning should be restored. (Inline comments posted.)
Duplicate audit workflow files: Both audit_package.yml and audit_package_v3.0.1.yml exist. Keeping two overlapping scheduled audit workflows will result in redundant weekly runs. Decide which one to keep and remove the other.
dist/LICENSE.txt removed: The bundled third-party license file was deleted. Some bundled dependencies (Apache-2.0, MIT, ISC) may require their license text to be distributed alongside the bundle. Verify this is intentional.
process.exit(1) in subscription check (src/subscription.ts:46): Using process.exit bypasses GitHub Actions post steps and Node.js cleanup hooks. Replacing it with core.setFailed(message); return; is the idiomatic Actions pattern. (Inline comment posted.)
void run() changed to run(): Dropping void means an unhandled rejection from the top-level async call is no longer explicitly suppressed. Since the function has an internal try/catch, this is benign, but it is a subtle behaviour change.
🔒 Security Findings
Removal of harden-runner from CI — the CI pipeline no longer monitors outbound network calls. This is a regression for a StepSecurity-maintained action where security tooling is expected to be present in its own CI.
Unpinned actions in main.yml — actions/checkout@v7 and actions/setup-node@v7 without SHA pins are vulnerable to silent tag reassignment (supply chain attack). The previous version was SHA-pinned; this PR reverses that hardening.
process.exit(1) can bypass post-run cleanup — if the subscription API returns 403, the process is killed immediately without running any registered cleanup steps, which could leave the runner in a dirty state.
Summary
The core action logic and subscription check are correct, but this PR introduces several regressions: the required auto_cherry_pick.yml workflow is absent, the existing audit_package.yml is not updated for the new yarn package manager, and the CI pipeline loses its harden-runner coverage and SHA-pinned action references. These issues should be resolved before merging.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The build removes third-party license notices without regenerating them, and the legacy scheduled audit still runs npm ci despite package-lock.json being deleted.
Dependencies: All declared dependencies (@actions/core, @actions/github, @actions/io, @actions/tool-cache, axios) are actively used in source code.
Failed Checks
Missing auto_cherry_pick.yml: The file .github/workflows/auto_cherry_pick.yml is not present in the repository. This is a required workflow per the onboarding checklist. It is also needed to cross-verify that the upstream value in src/subscription.ts (hashicorp-contrib/setup-packer) matches the original-owner/repo-name fields defined in that file.
harden-runner removed from main.yml: The PR removes step-security/harden-runner@v2 from both jobs in .github/workflows/main.yml. This is a security regression — it eliminates egress auditing from the CI pipeline. As a StepSecurity-maintained action, CI workflows should use harden-runner to demonstrate the product's own capabilities.
Unpinned action references in main.yml: The PR replaces previously-pinned SHA-based action refs (e.g., actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1) with floating major-version tags (actions/checkout@v7, actions/setup-node@v7). Floating tags can be silently redirected and represent a supply-chain risk in CI.
Warnings
permissions: placement in audit_package_v3.0.1.yml: The top-level permissions: block is placed after the jobs: block. While YAML is unordered and GitHub Actions parses it correctly, it should be moved above jobs: for readability and consistency.
dist/LICENSE.txt removed: The bundled third-party license file has been deleted from dist/. This file documents licenses of all bundled npm dependencies; removing it may create legal compliance issues for licenses that require notice preservation.
README example inconsistency: The README Example workflow uses actions/checkout@v4, while .github/workflows/main.yml uses actions/checkout@v7. These should be consistent.
Mixed package manager signals: The PR adds .yarnrc.yml (setting nodeLinker: node-modules) while package-lock.json (npm) remains the primary lock file, which may cause confusion.
Loose devDependency version ranges: The previous version used exact pinned versions for devDependencies; this PR switches to caret ranges (e.g., "^1.9.4"). While package-lock.json mitigates this for npm ci, exact pinning is more predictable.
Security Findings
harden-runner removed (medium severity): Both CI jobs in main.yml no longer use step-security/harden-runner, removing outbound network call auditing. This is especially concerning for a StepSecurity-maintained action that should model best practices.
Floating CI action tags (medium severity): actions/checkout@v7 and actions/setup-node@v7 are mutable references. If re-pointed via a supply-chain attack, CI could execute malicious code with repository write permissions. These should be pinned to full commit SHAs.
Unvalidated JSON.parse on GitHub event file (low / acceptable risk): src/subscription.ts reads and parses GITHUB_EVENT_PATH without schema validation. Risk is low since this file is controlled by the GitHub Actions runtime, but defensive validation would improve robustness.
Summary
The core action logic is correctly ported from the upstream v3.0.1 release and the subscription check is properly implemented, but the PR must add auto_cherry_pick.yml, restore harden-runner in main.yml, and re-pin CI action references to commit SHAs before it is ready to merge.
and was preceded by step-security/harden-runner@v2 for egress auditing.
Two issues here:
harden-runner should be restored as the first step in every job — it audits outbound calls and is the flagship feature of StepSecurity. Removing it from a StepSecurity-maintained repo sends the wrong signal.
Floating major-version tags like @v7 are mutable and can be re-pointed to malicious commits. Pin to a full SHA:
The reason will be displayed to describe this comment to others. Learn more.
Warning: permissions block placed after jobs.
Top-level permissions should appear before jobs: for readability and consistency with the rest of the workflows in this repo. While GitHub Actions parses YAML as an unordered dictionary (so this works), the convention is to place it near the top of the file alongside on: and name:.
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
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.
https://github.com/hashicorp-contrib/setup-packer/tree/v3.0.1