feat(security): implement robust IP validation and safeFetch foundation (#21401)

This commit is contained in:
Alisa
2026-03-09 12:02:07 -07:00
committed by GitHub
parent b68d7bc0f9
commit e92ccec6c8
16 changed files with 612 additions and 27 deletions

View File

@@ -35,6 +35,11 @@ const commonRestrictedSyntaxRules = [
message:
'Do not throw string literals or non-Error objects. Throw new Error("...") instead.',
},
{
selector: 'CallExpression[callee.name="fetch"]',
message:
'Use safeFetch() from "@/utils/fetch" instead of the global fetch() to ensure SSRF protection. If you are implementing a custom security layer, use an eslint-disable comment and explain why.',
},
];
export default tseslint.config(