Repository navigation
fix(build): replace tsc-alias to clear unpatched braces advisory - #24
Merged
Merged
Conversation
tsc-alias pulled in braces@3.0.3 (via chokidar and globby), which has a high-severity advisory with no patched release (GHSA-vfj7-8cjw-p6xm), so npm audit --audit-level=high failed CI on every branch. - server/scripts/resolve-aliases.mjs rewrites @server/* and @shared/* imports in dist to relative paths (tested) - npm audit fix for brace-expansion and ip-address
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
Why
CI started failing on every branch (e.g. #21) at the last step,
npm audit --audit-level=high. A new high-severity advisory forbraces(GHSA-vfj7-8cjw-p6xm, stack exhaustion on deeply nested patterns) affects all versions ≤ 3.0.3, and there is no patched release. The only path to it was the server's build-time dev dependencytsc-alias(→chokidar/globby→micromatch→braces). It never runs in production, but the CI policy is strict and there's no fix to upgrade to.What
tsc-alias.server/scripts/resolve-aliases.mjs(~50 lines) does the one thing we used it for: it rewrites@server/*and@shared/*specifiers inserver/distto relative paths (static, re-export and dynamicimport()).npm audit fixfor two other advisories published since:brace-expansion(high) andip-address(moderate).server/scripts/*.mjs.Test plan
npm run build -w server: 22 files rewritten, 0 aliases left indist,server/dist/src/app.jsloadstypecheck:apipasses (Vercel handlers resolve against the rewrittendist)npm audit --audit-level=high: 0 vulnerabilities;format:check,lint,typecheck,test,buildAfter merge I'll merge
maininto the open grid-refactor PRs (#21–#23) so their CI goes green.