diff --git a/analytics/eslint.config.js b/analytics/eslint.config.js index a9b371e16..c06c471c7 100644 --- a/analytics/eslint.config.js +++ b/analytics/eslint.config.js @@ -1,4 +1,5 @@ import js from "@eslint/js"; +import securityPlugin from "eslint-plugin-security"; import tseslint from "typescript-eslint"; export default tseslint.config( @@ -62,6 +63,24 @@ export default tseslint.config( "object-shorthand": "error", }, }, + // Security hotspot rules (eslint-plugin-security): recommended set on source files, + // noisy/irrelevant rules off. detect-object-injection fires on every computed property + // access; the CSRF/mustache rules assume Express/server-side templates we don't use; + // Buffer noAssert is a deprecated pattern. Unambiguous rules are errors. + { + files: ["**/*.ts"], + ignores: ["test/**", "**/*.test.ts"], + plugins: { security: securityPlugin }, + rules: { + ...securityPlugin.configs.recommended.rules, + "security/detect-object-injection": "off", + "security/detect-no-csrf-before-method-override": "off", + "security/detect-disable-mustache-escape": "off", + "security/detect-buffer-noassert": "off", + "security/detect-pseudoRandomBytes": "error", + "security/detect-eval-with-expression": "error", + }, + }, // Test files: vitest globals + relax unsafe rules (mocks are inherently untyped) { files: ["test/**/*.ts", "**/*.test.ts"], diff --git a/analytics/package-lock.json b/analytics/package-lock.json index e9fc316e4..c60620b25 100644 --- a/analytics/package-lock.json +++ b/analytics/package-lock.json @@ -21,6 +21,7 @@ "@vitest/coverage-v8": "^5.1.0", "dotenv": "^18.0.10", "eslint": "^10.15.0", + "eslint-plugin-security": "^4.2.1", "prettier": "^3.10.1", "serverless-scaleway-functions": ">=0.4.16", "tsdown": "^0.23.7", @@ -38,12 +39,12 @@ "version": "1.0.0", "devDependencies": { "@eslint/js": "^10.0.0", - "@vitest/coverage-v8": "^5.0.0", - "eslint": "^10.0.0", - "prettier": "^3.8.1", + "@vitest/coverage-v8": "^5.1.0", + "eslint": "^10.15.0", + "prettier": "^3.10.1", "typescript": "^6.0.3", - "typescript-eslint": "^8.60.0", - "viem": "^2.57.4", + "typescript-eslint": "^8.73.0", + "viem": "^2.58.0", "vitest": "^5.0.3" }, "optionalDependencies": { @@ -3993,6 +3994,22 @@ } } }, + "node_modules/eslint-plugin-security": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-4.2.1.tgz", + "integrity": "sha512-iF95SSqdSUVTvB7srNXoNeTQIqwfALTn9nmoqJyixSIKqEydlW01Cqb7xNveqE4Zd6YWBoQICQ4FH9NkR1byDg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-regex": "^2.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-scope": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", @@ -6948,6 +6965,16 @@ "node": ">= 12.13.0" } }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "license": "MIT", + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -7178,6 +7205,16 @@ ], "license": "MIT" }, + "node_modules/safe-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "regexp-tree": "~0.1.1" + } + }, "node_modules/safe-regex2": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/safe-regex2/-/safe-regex2-3.1.0.tgz", diff --git a/analytics/package.json b/analytics/package.json index 24d8aed93..893bf3171 100644 --- a/analytics/package.json +++ b/analytics/package.json @@ -45,6 +45,7 @@ "@vitest/coverage-v8": "^5.1.0", "dotenv": "^18.0.10", "eslint": "^10.15.0", + "eslint-plugin-security": "^4.2.1", "prettier": "^3.10.1", "serverless-scaleway-functions": ">=0.4.16", "tsdown": "^0.23.7", diff --git a/analytics/storage.ts b/analytics/storage.ts index 80ac4c8ef..07ee7f9f2 100644 --- a/analytics/storage.ts +++ b/analytics/storage.ts @@ -57,9 +57,11 @@ export class FileHitStorage implements HitStorage { async getWithMeta(key: string): Promise { const filePath = this.pathFor(key); + // eslint-disable-next-line security/detect-non-literal-fs-filename -- key = pinned ALLOWED_SITE + UTC timestamp, never request data if (!existsSync(filePath)) { return null; } + // eslint-disable-next-line security/detect-non-literal-fs-filename -- same key derivation as above const body = await readFile(filePath, "utf8"); return { body, etag: this.etagOf(body) }; } @@ -73,7 +75,9 @@ export class FileHitStorage implements HitStorage { return { ok: false, status: 412 }; } const filePath = this.pathFor(key); + // eslint-disable-next-line security/detect-non-literal-fs-filename -- same key derivation as above await mkdir(path.dirname(filePath), { recursive: true }); + // eslint-disable-next-line security/detect-non-literal-fs-filename -- same key derivation as above await writeFile(filePath, body, "utf8"); return { ok: true, etag: this.etagOf(body) }; } diff --git a/bunny_js/eslint.config.js b/bunny_js/eslint.config.js index 469de9f8d..9e083fe8d 100644 --- a/bunny_js/eslint.config.js +++ b/bunny_js/eslint.config.js @@ -1,4 +1,5 @@ import js from "@eslint/js"; +import securityPlugin from "eslint-plugin-security"; import tseslint from "typescript-eslint"; export default tseslint.config( @@ -47,6 +48,23 @@ export default tseslint.config( "object-shorthand": "error", }, }, + // Security hotspot rules (eslint-plugin-security): recommended set on source files, + // noisy/irrelevant rules off. detect-object-injection fires on every computed property + // access; the CSRF/mustache rules assume Express/server-side templates we don't use; + // Buffer noAssert is a deprecated pattern. Unambiguous rules are errors. + { + files: ["src/**/*.ts", "scripts/**/*.ts"], + plugins: { security: securityPlugin }, + rules: { + ...securityPlugin.configs.recommended.rules, + "security/detect-object-injection": "off", + "security/detect-no-csrf-before-method-override": "off", + "security/detect-disable-mustache-escape": "off", + "security/detect-buffer-noassert": "off", + "security/detect-pseudoRandomBytes": "error", + "security/detect-eval-with-expression": "error", + }, + }, // Test files: type-aware like the rest of the package, plus vitest globals. { files: ["test/**/*.ts", "**/*.test.ts"], diff --git a/bunny_js/package-lock.json b/bunny_js/package-lock.json index 0fc23db00..bf997f6ff 100644 --- a/bunny_js/package-lock.json +++ b/bunny_js/package-lock.json @@ -24,6 +24,7 @@ "@vitest/coverage-v8": "^5.1.0", "@vitest/eslint-plugin": "^1.6.27", "eslint": "^10.0.0", + "eslint-plugin-security": "^4.2.1", "prettier": "^3.6.2", "tsdown": "^0.23.1", "tsx": "^4.23.15", @@ -37,12 +38,12 @@ "version": "1.0.0", "devDependencies": { "@eslint/js": "^10.0.0", - "@vitest/coverage-v8": "^5.0.0", - "eslint": "^10.0.0", - "prettier": "^3.8.1", + "@vitest/coverage-v8": "^5.1.0", + "eslint": "^10.15.0", + "prettier": "^3.10.1", "typescript": "^6.0.3", - "typescript-eslint": "^8.60.0", - "viem": "^2.57.4", + "typescript-eslint": "^8.73.0", + "viem": "^2.58.0", "vitest": "^5.0.3" }, "optionalDependencies": { @@ -2373,6 +2374,22 @@ } } }, + "node_modules/eslint-plugin-security": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-4.2.1.tgz", + "integrity": "sha512-iF95SSqdSUVTvB7srNXoNeTQIqwfALTn9nmoqJyixSIKqEydlW01Cqb7xNveqE4Zd6YWBoQICQ4FH9NkR1byDg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-regex": "^2.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-scope": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", @@ -3482,6 +3499,16 @@ ], "license": "MIT" }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "license": "MIT", + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, "node_modules/require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", @@ -3582,6 +3609,16 @@ } } }, + "node_modules/safe-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "regexp-tree": "~0.1.1" + } + }, "node_modules/semver": { "version": "7.8.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", diff --git a/bunny_js/package.json b/bunny_js/package.json index cb83baa57..60ec2ac94 100644 --- a/bunny_js/package.json +++ b/bunny_js/package.json @@ -39,6 +39,7 @@ "@vitest/coverage-v8": "^5.1.0", "@vitest/eslint-plugin": "^1.6.27", "eslint": "^10.0.0", + "eslint-plugin-security": "^4.2.1", "prettier": "^3.6.2", "tsdown": "^0.23.1", "tsx": "^4.23.15", diff --git a/comment_service/eslint.config.js b/comment_service/eslint.config.js index caa614ab2..a86790ea7 100644 --- a/comment_service/eslint.config.js +++ b/comment_service/eslint.config.js @@ -1,4 +1,5 @@ import js from "@eslint/js"; +import securityPlugin from "eslint-plugin-security"; import tseslint from "typescript-eslint"; export default tseslint.config( @@ -49,6 +50,24 @@ export default tseslint.config( "object-shorthand": "error", }, }, + // Security hotspot rules (eslint-plugin-security): recommended set on source files, + // noisy/irrelevant rules off. detect-object-injection fires on every computed property + // access; the CSRF/mustache rules assume Express/server-side templates we don't use; + // Buffer noAssert is a deprecated pattern. Unambiguous rules are errors. + { + files: ["**/*.ts"], + ignores: ["test/**", "**/*.test.ts"], + plugins: { security: securityPlugin }, + rules: { + ...securityPlugin.configs.recommended.rules, + "security/detect-object-injection": "off", + "security/detect-no-csrf-before-method-override": "off", + "security/detect-disable-mustache-escape": "off", + "security/detect-buffer-noassert": "off", + "security/detect-pseudoRandomBytes": "error", + "security/detect-eval-with-expression": "error", + }, + }, // Test files: vitest globals + relax unsafe rules (mocks are inherently untyped) { files: ["test/**/*.ts", "**/*.test.ts"], diff --git a/comment_service/package-lock.json b/comment_service/package-lock.json index d6133492b..232cc0258 100644 --- a/comment_service/package-lock.json +++ b/comment_service/package-lock.json @@ -17,6 +17,7 @@ "@types/node": "^26.6.6", "@vitest/coverage-v8": "^5.1.0", "eslint": "^10.15.0", + "eslint-plugin-security": "^4.2.1", "prettier": "^3.10.1", "serverless-scaleway-functions": ">=0.4.16", "tsdown": "^0.23.7", @@ -3361,6 +3362,22 @@ } } }, + "node_modules/eslint-plugin-security": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-4.2.1.tgz", + "integrity": "sha512-iF95SSqdSUVTvB7srNXoNeTQIqwfALTn9nmoqJyixSIKqEydlW01Cqb7xNveqE4Zd6YWBoQICQ4FH9NkR1byDg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-regex": "^2.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-scope": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", @@ -6257,6 +6274,16 @@ "node": ">= 12.13.0" } }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "license": "MIT", + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -6487,6 +6514,16 @@ ], "license": "MIT" }, + "node_modules/safe-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "regexp-tree": "~0.1.1" + } + }, "node_modules/safe-regex2": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/safe-regex2/-/safe-regex2-3.1.0.tgz", diff --git a/comment_service/package.json b/comment_service/package.json index 96b48f770..1014ab5dd 100644 --- a/comment_service/package.json +++ b/comment_service/package.json @@ -37,6 +37,7 @@ "@types/node": "^26.6.6", "@vitest/coverage-v8": "^5.1.0", "eslint": "^10.15.0", + "eslint-plugin-security": "^4.2.1", "prettier": "^3.10.1", "serverless-scaleway-functions": ">=0.4.16", "tsdown": "^0.23.7", diff --git a/scw_js/eslint.config.js b/scw_js/eslint.config.js index 56d8025d0..de8a295b7 100644 --- a/scw_js/eslint.config.js +++ b/scw_js/eslint.config.js @@ -1,4 +1,5 @@ import js from "@eslint/js"; +import securityPlugin from "eslint-plugin-security"; import tseslint from "typescript-eslint"; export default tseslint.config( @@ -57,6 +58,23 @@ export default tseslint.config( "object-shorthand": "error", }, }, + // Security hotspot rules (eslint-plugin-security): recommended set on source files, + // noisy/irrelevant rules off. detect-object-injection fires on every computed property + // access; the CSRF/mustache rules assume Express/server-side templates we don't use; + // Buffer noAssert is a deprecated pattern. Unambiguous rules are errors. + { + files: ["*.ts", "scripts/**/*.ts"], + plugins: { security: securityPlugin }, + rules: { + ...securityPlugin.configs.recommended.rules, + "security/detect-object-injection": "off", + "security/detect-no-csrf-before-method-override": "off", + "security/detect-disable-mustache-escape": "off", + "security/detect-buffer-noassert": "off", + "security/detect-pseudoRandomBytes": "error", + "security/detect-eval-with-expression": "error", + }, + }, // Test files: type-aware like the rest of the package (now in tsconfig's `include`), plus // vitest globals. { diff --git a/scw_js/package-lock.json b/scw_js/package-lock.json index 90be89a72..739e81cb6 100644 --- a/scw_js/package-lock.json +++ b/scw_js/package-lock.json @@ -31,6 +31,7 @@ "@vitest/eslint-plugin": "^1.6.27", "eslint": "^10.0.0", "eslint-plugin-node": "^11.1.0", + "eslint-plugin-security": "^4.2.1", "fastify": "^5.12.1", "prettier": "^3.6.2", "serverless-scaleway-functions": ">=0.5.1", @@ -45,12 +46,12 @@ "version": "1.0.0", "devDependencies": { "@eslint/js": "^10.0.0", - "@vitest/coverage-v8": "^5.0.0", - "eslint": "^10.0.0", - "prettier": "^3.8.1", + "@vitest/coverage-v8": "^5.1.0", + "eslint": "^10.15.0", + "prettier": "^3.10.1", "typescript": "^6.0.3", - "typescript-eslint": "^8.60.0", - "viem": "^2.57.4", + "typescript-eslint": "^8.73.0", + "viem": "^2.58.0", "vitest": "^5.0.3" }, "optionalDependencies": { @@ -4454,6 +4455,22 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-security": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-4.2.1.tgz", + "integrity": "sha512-iF95SSqdSUVTvB7srNXoNeTQIqwfALTn9nmoqJyixSIKqEydlW01Cqb7xNveqE4Zd6YWBoQICQ4FH9NkR1byDg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-regex": "^2.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-scope": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", @@ -7855,6 +7872,16 @@ "integrity": "sha512-P4nbQYQfePJxRSmY+v/KINxVucm4NF3p3s7pJveMTtom52FR4YGltUQLB8idDXwDDWW+eYrWDFbuzUnjoWHF7g==", "license": "MIT" }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "license": "MIT", + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, "node_modules/regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", @@ -8161,6 +8188,16 @@ ], "license": "MIT" }, + "node_modules/safe-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "regexp-tree": "~0.1.1" + } + }, "node_modules/safe-regex2": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-regex2/-/safe-regex2-5.1.2.tgz", diff --git a/scw_js/package.json b/scw_js/package.json index 565484a6f..90f7313fc 100644 --- a/scw_js/package.json +++ b/scw_js/package.json @@ -36,6 +36,7 @@ "@vitest/eslint-plugin": "^1.6.27", "eslint": "^10.0.0", "eslint-plugin-node": "^11.1.0", + "eslint-plugin-security": "^4.2.1", "fastify": "^5.12.1", "prettier": "^3.6.2", "serverless-scaleway-functions": ">=0.5.1", diff --git a/scw_js/scripts/openapi-codegen.ts b/scw_js/scripts/openapi-codegen.ts index 0075f2430..1dec1d2ea 100644 --- a/scw_js/scripts/openapi-codegen.ts +++ b/scw_js/scripts/openapi-codegen.ts @@ -131,6 +131,7 @@ export function toComponentSchema(schema: z.ZodType): Record { * The golden-file tests compare parsed JSON, so formatting never affects them either way. */ export function writeSpec(outputPath: string, spec: object): void { + // eslint-disable-next-line security/detect-non-literal-fs-filename -- dev codegen script, outputPath is a repo-local CLI arg writeFileSync(outputPath, JSON.stringify(spec, null, 2) + "\n"); console.log(`Generated ${outputPath}`); } diff --git a/x402_facilitator/eslint.config.js b/x402_facilitator/eslint.config.js index 175be1f3a..f2035ee71 100644 --- a/x402_facilitator/eslint.config.js +++ b/x402_facilitator/eslint.config.js @@ -1,4 +1,5 @@ import js from "@eslint/js"; +import securityPlugin from "eslint-plugin-security"; import tseslint from "typescript-eslint"; export default tseslint.config( @@ -84,6 +85,24 @@ export default tseslint.config( "object-shorthand": "error", }, }, + // Security hotspot rules (eslint-plugin-security): recommended set on source files, + // noisy/irrelevant rules off. detect-object-injection fires on every computed property + // access; the CSRF/mustache rules assume Express/server-side templates we don't use; + // Buffer noAssert is a deprecated pattern. Unambiguous rules are errors. + { + files: ["**/*.ts"], + ignores: ["test/**", "**/*.test.ts"], + plugins: { security: securityPlugin }, + rules: { + ...securityPlugin.configs.recommended.rules, + "security/detect-object-injection": "off", + "security/detect-no-csrf-before-method-override": "off", + "security/detect-disable-mustache-escape": "off", + "security/detect-buffer-noassert": "off", + "security/detect-pseudoRandomBytes": "error", + "security/detect-eval-with-expression": "error", + }, + }, // Test files: vitest globals + relax unsafe rules (mocks are inherently untyped) { files: ["test/**/*.ts", "**/*.test.ts", "test/**/*.js", "**/*.test.js"], diff --git a/x402_facilitator/package-lock.json b/x402_facilitator/package-lock.json index 4a1dfe0d6..76907ed31 100644 --- a/x402_facilitator/package-lock.json +++ b/x402_facilitator/package-lock.json @@ -10,7 +10,6 @@ "license": "MIT", "dependencies": { "@fretchen/chain-utils": "file:../shared/chain-utils", - "@rollup/rollup-linux-x64-musl": "4.68.4", "dotenv": "^18.0.10", "pino": "^10.4.0", "viem": "^2.58.0" @@ -21,6 +20,7 @@ "@types/node": "^26.6.6", "@vitest/coverage-v8": "^5.1.0", "eslint": "^10.15.0", + "eslint-plugin-security": "^4.2.1", "prettier": "^3.10.1", "serverless-scaleway-functions": ">=0.4.16", "tsdown": "^0.23.7", @@ -4008,6 +4008,22 @@ } } }, + "node_modules/eslint-plugin-security": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-security/-/eslint-plugin-security-4.2.1.tgz", + "integrity": "sha512-iF95SSqdSUVTvB7srNXoNeTQIqwfALTn9nmoqJyixSIKqEydlW01Cqb7xNveqE4Zd6YWBoQICQ4FH9NkR1byDg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-regex": "^2.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/eslint-scope": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", @@ -7014,6 +7030,16 @@ "integrity": "sha512-P4nbQYQfePJxRSmY+v/KINxVucm4NF3p3s7pJveMTtom52FR4YGltUQLB8idDXwDDWW+eYrWDFbuzUnjoWHF7g==", "license": "MIT" }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "license": "MIT", + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -7244,6 +7270,16 @@ ], "license": "MIT" }, + "node_modules/safe-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", + "dev": true, + "license": "MIT", + "dependencies": { + "regexp-tree": "~0.1.1" + } + }, "node_modules/safe-regex2": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/safe-regex2/-/safe-regex2-3.1.0.tgz", diff --git a/x402_facilitator/package.json b/x402_facilitator/package.json index 7e3326ef6..bf89ab2fb 100644 --- a/x402_facilitator/package.json +++ b/x402_facilitator/package.json @@ -44,6 +44,7 @@ "@types/node": "^26.6.6", "@vitest/coverage-v8": "^5.1.0", "eslint": "^10.15.0", + "eslint-plugin-security": "^4.2.1", "prettier": "^3.10.1", "serverless-scaleway-functions": ">=0.4.16", "tsdown": "^0.23.7",