Harden workflows and dev scripts against code-scanning findings

- auto-release: pass step outputs to run scripts through env, not ${{ }} interpolation
- perf-comment: download the PR's perf artifact to RUNNER_TEMP, outside the workspace
- dev server: log errors to the terminal instead of sending stack traces in the response
- i18n-add/i18n-check: escape every regex metacharacter when building patterns from labels
This commit is contained in:
Frederic Jung 2026-11-05 21:04:21 +01:00
parent 1a6c63e920
commit e7729d0a1e
No known key found for this signature in database
5 changed files with 21 additions and 8 deletions

View file

@ -53,8 +53,10 @@ const server = http.createServer((req, res) => {
res.writeHead(200, { 'content-type': TYPES[path.extname(file)] || 'application/octet-stream', 'cache-control': 'no-store' });
fs.createReadStream(file).pipe(res);
} catch (e) {
// The stack goes to the terminal running the server, never into the response.
console.error(e);
res.writeHead(500, { 'content-type': 'text/plain; charset=utf-8' });
res.end(String(e && e.stack || e));
res.end('Could not build the page: see the terminal running npm run dev.');
}
});
const relay = createRelay({ server });