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) => {
|
return command.replace(/\{\{(\w+)\}\}/g, (match, key) => {
|
||||||
if (!(key in params)) return match;
|
if (!(key in params)) return match;
|
||||||
const val = String(params[key]).trim();
|
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}"`);
|
throw new Error(`Unsafe value for workflow parameter "${key}"`);
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
|
|||||||
Generated
+6
-8
@@ -4107,10 +4107,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/path-to-regexp": {
|
"node_modules/path-to-regexp": {
|
||||||
"version": "8.3.0",
|
"version": "8.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz",
|
||||||
"integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==",
|
"integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==",
|
||||||
"license": "MIT",
|
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
"url": "https://opencollective.com/express"
|
"url": "https://opencollective.com/express"
|
||||||
@@ -4294,10 +4293,9 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"node_modules/qs": {
|
"node_modules/qs": {
|
||||||
"version": "6.14.0",
|
"version": "6.15.1",
|
||||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",
|
"resolved": "https://registry.npmjs.org/qs/-/qs-6.15.1.tgz",
|
||||||
"integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
|
"integrity": "sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg==",
|
||||||
"license": "BSD-3-Clause",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"side-channel": "^1.1.0"
|
"side-channel": "^1.1.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"node": true,
|
||||||
|
"jest": true,
|
||||||
|
"es2021": true
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user