-
Notifications
You must be signed in to change notification settings - Fork 24
Fix security vulnerabilities: Remove unused tar-fs and upgrade npm to resolve brace-expansion issue #116
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
Fix security vulnerabilities: Remove unused tar-fs and upgrade npm to resolve brace-expansion issue #116
Conversation
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.
Copilot wasn't able to review any files in this pull request.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: manast <[email protected]>
…erability Co-authored-by: manast <[email protected]>
roggervalf
left a comment
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.
Lgtm
|
@copilot why can't we merge this PR despite being approved? |
The PR is blocked because the OSV-Scanner workflow ( The workflow shows as
The PR itself is technically ready to merge - all changes are correct and the code builds successfully. |
|
@copilot ok, I enabled it now, but it is not running for this repo now. Can you trigger it? |
I cannot directly trigger GitHub Actions workflows, but I can make a minimal change to the PR to trigger the workflow. The OSV-Scanner workflow is configured to run on pull_request events to the master branch. However, since the workflow was just re-enabled, GitHub won't automatically re-run it for existing PR events. The typical ways to trigger it would be:
Would you like me to make a trivial documentation update to trigger the workflow, or would you prefer to manually trigger it from the GitHub UI? |
|
@copilot fix this vulnerability found by OSV scan: |
Co-authored-by: manast <[email protected]>
Fixed in commit 7c0c5db by upgrading npm from 10.9.2 to 11.6.1 via package.json overrides. The brace-expansion 2.0.1 vulnerability was bundled inside the old npm package. npm audit now shows 0 vulnerabilities. |
roggervalf
left a comment
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.
Lgtm
|
@copilot why is this PR blocked despite having 2 approvals? |
The PR is still blocked because while the OSV-Scanner workflow is now enabled (state changed from "disabled_inactivity" to "active"), it hasn't run yet. GitHub doesn't automatically re-run workflows for commits that were pushed before the workflow was enabled. The branch protection rules require the OSV-Scanner check, but since it never ran for the current commits, the PR shows as "blocked" with 0 checks. To trigger the workflow, I can make a trivial change (like adding a newline to a comment) and push it. This will create a new pull_request event that will trigger the OSV-Scanner. Would you like me to do that? Alternatively, you can manually trigger the workflow from the GitHub Actions tab if it supports manual triggering. |
|
@copilot I re-run it successfully and still it is not allowing me to merge, also why is does it say: "Merging is blocked |
This is a GitHub security feature for bot-authored changes. Since I (Copilot) made the last commit (1ed792e), GitHub requires an additional approval from a reviewer who didn't collaborate with me in the PR comments. Both you (@manast) and @roggervalf have commented/interacted with me on this PR, so GitHub doesn't count your approvals for this specific security requirement. You need approval from another team member with write access who hasn't interacted with Copilot on this PR. This is a standard GitHub branch protection rule to ensure bot-authored changes have proper human oversight before merging. |
|
🎉 This PR is included in version 1.36.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR addresses multiple security vulnerabilities found in the repository dependencies.
Problems
tar-fs symlink validation bypass: The repository had tar-fs version 2.1.3 listed as a direct dependency, which contains a security vulnerability that allows symlink validation bypass when the destination directory is predictable with a specific tarball. This could potentially allow malicious tarballs to extract files outside the intended directory.
brace-expansion RegEx DoS: The brace-expansion 2.0.1 package (bundled within npm 10.9.2) contains a Regular Expression Denial of Service vulnerability (GHSA-v6h2-p8h4-qcjw, CVSS 3.1).
Solutions
tar-fs vulnerability
After thorough investigation of the codebase, I found that tar-fs is not actually used anywhere in the project:
The safest and most minimal fix is to remove the unused dependency entirely.
brace-expansion vulnerability
The brace-expansion 2.0.1 vulnerability was bundled inside npm 10.9.2 (a dependency of @semantic-release/npm). Fixed by overriding npm to version 11.6.1 in package.json, which no longer bundles the vulnerable brace-expansion version.
Changes
tar-fsfrom dependencies inpackage.jsonnpmto version 11.6.1 inpackage.jsonto resolve brace-expansion vulnerabilitypackage-lock.jsonandyarn.lockto reflect the changesVerification
This approach eliminates both vulnerabilities with zero functional impact while reducing the overall attack surface.
Fixes #115
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.