Repository navigation
Build input safety: slug validation, HTML escaping, secret denylist - #6
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jun 3, 2026
Validate project folder names against a strict slug (^[a-z0-9][a-z0-9-]*$) at discovery and skip the rest — closes the command-injection vector where a folder name was interpolated into `sh -c` (`npx vite build --base /<name>/`). Extend the static-copy filter to drop secret-looking files (.env*, .npmrc, *.pem/*.key, ssh keys) so a template can't publish credentials. HTML-escape project name/title/type and section titles in the generated landing index, and allowlist link schemes (internal paths + http(s) only) so externals.json can't inject script/markup.
miguelrisero
force-pushed
the
fix/build-safety
branch
from
October 14, 2026 19:21
e9d7609 to
1c9abed
Compare
The type-check step ran a bare tsc against projects/dtc-image-package without its node_modules, so every react/vite import failed to resolve and the job was red on main. Install the project's locked dependencies and use its own pinned tsc. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch was successfully deployed
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.
Stack 2 of 5 (base:
chore/governance-and-ci). Council P0 — treat repo content as untrusted now that the repo is public.^[a-z0-9][a-z0-9-]*$) at discovery; invalid names are skipped with a warning. This closes the command-injection path wherenamewas interpolated intospawn("sh", ["-c", …])(e.g.npx vite build --base /${name}/).name/title/typeand section titles in the generated landing index; allowlist link schemes (internal paths +http(s)only) soexternals.jsoncan't injectjavascript:/markup → fixes the stored-XSS sink..env*,.npmrc,*.pem/*.key,id_rsa/id_ed25519,.DS_Storeso a static template can't accidentally publish credentials.npm run buildstays green; both example cards still render. (build-node-functions.mjsalready validatestemplate.config.jsonpaths against traversal/symlink escape.)