Fix false positive CVE alerts from bundled VS Code package.json#7839
Open
ka-ishimoto wants to merge 2 commits into
Open
Fix false positive CVE alerts from bundled VS Code package.json#7839ka-ishimoto wants to merge 2 commits into
ka-ishimoto wants to merge 2 commits into
Conversation
The VS Code build process sets the bundled lib/vscode/package.json name to "code-server" (from product.json nameShort), causing vulnerability scanners to misidentify it and flag non-applicable CVEs. Override the name to "code-oss-dev" in build-release.sh after merging package.json. Fixes coder#7071 Signed-off-by: ka-ishimoto <ka-ishimoto@kddi.com>
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.
Fixes #7071
The VS Code build process (
gulpfile.reh.ts) writesproduct.json'snameShort("code-server") into the bundledlib/vscode/package.jsonnamefield. Vulnerability scanners (e.g. Anchore Grype) then matchthis against CVE databases using the combination of
name: "code-server"and
version: "1.x.x"(the VS Code version), producing false positiveslike GHSA-frjg-g767-7363.
This overrides the
nameto"code-oss-dev"inbuild-release.shafter merging the package.json, so scanners can no longer match it
against known CVE entries for code-server.