Fix ESLint errors in test files and npm vulnerabilities
- Add tests/.eslintrc.json to declare jest globals (describe/test/expect) - Fix no-useless-escape in lib/utils.js regex character class - Run npm audit fix: updated path-to-regexp and qs (1 high, 1 moderate fixed) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ function applyParams(command, params) {
|
||||
return command.replace(/\{\{(\w+)\}\}/g, (match, key) => {
|
||||
if (!(key in params)) return match;
|
||||
const val = String(params[key]).trim();
|
||||
if (!/^[a-zA-Z0-9._:@\-\/]+$/.test(val)) {
|
||||
if (!/^[a-zA-Z0-9._:@/-]+$/.test(val)) {
|
||||
throw new Error(`Unsafe value for workflow parameter "${key}"`);
|
||||
}
|
||||
return val;
|
||||
|
||||
Reference in New Issue
Block a user