Repository navigation
Fix four code-scanning alerts - #261
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use execa argument arrays for pack and publish, preserving Windows command-shim support and literal argument boundaries. Cover special-character paths, tarball executable permissions, and packaging errors. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of the workflow-permission and package-publishing hardening changes.
No open issues 🎉
What changed in this PR
This PR addresses four code-scanning alerts by tightening workflow permissions, removing an unused workflow, and hardening the package publishing task.
Changes:
- Deny workflow token permissions by default and grant only the required job-level permissions.
- Remove the unused security-alert workflow.
- Replace shell-interpolated npm commands with executable/argument arrays, with regression tests for argument handling, special-character paths, permission repair, and pack failures.
| File | Description |
|---|---|
test/tests/publish-test.js |
Adds regression tests for packaging and publishing behavior. |
Gulpfile.js |
Passes npm arguments separately instead of interpolating shell commands. |
.github/workflows/handle-stale.yml |
Restricts default permissions and grants stale-job write access. |
.github/workflows/handle-labels.yml |
Restricts default permissions and explicitly scopes label-job access. |
.github/workflows/check-security-alerts.yml |
Removes the unused security-alert workflow. |
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Bayheck
approved these changes
Nov 3, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Address the four open code-scanning alerts in separate commits:
issues: writeandpull-requests: write. Preserve the keepalive job's existingcontents: writepermission.contents: read,issues: write, andpull-requests: write, matching the underlying label action's documented requirements for the configured events.check-security-alerts.ymlworkflow.npm packandnpm publishcommands with executable/argument arrays using the existingexecadependency, which handles Windows command shims. Preserve literal publish arguments and existing tarball permission repair.The packaging change is defensive hardening; exploitability of the original path-derived command was not established. No dependency upgrades or unrelated audit fixes are included.
Follow-up commit
4d507dcremovestest/tests/publish-test.jsat the user's request; the packaging fix is unchanged.Validation
npm testpassed locally on Windows with Node 24: lint, TypeScript build, and all 9 remaining tests.refs/pull/261/merge. CI will rerun for the follow-up commit.npm packagainst paths containing spaces, ampersands, and semicolons, argument boundaries, tarball executable-bit repair, and pack error propagation. No package was published. These tests are no longer part of the PR.git diff --checkpassed.Limitations
Workflow actions were not run against live issues or pull requests to avoid modifying repository state. Alerts on the default branch will not close until the changes are merged and rescanned.