eslint-plugin-sdl-2 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/plugin.ts", "../package.json", "../src/_internal/create-rule.ts", "../src/rules/no-angular-bypass-sanitizer.ts", "../src/rules/no-angular-bypass-security-trust-html.ts", "../src/rules/no-angular-innerhtml-binding.ts", "../src/rules/no-angular-sanitization-trusted-urls.ts", "../src/rules/no-angularjs-bypass-sce.ts", "../src/rules/no-angularjs-enable-svg.ts", "../src/rules/no-angularjs-ng-bind-html-without-sanitize.ts", "../src/rules/no-angularjs-sanitization-whitelist.ts", "../src/rules/no-angularjs-sce-resource-url-wildcard.ts", "../src/rules/no-child-process-exec.ts", "../src/_internal/estree-utils.ts", "../src/rules/no-child-process-shell-true.ts", "../src/_internal/ast-utils.ts", "../src/rules/no-cookies.ts", "../src/rules/no-document-domain.ts", "../src/rules/no-document-execcommand-insert-html.ts", "../src/rules/no-document-parse-html-unsafe.ts", "../src/rules/no-document-write.ts", "../src/rules/no-domparser-html-without-sanitization.ts", "../src/_internal/domparser.ts", "../src/rules/no-domparser-svg-without-sanitization.ts", "../src/_internal/worker-code-loading.ts", "../src/rules/no-dynamic-import-unsafe-url.ts", "../src/_internal/electron-web-preferences.ts", "../src/rules/no-electron-allow-running-insecure-content.ts", "../src/rules/no-electron-dangerous-blink-features.ts", "../src/rules/no-electron-disable-context-isolation.ts", "../src/rules/no-electron-disable-sandbox.ts", "../src/rules/no-electron-disable-web-security.ts", "../src/rules/no-electron-enable-remote-module.ts", "../src/rules/no-electron-enable-webview-tag.ts", "../src/rules/no-electron-experimental-features.ts", "../src/rules/no-electron-expose-raw-ipc-renderer.ts", "../src/rules/no-electron-insecure-certificate-error-handler.ts", "../src/rules/no-electron-insecure-certificate-verify-proc.ts", "../src/rules/no-electron-insecure-permission-request-handler.ts", "../src/rules/no-electron-node-integration.ts", "../src/rules/no-electron-permission-check-handler-allow-all.ts", "../src/rules/no-electron-unchecked-ipc-sender.ts", "../src/rules/no-electron-unrestricted-navigation.ts", "../src/rules/no-electron-untrusted-open-external.ts", "../src/rules/no-electron-webview-allowpopups.ts", "../src/rules/no-electron-webview-insecure-webpreferences.ts", "../src/rules/no-electron-webview-node-integration.ts", "../src/rules/no-html-method.ts", "../src/rules/no-http-request-to-insecure-protocol.ts", "../src/rules/no-iframe-srcdoc.ts", "../src/rules/no-inner-html.ts", "../src/rules/no-insecure-random.ts", "../src/rules/no-insecure-tls-agent-options.ts", "../src/rules/no-insecure-url.ts", "../src/rules/no-location-javascript-url.ts", "../src/rules/no-message-event-without-origin-check.ts", "../src/rules/no-msapp-exec-unsafe.ts", "../src/rules/no-node-tls-check-server-identity-bypass.ts", "../src/_internal/node-tls-config.ts", "../src/rules/no-node-tls-legacy-protocol.ts", "../src/rules/no-node-tls-reject-unauthorized-zero.ts", "../src/rules/no-node-tls-security-level-zero.ts", "../src/rules/no-node-vm-run-in-context.ts", "../src/rules/no-node-vm-source-text-module.ts", "../src/rules/no-node-worker-threads-eval.ts", "../src/rules/no-nonnull-assertion-on-security-input.ts", "../src/rules/no-postmessage-star-origin.ts", "../src/rules/no-postmessage-without-origin-allowlist.ts", "../src/rules/no-range-create-contextual-fragment.ts", "../src/_internal/script-element.ts", "../src/rules/no-script-src-data-url.ts", "../src/rules/no-script-text.ts", "../src/rules/no-service-worker-unsafe-script-url.ts", "../src/rules/no-set-html-unsafe.ts", "../src/rules/no-trusted-types-policy-pass-through.ts", "../src/rules/no-unsafe-alloc.ts", "../src/rules/no-unsafe-cast-to-trusted-types.ts", "../src/rules/no-window-open-without-noopener.ts", "../src/rules/no-winjs-html-unsafe.ts", "../src/rules/no-worker-blob-url.ts", "../src/rules/no-worker-data-url.ts", "../src/_internal/rules-registry.ts"],
4
- "sourcesContent": ["import type { ESLint, Linter } from \"eslint\";\n\nimport typeScriptPlugin from \"@typescript-eslint/eslint-plugin\";\nimport typeScriptParser from \"@typescript-eslint/parser\";\nimport nodePlugin from \"eslint-plugin-n\";\nimport securityPlugin from \"eslint-plugin-security\";\n\nimport type { SdlConfigName } from \"./_internal/config-references.js\";\n\nimport packageJson from \"../package.json\" with { type: \"json\" };\nimport sdlRules from \"./_internal/rules-registry.js\";\n\ntype SdlConfig = Readonly<Linter.Config>;\ntype SdlConfigArray = readonly SdlConfig[];\ntype SdlConfigMap = Record<SdlConfigName, SdlConfigArray>;\ntype SdlPlugin = Readonly<ESLint.Plugin>;\ntype SdlPluginWithConfigs = ESLint.Plugin & {\n readonly configs: Readonly<Record<SdlConfigName, SdlConfigArray>>;\n};\n\nconst typeScriptEslintPlugin = typeScriptPlugin as unknown as ESLint.Plugin;\nconst nodeEslintPlugin = nodePlugin as unknown as ESLint.Plugin;\nconst securityEslintPlugin = securityPlugin as unknown as ESLint.Plugin;\n\nconst typeScriptFiles = [\"**/*.{ts,tsx,mts,cts}\"];\n\nconst createAngularConfig = (plugin: SdlPlugin): SdlConfigArray => [\n {\n plugins: {\n sdl: plugin,\n },\n rules: {\n \"sdl/no-angular-bypass-sanitizer\": \"error\",\n \"sdl/no-angular-bypass-security-trust-html\": \"error\",\n \"sdl/no-angular-innerhtml-binding\": \"error\",\n \"sdl/no-angular-sanitization-trusted-urls\": \"error\",\n },\n },\n];\n\nconst createAngularJsConfig = (plugin: SdlPlugin): SdlConfigArray => [\n {\n plugins: {\n sdl: plugin,\n },\n rules: {\n \"sdl/no-angularjs-bypass-sce\": \"error\",\n \"sdl/no-angularjs-enable-svg\": \"error\",\n \"sdl/no-angularjs-ng-bind-html-without-sanitize\": \"error\",\n \"sdl/no-angularjs-sanitization-whitelist\": \"error\",\n \"sdl/no-angularjs-sce-resource-url-wildcard\": \"error\",\n },\n },\n];\n\nconst createCommonConfig = (plugin: SdlPlugin): SdlConfigArray => [\n {\n plugins: {\n sdl: plugin,\n },\n rules: {\n \"no-caller\": \"error\",\n \"no-delete-var\": \"error\",\n \"no-eval\": \"error\",\n \"no-implied-eval\": \"error\",\n \"no-new-func\": \"error\",\n \"sdl/no-cookies\": \"error\",\n \"sdl/no-document-domain\": \"error\",\n \"sdl/no-document-execcommand-insert-html\": \"error\",\n \"sdl/no-document-parse-html-unsafe\": \"error\",\n \"sdl/no-document-write\": \"error\",\n \"sdl/no-domparser-html-without-sanitization\": \"error\",\n \"sdl/no-domparser-svg-without-sanitization\": \"error\",\n \"sdl/no-dynamic-import-unsafe-url\": \"error\",\n \"sdl/no-html-method\": \"error\",\n \"sdl/no-iframe-srcdoc\": \"error\",\n \"sdl/no-inner-html\": \"error\",\n \"sdl/no-insecure-random\": \"error\",\n \"sdl/no-insecure-url\": \"error\",\n \"sdl/no-location-javascript-url\": \"error\",\n \"sdl/no-message-event-without-origin-check\": \"error\",\n \"sdl/no-msapp-exec-unsafe\": \"error\",\n \"sdl/no-postmessage-star-origin\": \"error\",\n \"sdl/no-postmessage-without-origin-allowlist\": \"error\",\n \"sdl/no-range-create-contextual-fragment\": \"error\",\n \"sdl/no-script-src-data-url\": \"error\",\n \"sdl/no-script-text\": \"error\",\n \"sdl/no-service-worker-unsafe-script-url\": \"error\",\n \"sdl/no-set-html-unsafe\": \"error\",\n \"sdl/no-window-open-without-noopener\": \"error\",\n \"sdl/no-winjs-html-unsafe\": \"error\",\n \"sdl/no-worker-blob-url\": \"error\",\n \"sdl/no-worker-data-url\": \"error\",\n },\n },\n];\n\nconst createElectronConfig = (plugin: SdlPlugin): SdlConfigArray => [\n {\n plugins: {\n sdl: plugin,\n },\n rules: {\n \"sdl/no-electron-allow-running-insecure-content\": \"error\",\n \"sdl/no-electron-dangerous-blink-features\": \"error\",\n \"sdl/no-electron-disable-context-isolation\": \"error\",\n \"sdl/no-electron-disable-sandbox\": \"error\",\n \"sdl/no-electron-disable-web-security\": \"error\",\n \"sdl/no-electron-enable-remote-module\": \"error\",\n \"sdl/no-electron-enable-webview-tag\": \"error\",\n \"sdl/no-electron-experimental-features\": \"error\",\n \"sdl/no-electron-expose-raw-ipc-renderer\": \"error\",\n \"sdl/no-electron-insecure-certificate-error-handler\": \"error\",\n \"sdl/no-electron-insecure-certificate-verify-proc\": \"error\",\n \"sdl/no-electron-insecure-permission-request-handler\": \"error\",\n \"sdl/no-electron-node-integration\": \"error\",\n \"sdl/no-electron-permission-check-handler-allow-all\": \"error\",\n \"sdl/no-electron-unchecked-ipc-sender\": \"error\",\n \"sdl/no-electron-unrestricted-navigation\": \"error\",\n \"sdl/no-electron-untrusted-open-external\": \"error\",\n \"sdl/no-electron-webview-allowpopups\": \"error\",\n \"sdl/no-electron-webview-insecure-webpreferences\": \"error\",\n \"sdl/no-electron-webview-node-integration\": \"error\",\n },\n },\n];\n\nconst createNodeConfig = (plugin: SdlPlugin): SdlConfigArray => [\n {\n plugins: {\n n: nodeEslintPlugin,\n },\n rules: {\n \"n/no-deprecated-api\": \"error\",\n },\n },\n {\n plugins: {\n sdl: plugin,\n },\n rules: {\n \"sdl/no-child-process-exec\": \"error\",\n \"sdl/no-child-process-shell-true\": \"error\",\n \"sdl/no-http-request-to-insecure-protocol\": \"error\",\n \"sdl/no-insecure-tls-agent-options\": \"error\",\n \"sdl/no-node-tls-check-server-identity-bypass\": \"error\",\n \"sdl/no-node-tls-legacy-protocol\": \"error\",\n \"sdl/no-node-tls-reject-unauthorized-zero\": \"error\",\n \"sdl/no-node-tls-security-level-zero\": \"error\",\n \"sdl/no-node-vm-run-in-context\": \"error\",\n \"sdl/no-node-vm-source-text-module\": \"error\",\n \"sdl/no-node-worker-threads-eval\": \"error\",\n \"sdl/no-unsafe-alloc\": \"error\",\n },\n },\n];\n\nconst createReactConfig = (plugin: SdlPlugin): SdlConfigArray => [\n {\n languageOptions: {\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n },\n },\n {\n plugins: {\n sdl: plugin,\n },\n },\n];\n\nconst createTypeScriptConfig = (plugin: SdlPlugin): SdlConfigArray => [\n {\n languageOptions: {\n parserOptions: {\n ecmaVersion: \"latest\",\n sourceType: \"module\",\n },\n },\n },\n {\n files: [...typeScriptFiles],\n languageOptions: {\n parser: typeScriptParser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n ecmaVersion: \"latest\",\n sourceType: \"module\",\n },\n },\n plugins: {\n \"@typescript-eslint\": typeScriptEslintPlugin,\n sdl: plugin,\n },\n rules: {\n \"@typescript-eslint/no-implied-eval\": \"error\",\n \"no-implied-eval\": \"off\",\n \"sdl/no-nonnull-assertion-on-security-input\": \"error\",\n \"sdl/no-trusted-types-policy-pass-through\": \"error\",\n \"sdl/no-unsafe-cast-to-trusted-types\": \"error\",\n },\n },\n];\n\nconst createRequiredConfig = (\n configs: Readonly<SdlConfigMap>\n): SdlConfigArray => [\n ...configs.angular,\n ...configs.angularjs,\n ...configs.common,\n ...configs.electron,\n ...configs.node,\n ...configs.react,\n];\n\nconst createRecommendedConfig = (\n configs: Readonly<SdlConfigMap>\n): SdlConfigArray => [\n ...configs.required,\n ...configs.typescript,\n {\n plugins: {\n security: securityEslintPlugin,\n },\n },\n];\n\nconst packageJsonVersion =\n typeof packageJson.version === \"string\" && packageJson.version.length > 0\n ? packageJson.version\n : \"0.0.0\";\n\nconst pluginCore: SdlPlugin = {\n meta: {\n name: \"eslint-plugin-sdl-2\",\n namespace: \"sdl\",\n version: packageJsonVersion,\n },\n rules: sdlRules as unknown as NonNullable<ESLint.Plugin[\"rules\"]>,\n};\n\nconst configs: SdlConfigMap = {\n angular: createAngularConfig(pluginCore),\n angularjs: createAngularJsConfig(pluginCore),\n common: createCommonConfig(pluginCore),\n electron: createElectronConfig(pluginCore),\n node: createNodeConfig(pluginCore),\n react: createReactConfig(pluginCore),\n recommended: [],\n required: [],\n typescript: createTypeScriptConfig(pluginCore),\n};\n\nconfigs.required = createRequiredConfig(configs);\nconfigs.recommended = createRecommendedConfig(configs);\n\n/** ESLint plugin entrypoint with SDL rule set and flat-config presets. */\nconst sdlPlugin: SdlPluginWithConfigs = {\n ...pluginCore,\n configs,\n rules: sdlRules as unknown as NonNullable<ESLint.Plugin[\"rules\"]>,\n};\n\nexport default sdlPlugin;\n", "{\n \"$schema\": \"https://www.schemastore.org/package.json\",\n \"name\": \"eslint-plugin-sdl-2\",\n \"version\": \"1.1.0\",\n \"private\": false,\n \"description\": \"ESLint plugin providing SDL-focused security and platform hardening rules.\",\n \"keywords\": [\n \"eslint\",\n \"eslint-plugin\",\n \"eslintplugin\",\n \"sdl\",\n \"security\",\n \"angular\",\n \"angularjs\",\n \"electron\",\n \"node\",\n \"typescript\"\n ],\n \"homepage\": \"https://github.com/Nick2bad4u/eslint-plugin-SDL-2\",\n \"bugs\": {\n \"url\": \"https://github.com/Nick2bad4u/eslint-plugin-SDL-2/issues\",\n \"email\": \"20943337+Nick2bad4u@users.noreply.github.com\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/Nick2bad4u/eslint-plugin-SDL-2.git\"\n },\n \"license\": \"MIT\",\n \"author\": \"Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com> (https://nick2bad4u.github.io/eslint-plugin-SDL-2)\",\n \"contributors\": [\n {\n \"name\": \"Nick2bad4u\",\n \"email\": \"20943337+Nick2bad4u@users.noreply.github.com\",\n \"url\": \"https://nick2bad4u.github.io/eslint-plugin-SDL-2\"\n }\n ],\n \"sideEffects\": false,\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/plugin.d.ts\",\n \"default\": \"./dist/plugin.js\"\n },\n \"require\": {\n \"types\": \"./dist/plugin.d.cts\",\n \"default\": \"./dist/plugin.cjs\"\n },\n \"default\": \"./dist/plugin.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"main\": \"./dist/plugin.cjs\",\n \"types\": \"./dist/plugin.d.ts\",\n \"files\": [\n \"dist\",\n \"docs/rules/**\",\n \"CHANGELOG.md\"\n ],\n \"workspaces\": [\n \"docs/docusaurus\"\n ],\n \"scripts\": {\n \"prebench\": \"npm run build\",\n \"bench\": \"node benchmarks/run-eslint-stats.mjs\",\n \"prebench:compare\": \"npm run build\",\n \"bench:compare\": \"node benchmarks/run-eslint-stats.mjs --iterations=6 --warmup=2 --compare=coverage/benchmarks/eslint-stats.json\",\n \"prebench:eslint:stats\": \"npm run build\",\n \"bench:eslint:stats\": \"node benchmarks/run-eslint-stats.mjs\",\n \"prebench:eslint:timing\": \"npm run build\",\n \"bench:eslint:timing\": \"cross-env TIMING=all eslint --config benchmarks/eslint-timing.config.mjs --stats \\\"test/fixtures/ts/compat-no-insecure-*.invalid.ts\\\"\",\n \"prebench:rule-benchmark\": \"npm run build\",\n \"bench:rule-benchmark\": \"eslint-rule-benchmark run\",\n \"prebench:ui\": \"npm run build\",\n \"bench:ui\": \"vitest bench --ui\",\n \"prebench:watch\": \"npm run build\",\n \"bench:watch\": \"vitest bench\",\n \"build\": \"tsc -p tsconfig.build.json && npm run build:types:cjs && npm run build:cjs\",\n \"build:cjs\": \"esbuild dist/plugin.js --bundle --format=cjs --platform=node --packages=external --sourcemap --outfile=dist/plugin.cjs --footer:js=\\\"module.exports = module.exports.default;\\\"\",\n \"build:clean\": \"node -e \\\"require('node:fs').rmSync('dist',{recursive:true,force:true})\\\"\",\n \"build:eslint-inspector\": \"npx -y @eslint/config-inspector@1.4.2 build --outDir \\\"docs/docusaurus/static/eslint-inspector\\\" --base \\\"/eslint-plugin-SDL-2/eslint-inspector/\\\"\",\n \"build:eslint-inspector:local\": \"npx @eslint/config-inspector\",\n \"build:stylelint-inspector\": \"npx -y stylelint-config-inspector@latest build --outDir \\\"docs/docusaurus/static/stylelint-inspector\\\" --base \\\"/eslint-plugin-SDL-2/stylelint-inspector/\\\"\",\n \"build:stylelint-inspector:local\": \"npx stylelint-config-inspector@latest\",\n \"build:types:cjs\": \"node -e \\\"require('node:fs').copyFileSync('dist/plugin.d.ts','dist/plugin.d.cts')\\\"\",\n \"changelog:generate\": \"git-cliff --config cliff.toml --output CHANGELOG.md\",\n \"changelog:preview\": \"git-cliff --config cliff.toml --unreleased\",\n \"changelog:release-notes\": \"git-cliff --config cliff.toml --latest --strip all\",\n \"clean:cache\": \"rimraf dist coverage cache .cache .vite .turbo\",\n \"clean:cache:coverage\": \"rimraf coverage .coverage\",\n \"clean:cache:dist\": \"rimraf dist release\",\n \"clean:cache:eslint\": \"rimraf .cache/.eslintcache\",\n \"clean:cache:ncu\": \"rimraf .cache/.ncu-cache.json\",\n \"clean:cache:prettier\": \"rimraf .cache/.prettier-cache .prettier-cache .prettiercache\",\n \"clean:cache:stryker\": \"rimraf .stryker-tmp\",\n \"clean:cache:stylelint\": \"rimraf .cache/stylelintcache stylelintcache .stylelintcache\",\n \"clean:cache:temp\": \"rimraf \\\".temp/.**\\\" --glob\",\n \"clean:cache:typescript\": \"rimraf .cache/**.tsbuildinfo .cache/builds\",\n \"clean:cache:vite\": \"rimraf .cache/vite .cache/vitest .cache/vitest-zero-coverage .cache/vite-zero-coverage\",\n \"clean:database\": \"rimraf %appdata%/uptime-watcher/uptime-watcher.sqlite\",\n \"clean:docs\": \"rimraf docs/docusaurus/.docusaurus/** docs/docusaurus/build/** docs/docusaurus/site-docs/developer/api/**\",\n \"clean:docusaurus\": \"npm run clean:docs && npm run --workspace docs/docusaurus clear\",\n \"cognitive-complexity\": \"cognitive-complexity-ts --threshold 10\",\n \"commit\": \"git-cz\",\n \"contrib\": \"all-contributors\",\n \"contrib:add\": \"all-contributors add\",\n \"contrib:check\": \"all-contributors check\",\n \"contrib:compare\": \"npm run contrib:check\",\n \"contrib:generate\": \"all-contributors generate\",\n \"coverage\": \"vitest run --coverage\",\n \"docs:api\": \"npm run --workspace docs/docusaurus docs:api\",\n \"docs:api:local\": \"npm run --workspace docs/docusaurus docs:api:local\",\n \"docs:build\": \"npm run --workspace docs/docusaurus build\",\n \"docs:build:local\": \"npm run --workspace docs/docusaurus build:local\",\n \"docs:check-links\": \"npm run docs:api && node ./scripts/check-doc-links.mjs\",\n \"docs:serve\": \"npm run --workspace docs/docusaurus serve\",\n \"docs:start\": \"npm run --workspace docs/docusaurus start\",\n \"docs:toc\": \"remark docs --use remark-toc --output\",\n \"docs:typecheck\": \"npm run --workspace docs/docusaurus typecheck\",\n \"docs:typedoc\": \"npm run --workspace docs/docusaurus docs:api\",\n \"docs:typedoc:local\": \"npm run --workspace docs/docusaurus docs:api:local\",\n \"docs:validate-links\": \"remark docs --use remark-validate-links --frail\",\n \"knip\": \"cross-env NODE_OPTIONS=--max_old_space_size=4096 NODE_NO_WARNINGS=1 npx knip -c knip.config.ts --include-libs --cache --cache-location .cache/knip --tsConfig tsconfig.json\",\n \"lint\": \"cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache\",\n \"lint:action\": \"npm run lint:actions\",\n \"lint:actions\": \"node scripts/lint-actionlint.mjs\",\n \"lint:all\": \"npm run lint && npm run lint:css && npm run lint:prettier && npm run lint:remark && npm run lint:package && npm run lint:secretlint && npm run lint:yaml && npm run lint:actions && npm run lint:circular\",\n \"lint:all:fix\": \"npm run lint:fix && npm run lint:css:fix && npm run lint:prettier:fix && npm run lint:remark && npm run lint:package && npm run lint:secretlint && npm run lint:yaml:fix && npm run lint:actions && npm run lint:circular\",\n \"lint:all:fix:quiet\": \"npm run lint:fix:quiet && npm run lint:css:fix && npm run lint:prettier:fix && npm run lint:remark && npm run lint:package && npm run lint:secretlint && npm run lint:yaml:fix && npm run lint:actions && npm run lint:circular\",\n \"lint:circular\": \"npm run madge:circular\",\n \"lint:compat:eslint9\": \"node scripts/eslint9-compat-smoke.mjs\",\n \"lint:config:build\": \"npm run build:eslint-inspector\",\n \"lint:config:inspect\": \"npx eslint --inspect-config\",\n \"lint:css\": \"stylelint --cache --config stylelint.config.mjs --cache-strategy content --cache-location .cache/stylelintcache --ignore-pattern \\\"docs/docusaurus/static/stylelint-inspector/**\\\" --ignore-pattern \\\"docs/docusaurus/static/eslint-inspector/**\\\" src/ docs/ --custom-formatter stylelint-formatter-pretty && echo \\\"Stylelint done!\\\"\",\n \"lint:css:fix\": \"stylelint --cache --config stylelint.config.mjs --cache-strategy content --cache-location .cache/stylelintcache --ignore-pattern \\\"docs/docusaurus/static/stylelint-inspector/**\\\" --ignore-pattern \\\"docs/docusaurus/static/eslint-inspector/**\\\" src/ docs/ --custom-formatter stylelint-formatter-pretty --fix && echo \\\"Stylelint done!\\\"\",\n \"lint:depcheck\": \"depcheck\",\n \"lint:deps\": \"depcheck && npm run knip\",\n \"lint:dupes\": \"jscpd src/ --config jscpd.json\",\n \"lint:dupes:all\": \"jscpd src/ --config jscpd.json --min-lines 3\",\n \"lint:dupes:skiplocal\": \"jscpd src/ --skipLocal --config jscpd.json\",\n \"lint:dupes:skiplocal:all\": \"jscpd src/ --skipLocal --config jscpd.json --min-lines 3\",\n \"lint:duplicates\": \"npm run lint:dupes\",\n \"lint:exports\": \"ts-unused-exports tsconfig.json src/plugin.ts --excludePathsFromReport=plugin.ts\",\n \"lint:fix\": \"cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache --fix\",\n \"lint:fix:quiet\": \"cross-env ESLINT_PROGRESS=off NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache --fix && echo \\\"Eslint fix done!\\\"\",\n \"lint:grype\": \"grype . -c .grype.yaml --name eslint-plugin-sdl-2\",\n \"lint:knip\": \"npm run knip\",\n \"lint:knip:exports\": \"npm run knip -- --include exports,nsExports,classMembers,types,nsTypes,enumMembers,duplicates\",\n \"lint:knip:unused:exports\": \"npm run knip -- --dependencies --exports\",\n \"lint:leaves\": \"npm run madge:leaves\",\n \"lint:metrics\": \"npm run sloc\",\n \"lint:node-version-files\": \"node scripts/sync-node-version-files.mjs --check\",\n \"lint:orphans\": \"npm run madge:orphans\",\n \"lint:package\": \"npm run lint:node-version-files && npm run lint:package-sort && npm run lint:packagelintrc && echo \\\"Package.json lint done!\\\"\",\n \"lint:package:strict\": \"npm run lint:node-version-files && npm run lint:package-sort && npm run lint:package-check && npm run lint:packagelintrc && echo \\\"Package.json lint done!\\\"\",\n \"lint:package-check\": \"publint && attw --pack .\",\n \"lint:package-check:strict\": \"publint && attw --pack . --profile strict\",\n \"lint:package-sort\": \"sort-package-json \\\"./package.json\\\" \\\"./docs/docusaurus/package.json\\\"\",\n \"lint:package-sort-check\": \"sort-package-json --check \\\"./package.json\\\" \\\"./docs/docusaurus/package.json\\\"\",\n \"lint:packagelintrc\": \"npmPkgJsonLint . --config .npmpackagejsonlintrc.json\",\n \"lint:prettier\": \"prettier . --log-level warn --cache --cache-location=.cache/.prettier-cache --cache-strategy=content --check\",\n \"lint:prettier:fix\": \"prettier . --log-level warn --cache --cache-location=.cache/.prettier-cache --cache-strategy=content --write\",\n \"lint:publint\": \"publint\",\n \"lint:quiet\": \"cross-env ESLINT_PROGRESS=nofile NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache && echo \\\"Eslint done!\\\"\",\n \"lint:remark\": \"remark --rc-path .remarkrc.mjs --silently-ignore --ignore-path .remarkignore --frail \\\"*.{md,mdx}\\\" \\\"docs/**/*.{md,mdx}\\\" --quiet\",\n \"lint:remark:fix\": \"prettier --log-level warn --ignore-path prettierignore.remark --cache --cache-location=.cache/.prettier-cache --cache-strategy=content --no-error-on-unmatched-pattern --write \\\"*.{md,mdx}\\\" \\\"docs/**/*.{md,mdx}\\\" && npm run remark:fix\",\n \"lint:secretlint\": \"secretlint --secretlintrc .secretlintrc.json --secretlintignore .secretlintignore \\\"./*\\\" \\\".vscode/**\\\" \\\"assets/**\\\" \\\"src/**\\\" \\\"electron/**\\\" \\\"shared/**\\\" \\\"config/**\\\" \\\"scripts/**\\\" \\\"playwright/**\\\" \\\"storybook/**\\\" \\\".storybook\\\" \\\"tests/**\\\" \\\"benchmarks/**\\\" \\\".devin/**\\\" \\\"public/**\\\" \\\".github/**\\\" \\\"docs/Architecture/**\\\" \\\"docs/*\\\" \\\"docs/assets/**\\\" \\\"docs/Guides/**\\\" \\\"docs/Testing/**\\\" \\\"docs/TSDoc/**\\\" \\\"docs/docusaurus/src/**\\\" \\\"docs/docusaurus/static/**\\\" \\\"docs/docusaurus/blog/**\\\" \\\"docs/docusaurus/docs/**\\\" \\\"docs/docusaurus/docs/*\\\"\",\n \"lint:secrets\": \"detect-secrets scan\",\n \"lint:unused\": \"npm run knip -- --include unlisted,unresolved,duplicates\",\n \"lint:unused-deps\": \"depcheck --ignores='@types/*,@testing-library/*,@vitest/*'\",\n \"lint:yaml\": \"cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache \\\"**/*.{yml,yaml}\\\" && echo \\\"YAML lint done!\\\"\",\n \"lint:yaml:fix\": \"cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache --fix \\\"**/*.{yml,yaml}\\\" && echo \\\"YAML lint (fix) done!\\\"\",\n \"madge:circular\": \"madge --circular --no-spinner --ts-config tsconfig.json --extensions ts,tsx,js,jsx,mjs,cjs,cts,mts ./src --exclude \\\"(^|[\\\\/])(test|dist|node_modules|cache|.cache|coverage|build|eslint-inspector|temp|.docusaurus)($|[\\\\/])|\\\\.css$\\\"\",\n \"madge:leaves\": \"madge --leaves --no-spinner --ts-config tsconfig.json --extensions ts,tsx,js,jsx,mjs,cjs,cts,mts ./src --exclude \\\"(^|[\\\\/])(test|dist|node_modules|cache|.cache|coverage|build|eslint-inspector|temp|.docusaurus)($|[\\\\/])|\\\\.css$\\\"\",\n \"madge:orphans\": \"madge --orphans --no-spinner --ts-config tsconfig.json --extensions ts,tsx,js,jsx,mjs,cjs,cts,mts ./src --exclude \\\"(^|[\\\\/])(test|dist|node_modules|cache|.cache|coverage|build|eslint-inspector|temp|.docusaurus)($|[\\\\/])|\\\\.css$\\\"\",\n \"open:coverage\": \"open-cli coverage/index.html\",\n \"prepublishOnly\": \"npm run release:check\",\n \"release:check\": \"npm run release:verify\",\n \"release:verify\": \"npm run build && npm run lint && npm run typecheck && npm run test && npm run sync:readme-rules-table && npm run sync:presets-rules-matrix && npm run docs:check-links && npm pack --dry-run\",\n \"remark:fix\": \"remark --rc-path .remarkrc.mjs --silently-ignore --ignore-path .remarkignore --frail --quiet --output -- \\\"*.{md,mdx}\\\" \\\"docs/**/*.{md,mdx}\\\"\",\n \"remark:test-config\": \"remark --rc-path .remarkrc.mjs --silently-ignore --ignore-path .remarkignore --frail \\\"README.md\\\"\",\n \"sync:node-version-files\": \"node scripts/sync-node-version-files.mjs\",\n \"sync:peer-eslint-range\": \"node scripts/sync-peer-eslint-range.mjs\",\n \"sync:presets-rules-matrix\": \"node scripts/sync-presets-rules-matrix.mjs\",\n \"sync:readme-rules-table\": \"node scripts/sync-readme-rules-table.mjs\",\n \"sync:readme-rules-table:update\": \"npm run build && npm run sync:readme-rules-table:write\",\n \"sync:readme-rules-table:write\": \"node scripts/sync-readme-rules-table.mjs --write\",\n \"pretest\": \"npm run build\",\n \"test\": \"vitest run\",\n \"test:autofix:fixtures\": \"cross-env SDL_AUTOFIX_SMOKE=1 vitest run test/rules-sdl.test.ts\",\n \"test:autofix:fixtures:typed\": \"cross-env SDL_AUTOFIX_SMOKE=1 SDL_AUTOFIX_FIXTURE_DIR=test/fixtures/ts vitest run test/rules-sdl.test.ts\",\n \"test:ci\": \"cross-env CI=true vitest run --reporter=default\",\n \"test:coverage\": \"vitest run --coverage --reporter=default\",\n \"test:coverage:detailed\": \"vitest run --coverage --reporter=verbose\",\n \"test:coverage:minimal\": \"vitest run --coverage --reporter=dot\",\n \"test:coverage:open\": \"npm run test:coverage && npm run open:coverage\",\n \"test:coverage:quiet\": \"vitest run --coverage --reporter=default --silent\",\n \"test:coverage:verbose\": \"vitest run --coverage --reporter=verbose\",\n \"test:detailed\": \"vitest run --reporter=verbose\",\n \"test:minimal\": \"vitest run --reporter=dot\",\n \"test:open\": \"npm run test:coverage && npm run open:coverage\",\n \"test:quiet\": \"vitest run --reporter=default --silent\",\n \"test:serial\": \"cross-env MAX_THREADS=1 vitest run\",\n \"test:stryker\": \"stryker run --ignoreStatic --concurrency 12 --incrementalFile .cache/stryker/incremental-fast.json\",\n \"test:stryker:ci\": \"cross-env CI=true stryker run --ignoreStatic --concurrency 2 --incrementalFile .cache/stryker/incremental-fast-ci.json\",\n \"test:stryker:full\": \"stryker run --concurrency 12 --incrementalFile .cache/stryker/incremental-full.json\",\n \"test:stryker:full:ci\": \"cross-env CI=true stryker run --concurrency 2 --incrementalFile .cache/stryker/incremental-full-ci.json\",\n \"test:verbose\": \"vitest run --reporter=verbose\",\n \"test:watch\": \"vitest\",\n \"typecheck\": \"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.build.json --noEmit && tsc -p tsconfig.eslint.json --noEmit && tsc -p tsconfig.js.json --noEmit && npm run --workspace docs/docusaurus typecheck\",\n \"typecheck:all\": \"npm run typecheck\",\n \"types:update\": \"typesync\",\n \"update-deps\": \"npx ncu -i --install never && npm run sync:peer-eslint-range && npm install --force\",\n \"verify:readme-rules-table\": \"npm run build && npm run sync:readme-rules-table\"\n },\n \"overrides\": {\n \"jsonc-eslint-parser\": \"$jsonc-eslint-parser\"\n },\n \"dependencies\": {\n \"@typescript-eslint/parser\": \"^8.59.0\",\n \"@typescript-eslint/type-utils\": \"^8.59.0\",\n \"@typescript-eslint/utils\": \"^8.59.0\",\n \"ts-extras\": \"^1.0.0\",\n \"type-fest\": \"^5.6.0\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"^0.18.2\",\n \"@csstools/stylelint-formatter-github\": \"^2.0.0\",\n \"@docusaurus/eslint-plugin\": \"^3.10.0\",\n \"@double-great/remark-lint-alt-text\": \"^1.1.1\",\n \"@double-great/stylelint-a11y\": \"^3.4.10\",\n \"@eslint-community/eslint-plugin-eslint-comments\": \"^4.7.1\",\n \"@eslint-react/eslint-plugin\": \"^4.2.3\",\n \"@eslint/compat\": \"^2.0.5\",\n \"@eslint/config-helpers\": \"^0.5.5\",\n \"@eslint/config-inspector\": \"^2.0.0\",\n \"@eslint/css\": \"^1.1.0\",\n \"@eslint/js\": \"^10.0.1\",\n \"@eslint/json\": \"^1.2.0\",\n \"@eslint/markdown\": \"^8.0.1\",\n \"@html-eslint/eslint-plugin\": \"^0.59.0\",\n \"@html-eslint/parser\": \"^0.59.0\",\n \"@microsoft/eslint-plugin-sdl\": \"^1.1.0\",\n \"@microsoft/tsdoc-config\": \"^0.18.1\",\n \"@secretlint/secretlint-rule-anthropic\": \"^12.2.0\",\n \"@secretlint/secretlint-rule-aws\": \"^12.2.0\",\n \"@secretlint/secretlint-rule-database-connection-string\": \"^12.2.0\",\n \"@secretlint/secretlint-rule-gcp\": \"^12.2.0\",\n \"@secretlint/secretlint-rule-github\": \"^12.2.0\",\n \"@secretlint/secretlint-rule-no-dotenv\": \"^12.2.0\",\n \"@secretlint/secretlint-rule-no-homedir\": \"^12.2.0\",\n \"@secretlint/secretlint-rule-npm\": \"^12.2.0\",\n \"@secretlint/secretlint-rule-openai\": \"^12.2.0\",\n \"@secretlint/secretlint-rule-pattern\": \"^12.2.0\",\n \"@secretlint/secretlint-rule-preset-recommend\": \"^12.2.0\",\n \"@secretlint/secretlint-rule-privatekey\": \"^12.2.0\",\n \"@secretlint/secretlint-rule-secp256k1-privatekey\": \"^12.2.0\",\n \"@secretlint/types\": \"^12.2.0\",\n \"@softonus/prettier-plugin-duplicate-remover\": \"^1.1.2\",\n \"@stryker-ignorer/console-all\": \"^0.3.2\",\n \"@stryker-mutator/core\": \"^9.6.1\",\n \"@stryker-mutator/typescript-checker\": \"^9.6.1\",\n \"@stryker-mutator/vitest-runner\": \"^9.6.1\",\n \"@stylelint-types/stylelint-order\": \"^7.0.1\",\n \"@stylelint-types/stylelint-stylistic\": \"^5.0.0\",\n \"@stylistic/eslint-plugin\": \"^5.10.0\",\n \"@stylistic/stylelint-plugin\": \"^5.1.0\",\n \"@types/eslint-plugin-jsx-a11y\": \"^6.10.1\",\n \"@types/eslint-plugin-security\": \"^3.0.1\",\n \"@types/htmlhint\": \"^1.1.5\",\n \"@types/madge\": \"^5.0.3\",\n \"@types/node\": \"^25.6.0\",\n \"@types/postcss-clamp\": \"^4.1.3\",\n \"@types/postcss-flexbugs-fixes\": \"^5.0.3\",\n \"@types/postcss-html\": \"^1.5.3\",\n \"@types/postcss-import\": \"^14.0.3\",\n \"@types/postcss-inline-svg\": \"^5.0.4\",\n \"@types/postcss-normalize\": \"^9.0.4\",\n \"@types/postcss-reporter\": \"^7.0.5\",\n \"@types/sloc\": \"^0.2.3\",\n \"@typescript-eslint/eslint-plugin\": \"^8.59.0\",\n \"@typescript-eslint/rule-tester\": \"^8.59.0\",\n \"@typpi/eslint-plugin-vite\": \"^1.0.13\",\n \"@vitest/coverage-v8\": \"^4.1.5\",\n \"@vitest/eslint-plugin\": \"^1.6.16\",\n \"@vitest/ui\": \"^4.1.5\",\n \"actionlint\": \"^2.0.6\",\n \"all-contributors-cli\": \"^6.26.1\",\n \"cognitive-complexity-ts\": \"^0.8.1\",\n \"commitlint\": \"^20.5.0\",\n \"commitlint-config-gitmoji\": \"^2.3.1\",\n \"cross-env\": \"^10.1.0\",\n \"depcheck\": \"^1.4.7\",\n \"detect-secrets\": \"^1.0.6\",\n \"eslint\": \"^10.2.1\",\n \"eslint-config-flat-gitignore\": \"^2.3.0\",\n \"eslint-config-prettier\": \"^10.1.8\",\n \"eslint-formatter-unix\": \"^9.0.1\",\n \"eslint-import-resolver-typescript\": \"^4.4.4\",\n \"eslint-plugin-array-func\": \"^5.1.1\",\n \"eslint-plugin-canonical\": \"^5.1.3\",\n \"eslint-plugin-case-police\": \"^2.2.1\",\n \"eslint-plugin-comment-length\": \"^2.3.1\",\n \"eslint-plugin-copilot\": \"^1.0.8\",\n \"eslint-plugin-css-modules\": \"^2.12.0\",\n \"eslint-plugin-de-morgan\": \"^2.1.1\",\n \"eslint-plugin-depend\": \"^1.5.0\",\n \"eslint-plugin-docusaurus-2\": \"^0.2.0\",\n \"eslint-plugin-eslint-plugin\": \"^7.3.2\",\n \"eslint-plugin-etc\": \"^2.0.3\",\n \"eslint-plugin-etc-misc\": \"^1.0.8\",\n \"eslint-plugin-file-progress-2\": \"^5.0.1\",\n \"eslint-plugin-github-actions-2\": \"^1.1.0\",\n \"eslint-plugin-html\": \"^8.1.4\",\n \"eslint-plugin-immutable-2\": \"^1.0.10\",\n \"eslint-plugin-import-x\": \"^4.16.2\",\n \"eslint-plugin-jsdoc\": \"^62.9.0\",\n \"eslint-plugin-jsonc\": \"^3.1.2\",\n \"eslint-plugin-jsx-a11y\": \"^6.10.2\",\n \"eslint-plugin-listeners\": \"^1.5.1\",\n \"eslint-plugin-loadable-imports\": \"^1.0.1\",\n \"eslint-plugin-math\": \"^0.13.1\",\n \"eslint-plugin-module-interop\": \"^0.3.1\",\n \"eslint-plugin-n\": \"^17.24.0\",\n \"eslint-plugin-nitpick\": \"^0.12.0\",\n \"eslint-plugin-no-barrel-files\": \"^1.3.1\",\n \"eslint-plugin-no-explicit-type-exports\": \"^0.12.1\",\n \"eslint-plugin-no-function-declare-after-return\": \"^1.1.0\",\n \"eslint-plugin-no-lookahead-lookbehind-regexp\": \"^0.4.0\",\n \"eslint-plugin-no-only-tests\": \"^3.3.0\",\n \"eslint-plugin-no-secrets\": \"^2.3.3\",\n \"eslint-plugin-no-unsanitized\": \"^4.1.5\",\n \"eslint-plugin-no-use-extend-native\": \"^0.7.2\",\n \"eslint-plugin-node-dependencies\": \"^2.2.0\",\n \"eslint-plugin-package-json\": \"^0.91.1\",\n \"eslint-plugin-perfectionist\": \"^5.9.0\",\n \"eslint-plugin-prefer-arrow\": \"^1.2.3\",\n \"eslint-plugin-prettier\": \"^5.5.5\",\n \"eslint-plugin-promise\": \"^7.2.1\",\n \"eslint-plugin-redos\": \"^4.5.0\",\n \"eslint-plugin-regexp\": \"^3.1.0\",\n \"eslint-plugin-require-jsdoc\": \"^1.0.4\",\n \"eslint-plugin-security\": \"^4.0.0\",\n \"eslint-plugin-sonarjs\": \"^4.0.3\",\n \"eslint-plugin-sort-class-members\": \"^1.22.1\",\n \"eslint-plugin-stylelint-2\": \"^1.1.0\",\n \"eslint-plugin-testing-library\": \"^7.16.2\",\n \"eslint-plugin-toml\": \"^1.3.1\",\n \"eslint-plugin-total-functions\": \"^7.1.0\",\n \"eslint-plugin-tsdoc\": \"^0.5.2\",\n \"eslint-plugin-tsdoc-require-2\": \"^1.1.0\",\n \"eslint-plugin-typedoc\": \"^1.2.0\",\n \"eslint-plugin-typefest\": \"^1.2.4\",\n \"eslint-plugin-undefined-css-classes\": \"^0.1.5\",\n \"eslint-plugin-unicorn\": \"^64.0.0\",\n \"eslint-plugin-unused-imports\": \"^4.4.1\",\n \"eslint-plugin-write-good-comments\": \"^0.2.0\",\n \"eslint-plugin-write-good-comments-2\": \"^1.0.6\",\n \"eslint-plugin-yml\": \"^3.3.1\",\n \"eslint-rule-benchmark\": \"^0.8.0\",\n \"fast-check\": \"^4.7.0\",\n \"git-cliff\": \"^2.12.0\",\n \"gitleaks-secret-scanner\": \"^2.1.1\",\n \"globals\": \"^17.5.0\",\n \"htmlhint\": \"^1.9.2\",\n \"jscpd\": \"^4.0.9\",\n \"jsonc-eslint-parser\": \"^3.1.0\",\n \"knip\": \"^6.6.1\",\n \"leasot\": \"^14.4.0\",\n \"madge\": \"^8.0.0\",\n \"markdown-link-check\": \"^3.14.2\",\n \"npm-check-updates\": \"^21.0.3\",\n \"npm-package-json-lint\": \"^10.2.1\",\n \"picocolors\": \"^1.1.1\",\n \"postcss\": \"^8.5.10\",\n \"postcss-assets\": \"^6.0.0\",\n \"postcss-clamp\": \"^4.1.0\",\n \"postcss-combine-duplicated-selectors\": \"^10.0.3\",\n \"postcss-flexbugs-fixes\": \"^5.0.2\",\n \"postcss-html\": \"^1.8.1\",\n \"postcss-import\": \"^16.1.1\",\n \"postcss-inline-svg\": \"^6.0.0\",\n \"postcss-logical\": \"^9.0.0\",\n \"postcss-normalize\": \"^13.0.1\",\n \"postcss-reporter\": \"^7.1.0\",\n \"postcss-round-subpixels\": \"^2.0.0\",\n \"postcss-scss\": \"^4.0.9\",\n \"postcss-sort-media-queries\": \"^6.5.0\",\n \"postcss-styled-jsx\": \"^1.0.1\",\n \"postcss-styled-syntax\": \"^0.7.1\",\n \"postcss-viewport-height-correction\": \"^1.1.1\",\n \"prettier\": \"^3.8.3\",\n \"prettier-plugin-ini\": \"^1.3.0\",\n \"prettier-plugin-interpolated-html-tags\": \"^2.0.1\",\n \"prettier-plugin-jsdoc\": \"^1.8.0\",\n \"prettier-plugin-jsdoc-type\": \"^0.2.0\",\n \"prettier-plugin-merge\": \"^0.10.1\",\n \"prettier-plugin-multiline-arrays\": \"^4.1.7\",\n \"prettier-plugin-packagejson\": \"^3.0.2\",\n \"prettier-plugin-properties\": \"^0.3.1\",\n \"prettier-plugin-sort-json\": \"^4.2.0\",\n \"prettier-plugin-toml\": \"^2.0.6\",\n \"publint\": \"^0.3.18\",\n \"recheck-jar\": \"^4.5.0\",\n \"rehype-katex\": \"^7.0.1\",\n \"remark\": \"^15.0.1\",\n \"remark-cli\": \"^12.0.1\",\n \"remark-directive\": \"^4.0.0\",\n \"remark-frontmatter\": \"^5.0.0\",\n \"remark-gfm\": \"^4.0.1\",\n \"remark-ignore\": \"^3.0.0\",\n \"remark-inline-links\": \"^7.0.0\",\n \"remark-lint\": \"^10.0.1\",\n \"remark-lint-blockquote-indentation\": \"^4.0.1\",\n \"remark-lint-check-toc\": \"^1.0.0\",\n \"remark-lint-checkbox-character-style\": \"^5.0.1\",\n \"remark-lint-checkbox-content-indent\": \"^5.0.1\",\n \"remark-lint-code-block-split-list\": \"^1.0.0\",\n \"remark-lint-code-block-style\": \"^4.0.1\",\n \"remark-lint-correct-media-syntax\": \"^1.0.1\",\n \"remark-lint-definition-case\": \"^4.0.1\",\n \"remark-lint-definition-sort\": \"^1.0.1\",\n \"remark-lint-definition-spacing\": \"^4.0.1\",\n \"remark-lint-directive-attribute-sort\": \"^1.0.1\",\n \"remark-lint-directive-collapsed-attribute\": \"^1.0.1\",\n \"remark-lint-directive-quote-style\": \"^1.0.1\",\n \"remark-lint-directive-shortcut-attribute\": \"^1.0.1\",\n \"remark-lint-directive-unique-attribute-name\": \"^1.0.1\",\n \"remark-lint-emphasis-marker\": \"^4.0.1\",\n \"remark-lint-fenced-code-flag\": \"^4.2.0\",\n \"remark-lint-fenced-code-flag-case\": \"^3.0.0\",\n \"remark-lint-fenced-code-marker\": \"^4.0.1\",\n \"remark-lint-file-extension\": \"^3.0.1\",\n \"remark-lint-final-definition\": \"^4.0.2\",\n \"remark-lint-final-newline\": \"^3.0.1\",\n \"remark-lint-first-heading-level\": \"^4.0.1\",\n \"remark-lint-frontmatter-schema\": \"^3.15.4\",\n \"remark-lint-hard-break-spaces\": \"^4.1.1\",\n \"remark-lint-heading-capitalization\": \"^1.3.0\",\n \"remark-lint-heading-increment\": \"^4.0.1\",\n \"remark-lint-heading-style\": \"^4.0.1\",\n \"remark-lint-heading-whitespace\": \"^1.0.0\",\n \"remark-lint-linebreak-style\": \"^4.0.1\",\n \"remark-lint-link-title-style\": \"^4.0.1\",\n \"remark-lint-list-item-bullet-indent\": \"^5.0.1\",\n \"remark-lint-list-item-content-indent\": \"^4.0.1\",\n \"remark-lint-list-item-indent\": \"^4.0.1\",\n \"remark-lint-list-item-spacing\": \"^5.0.1\",\n \"remark-lint-maximum-heading-length\": \"^4.1.1\",\n \"remark-lint-maximum-line-length\": \"^4.1.1\",\n \"remark-lint-mdx-jsx-attribute-sort\": \"^1.0.1\",\n \"remark-lint-mdx-jsx-no-void-children\": \"^1.0.1\",\n \"remark-lint-mdx-jsx-quote-style\": \"^1.0.1\",\n \"remark-lint-mdx-jsx-self-close\": \"^1.0.1\",\n \"remark-lint-mdx-jsx-shorthand-attribute\": \"^1.0.1\",\n \"remark-lint-mdx-jsx-unique-attribute-name\": \"^1.0.1\",\n \"remark-lint-media-style\": \"^1.0.1\",\n \"remark-lint-no-blockquote-without-marker\": \"^6.0.1\",\n \"remark-lint-no-consecutive-blank-lines\": \"^5.0.1\",\n \"remark-lint-no-dead-urls\": \"^2.0.1\",\n \"remark-lint-no-duplicate-defined-urls\": \"^3.0.1\",\n \"remark-lint-no-duplicate-definitions\": \"^4.0.1\",\n \"remark-lint-no-duplicate-headings\": \"^4.0.1\",\n \"remark-lint-no-duplicate-headings-in-section\": \"^4.0.1\",\n \"remark-lint-no-emphasis-as-heading\": \"^4.0.1\",\n \"remark-lint-no-empty-sections\": \"^4.0.0\",\n \"remark-lint-no-empty-url\": \"^4.0.1\",\n \"remark-lint-no-file-name-articles\": \"^3.0.1\",\n \"remark-lint-no-file-name-consecutive-dashes\": \"^3.0.1\",\n \"remark-lint-no-file-name-irregular-characters\": \"^3.0.1\",\n \"remark-lint-no-file-name-mixed-case\": \"^3.0.1\",\n \"remark-lint-no-file-name-outer-dashes\": \"^3.0.1\",\n \"remark-lint-no-heading-content-indent\": \"^5.0.1\",\n \"remark-lint-no-heading-indent\": \"^5.0.1\",\n \"remark-lint-no-heading-like-paragraph\": \"^4.0.1\",\n \"remark-lint-no-heading-punctuation\": \"^4.0.1\",\n \"remark-lint-no-hidden-table-cell\": \"^1.0.1\",\n \"remark-lint-no-html\": \"^4.0.1\",\n \"remark-lint-no-literal-urls\": \"^4.0.1\",\n \"remark-lint-no-missing-blank-lines\": \"^4.0.1\",\n \"remark-lint-no-multiple-toplevel-headings\": \"^4.0.1\",\n \"remark-lint-no-paragraph-content-indent\": \"^5.0.1\",\n \"remark-lint-no-reference-like-url\": \"^4.0.1\",\n \"remark-lint-no-shell-dollars\": \"^4.0.1\",\n \"remark-lint-no-shortcut-reference-image\": \"^4.0.1\",\n \"remark-lint-no-shortcut-reference-link\": \"^4.0.1\",\n \"remark-lint-no-table-indentation\": \"^5.0.1\",\n \"remark-lint-no-tabs\": \"^4.0.1\",\n \"remark-lint-no-undefined-references\": \"^5.0.2\",\n \"remark-lint-no-unneeded-full-reference-image\": \"^4.0.1\",\n \"remark-lint-no-unneeded-full-reference-link\": \"^4.0.1\",\n \"remark-lint-no-unused-definitions\": \"^4.0.2\",\n \"remark-lint-ordered-list-marker-style\": \"^4.0.1\",\n \"remark-lint-ordered-list-marker-value\": \"^4.0.1\",\n \"remark-lint-rule-style\": \"^4.0.1\",\n \"remark-lint-strikethrough-marker\": \"^3.0.1\",\n \"remark-lint-strong-marker\": \"^4.0.1\",\n \"remark-lint-table-cell-padding\": \"^5.1.1\",\n \"remark-lint-table-pipe-alignment\": \"^4.1.1\",\n \"remark-lint-table-pipes\": \"^5.0.1\",\n \"remark-lint-unordered-list-marker-style\": \"^4.0.1\",\n \"remark-lint-write-good\": \"^1.2.0\",\n \"remark-math\": \"^6.0.0\",\n \"remark-preset-lint-consistent\": \"^6.0.1\",\n \"remark-preset-lint-markdown-style-guide\": \"^6.0.1\",\n \"remark-preset-lint-recommended\": \"^7.0.1\",\n \"remark-preset-prettier\": \"^2.0.2\",\n \"remark-toc\": \"^9.0.0\",\n \"remark-validate-links\": \"^13.1.0\",\n \"remark-wiki-link\": \"^2.0.1\",\n \"rimraf\": \"^6.1.3\",\n \"secretlint\": \"^12.2.0\",\n \"sloc\": \"^0.3.2\",\n \"sort-package-json\": \"^3.6.1\",\n \"stylelint\": \"^17.8.0\",\n \"stylelint-actions-formatters\": \"^16.3.1\",\n \"stylelint-checkstyle-formatter\": \"^0.1.2\",\n \"stylelint-codeframe-formatter\": \"^1.2.0\",\n \"stylelint-config-alphabetical-order\": \"^2.0.0\",\n \"stylelint-config-idiomatic-order\": \"^10.0.0\",\n \"stylelint-config-inspector\": \"^2.1.2\",\n \"stylelint-config-recess-order\": \"^7.7.0\",\n \"stylelint-config-recommended\": \"^18.0.0\",\n \"stylelint-config-sass-guidelines\": \"^13.0.0\",\n \"stylelint-config-standard\": \"^40.0.0\",\n \"stylelint-config-standard-scss\": \"^17.0.0\",\n \"stylelint-config-tailwindcss\": \"^1.0.1\",\n \"stylelint-declaration-block-no-ignored-properties\": \"^3.0.0\",\n \"stylelint-declaration-strict-value\": \"^1.11.1\",\n \"stylelint-define-config\": \"^17.8.0\",\n \"stylelint-find-new-rules\": \"^6.0.0\",\n \"stylelint-formatter-gitlab-code-quality-report\": \"^1.1.0\",\n \"stylelint-formatter-pretty\": \"^4.0.1\",\n \"stylelint-gamut\": \"^2.0.0\",\n \"stylelint-group-selectors\": \"^1.0.10\",\n \"stylelint-high-performance-animation\": \"^2.0.0\",\n \"stylelint-media-use-custom-media\": \"^4.1.0\",\n \"stylelint-no-browser-hacks\": \"^2.0.0\",\n \"stylelint-no-indistinguishable-colors\": \"^2.3.1\",\n \"stylelint-no-restricted-syntax\": \"^2.2.1\",\n \"stylelint-no-unresolved-module\": \"^2.5.2\",\n \"stylelint-no-unsupported-browser-features\": \"^8.1.1\",\n \"stylelint-order\": \"^8.1.1\",\n \"stylelint-plugin-defensive-css\": \"^2.9.1\",\n \"stylelint-plugin-docusaurus\": \"^1.0.3\",\n \"stylelint-plugin-logical-css\": \"^2.1.0\",\n \"stylelint-plugin-use-baseline\": \"^1.4.1\",\n \"stylelint-prettier\": \"^5.0.3\",\n \"stylelint-react-native\": \"^2.7.0\",\n \"stylelint-scales\": \"^5.0.0\",\n \"stylelint-selector-bem-pattern\": \"^4.0.1\",\n \"stylelint-use-nesting\": \"^6.0.2\",\n \"stylelint-value-no-unknown-custom-properties\": \"^6.1.1\",\n \"toml-eslint-parser\": \"^1.0.3\",\n \"ts-unused-exports\": \"^11.0.1\",\n \"typedoc\": \"^0.28.19\",\n \"typescript\": \"^6.0.3\",\n \"typescript-eslint\": \"^8.59.0\",\n \"typesync\": \"^0.14.3\",\n \"vfile\": \"^6.0.3\",\n \"vite\": \"^8.0.9\",\n \"vite-tsconfig-paths\": \"^6.1.1\",\n \"vitest\": \"^4.1.5\",\n \"yaml-eslint-parser\": \"^2.0.0\",\n \"yamllint-js\": \"^0.2.4\"\n },\n \"peerDependencies\": {\n \"eslint\": \"^9.0.0 || ^10.2.1\",\n \"typescript\": \">=5.0.0\"\n },\n \"packageManager\": \"npm@11.13.0\",\n \"engines\": {\n \"node\": \">=20.19.0\"\n },\n \"devEngines\": {\n \"runtime\": {\n \"name\": \"node\",\n \"version\": \">=20.19.0\",\n \"onFail\": \"error\"\n },\n \"packageManager\": {\n \"name\": \"npm\",\n \"version\": \">=11.0.0\",\n \"onFail\": \"error\"\n }\n },\n \"publishConfig\": {\n \"provenance\": true,\n \"registry\": \"https://registry.npmjs.org/\"\n },\n \"readme\": \"README.md\"\n}\n", "import type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { ESLintUtils } from \"@typescript-eslint/utils\";\n\ntype SdlRuleDocs = TSESLint.RuleMetaDataDocs & {\n recommended: boolean;\n};\n\nconst docsBaseUrl =\n \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules\";\n\n/** Shared SDL rule helper that injects canonical docs URLs. */\nexport const createRule: ReturnType<\n typeof ESLintUtils.RuleCreator<SdlRuleDocs>\n> = ESLintUtils.RuleCreator<SdlRuleDocs>((name) => `${docsBaseUrl}/${name}`);\n", "import { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"noBypass\">({\n create(context) {\n return {\n \"CallExpression[arguments.length>0][callee.property.name=/^bypassSecurityTrust(?:html|resourceurl|script|style|url)$/i]\"(\n node\n ) {\n context.report({\n messageId: \"noBypass\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow bypassing Angular DomSanitizer trust APIs such as bypassSecurityTrustHtml.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-bypass-sanitizer\",\n },\n messages: {\n noBypass: \"Do not bypass Angular's built-in sanitizer.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angular-bypass-sanitizer\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n getMemberPropertyName(node.callee) !==\n \"bypassSecurityTrustHtml\"\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Angular bypassSecurityTrustHtml usage in application code.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-bypass-security-trust-html\",\n },\n messages: {\n default:\n \"Avoid bypassSecurityTrustHtml; use validated/sanitized HTML flows instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angular-bypass-security-trust-html\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst hasInnerHtmlBindingPattern = (text: string): boolean =>\n /\\[\\s*innerhtml\\s*\\]\\s*=/iu.test(text);\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n Literal(node: TSESTree.Literal) {\n if (typeof node.value !== \"string\") {\n return;\n }\n\n if (!hasInnerHtmlBindingPattern(node.value)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n TemplateLiteral(node: TSESTree.TemplateLiteral) {\n if (node.expressions.length > 0) {\n return;\n }\n\n const templateValue = arrayFirst(node.quasis)?.value.cooked;\n\n if (typeof templateValue !== \"string\") {\n return;\n }\n\n if (!hasInnerHtmlBindingPattern(templateValue)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Angular [innerHTML] template bindings without a reviewed sanitization/trusted-types strategy.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-innerhtml-binding\",\n },\n messages: {\n default:\n \"Avoid raw [innerHTML] bindings unless input is strictly sanitized by a reviewed policy.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angular-innerhtml-binding\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<\n [],\n \"noSanitizationTrustedUrls\"\n>({\n create(context) {\n return {\n \"CallExpression[arguments.length>0][callee.object.name='$compileProvider'][callee.property.name=/^(?:aHref|imgSrc)SanitizationTrustedUrlList$/]\"(\n node\n ) {\n context.report({\n messageId: \"noSanitizationTrustedUrls\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow AngularJS trusted URL list mutations via $compileProvider.*SanitizationTrustedUrlList.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-sanitization-trusted-urls\",\n },\n messages: {\n noSanitizationTrustedUrls:\n \"Do not modify AngularJS sanitization trusted URL lists.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angular-sanitization-trusted-urls\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst, arrayIncludes } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\nconst isEmptyLiteral = (argument: TSESTree.Node | undefined): boolean =>\n argument?.type === \"Literal\" && argument.value === \"\";\n\nconst isSceProviderEnabledSafeLiteral = (\n argument: TSESTree.Node | undefined\n): boolean =>\n argument?.type === \"Literal\" &&\n arrayIncludes(\n [\n 1,\n \"1\",\n true,\n \"true\",\n ],\n argument.value\n );\n\nconst isBypassSceMethod = (methodName: string): boolean =>\n arrayIncludes(\n [\n \"trustAs\",\n \"trustAsCss\",\n \"trustAsHtml\",\n \"trustAsJs\",\n \"trustAsResourceUrl\",\n \"trustAsUrl\",\n ],\n methodName\n );\n\n/** Rule implementation for no-angularjs-bypass-sce. */\nexport const noAngularjsBypassSceRule: ReturnType<typeof createRule> =\n createRule<[], \"doNotBypass\">({\n create(context): TSESLint.RuleListener {\n const report = (node: TSESTree.CallExpression): void => {\n context.report({\n messageId: \"doNotBypass\",\n node,\n });\n };\n\n return {\n \"CallExpression[callee.type='MemberExpression'][callee.object.type='Identifier'][callee.object.name='$sce'][callee.property.type='Identifier']\"(\n node: TSESTree.CallExpression\n ) {\n if (\n node.callee.type !== \"MemberExpression\" ||\n node.callee.property.type !== \"Identifier\"\n ) {\n return;\n }\n\n if (!isBypassSceMethod(node.callee.property.name)) {\n return;\n }\n\n const firstArgument = arrayFirst(node.arguments);\n\n if (\n node.arguments.length === 1 &&\n isEmptyLiteral(firstArgument)\n ) {\n return;\n }\n\n report(node);\n },\n \"CallExpression[callee.type='MemberExpression'][callee.object.type='Identifier'][callee.object.name='$sceProvider'][callee.property.type='Identifier'][callee.property.name='enabled']\"(\n node: TSESTree.CallExpression\n ) {\n const firstArgument = arrayFirst(node.arguments);\n\n if (isSceProviderEnabledSafeLiteral(firstArgument)) {\n return;\n }\n\n report(node);\n },\n \"CallExpression[callee.type='MemberExpression'][callee.property.type='Identifier'][callee.property.name='trustAs']\"(\n node: TSESTree.CallExpression\n ) {\n const firstArgument = arrayFirst(node.arguments);\n\n if (\n node.arguments.length === 1 &&\n isEmptyLiteral(firstArgument)\n ) {\n return;\n }\n\n report(node);\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow AngularJS SCE bypass APIs that trust unvalidated values.\",\n frozen: false,\n recommended: false,\n url: \"https://github.com/Nick2bad4u/eslint-plugin-SDL-2/blob/main/docs/rules/no-angularjs-bypass-sce.md\",\n },\n messages: {\n doNotBypass:\n \"Do not bypass AngularJS SCE with untrusted values. Validate and sanitize content before marking it trusted.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angularjs-bypass-sce\",\n });\n\nexport default noAngularjsBypassSceRule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayIncludes } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\nconst isExplicitlyDisabledSvgLiteral = (\n argument: TSESTree.Node | undefined\n): boolean =>\n argument?.type === \"Literal\" &&\n arrayIncludes(\n [\n 0,\n \"0\",\n false,\n \"false\",\n ],\n argument.value\n );\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"doNotEnableSVG\">({\n create(context) {\n return {\n \"CallExpression[callee.object.name='$sanitizeProvider'][callee.property.name='enableSvg']\"(\n node: TSESTree.CallExpression\n ) {\n if (node.arguments.length !== 1) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (isExplicitlyDisabledSvgLiteral(firstArgument)) {\n return;\n }\n\n context.report({\n messageId: \"doNotEnableSVG\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling AngularJS sanitizer SVG support via $sanitizeProvider.enableSvg(true).\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-enable-svg\",\n },\n messages: {\n doNotEnableSVG: \"Do not enable SVG support in AngularJS sanitizer.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angularjs-enable-svg\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst hasNgBindHtmlPattern = (text: string): boolean =>\n /\\bng-bind-html\\b/iu.test(text);\n\nconst hasKnownSanitizePattern = (text: string): boolean =>\n /\\b(?:ngsanitize|\\$sanitize|sanitize)\\b/iu.test(text);\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n Literal(node: TSESTree.Literal) {\n if (typeof node.value !== \"string\") {\n return;\n }\n\n if (!hasNgBindHtmlPattern(node.value)) {\n return;\n }\n\n if (hasKnownSanitizePattern(node.value)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n TemplateLiteral(node: TSESTree.TemplateLiteral) {\n if (node.expressions.length > 0) {\n return;\n }\n\n const templateValue = arrayFirst(node.quasis)?.value.cooked;\n\n if (typeof templateValue !== \"string\") {\n return;\n }\n\n if (!hasNgBindHtmlPattern(templateValue)) {\n return;\n }\n\n if (hasKnownSanitizePattern(templateValue)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow AngularJS ng-bind-html usage without explicit sanitization context.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-ng-bind-html-without-sanitize\",\n },\n messages: {\n default:\n \"Avoid ng-bind-html unless sanitization is explicitly configured and enforced.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angularjs-ng-bind-html-without-sanitize\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<\n [],\n \"noSanitizationWhitelist\"\n>({\n create(context) {\n return {\n \"CallExpression[arguments.length>0][callee.object.name='$compileProvider'][callee.property.name=/^(?:aHref|imgSrc)SanitizationWhitelist$/]\"(\n node\n ) {\n context.report({\n messageId: \"noSanitizationWhitelist\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow AngularJS sanitizer whitelist mutations via $compileProvider.*SanitizationWhitelist.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-sanitization-whitelist\",\n },\n messages: {\n noSanitizationWhitelist:\n \"Do not modify AngularJS sanitization whitelists.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angularjs-sanitization-whitelist\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isWildcardValue = (value: string): boolean => value.includes(\"*\");\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n getMemberPropertyName(node.callee) !==\n \"resourceUrlWhitelist\"\n ) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n firstArgument.type !== \"ArrayExpression\"\n ) {\n return;\n }\n\n for (const elementNode of firstArgument.elements) {\n if (\n elementNode === null ||\n elementNode.type === \"SpreadElement\" ||\n elementNode.type !== \"Literal\" ||\n typeof elementNode.value !== \"string\"\n ) {\n continue;\n }\n\n if (!isWildcardValue(elementNode.value)) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: elementNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow wildcard entries in AngularJS SCE resource URL whitelists.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-sce-resource-url-wildcard\",\n },\n messages: {\n default:\n \"Do not use wildcard resourceUrlWhitelist entries for AngularJS SCE configuration.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angularjs-sce-resource-url-wildcard\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined, setHas } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getPropertyName,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst CHILD_PROCESS_MODULE_NAMES = new Set([\n \"child_process\",\n \"node:child_process\",\n]);\nconst DISALLOWED_CHILD_PROCESS_METHOD_NAMES = new Set([\"exec\", \"execSync\"]);\n\nconst isDisallowedChildProcessMethodName = (\n value: string | undefined\n): value is \"exec\" | \"execSync\" =>\n isDefined(value) && setHas(DISALLOWED_CHILD_PROCESS_METHOD_NAMES, value);\n\nconst isChildProcessModuleSource = (value: string): boolean =>\n setHas(CHILD_PROCESS_MODULE_NAMES, value);\n\nconst isRequireCallFromChildProcess = (\n expression: null | TSESTree.Expression\n): expression is TSESTree.CallExpression => {\n if (\n expression?.type !== \"CallExpression\" ||\n expression.callee.type !== \"Identifier\" ||\n expression.callee.name !== \"require\"\n ) {\n return false;\n }\n\n const [firstArgument] = expression.arguments;\n\n return (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n firstArgument.type === \"Literal\" &&\n typeof firstArgument.value === \"string\" &&\n isChildProcessModuleSource(firstArgument.value)\n );\n};\n\nconst getPatternIdentifier = (\n pattern: TSESTree.Property[\"value\"]\n): TSESTree.Identifier | undefined => {\n if (pattern.type === \"Identifier\") {\n return pattern;\n }\n\n if (\n pattern.type === \"AssignmentPattern\" &&\n pattern.left.type === \"Identifier\"\n ) {\n return pattern.left;\n }\n\n return undefined;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const childProcessExecBindingNames = new Set<string>();\n const childProcessNamespaceBindingNames = new Set<string>();\n\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type === \"Identifier\") {\n if (\n !setHas(childProcessExecBindingNames, node.callee.name)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n\n return;\n }\n\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (!isDisallowedChildProcessMethodName(methodName)) {\n return;\n }\n\n if (\n node.callee.object.type === \"Identifier\" &&\n setHas(\n childProcessNamespaceBindingNames,\n node.callee.object.name\n )\n ) {\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n\n return;\n }\n\n if (\n node.callee.object.type === \"CallExpression\" &&\n isRequireCallFromChildProcess(node.callee.object)\n ) {\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n }\n },\n ImportDeclaration(node: TSESTree.ImportDeclaration) {\n if (!isChildProcessModuleSource(node.source.value)) {\n return;\n }\n\n for (const specifierNode of node.specifiers) {\n if (\n specifierNode.type === \"ImportDefaultSpecifier\" ||\n specifierNode.type === \"ImportNamespaceSpecifier\"\n ) {\n childProcessNamespaceBindingNames.add(\n specifierNode.local.name\n );\n continue;\n }\n\n const importedName =\n specifierNode.imported.type === \"Identifier\"\n ? specifierNode.imported.name\n : specifierNode.imported.value;\n\n if (!isDisallowedChildProcessMethodName(importedName)) {\n continue;\n }\n\n childProcessExecBindingNames.add(specifierNode.local.name);\n }\n },\n VariableDeclarator(node: TSESTree.VariableDeclarator) {\n if (!isRequireCallFromChildProcess(node.init)) {\n return;\n }\n\n if (node.id.type === \"Identifier\") {\n childProcessNamespaceBindingNames.add(node.id.name);\n return;\n }\n\n if (node.id.type !== \"ObjectPattern\") {\n return;\n }\n\n for (const propertyNode of node.id.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.computed\n ) {\n continue;\n }\n\n const importedName = getPropertyName(propertyNode);\n\n if (!isDisallowedChildProcessMethodName(importedName)) {\n continue;\n }\n\n const localIdentifier = getPatternIdentifier(\n propertyNode.value\n );\n\n if (localIdentifier === undefined) {\n continue;\n }\n\n childProcessExecBindingNames.add(localIdentifier.name);\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow child_process.exec() and execSync() shell-backed execution APIs.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-child-process-exec\",\n },\n messages: {\n default:\n \"Do not use child_process.exec() or execSync(); prefer execFile(), spawn(), or other argv-separated process launches.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-child-process-exec\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\n/**\n * Get the static property name accessed by a member expression.\n *\n * Returns `undefined` for computed members whose property key cannot be\n * resolved to a static string.\n *\n * @param memberExpression - Member expression to inspect.\n *\n * @returns Static property name when available.\n */\nexport const getMemberPropertyName = (\n memberExpression: Readonly<TSESTree.MemberExpression>\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\n/**\n * Get the static key name for an object literal property.\n *\n * @param property - Object property node to inspect.\n *\n * @returns Static property key when available.\n */\nexport const getPropertyName = (\n property: Readonly<TSESTree.Property>\n): string | undefined => {\n if (property.computed) {\n return undefined;\n }\n\n if (property.key.type === \"Identifier\") {\n return property.key.name;\n }\n\n if (\n property.key.type === \"Literal\" &&\n typeof property.key.value === \"string\"\n ) {\n return property.key.value;\n }\n\n return undefined;\n};\n\n/**\n * Find an initialized object literal property by its static key name.\n *\n * @param objectExpression - Object expression to search.\n * @param propertyName - Property name to match.\n *\n * @returns Matching property node when present.\n */\nexport const getPropertyByName = (\n objectExpression: Readonly<TSESTree.ObjectExpression>,\n propertyName: string\n): TSESTree.Property | undefined => {\n for (const propertyNode of objectExpression.properties) {\n if (propertyNode.type !== \"Property\" || propertyNode.kind !== \"init\") {\n continue;\n }\n\n if (getPropertyName(propertyNode) === propertyName) {\n return propertyNode;\n }\n }\n\n return undefined;\n};\n\n/**\n * Resolve a string value from a static expression.\n *\n * Supports plain string literals and template literals without expressions.\n *\n * @param node - Expression node to inspect.\n *\n * @returns Static string value when available.\n */\nexport const getStaticStringValue = (\n node: Readonly<TSESTree.Expression>\n): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\" && node.expressions.length === 0) {\n return arrayFirst(node.quasis)?.value.cooked ?? undefined;\n }\n\n return undefined;\n};\n\n/**\n * Resolve a string value from a JSX attribute value.\n *\n * Supports plain string literals and JSX expression containers that wrap a\n * static string literal or expression-free template literal.\n *\n * @param attributeValue - JSX attribute value node to inspect.\n *\n * @returns Static string value when available.\n */\nexport const getStaticJsxAttributeStringValue = (\n attributeValue: Readonly<TSESTree.JSXAttribute[\"value\"]>\n): string | undefined => {\n if (attributeValue === null) {\n return undefined;\n }\n\n if (\n attributeValue.type === \"Literal\" &&\n typeof attributeValue.value === \"string\"\n ) {\n return attributeValue.value;\n }\n\n if (attributeValue.type !== \"JSXExpressionContainer\") {\n return undefined;\n }\n\n if (\n attributeValue.expression.type === \"Literal\" &&\n typeof attributeValue.expression.value === \"string\"\n ) {\n return attributeValue.expression.value;\n }\n\n if (\n attributeValue.expression.type === \"TemplateLiteral\" &&\n attributeValue.expression.expressions.length === 0\n ) {\n return (\n arrayFirst(attributeValue.expression.quasis)?.value.cooked ??\n undefined\n );\n }\n\n return undefined;\n};\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isTruthyLiteral = (node: TSESTree.Property[\"value\"]): boolean =>\n node.type === \"Literal\" && node.value === true;\n\nconst hasShellTrueOption = (optionsNode: TSESTree.Expression): boolean => {\n if (optionsNode.type !== \"ObjectExpression\") {\n return false;\n }\n\n for (const propertyNode of optionsNode.properties) {\n if (propertyNode.type !== \"Property\" || propertyNode.kind !== \"init\") {\n continue;\n }\n\n const keyName =\n propertyNode.key.type === \"Identifier\"\n ? propertyNode.key.name\n : propertyNode.key.type === \"Literal\" &&\n typeof propertyNode.key.value === \"string\"\n ? propertyNode.key.value\n : undefined;\n\n if (keyName !== \"shell\") {\n continue;\n }\n\n if (isTruthyLiteral(propertyNode.value)) {\n return true;\n }\n }\n\n return false;\n};\n\nconst isTargetChildProcessMethod = (node: TSESTree.CallExpression): boolean => {\n if (node.callee.type === \"Identifier\") {\n return node.callee.name === \"spawn\" || node.callee.name === \"execFile\";\n }\n\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n return methodName === \"spawn\" || methodName === \"execFile\";\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isTargetChildProcessMethod(node)) {\n return;\n }\n\n for (const argumentNode of node.arguments) {\n if (argumentNode.type === \"SpreadElement\") {\n continue;\n }\n\n if (!hasShellTrueOption(argumentNode)) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: argumentNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow child_process spawn/execFile options that enable shell: true.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-child-process-shell-true\",\n },\n messages: {\n default:\n \"Do not enable shell: true for child_process execution paths.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-child-process-shell-true\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\nimport type {\n UnknownRecord as TypeFestUnknownRecord,\n UnknownMap,\n} from \"type-fest\";\nimport type ts from \"typescript\";\n\nimport { isDefined } from \"ts-extras\";\n\ntype RuleSourceCodeLike = Readonly<{\n parserServices?: unknown;\n}>;\n\ntype TypeScriptParserServices = Readonly<{\n esTreeNodeToTSNodeMap: ReadonlyMap<TSESTree.Node, ts.Node>;\n program: ts.Program;\n tsNodeToESTreeNodeMap: ReadonlyMap<ts.Node, TSESTree.Node>;\n}>;\n\ntype UnknownObjectRecord = Readonly<TypeFestUnknownRecord>;\n\nconst isUnknownRecord = (value: unknown): value is UnknownObjectRecord =>\n typeof value === \"object\" && value !== null;\n\nconst isMapLike = (value: unknown): value is Readonly<UnknownMap> =>\n isUnknownRecord(value) && typeof value[\"get\"] === \"function\";\n\nconst isProgramLike = (value: unknown): value is ts.Program =>\n isUnknownRecord(value) && typeof value[\"getTypeChecker\"] === \"function\";\n\nconst isTypeScriptParserServices = (\n parserServices: unknown\n): parserServices is TypeScriptParserServices => {\n if (!isUnknownRecord(parserServices)) {\n return false;\n }\n\n const candidate = parserServices;\n\n return (\n isProgramLike(candidate[\"program\"]) &&\n isMapLike(candidate[\"esTreeNodeToTSNodeMap\"]) &&\n isMapLike(candidate[\"tsNodeToESTreeNodeMap\"])\n );\n};\n\nconst isRuleSourceCodeLike = (value: unknown): value is RuleSourceCodeLike =>\n isUnknownRecord(value);\n\nconst getParserServices = (\n context: unknown\n): TypeScriptParserServices | undefined => {\n if (!isUnknownRecord(context)) {\n return undefined;\n }\n\n const sourceCode = context[\"sourceCode\"];\n\n if (!isRuleSourceCodeLike(sourceCode)) {\n return undefined;\n }\n\n const parserServices = sourceCode.parserServices;\n\n return isTypeScriptParserServices(parserServices)\n ? parserServices\n : undefined;\n};\n\n/** Returns `true` when parser services expose complete TypeScript program data. */\nexport const hasFullTypeInformation = (context: unknown): boolean =>\n isDefined(getParserServices(context));\n\n/** Returns the TypeScript type checker when parser services are available. */\nexport const getFullTypeChecker = (\n context: unknown\n): ts.TypeChecker | undefined =>\n getParserServices(context)?.program.getTypeChecker();\n\n/** Resolve the textual type for an ESTree node via parser services. */\nexport const getNodeTypeAsString = (\n fullTypeChecker: Readonly<ts.TypeChecker> | undefined,\n node: null | Readonly<TSESTree.Node> | undefined,\n context: unknown\n): string => {\n if (!isDefined(fullTypeChecker) || node === null || node === undefined) {\n return \"any\";\n }\n\n const parserServices = getParserServices(context);\n\n if (!isDefined(parserServices)) {\n return \"any\";\n }\n\n const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);\n\n if (!isDefined(tsNode)) {\n return \"any\";\n }\n\n const tsType = fullTypeChecker.getTypeAtLocation(tsNode);\n\n return fullTypeChecker.typeToString(tsType);\n};\n\nconst isWindowIdentifierName = (name: string): boolean =>\n name.toLowerCase().endsWith(\"window\");\n\nconst getMemberPropertyName = (\n node: Readonly<TSESTree.MemberExpression>\n): string | undefined => {\n if (node.property.type === \"Identifier\") {\n return node.property.name;\n }\n\n if (\n node.property.type === \"Literal\" &&\n typeof node.property.value === \"string\"\n ) {\n return node.property.value;\n }\n\n return undefined;\n};\n\nconst isDocumentMemberReference = (\n node: Readonly<TSESTree.MemberExpression>\n): boolean => {\n const propertyName = getMemberPropertyName(node);\n\n if (propertyName !== \"document\") {\n return false;\n }\n\n if (node.object.type === \"Identifier\") {\n return isWindowIdentifierName(node.object.name);\n }\n\n if (node.object.type !== \"MemberExpression\") {\n return false;\n }\n\n const nestedPropertyName = getMemberPropertyName(node.object);\n\n if (nestedPropertyName !== \"window\") {\n return false;\n }\n\n if (node.object.object.type === \"ThisExpression\") {\n return true;\n }\n\n return (\n node.object.object.type === \"Identifier\" &&\n node.object.object.name === \"globalThis\"\n );\n};\n\n/**\n * Best-effort check for the browser `Document` object.\n *\n * Falls back to syntactic checks when parser services are unavailable.\n */\nexport const isDocumentObject = (\n node: Readonly<TSESTree.Node>,\n context: unknown,\n fullTypeChecker: Readonly<ts.TypeChecker> | undefined\n): boolean => {\n if (fullTypeChecker !== undefined) {\n return (\n getNodeTypeAsString(fullTypeChecker, node, context) === \"Document\"\n );\n }\n\n if (node.type === \"Identifier\") {\n return node.name === \"document\";\n }\n\n if (node.type === \"MemberExpression\") {\n return isDocumentMemberReference(node);\n }\n\n return false;\n};\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport {\n getFullTypeChecker,\n isDocumentObject,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"doNotUseCookies\">({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n \"MemberExpression[property.name='cookie']\"(\n node: TSESTree.MemberExpression\n ) {\n if (!isDocumentObject(node.object, context, fullTypeChecker)) {\n return;\n }\n\n context.report({\n messageId: \"doNotUseCookies\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow document.cookie usage to avoid insecure legacy client-side storage patterns.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-cookies\",\n },\n messages: {\n doNotUseCookies: \"Do not use HTTP cookies in modern applications.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-cookies\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport {\n getFullTypeChecker,\n isDocumentObject,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n \"AssignmentExpression[operator='='][left.property.name='domain']\"(\n node: TSESTree.AssignmentExpression\n ) {\n if (node.left.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n !isDocumentObject(\n node.left.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow writes to document.domain that can weaken same-origin policy guarantees.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-domain\",\n },\n messages: {\n default: \"Do not write to document.domain.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-document-domain\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport {\n getFullTypeChecker,\n isDocumentObject,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst isInsertHtmlCommand = (expression: TSESTree.Expression): boolean =>\n getStaticStringValue(expression)?.toLowerCase() === \"inserthtml\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (getMemberPropertyName(node.callee) !== \"execCommand\") {\n return;\n }\n\n if (\n !isDocumentObject(\n node.callee.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n const [\n firstArgument,\n ,\n thirdArgument,\n ] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n !isInsertHtmlCommand(firstArgument)\n ) {\n return;\n }\n\n if (\n thirdArgument === undefined ||\n thirdArgument.type === \"SpreadElement\" ||\n getStaticStringValue(thirdArgument) === \"\"\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: thirdArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow document.execCommand('insertHTML', ...) HTML insertion sinks.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-execcommand-insert-html\",\n },\n messages: {\n default:\n \"Do not inject HTML with document.execCommand('insertHTML', ...); build DOM nodes safely or use text-only insertion APIs instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-document-execcommand-insert-html\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst isDocumentConstructorReference = (\n expression: TSESTree.Expression\n): boolean => {\n if (expression.type === \"Identifier\") {\n return expression.name === \"Document\";\n }\n\n if (expression.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(expression) !== \"Document\") {\n return false;\n }\n\n return (\n expression.object.type === \"Identifier\" &&\n (expression.object.name === \"globalThis\" ||\n expression.object.name === \"self\" ||\n expression.object.name === \"window\")\n );\n};\n\nconst isDocumentParseHtmlUnsafeCall = (\n node: TSESTree.CallExpression\n): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(node.callee) !== \"parseHTMLUnsafe\") {\n return false;\n }\n\n return isDocumentConstructorReference(node.callee.object);\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isDocumentParseHtmlUnsafeCall(node)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n getStaticStringValue(firstArgument) === \"\"\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument ?? node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Document.parseHTMLUnsafe() because it preserves unsafe HTML unless a reviewed sanitization path is enforced separately.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-parse-html-unsafe\",\n },\n messages: {\n default:\n \"Do not call Document.parseHTMLUnsafe(); prefer Document.parseHTML() or a reviewed sanitization pipeline.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-document-parse-html-unsafe\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport {\n getFullTypeChecker,\n isDocumentObject,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n \"CallExpression[arguments.length=1][callee.property.name=/^(?:write|writeln)$/]\"(\n node: TSESTree.CallExpression\n ) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n !isDocumentObject(\n node.callee.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow document.write/document.writeln because they bypass safe DOM construction patterns.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-write\",\n },\n messages: {\n default:\n \"Do not write to the DOM directly using document.write/document.writeln.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-document-write\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n isDomParserParseFromStringCall,\n isSanitizedExpression,\n} from \"../_internal/domparser.js\";\nimport { getStaticStringValue } from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isDomParserParseFromStringCall(node)) {\n return;\n }\n\n if (node.arguments.length < 2) {\n return;\n }\n\n const [firstArgument, secondArgument] = node.arguments;\n\n if (!isDefined(firstArgument) || !isDefined(secondArgument)) {\n return;\n }\n\n if (\n firstArgument.type === \"SpreadElement\" ||\n secondArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const mimeTypeValue = getStaticStringValue(secondArgument);\n\n if (mimeTypeValue !== \"text/html\") {\n return;\n }\n\n if (isSanitizedExpression(firstArgument)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow DOMParser.parseFromString(..., 'text/html') calls on unsanitized input.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-domparser-html-without-sanitization\",\n },\n messages: {\n default:\n \"Sanitize HTML input before parsing with DOMParser.parseFromString(..., 'text/html').\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-domparser-html-without-sanitization\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { getMemberPropertyName } from \"./estree-utils.js\";\n\nconst SANITIZER_NAME_PATTERN = /createhtml|sanitize|trusted/u;\n\n/**\n * Check whether a call is `new DOMParser().parseFromString(...)`.\n *\n * @param node - Call expression to inspect.\n *\n * @returns Whether the call matches the DOMParser parsing sink.\n */\nexport const isDomParserParseFromStringCall = (\n node: Readonly<TSESTree.CallExpression>\n): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(node.callee) !== \"parseFromString\") {\n return false;\n }\n\n if (node.callee.object.type !== \"NewExpression\") {\n return false;\n }\n\n return (\n node.callee.object.callee.type === \"Identifier\" &&\n node.callee.object.callee.name === \"DOMParser\"\n );\n};\n\n/**\n * Check whether an expression appears to run through a sanitizer or trusted\n * policy helper.\n *\n * @param node - Expression to inspect.\n *\n * @returns Whether the expression is an explicit sanitization call.\n */\nexport const isSanitizedExpression = (\n node: Readonly<TSESTree.Expression>\n): boolean => {\n if (node.type !== \"CallExpression\") {\n return false;\n }\n\n if (node.callee.type === \"Identifier\") {\n return SANITIZER_NAME_PATTERN.test(node.callee.name.toLowerCase());\n }\n\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n const propertyName = getMemberPropertyName(node.callee);\n\n return (\n typeof propertyName === \"string\" &&\n SANITIZER_NAME_PATTERN.test(propertyName.toLowerCase())\n );\n};\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n isDomParserParseFromStringCall,\n isSanitizedExpression,\n} from \"../_internal/domparser.js\";\nimport { getStaticStringValue } from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isDomParserParseFromStringCall(node)) {\n return;\n }\n\n if (node.arguments.length < 2) {\n return;\n }\n\n const [firstArgument, secondArgument] = node.arguments;\n\n if (!isDefined(firstArgument) || !isDefined(secondArgument)) {\n return;\n }\n\n if (\n firstArgument.type === \"SpreadElement\" ||\n secondArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const mimeTypeValue = getStaticStringValue(secondArgument);\n\n if (mimeTypeValue !== \"image/svg+xml\") {\n return;\n }\n\n if (isSanitizedExpression(firstArgument)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow DOMParser.parseFromString(..., 'image/svg+xml') calls on unsanitized input.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-domparser-svg-without-sanitization\",\n },\n messages: {\n default:\n \"Sanitize SVG input before parsing with DOMParser.parseFromString(..., 'image/svg+xml').\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-domparser-svg-without-sanitization\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined, setHas } from \"ts-extras\";\n\nimport { getMemberPropertyName } from \"./estree-utils.js\";\n\ntype WorkerConstructorName = \"SharedWorker\" | \"Worker\";\n\nconst WORKER_CONSTRUCTOR_NAMES = new Set([\"SharedWorker\", \"Worker\"]);\nconst GLOBAL_OBJECT_NAMES = new Set([\n \"globalThis\",\n \"self\",\n \"window\",\n]);\n\nconst isNavigatorObject = (value: Readonly<TSESTree.Expression>): boolean => {\n if (value.type === \"Identifier\") {\n return value.name === \"navigator\";\n }\n\n if (value.type !== \"MemberExpression\") {\n return false;\n }\n\n return (\n getMemberPropertyName(value) === \"navigator\" &&\n value.object.type === \"Identifier\" &&\n setHas(GLOBAL_OBJECT_NAMES, value.object.name)\n );\n};\n\n/**\n * Check whether a value is a static `blob:` URL.\n *\n * @param value - URL string to inspect.\n *\n * @returns Whether the string starts with `blob:`.\n */\nexport const isBlobUrl = (value: string): boolean => /^\\s*blob:/iu.test(value);\n\n/**\n * Check whether a value is a static `data:` URL.\n *\n * @param value - URL string to inspect.\n *\n * @returns Whether the string starts with `data:`.\n */\nexport const isDataUrl = (value: string): boolean => /^\\s*data:/iu.test(value);\n\nconst isWorkerConstructorName = (\n value: string | undefined\n): value is WorkerConstructorName =>\n isDefined(value) && setHas(WORKER_CONSTRUCTOR_NAMES, value);\n\nconst isGlobalObjectName = (value: string): boolean =>\n setHas(GLOBAL_OBJECT_NAMES, value);\n\n/**\n * Check whether an expression is one of the common global objects used for\n * worker-related APIs.\n *\n * @param value - Expression to inspect.\n *\n * @returns Whether the expression is `window`, `self`, or `globalThis`.\n */\nexport const isWorkerGlobalObject = (\n value: Readonly<TSESTree.Expression>\n): boolean => value.type === \"Identifier\" && isGlobalObjectName(value.name);\n\n/**\n * Check whether a constructor callee targets `Worker` or `SharedWorker`.\n *\n * @param callee - Constructor callee to inspect.\n *\n * @returns Whether the callee is a worker constructor.\n */\nexport const isWorkerConstructor = (\n callee: Readonly<TSESTree.NewExpression[\"callee\"]>\n): boolean => {\n if (callee.type === \"Identifier\") {\n return isWorkerConstructorName(callee.name);\n }\n\n if (callee.type !== \"MemberExpression\") {\n return false;\n }\n\n return (\n isWorkerConstructorName(getMemberPropertyName(callee)) &&\n isWorkerGlobalObject(callee.object)\n );\n};\n\n/**\n * Check whether a call targets `importScripts(...)`.\n *\n * @param callee - Call callee to inspect.\n *\n * @returns Whether the callee is an importScripts sink.\n */\nexport const isImportScriptsCall = (\n callee: Readonly<TSESTree.CallExpression[\"callee\"]>\n): boolean => {\n if (callee.type === \"Identifier\") {\n return callee.name === \"importScripts\";\n }\n\n if (callee.type !== \"MemberExpression\") {\n return false;\n }\n\n return (\n getMemberPropertyName(callee) === \"importScripts\" &&\n isWorkerGlobalObject(callee.object)\n );\n};\n\n/**\n * Check whether an expression resolves the service worker container from\n * `navigator.serviceWorker`.\n *\n * @param value - Expression to inspect.\n *\n * @returns Whether the expression is a service worker container access.\n */\nexport const isServiceWorkerContainerAccess = (\n value: Readonly<TSESTree.Expression>\n): value is TSESTree.MemberExpression => {\n if (value.type !== \"MemberExpression\") {\n return false;\n }\n\n return (\n getMemberPropertyName(value) === \"serviceWorker\" &&\n isNavigatorObject(value.object)\n );\n};\n\n/**\n * Check whether a call targets `navigator.serviceWorker.register(...)`.\n *\n * @param callee - Call callee to inspect.\n *\n * @returns Whether the callee is a service worker registration sink.\n */\nexport const isServiceWorkerRegisterCall = (\n callee: Readonly<TSESTree.CallExpression[\"callee\"]>\n): boolean =>\n callee.type === \"MemberExpression\" &&\n getMemberPropertyName(callee) === \"register\" &&\n isServiceWorkerContainerAccess(callee.object);\n\nconst isGlobalUrlObject = (\n node: Readonly<TSESTree.MemberExpression>\n): boolean => {\n if (getMemberPropertyName(node) !== \"URL\") {\n return false;\n }\n\n return (\n node.object.type === \"Identifier\" &&\n isGlobalObjectName(node.object.name)\n );\n};\n\n/**\n * Check whether an expression is a direct `URL.createObjectURL(...)` call.\n *\n * @param node - Expression to inspect.\n *\n * @returns Whether the expression creates an object URL from the global URL\n * API.\n */\nexport const isUrlCreateObjectUrlCall = (\n node: Readonly<TSESTree.Expression>\n): node is TSESTree.CallExpression => {\n if (\n node.type !== \"CallExpression\" ||\n node.callee.type !== \"MemberExpression\"\n ) {\n return false;\n }\n\n if (getMemberPropertyName(node.callee) !== \"createObjectURL\") {\n return false;\n }\n\n return (\n (node.callee.object.type === \"Identifier\" &&\n node.callee.object.name === \"URL\") ||\n (node.callee.object.type === \"MemberExpression\" &&\n isGlobalUrlObject(node.callee.object))\n );\n};\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getStaticStringValue } from \"../_internal/estree-utils.js\";\nimport {\n isBlobUrl,\n isDataUrl,\n isUrlCreateObjectUrlCall,\n} from \"../_internal/worker-code-loading.js\";\n\ntype MessageIds = \"default\";\n\nconst isJavaScriptUrl = (value: string): boolean =>\n /^\\s*javascript\\s*:/iu.test(value);\n\nconst isUnsafeDynamicImportSource = (\n expression: Readonly<TSESTree.Expression>\n): boolean => {\n const configuredValue = getStaticStringValue(expression);\n\n return (\n (typeof configuredValue === \"string\" &&\n (isBlobUrl(configuredValue) ||\n isDataUrl(configuredValue) ||\n isJavaScriptUrl(configuredValue))) ||\n isUrlCreateObjectUrlCall(expression)\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n ImportExpression(node: TSESTree.ImportExpression) {\n if (!isUnsafeDynamicImportSource(node.source)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.source,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow dynamic import() calls that load code from data:, blob:, javascript:, or direct URL.createObjectURL(...) URLs.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-dynamic-import-unsafe-url\",\n },\n messages: {\n default:\n \"Do not dynamically import code from data:, blob:, javascript:, or URL.createObjectURL(...) URLs.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-dynamic-import-unsafe-url\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\ntype ElectronPreferenceMessageIds = \"default\";\n\ntype ElectronWebPreferenceCheck = Readonly<{\n disallowedValue: boolean;\n preferenceName: string;\n}>;\n\ntype RuleContext = Readonly<\n TSESLint.RuleContext<ElectronPreferenceMessageIds, unknown[]>\n>;\n\nconst getPropertyName = (\n property: Readonly<TSESTree.Property>\n): string | undefined => {\n if (property.computed) {\n return undefined;\n }\n\n if (property.key.type === \"Identifier\") {\n return property.key.name;\n }\n\n if (\n property.key.type === \"Literal\" &&\n typeof property.key.value === \"string\"\n ) {\n return property.key.value;\n }\n\n return undefined;\n};\n\nconst getPropertyByName = (\n objectExpression: Readonly<TSESTree.ObjectExpression>,\n propertyName: string\n): TSESTree.Property | undefined => {\n for (const propertyNode of objectExpression.properties) {\n if (propertyNode.type !== \"Property\" || propertyNode.kind !== \"init\") {\n continue;\n }\n\n if (getPropertyName(propertyNode) === propertyName) {\n return propertyNode;\n }\n }\n\n return undefined;\n};\n\nconst getBooleanLiteralValue = (\n valueNode: Readonly<TSESTree.Node>\n): boolean | undefined => {\n if (valueNode.type !== \"Literal\" || typeof valueNode.value !== \"boolean\") {\n return undefined;\n }\n\n return valueNode.value;\n};\n\n/**\n * Creates a listener that reports unsafe boolean Electron `webPreferences`\n * values.\n */\nexport const createElectronWebPreferencesBooleanListener = (\n context: RuleContext,\n check: ElectronWebPreferenceCheck\n): TSESLint.RuleListener => ({\n \"NewExpression[callee.name=/^(?:BrowserWindow|BrowserView)$/]\"(\n node: Readonly<TSESTree.NewExpression>\n ) {\n const [firstArgument] = node.arguments;\n\n if (firstArgument?.type !== \"ObjectExpression\") {\n return;\n }\n\n const webPreferencesProperty = getPropertyByName(\n firstArgument,\n \"webPreferences\"\n );\n\n if (webPreferencesProperty?.value.type !== \"ObjectExpression\") {\n return;\n }\n\n const preferenceProperty = getPropertyByName(\n webPreferencesProperty.value,\n check.preferenceName\n );\n\n if (preferenceProperty === undefined) {\n return;\n }\n\n const preferenceValueNode = preferenceProperty.value;\n const literalValue = getBooleanLiteralValue(preferenceValueNode);\n\n if (literalValue !== check.disallowedValue) {\n return;\n }\n\n context.report({\n fix(fixer) {\n return fixer.replaceText(\n preferenceValueNode,\n String(!check.disallowedValue)\n );\n },\n messageId: \"default\",\n node: preferenceProperty,\n });\n },\n});\n", "import { createRule } from \"../_internal/create-rule.js\";\nimport { createElectronWebPreferencesBooleanListener } from \"../_internal/electron-web-preferences.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return createElectronWebPreferencesBooleanListener(context, {\n disallowedValue: true,\n preferenceName: \"allowRunningInsecureContent\",\n });\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling allowRunningInsecureContent in Electron webPreferences.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-allow-running-insecure-content\",\n },\n fixable: \"code\",\n messages: {\n default:\n \"Do not set webPreferences.allowRunningInsecureContent to true.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-allow-running-insecure-content\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getPropertyName = (property: TSESTree.Property): string | undefined => {\n if (property.computed) {\n return undefined;\n }\n\n if (property.key.type === \"Identifier\") {\n return property.key.name;\n }\n\n if (\n property.key.type === \"Literal\" &&\n typeof property.key.value === \"string\"\n ) {\n return property.key.value;\n }\n\n return undefined;\n};\n\nconst getPropertyByName = (\n objectExpression: TSESTree.ObjectExpression,\n propertyName: string\n): TSESTree.Property | undefined => {\n for (const propertyNode of objectExpression.properties) {\n if (propertyNode.type !== \"Property\" || propertyNode.kind !== \"init\") {\n continue;\n }\n\n if (getPropertyName(propertyNode) === propertyName) {\n return propertyNode;\n }\n }\n\n return undefined;\n};\n\nconst getStaticStringValue = (node: TSESTree.Node): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\" && node.expressions.length === 0) {\n return arrayFirst(node.quasis)?.value.cooked ?? undefined;\n }\n\n return undefined;\n};\n\nconst isDangerousBlinkFeaturesValue = (node: TSESTree.Node): boolean => {\n const staticStringValue = getStaticStringValue(node);\n\n if (typeof staticStringValue !== \"string\") {\n return false;\n }\n\n return staticStringValue.trim().length > 0;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n \"NewExpression[callee.name=/^(?:BrowserWindow|BrowserView)$/]\"(\n node: TSESTree.NewExpression\n ) {\n const [firstArgument] = node.arguments;\n\n if (firstArgument?.type !== \"ObjectExpression\") {\n return;\n }\n\n const webPreferencesProperty = getPropertyByName(\n firstArgument,\n \"webPreferences\"\n );\n\n if (webPreferencesProperty?.value.type !== \"ObjectExpression\") {\n return;\n }\n\n const enableBlinkFeaturesProperty = getPropertyByName(\n webPreferencesProperty.value,\n \"enableBlinkFeatures\"\n );\n\n if (enableBlinkFeaturesProperty === undefined) {\n return;\n }\n\n if (\n !isDangerousBlinkFeaturesValue(\n enableBlinkFeaturesProperty.value\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: enableBlinkFeaturesProperty,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling risky Blink runtime features through Electron webPreferences.enableBlinkFeatures.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-dangerous-blink-features\",\n },\n messages: {\n default:\n \"Do not set webPreferences.enableBlinkFeatures to a non-empty value.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-dangerous-blink-features\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import { createRule } from \"../_internal/create-rule.js\";\nimport { createElectronWebPreferencesBooleanListener } from \"../_internal/electron-web-preferences.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return createElectronWebPreferencesBooleanListener(context, {\n disallowedValue: false,\n preferenceName: \"contextIsolation\",\n });\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow disabling contextIsolation in Electron webPreferences.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-disable-context-isolation\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not set webPreferences.contextIsolation to false.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-disable-context-isolation\",\n});\n\nexport default rule;\n", "import { createRule } from \"../_internal/create-rule.js\";\nimport { createElectronWebPreferencesBooleanListener } from \"../_internal/electron-web-preferences.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return createElectronWebPreferencesBooleanListener(context, {\n disallowedValue: false,\n preferenceName: \"sandbox\",\n });\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow disabling Electron sandbox in webPreferences.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-disable-sandbox\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not set webPreferences.sandbox to false.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-disable-sandbox\",\n});\n\nexport default rule;\n", "import { createRule } from \"../_internal/create-rule.js\";\nimport { createElectronWebPreferencesBooleanListener } from \"../_internal/electron-web-preferences.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return createElectronWebPreferencesBooleanListener(context, {\n disallowedValue: false,\n preferenceName: \"webSecurity\",\n });\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow disabling webSecurity in Electron webPreferences.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-disable-web-security\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not set webPreferences.webSecurity to false.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-disable-web-security\",\n});\n\nexport default rule;\n", "import { createRule } from \"../_internal/create-rule.js\";\nimport { createElectronWebPreferencesBooleanListener } from \"../_internal/electron-web-preferences.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return createElectronWebPreferencesBooleanListener(context, {\n disallowedValue: true,\n preferenceName: \"enableRemoteModule\",\n });\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling enableRemoteModule in Electron webPreferences.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-enable-remote-module\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not set webPreferences.enableRemoteModule to true.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-enable-remote-module\",\n});\n\nexport default rule;\n", "import { createRule } from \"../_internal/create-rule.js\";\nimport { createElectronWebPreferencesBooleanListener } from \"../_internal/electron-web-preferences.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return createElectronWebPreferencesBooleanListener(context, {\n disallowedValue: true,\n preferenceName: \"webviewTag\",\n });\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling Electron webPreferences.webviewTag.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-enable-webview-tag\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not set webPreferences.webviewTag to true.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-enable-webview-tag\",\n});\n\nexport default rule;\n", "import { createRule } from \"../_internal/create-rule.js\";\nimport { createElectronWebPreferencesBooleanListener } from \"../_internal/electron-web-preferences.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return createElectronWebPreferencesBooleanListener(context, {\n disallowedValue: true,\n preferenceName: \"experimentalFeatures\",\n });\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling Electron webPreferences.experimentalFeatures.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-experimental-features\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not set webPreferences.experimentalFeatures to true.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-experimental-features\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getMemberPropertyName } from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst isExpressionNode = (node: TSESTree.Node): node is TSESTree.Expression =>\n node.type !== \"ArrayPattern\" &&\n node.type !== \"AssignmentPattern\" &&\n node.type !== \"ObjectPattern\";\n\nconst isContextBridgeObjectExpression = (\n expression: TSESTree.Expression\n): boolean => {\n if (expression.type === \"Identifier\") {\n return expression.name === \"contextBridge\";\n }\n\n if (expression.type !== \"MemberExpression\") {\n return false;\n }\n\n return getMemberPropertyName(expression) === \"contextBridge\";\n};\n\nconst isContextBridgeExposeCall = (node: TSESTree.CallExpression): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (\n methodName !== \"exposeInIsolatedWorld\" &&\n methodName !== \"exposeInMainWorld\"\n ) {\n return false;\n }\n\n return isContextBridgeObjectExpression(node.callee.object);\n};\n\nconst isIpcRendererReference = (expression: TSESTree.Expression): boolean => {\n if (expression.type === \"Identifier\") {\n return expression.name === \"ipcRenderer\";\n }\n\n if (expression.type !== \"MemberExpression\") {\n return false;\n }\n\n if (expression.object.type === \"Identifier\") {\n return expression.object.name === \"ipcRenderer\";\n }\n\n if (expression.object.type !== \"MemberExpression\") {\n return false;\n }\n\n return getMemberPropertyName(expression.object) === \"ipcRenderer\";\n};\n\nconst isUnsafeExposedValue = (expression: TSESTree.Expression): boolean => {\n if (isIpcRendererReference(expression)) {\n return true;\n }\n\n if (\n expression.type === \"CallExpression\" &&\n expression.callee.type === \"MemberExpression\" &&\n getMemberPropertyName(expression.callee) === \"bind\" &&\n expression.callee.object.type === \"MemberExpression\"\n ) {\n return isIpcRendererReference(expression.callee.object);\n }\n\n if (expression.type === \"ArrayExpression\") {\n return expression.elements.some(\n (element): element is TSESTree.Expression =>\n element !== null &&\n element.type !== \"SpreadElement\" &&\n isUnsafeExposedValue(element)\n );\n }\n\n if (expression.type !== \"ObjectExpression\") {\n return false;\n }\n\n return expression.properties.some((propertyNode) => {\n if (propertyNode.type === \"SpreadElement\") {\n return isUnsafeExposedValue(propertyNode.argument);\n }\n\n return (\n propertyNode.kind === \"init\" &&\n isExpressionNode(propertyNode.value) &&\n isUnsafeExposedValue(propertyNode.value)\n );\n });\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isContextBridgeExposeCall(node)) {\n return;\n }\n\n const [, exposedValue] = node.arguments;\n\n if (\n exposedValue === undefined ||\n exposedValue.type === \"SpreadElement\" ||\n !isUnsafeExposedValue(exposedValue)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: exposedValue,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow exposing raw Electron ipcRenderer objects or methods through contextBridge APIs.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-expose-raw-ipc-renderer\",\n },\n messages: {\n default:\n \"Expose narrow preload wrapper functions instead of raw ipcRenderer objects or methods.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-expose-raw-ipc-renderer\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayAt, arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getStaticStringValue = (\n node: TSESTree.Expression\n): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\" && node.expressions.length === 0) {\n return arrayFirst(node.quasis)?.value.cooked ?? undefined;\n }\n\n return undefined;\n};\n\nconst isOnMemberExpression = (\n callee: TSESTree.CallExpression[\"callee\"]\n): boolean => {\n if (callee.type !== \"MemberExpression\" || callee.computed) {\n return false;\n }\n\n return (\n callee.property.type === \"Identifier\" && callee.property.name === \"on\"\n );\n};\n\nconst getCallbackParameterName = (\n node: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression\n): string | undefined => {\n const callbackParameter = arrayAt(node.params, -1);\n\n return callbackParameter?.type === \"Identifier\"\n ? callbackParameter.name\n : undefined;\n};\n\nconst toUnsafeCallbackTruePattern = (callbackName: string): RegExp =>\n // eslint-disable-next-line security/detect-non-literal-regexp -- Callback identifier is static source text and safely interpolated for targeted pattern matching.\n new RegExp(String.raw`\\b${callbackName}\\s*\\(\\s*true\\b`, \"u\");\n\nconst hasUnsafeCallbackTrueCall = (\n callbackName: string,\n handlerNode: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression,\n context: TSESLint.RuleContext<MessageIds, unknown[]>\n): boolean => {\n const handlerSourceText = context.sourceCode.getText(handlerNode);\n\n return toUnsafeCallbackTruePattern(callbackName).test(handlerSourceText);\n};\n\nconst isCertificateErrorEventRegistration = (\n node: TSESTree.CallExpression\n): boolean => {\n if (!isOnMemberExpression(node.callee)) {\n return false;\n }\n\n const [firstArgument] = node.arguments;\n\n if (firstArgument === undefined || firstArgument.type === \"SpreadElement\") {\n return false;\n }\n\n return getStaticStringValue(firstArgument) === \"certificate-error\";\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isCertificateErrorEventRegistration(node)) {\n return;\n }\n\n const [, secondArgument] = node.arguments;\n\n if (\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n if (\n secondArgument.type !== \"ArrowFunctionExpression\" &&\n secondArgument.type !== \"FunctionExpression\"\n ) {\n return;\n }\n\n const callbackParameterName =\n getCallbackParameterName(secondArgument);\n\n if (typeof callbackParameterName !== \"string\") {\n return;\n }\n\n if (\n !hasUnsafeCallbackTrueCall(\n callbackParameterName,\n secondArgument,\n context\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: secondArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Electron certificate-error handlers that call the callback with true.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-insecure-certificate-error-handler\",\n },\n messages: {\n default:\n \"Do not bypass certificate validation by calling the certificate-error callback with true.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-insecure-certificate-error-handler\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayAt } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isFunctionExpression = (\n expression: TSESTree.CallExpressionArgument\n): expression is\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst hasInsecureCertificateOverride = (\n callbackNode:\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression,\n context: TSESLint.RuleContext<MessageIds, unknown[]>,\n callbackParameterName: string\n): boolean => {\n const callbackSourceText = context.sourceCode.getText(callbackNode);\n const escapedName = callbackParameterName.replaceAll(\"$\", String.raw`\\$`);\n // eslint-disable-next-line security/detect-non-literal-regexp -- Callback identifier is escaped before interpolation for strict handler-call detection.\n const callbackPattern = new RegExp(\n String.raw`\\b${escapedName}\\s*\\(\\s*0\\b`,\n \"u\"\n );\n\n return (\n callbackPattern.test(callbackSourceText) ||\n /\\breturn\\s+0\\b/u.test(callbackSourceText)\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n getMemberPropertyName(node.callee) !==\n \"setCertificateVerifyProc\"\n ) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n !isFunctionExpression(firstArgument)\n ) {\n return;\n }\n\n const callbackParameter = arrayAt(firstArgument.params, -1);\n\n if (callbackParameter?.type !== \"Identifier\") {\n return;\n }\n\n if (\n !hasInsecureCertificateOverride(\n firstArgument,\n context,\n callbackParameter.name\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Electron certificate verify proc callbacks that accept invalid certificates.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-insecure-certificate-verify-proc\",\n },\n messages: {\n default:\n \"Do not override certificate verification by returning/callbacking with 0 in setCertificateVerifyProc handlers.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-insecure-certificate-verify-proc\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayAt } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isFunctionExpression = (\n expression: TSESTree.CallExpressionArgument\n): expression is\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst hasUnsafePermissionAllowPattern = (\n callbackNode:\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression,\n context: TSESLint.RuleContext<MessageIds, unknown[]>,\n callbackParameterName: string\n): boolean => {\n const callbackSourceText = context.sourceCode.getText(callbackNode);\n const escapedName = callbackParameterName.replaceAll(\"$\", String.raw`\\$`);\n // eslint-disable-next-line security/detect-non-literal-regexp -- Callback identifier is escaped before interpolation for strict permission-allow detection.\n const callbackPattern = new RegExp(\n String.raw`\\b${escapedName}\\s*\\(\\s*true\\b`,\n \"u\"\n );\n\n return (\n callbackPattern.test(callbackSourceText) ||\n /\\breturn\\s+true\\b/u.test(callbackSourceText)\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n getMemberPropertyName(node.callee) !==\n \"setPermissionRequestHandler\"\n ) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n !isFunctionExpression(firstArgument)\n ) {\n return;\n }\n\n const callbackParameter = arrayAt(firstArgument.params, -1);\n\n if (callbackParameter?.type !== \"Identifier\") {\n return;\n }\n\n if (\n !hasUnsafePermissionAllowPattern(\n firstArgument,\n context,\n callbackParameter.name\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Electron permission request handlers that blanket-allow permission requests.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-insecure-permission-request-handler\",\n },\n messages: {\n default:\n \"Do not blanket-allow permissions in setPermissionRequestHandler callbacks.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-insecure-permission-request-handler\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n return {\n \"NewExpression[callee.name=/^(?:BrowserWindow|BrowserView)$/] > ObjectExpression.arguments > Property.properties[key.name='webPreferences'] > ObjectExpression.value > Property.properties[key.name=/^(?:nodeIntegration|nodeIntegrationInWorker|nodeIntegrationInSubFrames)$/][value.value=true]\"(\n node\n ) {\n context.report({\n fix(fixer) {\n const propertyText = context.sourceCode.getText(node);\n const separatorIndex = propertyText.indexOf(\":\");\n\n if (separatorIndex === -1) {\n return null;\n }\n\n const valuePortion = propertyText.slice(\n separatorIndex + 1\n );\n const trimmedValuePortion = valuePortion.trimStart();\n\n if (!trimmedValuePortion.startsWith(\"true\")) {\n return null;\n }\n\n const leadingWhitespaceLength =\n valuePortion.length - trimmedValuePortion.length;\n const nextValuePortion = `${valuePortion.slice(0, leadingWhitespaceLength)}false${trimmedValuePortion.slice(\"true\".length)}`;\n const nextPropertyText = `${propertyText.slice(0, separatorIndex + 1)}${nextValuePortion}`;\n\n if (nextPropertyText === propertyText) {\n return null;\n }\n\n return fixer.replaceText(node, nextPropertyText);\n },\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling Electron Node.js integration in BrowserWindow/BrowserView webPreferences.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-node-integration\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not enable Node.js integration for remote content.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-node-integration\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getMemberPropertyName } from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst isFunctionExpression = (\n expression: TSESTree.CallExpressionArgument\n): expression is\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst isBooleanTrueLiteral = (\n expression: null | TSESTree.Expression | undefined\n): boolean => expression?.type === \"Literal\" && expression.value === true;\n\nconst isAllowAllPermissionCheckHandler = (\n callbackNode: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression\n): boolean => {\n if (callbackNode.body.type !== \"BlockStatement\") {\n return isBooleanTrueLiteral(callbackNode.body);\n }\n\n if (callbackNode.body.body.length !== 1) {\n return false;\n }\n\n const onlyStatement = arrayFirst(callbackNode.body.body);\n\n return (\n onlyStatement?.type === \"ReturnStatement\" &&\n isBooleanTrueLiteral(onlyStatement.argument)\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n getMemberPropertyName(node.callee) !==\n \"setPermissionCheckHandler\"\n ) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n !isFunctionExpression(firstArgument) ||\n !isAllowAllPermissionCheckHandler(firstArgument)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Electron permission check handlers that unconditionally allow every permission request.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-permission-check-handler-allow-all\",\n },\n messages: {\n default:\n \"Do not unconditionally return true from setPermissionCheckHandler callbacks.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-permission-check-handler-allow-all\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isIpcMainObjectExpression = (\n expression: TSESTree.Expression\n): boolean => {\n if (expression.type === \"Identifier\") {\n return expression.name === \"ipcMain\";\n }\n\n if (expression.type !== \"MemberExpression\") {\n return false;\n }\n\n return getMemberPropertyName(expression) === \"ipcMain\";\n};\n\nconst isIpcMainHandlerRegistration = (\n node: TSESTree.CallExpression\n): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (methodName !== \"on\" && methodName !== \"handle\") {\n return false;\n }\n\n return isIpcMainObjectExpression(node.callee.object);\n};\n\nconst isFunctionExpression = (\n expression: TSESTree.CallExpressionArgument\n): expression is\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst hasSenderValidationPattern = (\n callbackNode:\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression,\n context: TSESLint.RuleContext<MessageIds, unknown[]>,\n eventParameterName: string\n): boolean => {\n const callbackSourceText = context.sourceCode.getText(callbackNode);\n const escapedEventName = eventParameterName.replaceAll(\"$\", String.raw`\\$`);\n // eslint-disable-next-line security/detect-non-literal-regexp -- Event parameter identifier is escaped before interpolation for sender-access detection.\n const eventSenderPattern = new RegExp(\n String.raw`\\b${escapedEventName}\\s*\\.\\s*(?:sender|senderFrame)\\b`,\n \"u\"\n );\n\n return (\n eventSenderPattern.test(callbackSourceText) ||\n /\\b(?:allowlist|getURL|isTrusted|origin|validate|whitelist)\\b/u.test(\n callbackSourceText\n )\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isIpcMainHandlerRegistration(node)) {\n return;\n }\n\n const [, handlerNode] = node.arguments;\n\n if (\n handlerNode === undefined ||\n handlerNode.type === \"SpreadElement\" ||\n !isFunctionExpression(handlerNode)\n ) {\n return;\n }\n\n const eventParameter = arrayFirst(handlerNode.params);\n\n if (eventParameter?.type !== \"Identifier\") {\n return;\n }\n\n if (\n hasSenderValidationPattern(\n handlerNode,\n context,\n eventParameter.name\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: handlerNode,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow privileged ipcMain handlers that do not validate sender/frame trust.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-unchecked-ipc-sender\",\n },\n messages: {\n default:\n \"Validate the IPC sender or sender frame before handling privileged ipcMain requests.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-unchecked-ipc-sender\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isFunctionExpression = (\n expression: TSESTree.CallExpressionArgument\n): expression is\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst hasUnsafeAllowAction = (\n callbackNode:\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression,\n context: TSESLint.RuleContext<MessageIds, unknown[]>\n): boolean => {\n const callbackSourceText = context.sourceCode.getText(callbackNode);\n\n return /\\baction\\s*:\\s*[\"'`]allow[\"'`]/u.test(callbackSourceText);\n};\n\nconst hasPreventDefaultCall = (\n callbackNode:\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression,\n context: TSESLint.RuleContext<MessageIds, unknown[]>,\n eventParameterName: string\n): boolean => {\n const callbackSourceText = context.sourceCode.getText(callbackNode);\n const escapedName = eventParameterName.replaceAll(\"$\", String.raw`\\$`);\n // eslint-disable-next-line security/detect-non-literal-regexp -- Event parameter identifier is escaped before interpolation for preventDefault-call detection.\n const preventDefaultPattern = new RegExp(\n String.raw`\\b${escapedName}\\s*\\.\\s*preventDefault\\s*\\(`,\n \"u\"\n );\n\n return preventDefaultPattern.test(callbackSourceText);\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (methodName === \"setWindowOpenHandler\") {\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n !isFunctionExpression(firstArgument)\n ) {\n return;\n }\n\n if (!hasUnsafeAllowAction(firstArgument, context)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n\n return;\n }\n\n if (methodName !== \"on\") {\n return;\n }\n\n const [firstArgument, secondArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\" ||\n !isFunctionExpression(secondArgument)\n ) {\n return;\n }\n\n if (\n firstArgument.type !== \"Literal\" ||\n firstArgument.value !== \"will-navigate\"\n ) {\n return;\n }\n\n const eventParameter = arrayFirst(secondArgument.params);\n\n if (eventParameter?.type !== \"Identifier\") {\n return;\n }\n\n if (\n hasPreventDefaultCall(\n secondArgument,\n context,\n eventParameter.name\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: secondArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Electron navigation handlers that allow unrestricted navigation or window opening.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-unrestricted-navigation\",\n },\n messages: {\n default:\n \"Restrict Electron navigation/window-opening handlers with explicit blocking or allowlist logic.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-unrestricted-navigation\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getStaticTemplateLiteralValue = (\n templateLiteral: TSESTree.TemplateLiteral\n): string | undefined => {\n if (templateLiteral.expressions.length > 0) {\n return undefined;\n }\n\n return arrayFirst(templateLiteral.quasis)?.value.cooked ?? undefined;\n};\n\nconst getStringValue = (node: TSESTree.Expression): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\") {\n return getStaticTemplateLiteralValue(node);\n }\n\n return undefined;\n};\n\nconst isAllowedExternalProtocol = (value: string): boolean =>\n /^(?:https|mailto):/iu.test(value.trim());\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isShellObjectExpression = (node: TSESTree.Expression): boolean => {\n if (node.type === \"Identifier\") {\n return node.name === \"shell\";\n }\n\n if (node.type !== \"MemberExpression\") {\n return false;\n }\n\n return getMemberPropertyName(node) === \"shell\";\n};\n\nconst isShellOpenExternalCallee = (\n callee: TSESTree.CallExpression[\"callee\"]\n): boolean => {\n if (callee.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(callee) !== \"openExternal\") {\n return false;\n }\n\n return isShellObjectExpression(callee.object);\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node) {\n if (!isShellOpenExternalCallee(node.callee)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const firstArgumentValue = getStringValue(firstArgument);\n\n if (\n typeof firstArgumentValue === \"string\" &&\n isAllowedExternalProtocol(firstArgumentValue)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow untrusted or non-HTTPS/non-mailto URLs in Electron shell.openExternal calls.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-untrusted-open-external\",\n },\n messages: {\n default:\n \"Only open trusted https: or mailto: URLs with shell.openExternal.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-untrusted-open-external\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst isJsxWebviewElement = (node: TSESTree.JSXOpeningElement): boolean => {\n if (node.name.type === \"JSXIdentifier\") {\n return node.name.name.toLowerCase() === \"webview\";\n }\n\n return false;\n};\n\nconst getJsxAttributeName = (\n attributeNode: TSESTree.JSXAttribute\n): string | undefined => {\n if (attributeNode.name.type !== \"JSXIdentifier\") {\n return undefined;\n }\n\n return attributeNode.name.name.toLowerCase();\n};\n\nconst isTruthyJsxAttributeValue = (\n attributeValue: TSESTree.JSXAttribute[\"value\"]\n): boolean => {\n if (attributeValue === null) {\n return true;\n }\n\n if (attributeValue.type === \"Literal\") {\n if (typeof attributeValue.value === \"boolean\") {\n return attributeValue.value;\n }\n\n if (typeof attributeValue.value === \"string\") {\n return attributeValue.value.toLowerCase() !== \"false\";\n }\n\n return false;\n }\n\n if (attributeValue.type !== \"JSXExpressionContainer\") {\n return false;\n }\n\n if (\n attributeValue.expression.type === \"Literal\" &&\n typeof attributeValue.expression.value === \"boolean\"\n ) {\n return attributeValue.expression.value;\n }\n\n return true;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n JSXOpeningElement(node: TSESTree.JSXOpeningElement) {\n if (!isJsxWebviewElement(node)) {\n return;\n }\n\n for (const attributeNode of node.attributes) {\n if (attributeNode.type !== \"JSXAttribute\") {\n continue;\n }\n\n if (getJsxAttributeName(attributeNode) !== \"allowpopups\") {\n continue;\n }\n\n if (!isTruthyJsxAttributeValue(attributeNode.value)) {\n continue;\n }\n\n context.report({\n fix(fixer) {\n return fixer.remove(attributeNode);\n },\n messageId: \"default\",\n node: attributeNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling allowpopups in Electron webview elements.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-webview-allowpopups\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not enable allowpopups on Electron webview elements.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-webview-allowpopups\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayJoin, isEmpty } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getStaticJsxAttributeStringValue } from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst UNSAFE_WEBPREFERENCES_PATTERNS = [\n {\n flagName: \"allowRunningInsecureContent\",\n pattern: /\\ballowrunninginsecurecontent\\s*=\\s*(?:1|on|true|yes)\\b/iu,\n },\n {\n flagName: \"contextIsolation\",\n pattern: /\\bcontextisolation\\s*=\\s*(?:0|false|no|off)\\b/iu,\n },\n {\n flagName: \"experimentalFeatures\",\n pattern: /\\bexperimentalfeatures\\s*=\\s*(?:1|on|true|yes)\\b/iu,\n },\n {\n flagName: \"sandbox\",\n pattern: /\\bsandbox\\s*=\\s*(?:0|false|no|off)\\b/iu,\n },\n {\n flagName: \"webSecurity\",\n pattern: /\\bwebsecurity\\s*=\\s*(?:0|false|no|off)\\b/iu,\n },\n] as const;\n\nconst isJsxWebviewElement = (node: TSESTree.JSXOpeningElement): boolean =>\n node.name.type === \"JSXIdentifier\" &&\n node.name.name.toLowerCase() === \"webview\";\n\nconst getJsxAttributeName = (attributeNode: TSESTree.JSXAttribute): string => {\n if (attributeNode.name.type === \"JSXIdentifier\") {\n return attributeNode.name.name.toLowerCase();\n }\n\n return `${attributeNode.name.namespace.name}:${attributeNode.name.name.name}`.toLowerCase();\n};\n\nconst getUnsafeWebPreferencesFlags = (\n attributeValue: string\n): readonly string[] =>\n UNSAFE_WEBPREFERENCES_PATTERNS.flatMap(({ flagName, pattern }) =>\n pattern.test(attributeValue) ? [flagName] : []\n );\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n JSXOpeningElement(node: TSESTree.JSXOpeningElement) {\n if (!isJsxWebviewElement(node)) {\n return;\n }\n\n for (const attributeNode of node.attributes) {\n if (attributeNode.type !== \"JSXAttribute\") {\n continue;\n }\n\n if (\n getJsxAttributeName(attributeNode) !== \"webpreferences\"\n ) {\n continue;\n }\n\n const staticValue = getStaticJsxAttributeStringValue(\n attributeNode.value\n );\n\n if (typeof staticValue !== \"string\") {\n continue;\n }\n\n const unsafeFlags =\n getUnsafeWebPreferencesFlags(staticValue);\n\n if (isEmpty(unsafeFlags)) {\n continue;\n }\n\n context.report({\n data: {\n flags: arrayJoin(unsafeFlags, \", \"),\n },\n messageId: \"default\",\n node: attributeNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow unsafe Electron webview webpreferences string flags.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-webview-insecure-webpreferences\",\n },\n messages: {\n default:\n \"Do not enable unsafe Electron webview webpreferences flags: {{flags}}.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-webview-insecure-webpreferences\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst isJsxWebviewElement = (node: TSESTree.JSXOpeningElement): boolean =>\n node.name.type === \"JSXIdentifier\" &&\n node.name.name.toLowerCase() === \"webview\";\n\nconst getJsxAttributeName = (attributeNode: TSESTree.JSXAttribute): string => {\n if (attributeNode.name.type === \"JSXIdentifier\") {\n return attributeNode.name.name.toLowerCase();\n }\n\n return `${attributeNode.name.namespace.name}:${attributeNode.name.name.name}`.toLowerCase();\n};\n\nconst isNodeIntegrationAttribute = (attributeName: string): boolean => {\n const normalizedName = attributeName.toLowerCase();\n\n return (\n normalizedName === \"nodeintegration\" ||\n normalizedName === \"nodeintegrationinsubframes\"\n );\n};\n\nconst isTruthyJsxAttributeValue = (\n attributeValue: TSESTree.JSXAttribute[\"value\"]\n): boolean => {\n if (attributeValue === null) {\n return true;\n }\n\n if (attributeValue.type === \"Literal\") {\n if (typeof attributeValue.value === \"boolean\") {\n return attributeValue.value;\n }\n\n if (typeof attributeValue.value === \"string\") {\n return attributeValue.value.toLowerCase() !== \"false\";\n }\n\n return false;\n }\n\n if (attributeValue.type !== \"JSXExpressionContainer\") {\n return false;\n }\n\n if (\n attributeValue.expression.type === \"Literal\" &&\n typeof attributeValue.expression.value === \"boolean\"\n ) {\n return attributeValue.expression.value;\n }\n\n return true;\n};\n\nconst webPreferencesHasNodeIntegration = (\n attributeValue: TSESTree.JSXAttribute[\"value\"]\n): boolean => {\n if (attributeValue === null) {\n return false;\n }\n\n if (\n attributeValue.type === \"Literal\" &&\n typeof attributeValue.value === \"string\"\n ) {\n return /\\bnodeintegration\\b/iu.test(attributeValue.value);\n }\n\n return false;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n JSXOpeningElement(node: TSESTree.JSXOpeningElement) {\n if (!isJsxWebviewElement(node)) {\n return;\n }\n\n for (const attributeNode of node.attributes) {\n if (attributeNode.type !== \"JSXAttribute\") {\n continue;\n }\n\n const attributeName = getJsxAttributeName(attributeNode);\n\n if (isNodeIntegrationAttribute(attributeName)) {\n if (!isTruthyJsxAttributeValue(attributeNode.value)) {\n continue;\n }\n\n context.report({\n fix(fixer) {\n return fixer.remove(attributeNode);\n },\n messageId: \"default\",\n node: attributeNode,\n });\n\n continue;\n }\n\n if (attributeName !== \"webpreferences\") {\n continue;\n }\n\n if (\n !webPreferencesHasNodeIntegration(attributeNode.value)\n ) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: attributeNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow node integration flags on Electron webview elements.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-webview-node-integration\",\n },\n fixable: \"code\",\n messages: {\n default:\n \"Do not enable node integration options on Electron webview elements.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-webview-node-integration\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n return {\n \"CallExpression[arguments.length=1] > MemberExpression.callee[property.name='html']\"(\n node: TSESTree.MemberExpression\n ) {\n const parentCall = node.parent;\n\n if (parentCall.type !== \"CallExpression\") {\n return;\n }\n\n const [firstArgument] = parentCall.arguments;\n\n if (\n firstArgument?.type === \"Literal\" &&\n (firstArgument.value === \"\" || firstArgument.value === null)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow direct html(...) DOM writes (for example jQuery html()) that bypass sanitization.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-html-method\",\n },\n messages: {\n default: \"Do not write to the DOM directly using html(...).\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-html-method\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst getStaticStringValue = (\n node: TSESTree.Expression\n): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\" && node.expressions.length === 0) {\n return arrayFirst(node.quasis)?.value.cooked ?? undefined;\n }\n\n return undefined;\n};\n\nconst isInsecureHttpUrl = (value: string): boolean =>\n /^http:\\/\\//iu.test(value.trim());\n\nconst isTargetRequestMethod = (node: TSESTree.CallExpression): boolean => {\n if (node.callee.type === \"Identifier\") {\n return node.callee.name === \"fetch\";\n }\n\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (methodName !== \"request\" && methodName !== \"get\") {\n return false;\n }\n\n if (node.callee.object.type !== \"Identifier\") {\n return false;\n }\n\n return (\n node.callee.object.name === \"http\" ||\n node.callee.object.name === \"https\"\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isTargetRequestMethod(node)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const firstArgumentValue = getStaticStringValue(firstArgument);\n\n if (\n typeof firstArgumentValue !== \"string\" ||\n !isInsecureHttpUrl(firstArgumentValue)\n ) {\n return;\n }\n\n context.report({\n fix(fixer) {\n const sourceText =\n context.sourceCode.getText(firstArgument);\n const fixedSourceText = sourceText.replace(\n /^(?<quote>[\"'`]?)http:\\/\\//iu,\n \"$<quote>https://\"\n );\n\n if (fixedSourceText === sourceText) {\n return null;\n }\n\n return fixer.replaceText(\n firstArgument,\n fixedSourceText\n );\n },\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Node HTTP client calls that use insecure http:// URLs.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-http-request-to-insecure-protocol\",\n },\n fixable: \"code\",\n messages: {\n default: \"Use HTTPS endpoints instead of insecure http:// URLs.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-http-request-to-insecure-protocol\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport {\n getFullTypeChecker,\n getNodeTypeAsString,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getStaticJsxAttributeStringValue,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\n\ntype AstUtilsRuleContext = Parameters<typeof getFullTypeChecker>[0];\ntype MessageIds = \"default\";\n\nconst isJsxIframeElement = (node: TSESTree.JSXOpeningElement): boolean => {\n if (node.name.type !== \"JSXIdentifier\") {\n return false;\n }\n\n return node.name.name.toLowerCase() === \"iframe\";\n};\n\nconst getJsxAttributeName = (\n attributeNode: TSESTree.JSXAttribute\n): string | undefined => {\n if (attributeNode.name.type !== \"JSXIdentifier\") {\n return undefined;\n }\n\n return attributeNode.name.name.toLowerCase();\n};\n\nconst isCreateElementIFrameCall = (node: TSESTree.Node): boolean => {\n if (\n node.type !== \"CallExpression\" ||\n node.callee.type !== \"MemberExpression\"\n ) {\n return false;\n }\n\n if (getMemberPropertyName(node.callee) !== \"createElement\") {\n return false;\n }\n\n const [firstArgument] = node.arguments;\n\n return (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n getStaticStringValue(firstArgument) === \"iframe\"\n );\n};\n\nconst isLikelyIFrameElement = (\n node: TSESTree.Node,\n context: AstUtilsRuleContext,\n fullTypeChecker: ReturnType<typeof getFullTypeChecker>\n): boolean => {\n if (fullTypeChecker !== undefined) {\n const nodeType = getNodeTypeAsString(fullTypeChecker, node, context);\n\n if (nodeType === \"any\" || nodeType.includes(\"HTMLIFrameElement\")) {\n return true;\n }\n }\n\n if (isCreateElementIFrameCall(node)) {\n return true;\n }\n\n if (node.type === \"Identifier\") {\n const normalizedName = node.name.toLowerCase();\n\n return normalizedName === \"frame\" || normalizedName.endsWith(\"iframe\");\n }\n\n if (node.type !== \"MemberExpression\") {\n return false;\n }\n\n const propertyName = getMemberPropertyName(node);\n\n if (typeof propertyName !== \"string\") {\n return false;\n }\n\n return propertyName.toLowerCase().endsWith(\"iframe\");\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (node.left.type !== \"MemberExpression\") {\n return;\n }\n\n if (getMemberPropertyName(node.left) !== \"srcdoc\") {\n return;\n }\n\n if (getStaticStringValue(node.right) === \"\") {\n return;\n }\n\n if (\n !isLikelyIFrameElement(\n node.left.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.right,\n });\n },\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (\n methodName !== \"setAttribute\" &&\n methodName !== \"setAttributeNS\"\n ) {\n return;\n }\n\n const [firstArgument, secondArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n getStaticStringValue(firstArgument) !== \"srcdoc\"\n ) {\n return;\n }\n\n if (\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\" ||\n getStaticStringValue(secondArgument) === \"\"\n ) {\n return;\n }\n\n if (\n !isLikelyIFrameElement(\n node.callee.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: secondArgument,\n });\n },\n JSXOpeningElement(node: TSESTree.JSXOpeningElement) {\n if (!isJsxIframeElement(node)) {\n return;\n }\n\n for (const attributeNode of node.attributes) {\n if (attributeNode.type !== \"JSXAttribute\") {\n continue;\n }\n\n if (getJsxAttributeName(attributeNode) !== \"srcdoc\") {\n continue;\n }\n\n if (\n getStaticJsxAttributeStringValue(\n attributeNode.value\n ) === \"\"\n ) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: attributeNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow iframe srcdoc assignments and JSX srcDoc attributes that embed inline HTML documents.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-iframe-srcdoc\",\n },\n messages: {\n default:\n \"Do not populate iframe srcdoc with inline HTML; load a reviewed document URL instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-iframe-srcdoc\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport {\n getFullTypeChecker,\n getNodeTypeAsString,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\n\nconst isEmptyStringLiteral = (node: TSESTree.Node): boolean =>\n node.type === \"Literal\" && node.value === \"\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<\n [],\n \"noInnerHtml\" | \"noInsertAdjacentHTML\"\n>({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n const mightBeHTMLElement = (node: TSESTree.Node): boolean => {\n const nodeType = getNodeTypeAsString(\n fullTypeChecker,\n node,\n context\n );\n\n return /HTML.*Element/u.test(nodeType) || nodeType === \"any\";\n };\n\n return {\n \"AssignmentExpression[left.type='MemberExpression'][left.property.name=/^(?:innerHTML|outerHTML)$/]\"(\n node: TSESTree.AssignmentExpression\n ) {\n if (isEmptyStringLiteral(node.right)) {\n return;\n }\n\n if (node.left.type !== \"MemberExpression\") {\n return;\n }\n\n if (!mightBeHTMLElement(node.left.object)) {\n return;\n }\n\n context.report({\n messageId: \"noInnerHtml\",\n node,\n });\n },\n \"CallExpression[arguments.length=2] > MemberExpression.callee[property.name='insertAdjacentHTML']\"(\n node: TSESTree.MemberExpression\n ) {\n if (node.parent.type !== \"CallExpression\") {\n return;\n }\n\n const secondArgument = node.parent.arguments[1];\n\n if (\n secondArgument !== undefined &&\n isEmptyStringLiteral(secondArgument)\n ) {\n return;\n }\n\n if (!mightBeHTMLElement(node.object)) {\n return;\n }\n\n context.report({\n messageId: \"noInsertAdjacentHTML\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow unsafe direct DOM HTML writes via innerHTML/outerHTML/insertAdjacentHTML.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-inner-html\",\n },\n messages: {\n noInnerHtml:\n \"Do not write to the DOM directly using innerHTML/outerHTML.\",\n noInsertAdjacentHTML:\n \"Do not write to the DOM using insertAdjacentHTML.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-inner-html\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { basename, parse } from \"node:path\";\nimport { arrayIncludes, isDefined } from \"ts-extras\";\n\nimport {\n getFullTypeChecker,\n getNodeTypeAsString,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\n\nconst bannedRandomLibraries = [\n \"chance\",\n \"random-number\",\n \"random-int\",\n \"random-float\",\n \"random-seed\",\n \"unique-random\",\n] as const;\n\nconst isBannedRandomLibrary = (value: string): boolean =>\n arrayIncludes(\n bannedRandomLibraries,\n value as (typeof bannedRandomLibraries)[number]\n );\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n \"CallExpression > MemberExpression[property.name='pseudoRandomBytes']\"(\n node: TSESTree.MemberExpression\n ) {\n const isUnsafe = isDefined(fullTypeChecker)\n ? arrayIncludes(\n [\"any\", \"Crypto\"],\n getNodeTypeAsString(\n fullTypeChecker,\n node.object,\n context\n )\n )\n : node.object.type === \"Identifier\" &&\n node.object.name === \"crypto\";\n\n if (!isUnsafe) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n \"CallExpression > MemberExpression[property.name='random']\"(\n node: TSESTree.MemberExpression\n ) {\n const isUnsafe = isDefined(fullTypeChecker)\n ? arrayIncludes(\n [\"any\", \"Math\"],\n getNodeTypeAsString(\n fullTypeChecker,\n node.object,\n context\n )\n )\n : node.object.type === \"Identifier\" &&\n node.object.name === \"Math\";\n\n if (!isUnsafe) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n \"CallExpression[callee.name='require'][arguments.length=1]\"(\n node: TSESTree.CallExpression\n ) {\n const [sourceArgument] = node.arguments;\n\n if (\n !isDefined(sourceArgument) ||\n sourceArgument.type !== \"Literal\" ||\n typeof sourceArgument.value !== \"string\"\n ) {\n return;\n }\n\n const requireName = parse(basename(sourceArgument.value)).name;\n\n if (!isBannedRandomLibrary(requireName)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n ImportDeclaration(node) {\n const sourceText = node.source.value;\n\n if (typeof sourceText !== \"string\") {\n return;\n }\n\n if (!isBannedRandomLibrary(basename(sourceText))) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow insecure pseudo-random APIs and known non-cryptographic random libraries for security-sensitive code.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-insecure-random\",\n },\n messages: {\n default:\n \"Do not use pseudo-random generators for secrets such as tokens, keys, or passwords.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-insecure-random\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst isFalseLiteral = (node: TSESTree.Property[\"value\"]): boolean =>\n node.type === \"Literal\" && node.value === false;\n\nconst getObjectPropertyName = (\n propertyNode: TSESTree.Property\n): string | undefined => {\n if (propertyNode.computed) {\n return undefined;\n }\n\n if (propertyNode.key.type === \"Identifier\") {\n return propertyNode.key.name;\n }\n\n if (\n propertyNode.key.type === \"Literal\" &&\n typeof propertyNode.key.value === \"string\"\n ) {\n return propertyNode.key.value;\n }\n\n return undefined;\n};\n\nconst findRejectUnauthorizedFalseProperty = (\n objectExpression: TSESTree.ObjectExpression\n): TSESTree.Property | undefined => {\n for (const propertyNode of objectExpression.properties) {\n if (propertyNode.type !== \"Property\" || propertyNode.kind !== \"init\") {\n continue;\n }\n\n if (getObjectPropertyName(propertyNode) !== \"rejectUnauthorized\") {\n continue;\n }\n\n if (isFalseLiteral(propertyNode.value)) {\n return propertyNode;\n }\n }\n\n return undefined;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n ObjectExpression(node: TSESTree.ObjectExpression) {\n const insecureOptionProperty =\n findRejectUnauthorizedFalseProperty(node);\n\n if (insecureOptionProperty === undefined) {\n return;\n }\n\n context.report({\n fix(fixer) {\n if (\n insecureOptionProperty.value.type !== \"Literal\" ||\n insecureOptionProperty.value.value !== false\n ) {\n return null;\n }\n\n return fixer.replaceText(\n insecureOptionProperty.value,\n \"true\"\n );\n },\n messageId: \"default\",\n node: insecureOptionProperty,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow rejectUnauthorized: false in TLS/HTTPS option objects.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-insecure-tls-agent-options\",\n },\n fixable: \"code\",\n messages: {\n default:\n \"Do not disable TLS certificate verification with rejectUnauthorized: false.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-insecure-tls-agent-options\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\n/** Default insecure-protocol blocklist patterns. */\nconst defaultBlocklist: readonly RegExp[] = [/^(?:ftp|http|telnet|ws):\\/\\//iu];\n\n/** Default allowlisted literal URL exceptions. */\nconst defaultExceptions: readonly RegExp[] = [\n /^http:(?:\\/\\/|\\\\u002f\\\\u002f)schemas\\.microsoft\\.com.*/iu,\n /^http:(?:\\/\\/|\\\\u002f\\\\u002f)schemas\\.openxmlformats\\.org.*/iu,\n /^http:(?:\\/|\\\\u002f){2}localhost(?::|\\/|\\\\u002f)*/iu,\n /^http:\\/\\/w{3}\\.w3\\.org\\/1999\\/xhtml/iu,\n /^http:\\/\\/w{3}\\.w3\\.org\\/2000\\/svg/iu,\n];\n\n/** Default source-text exceptions for variable/template contexts. */\nconst defaultVariableExceptions: readonly RegExp[] = [];\n\ntype MessageIds = \"doNotUseInsecureUrl\";\n\ntype NoInsecureUrlOptions = Readonly<{\n blocklist?: readonly string[];\n exceptions?: readonly string[];\n varExceptions?: readonly string[];\n}>;\n\ntype Options = [NoInsecureUrlOptions];\n\nconst asCaseInsensitiveRegex = (pattern: RegExp | string): RegExp => {\n if (pattern instanceof RegExp) {\n // eslint-disable-next-line security/detect-non-literal-regexp -- Rebuild trusted RegExp source with normalized flags only.\n return new RegExp(pattern.source, \"iu\");\n }\n\n // eslint-disable-next-line security/detect-non-literal-regexp -- User-configured regex patterns are intentionally compiled for matching behavior.\n return new RegExp(pattern, \"iu\");\n};\n\nconst matches = (patterns: readonly RegExp[], value: string): boolean =>\n patterns.some((pattern) => pattern.test(value));\n\nconst toRegexSources = (patterns: readonly RegExp[]): readonly string[] =>\n patterns.map((pattern) => pattern.source);\n\nconst shouldAttemptFix = (\n variableExceptions: readonly RegExp[],\n context: TSESLint.RuleContext<MessageIds, Options>,\n node: TSESTree.Node\n): boolean => {\n const targetNode = node.parent ?? node;\n const targetText = context.sourceCode.getText(targetNode);\n\n return !matches(variableExceptions, targetText);\n};\n\nconst reportInsecureUrl = (\n context: TSESLint.RuleContext<MessageIds, Options>,\n node: TSESTree.Node,\n replacementSourceText: string\n): void => {\n context.report({\n fix(fixer) {\n if (!/http:/iu.test(replacementSourceText)) {\n return null;\n }\n\n return fixer.replaceText(\n node,\n replacementSourceText.replace(/http:/iu, \"https:\")\n );\n },\n messageId: \"doNotUseInsecureUrl\",\n node,\n });\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<Options, MessageIds>({\n create(context) {\n const [options = {}] = context.options;\n const blocklist = (options.blocklist ?? defaultBlocklist).map(\n (pattern) => asCaseInsensitiveRegex(pattern)\n );\n const exceptions = (options.exceptions ?? defaultExceptions).map(\n (pattern) => asCaseInsensitiveRegex(pattern)\n );\n const variableExceptions = (\n options.varExceptions ?? defaultVariableExceptions\n ).map((pattern) => asCaseInsensitiveRegex(pattern));\n\n return {\n Literal(node) {\n if (typeof node.value !== \"string\") {\n return;\n }\n\n if (\n node.parent?.type === \"JSXAttribute\" &&\n node.parent.name.type === \"JSXIdentifier\" &&\n node.parent.name.name === \"xmlns\"\n ) {\n return;\n }\n\n if (\n !matches(blocklist, node.value) ||\n matches(exceptions, node.value)\n ) {\n return;\n }\n\n if (!shouldAttemptFix(variableExceptions, context, node)) {\n return;\n }\n\n reportInsecureUrl(context, node, JSON.stringify(node.value));\n },\n TemplateElement(node) {\n if (\n typeof node.value.raw !== \"string\" ||\n typeof node.value.cooked !== \"string\"\n ) {\n return;\n }\n\n const isRawMatch =\n shouldAttemptFix(variableExceptions, context, node) &&\n matches(blocklist, node.value.raw) &&\n !matches(exceptions, node.value.raw);\n const isCookedMatch =\n matches(blocklist, node.value.cooked) &&\n !matches(exceptions, node.value.cooked);\n\n if (!isRawMatch && !isCookedMatch) {\n return;\n }\n\n const escapedTemplatePart = JSON.stringify(\n context.sourceCode.getText(node)\n ).slice(1, -1);\n\n reportInsecureUrl(context, node, escapedTemplatePart);\n },\n };\n },\n meta: {\n defaultOptions: [\n {\n blocklist: toRegexSources(defaultBlocklist),\n exceptions: toRegexSources(defaultExceptions),\n varExceptions: toRegexSources(defaultVariableExceptions),\n },\n ],\n deprecated: false,\n docs: {\n description:\n \"disallow insecure URL protocols such as http:// and ftp:// with configurable exceptions.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-insecure-url\",\n },\n fixable: \"code\",\n messages: {\n doNotUseInsecureUrl: \"Do not use insecure URLs.\",\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n blocklist: {\n description:\n \"Regular-expression strings that identify insecure URL patterns to block.\",\n items: { type: \"string\" },\n type: \"array\",\n },\n exceptions: {\n description:\n \"Regular-expression strings that identify allowed URL literals excluded from blocklist checks.\",\n items: { type: \"string\" },\n type: \"array\",\n },\n varExceptions: {\n description:\n \"Regular-expression strings that identify source-text contexts where automatic fixing should be skipped.\",\n items: { type: \"string\" },\n type: \"array\",\n },\n },\n type: \"object\",\n },\n ],\n type: \"problem\",\n },\n name: \"no-insecure-url\",\n});\n\nexport { defaultBlocklist, defaultExceptions, defaultVariableExceptions };\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst getStaticStringValue = (\n node: TSESTree.Expression\n): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\" && node.expressions.length === 0) {\n return arrayFirst(node.quasis)?.value.cooked ?? undefined;\n }\n\n return undefined;\n};\n\nconst isJavaScriptUrl = (value: string): boolean =>\n /^\\s*javascript\\s*:/iu.test(value);\n\nconst isLocationLikeLeftHand = (\n expression: TSESTree.AssignmentExpression[\"left\"]\n): boolean => {\n if (expression.type !== \"MemberExpression\") {\n return false;\n }\n\n const propertyName = getMemberPropertyName(expression);\n\n return propertyName === \"location\" || propertyName === \"href\";\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (node.operator !== \"=\") {\n return;\n }\n\n if (!isLocationLikeLeftHand(node.left)) {\n return;\n }\n\n const assignedValue = getStaticStringValue(node.right);\n\n if (\n typeof assignedValue !== \"string\" ||\n !isJavaScriptUrl(assignedValue)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (\n methodName !== \"assign\" &&\n methodName !== \"replace\" &&\n methodName !== \"open\"\n ) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const argumentValue = getStaticStringValue(firstArgument);\n\n if (\n typeof argumentValue !== \"string\" ||\n !isJavaScriptUrl(argumentValue)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow assigning javascript: URLs to location-like navigation sinks.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-location-javascript-url\",\n },\n messages: {\n default:\n \"Do not use javascript: URLs in location or open-like navigation sinks.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-location-javascript-url\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\nimport type { UnknownRecord } from \"type-fest\";\n\nimport { keyIn, objectEntries } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\n\ntype CallbackFunction =\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression;\n\ntype MessageIds = \"default\";\ntype RuleContext = Readonly<TSESLint.RuleContext<MessageIds, unknown[]>>;\n\nconst isFunctionExpression = (\n expression: Readonly<TSESTree.Node>\n): expression is CallbackFunction =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst hasMessageEventGuardKeywords = (callbackText: string): boolean =>\n /\\b(?:allowlist|origin|trusted|validate|verify|whitelist)\\b/iu.test(\n callbackText\n );\n\nconst toNode = (value: unknown): Readonly<TSESTree.Node> | undefined => {\n if (typeof value !== \"object\" || value === null) {\n return undefined;\n }\n\n const recordValue = value as UnknownRecord;\n\n if (\n !keyIn(recordValue, \"type\") ||\n typeof recordValue[\"type\"] !== \"string\"\n ) {\n return undefined;\n }\n\n return recordValue as unknown as Readonly<TSESTree.Node>;\n};\n\nconst someDescendantNode = (\n node: Readonly<TSESTree.Node>,\n predicate: (node: Readonly<TSESTree.Node>) => boolean\n): boolean => {\n if (predicate(node)) {\n return true;\n }\n\n for (const [propertyName, propertyValue] of objectEntries(node)) {\n if (propertyName === \"parent\") {\n continue;\n }\n\n if (Array.isArray(propertyValue)) {\n for (const element of propertyValue) {\n const childNode = toNode(element);\n\n if (\n childNode !== undefined &&\n someDescendantNode(childNode, predicate)\n ) {\n return true;\n }\n }\n\n continue;\n }\n\n const childNode = toNode(propertyValue);\n\n if (\n childNode !== undefined &&\n someDescendantNode(childNode, predicate)\n ) {\n return true;\n }\n }\n\n return false;\n};\n\nconst isIdentifierNamed = (\n node: Readonly<TSESTree.Node>,\n identifierName: string\n): node is TSESTree.Identifier =>\n node.type === \"Identifier\" && node.name === identifierName;\n\nconst isStaticPropertyMatch = (\n memberExpression: Readonly<TSESTree.MemberExpression>,\n objectName: string,\n propertyName: string\n): boolean =>\n isIdentifierNamed(memberExpression.object, objectName) &&\n getMemberPropertyName(memberExpression) === propertyName;\n\nconst patternContainsProperty = (\n pattern: Readonly<TSESTree.ObjectPattern>,\n propertyName: string\n): boolean =>\n pattern.properties.some((propertyNode) => {\n if (propertyNode.type !== \"Property\") {\n return false;\n }\n\n return getPropertyName(propertyNode) === propertyName;\n });\n\nconst containsObjectDestructureFromIdentifier = (\n rootNode: Readonly<TSESTree.Node>,\n sourceName: string,\n propertyName: string\n): boolean =>\n someDescendantNode(rootNode, (node) => {\n if (node.type === \"VariableDeclarator\") {\n return (\n node.id.type === \"ObjectPattern\" &&\n node.init !== null &&\n isIdentifierNamed(node.init, sourceName) &&\n patternContainsProperty(node.id, propertyName)\n );\n }\n\n if (node.type !== \"AssignmentExpression\") {\n return false;\n }\n\n return (\n node.left.type === \"ObjectPattern\" &&\n isIdentifierNamed(node.right, sourceName) &&\n patternContainsProperty(node.left, propertyName)\n );\n });\n\nconst containsMemberPropertyAccess = (\n rootNode: Readonly<TSESTree.Node>,\n objectName: string,\n propertyName: string\n): boolean =>\n someDescendantNode(rootNode, (node) =>\n node.type === \"MemberExpression\"\n ? isStaticPropertyMatch(node, objectName, propertyName)\n : false\n );\n\nconst hasObjectPatternProperty = (\n objectPattern: TSESTree.ObjectPattern,\n propertyName: string\n): boolean =>\n objectPattern.properties.some((propertyNode) => {\n if (propertyNode.type !== \"Property\") {\n return false;\n }\n\n return getPropertyName(propertyNode) === propertyName;\n });\n\nconst callbackUsesMessageData = (\n callbackNode: CallbackFunction,\n eventParameterName: string\n): boolean =>\n containsMemberPropertyAccess(\n callbackNode.body,\n eventParameterName,\n \"data\"\n ) ||\n containsObjectDestructureFromIdentifier(\n callbackNode.body,\n eventParameterName,\n \"data\"\n );\n\nconst callbackHasOriginValidation = (\n callbackNode: CallbackFunction,\n context: RuleContext,\n eventParameterName: string\n): boolean => {\n const callbackSourceText = context.sourceCode.getText(callbackNode);\n\n return (\n containsMemberPropertyAccess(\n callbackNode.body,\n eventParameterName,\n \"origin\"\n ) ||\n containsObjectDestructureFromIdentifier(\n callbackNode.body,\n eventParameterName,\n \"origin\"\n ) ||\n hasMessageEventGuardKeywords(callbackSourceText)\n );\n};\n\nconst reportsIdentifierCallback = (\n callbackNode: CallbackFunction,\n context: RuleContext,\n eventParameter: TSESTree.Identifier\n): boolean =>\n callbackUsesMessageData(callbackNode, eventParameter.name) &&\n !callbackHasOriginValidation(callbackNode, context, eventParameter.name);\n\nconst reportsObjectPatternCallback = (\n callbackNode: CallbackFunction,\n context: RuleContext,\n eventParameter: TSESTree.ObjectPattern\n): boolean => {\n if (!hasObjectPatternProperty(eventParameter, \"data\")) {\n return false;\n }\n\n if (hasObjectPatternProperty(eventParameter, \"origin\")) {\n return false;\n }\n\n return !hasMessageEventGuardKeywords(\n context.sourceCode.getText(callbackNode)\n );\n};\n\nconst shouldReportMessageEventCallback = (\n callbackNode: CallbackFunction,\n context: RuleContext\n): boolean => {\n const [firstParameter] = callbackNode.params;\n\n if (firstParameter === undefined || firstParameter.type === \"RestElement\") {\n return false;\n }\n\n if (firstParameter.type === \"Identifier\") {\n return reportsIdentifierCallback(callbackNode, context, firstParameter);\n }\n\n if (firstParameter.type === \"ObjectPattern\") {\n return reportsObjectPatternCallback(\n callbackNode,\n context,\n firstParameter\n );\n }\n\n return false;\n};\n\nconst isMessageEventListenerCall = (node: TSESTree.CallExpression): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(node.callee) !== \"addEventListener\") {\n return false;\n }\n\n const [firstArgument] = node.arguments;\n\n return (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n getStaticStringValue(firstArgument) === \"message\"\n );\n};\n\nconst isOnMessageAssignment = (node: TSESTree.AssignmentExpression): boolean =>\n node.operator === \"=\" &&\n node.left.type === \"MemberExpression\" &&\n getMemberPropertyName(node.left) === \"onmessage\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (!isOnMessageAssignment(node)) {\n return;\n }\n\n if (!isFunctionExpression(node.right)) {\n return;\n }\n\n if (!shouldReportMessageEventCallback(node.right, context)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.right,\n });\n },\n CallExpression(node: TSESTree.CallExpression) {\n if (!isMessageEventListenerCall(node)) {\n return;\n }\n\n const [, secondArgument] = node.arguments;\n\n if (\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n if (!isFunctionExpression(secondArgument)) {\n return;\n }\n\n if (\n !shouldReportMessageEventCallback(secondArgument, context)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: secondArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow MessageEvent handlers that consume event data without validating event.origin.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-message-event-without-origin-check\",\n },\n messages: {\n default:\n \"Validate MessageEvent.origin before consuming data from received message events.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-message-event-without-origin-check\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n return {\n \"CallExpression[arguments.length=1][callee.object.name='MSApp'][callee.property.name='execUnsafeLocalFunction']\"(\n node\n ) {\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow MSApp.execUnsafeLocalFunction which bypasses script-injection safeguards.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-msapp-exec-unsafe\",\n },\n messages: {\n default: \"Do not bypass script injection validation.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-msapp-exec-unsafe\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getPropertyName } from \"../_internal/estree-utils.js\";\nimport {\n isNodeTlsStaticMember,\n isRelevantNodeTlsOptionsObject,\n} from \"../_internal/node-tls-config.js\";\n\ntype CheckServerIdentityFunction =\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression;\n\ntype MessageIds = \"default\";\n\nconst CHECK_SERVER_IDENTITY_PROPERTY_NAMES = new Set([\"checkServerIdentity\"]);\n\nconst isFunctionExpression = (\n expression: TSESTree.Expression\n): expression is CheckServerIdentityFunction =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst isExpressionNode = (node: TSESTree.Node): node is TSESTree.Expression =>\n node.type !== \"ArrayPattern\" &&\n node.type !== \"AssignmentPattern\" &&\n node.type !== \"ObjectPattern\";\n\nconst isAlwaysSuccessfulReturnExpression = (\n expression: TSESTree.Expression\n): boolean => {\n if (expression.type === \"Identifier\") {\n return expression.name === \"undefined\";\n }\n\n if (expression.type === \"Literal\") {\n return expression.value === null;\n }\n\n return (\n expression.type === \"UnaryExpression\" && expression.operator === \"void\"\n );\n};\n\nconst isAlwaysSuccessfulCheckServerIdentity = (\n callbackNode: CheckServerIdentityFunction\n): boolean => {\n if (callbackNode.body.type !== \"BlockStatement\") {\n return isAlwaysSuccessfulReturnExpression(callbackNode.body);\n }\n\n if (callbackNode.body.body.length === 0) {\n return true;\n }\n\n if (callbackNode.body.body.length !== 1) {\n return false;\n }\n\n const onlyStatement = arrayFirst(callbackNode.body.body);\n\n if (onlyStatement?.type !== \"ReturnStatement\") {\n return false;\n }\n\n return (\n onlyStatement.argument === null ||\n (onlyStatement.argument !== null &&\n isAlwaysSuccessfulReturnExpression(onlyStatement.argument))\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (\n node.operator !== \"=\" ||\n !isNodeTlsStaticMember(\n node.left,\n CHECK_SERVER_IDENTITY_PROPERTY_NAMES\n ) ||\n !isFunctionExpression(node.right) ||\n !isAlwaysSuccessfulCheckServerIdentity(node.right)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.right,\n });\n },\n ObjectExpression(node: TSESTree.ObjectExpression) {\n if (!isRelevantNodeTlsOptionsObject(node)) {\n return;\n }\n\n for (const propertyNode of node.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.kind !== \"init\" ||\n getPropertyName(propertyNode) !==\n \"checkServerIdentity\" ||\n !isExpressionNode(propertyNode.value) ||\n !isFunctionExpression(propertyNode.value) ||\n !isAlwaysSuccessfulCheckServerIdentity(\n propertyNode.value\n )\n ) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: propertyNode.value,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Node.js checkServerIdentity overrides that always accept the peer hostname.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-check-server-identity-bypass\",\n },\n messages: {\n default:\n \"Do not bypass Node.js hostname verification with a checkServerIdentity implementation that always succeeds.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-node-tls-check-server-identity-bypass\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined, setHas } from \"ts-extras\";\n\nimport { getMemberPropertyName } from \"./estree-utils.js\";\n\nconst NODE_TLS_OBJECT_NAMES = new Set([\n \"http2\",\n \"https\",\n \"tls\",\n]);\nconst NODE_TLS_CALL_METHOD_NAMES = new Set([\n \"connect\",\n \"createSecureContext\",\n \"createSecureServer\",\n \"createServer\",\n \"get\",\n \"request\",\n]);\n\n/**\n * Check whether an expression targets a Node TLS-capable module object.\n *\n * @param expression - Expression to inspect.\n *\n * @returns Whether the expression resolves to `tls`, `https`, or `http2`.\n */\nexport const isNodeTlsObjectExpression = (\n expression: Readonly<TSESTree.Expression>\n): boolean => {\n if (expression.type === \"Identifier\") {\n return setHas(NODE_TLS_OBJECT_NAMES, expression.name);\n }\n\n if (expression.type !== \"MemberExpression\") {\n return false;\n }\n\n const propertyName = getMemberPropertyName(expression);\n\n return (\n isDefined(propertyName) && setHas(NODE_TLS_OBJECT_NAMES, propertyName)\n );\n};\n\n/**\n * Check whether a call expression targets a relevant Node TLS API sink.\n *\n * @param callee - Call-expression callee to inspect.\n *\n * @returns Whether the callee matches a TLS-relevant call site.\n */\nexport const isRelevantNodeTlsCall = (\n callee: Readonly<TSESTree.CallExpression[\"callee\"]>\n): boolean => {\n if (callee.type === \"Identifier\") {\n return callee.name === \"createSecureContext\";\n }\n\n if (callee.type !== \"MemberExpression\") {\n return false;\n }\n\n const methodName = getMemberPropertyName(callee);\n\n return (\n isDefined(methodName) &&\n setHas(NODE_TLS_CALL_METHOD_NAMES, methodName) &&\n isNodeTlsObjectExpression(callee.object)\n );\n};\n\n/**\n * Check whether a constructor call targets a relevant Node TLS constructor.\n *\n * @param callee - New-expression callee to inspect.\n *\n * @returns Whether the callee matches a TLS-relevant constructor site.\n */\nexport const isRelevantNodeTlsConstructor = (\n callee: Readonly<TSESTree.NewExpression[\"callee\"]>\n): boolean => {\n if (callee.type !== \"MemberExpression\") {\n return false;\n }\n\n return (\n getMemberPropertyName(callee) === \"Agent\" &&\n isNodeTlsObjectExpression(callee.object)\n );\n};\n\n/**\n * Check whether an object literal is being used as options for a relevant Node\n * TLS API.\n *\n * @param node - Object expression to inspect.\n *\n * @returns Whether the object expression belongs to a TLS-relevant call site.\n */\nexport const isRelevantNodeTlsOptionsObject = (\n node: Readonly<TSESTree.ObjectExpression>\n): boolean => {\n const parentNode = node.parent;\n\n if (parentNode?.type === \"CallExpression\") {\n return isRelevantNodeTlsCall(parentNode.callee);\n }\n\n if (parentNode?.type === \"NewExpression\") {\n return isRelevantNodeTlsConstructor(parentNode.callee);\n }\n\n return false;\n};\n\n/**\n * Check whether an assignment left-hand side targets a static TLS member.\n *\n * @param node - Assignment left-hand side expression to inspect.\n * @param propertyNames - Allowed member names for matching.\n *\n * @returns Whether the node matches one of the targeted TLS static members.\n */\nexport const isNodeTlsStaticMember = (\n node: Readonly<TSESTree.AssignmentExpression[\"left\"]>,\n propertyNames: ReadonlySet<string>\n): node is TSESTree.MemberExpression => {\n if (node.type !== \"MemberExpression\") {\n return false;\n }\n\n const propertyName = getMemberPropertyName(node);\n\n return (\n isDefined(propertyName) &&\n setHas(propertyNames, propertyName) &&\n isNodeTlsObjectExpression(node.object)\n );\n};\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined, setHas } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\nimport {\n isNodeTlsStaticMember,\n isRelevantNodeTlsOptionsObject,\n} from \"../_internal/node-tls-config.js\";\n\ntype LegacyTlsPropertyName = \"maxVersion\" | \"minVersion\" | \"secureProtocol\";\ntype MessageIds = \"default\";\n\nconst LEGACY_TLS_VERSION_VALUES = new Set([\n \"TLSv1\",\n \"TLSv1.0\",\n \"TLSv1.1\",\n]);\n\nconst isLegacySecureProtocolValue = (value: string): boolean =>\n /^(?:SSLv2|SSLv3|TLSv1(?:_1)?)(?:_(?:client|server))?_method$/u.test(value);\n\nconst isExpressionNode = (node: TSESTree.Node): node is TSESTree.Expression =>\n node.type !== \"ArrayPattern\" &&\n node.type !== \"AssignmentPattern\" &&\n node.type !== \"ObjectPattern\";\n\nconst isLegacyTlsPropertyValue = (\n propertyName: LegacyTlsPropertyName,\n configuredValue: string\n): boolean => {\n if (propertyName === \"secureProtocol\") {\n return isLegacySecureProtocolValue(configuredValue);\n }\n\n return setHas(LEGACY_TLS_VERSION_VALUES, configuredValue);\n};\n\nconst getLegacyTlsPropertyName = (\n propertyNode: TSESTree.Property\n): LegacyTlsPropertyName | undefined => {\n const propertyName = getPropertyName(propertyNode);\n\n if (\n propertyName === \"maxVersion\" ||\n propertyName === \"minVersion\" ||\n propertyName === \"secureProtocol\"\n ) {\n return propertyName;\n }\n\n return undefined;\n};\n\nconst isTlsDefaultVersionMember = (\n node: TSESTree.AssignmentExpression[\"left\"]\n): node is TSESTree.MemberExpression =>\n isNodeTlsStaticMember(\n node,\n new Set([\"DEFAULT_MAX_VERSION\", \"DEFAULT_MIN_VERSION\"])\n );\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (\n node.operator !== \"=\" ||\n !isTlsDefaultVersionMember(node.left)\n ) {\n return;\n }\n\n const configuredValue = getStaticStringValue(node.right);\n\n if (\n typeof configuredValue !== \"string\" ||\n !setHas(LEGACY_TLS_VERSION_VALUES, configuredValue)\n ) {\n return;\n }\n\n context.report({\n data: {\n configuredValue,\n propertyName:\n getMemberPropertyName(node.left) ??\n \"DEFAULT_MIN_VERSION\",\n },\n messageId: \"default\",\n node: node.right,\n });\n },\n ObjectExpression(node: TSESTree.ObjectExpression) {\n if (!isRelevantNodeTlsOptionsObject(node)) {\n return;\n }\n\n for (const propertyNode of node.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.kind !== \"init\"\n ) {\n continue;\n }\n\n if (!isExpressionNode(propertyNode.value)) {\n continue;\n }\n\n const propertyName = getLegacyTlsPropertyName(propertyNode);\n\n if (!isDefined(propertyName)) {\n continue;\n }\n\n const configuredValue = getStaticStringValue(\n propertyNode.value\n );\n\n if (\n typeof configuredValue !== \"string\" ||\n !isLegacyTlsPropertyValue(propertyName, configuredValue)\n ) {\n continue;\n }\n\n context.report({\n data: {\n configuredValue,\n propertyName,\n },\n messageId: \"default\",\n node: propertyNode.value,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow legacy TLS protocol selection such as TLSv1/TLSv1.1 in Node.js TLS and HTTPS configuration.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-legacy-protocol\",\n },\n messages: {\n default:\n \"Do not configure {{propertyName}} with legacy TLS protocol {{configuredValue}}; require TLSv1.2 or newer instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-node-tls-legacy-protocol\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\" | \"replaceWithTlsRejectUnauthorizedOne\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isProcessEnvAccess = (node: TSESTree.Expression): boolean => {\n if (node.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(node) !== \"env\") {\n return false;\n }\n\n return node.object.type === \"Identifier\" && node.object.name === \"process\";\n};\n\nconst isTlsRejectUnauthorizedMember = (\n node: TSESTree.AssignmentExpression[\"left\"]\n): boolean => {\n if (node.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(node) !== \"NODE_TLS_REJECT_UNAUTHORIZED\") {\n return false;\n }\n\n return isProcessEnvAccess(node.object);\n};\n\nconst isUnsafeOverrideValue = (node: TSESTree.Expression): boolean => {\n if (node.type === \"Literal\") {\n return node.value === 0 || node.value === \"0\";\n }\n\n return (\n node.type === \"TemplateLiteral\" &&\n node.expressions.length === 0 &&\n arrayFirst(node.quasis)?.value.cooked === \"0\"\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (node.operator !== \"=\") {\n return;\n }\n\n if (!isTlsRejectUnauthorizedMember(node.left)) {\n return;\n }\n\n if (!isUnsafeOverrideValue(node.right)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n suggest: [\n {\n fix(fixer) {\n const replacementValue =\n node.right.type === \"TemplateLiteral\"\n ? \"`1`\"\n : \"'1'\";\n\n return fixer.replaceText(\n node.right,\n replacementValue\n );\n },\n messageId: \"replaceWithTlsRejectUnauthorizedOne\",\n },\n ],\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0' overrides in Node.js runtime code.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-reject-unauthorized-zero\",\n },\n hasSuggestions: true,\n messages: {\n default:\n \"Do not disable TLS certificate validation with NODE_TLS_REJECT_UNAUTHORIZED=0.\",\n replaceWithTlsRejectUnauthorizedOne:\n \"Set NODE_TLS_REJECT_UNAUTHORIZED to '1' to keep TLS certificate validation enabled.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-node-tls-reject-unauthorized-zero\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\nimport {\n isNodeTlsStaticMember,\n isRelevantNodeTlsOptionsObject,\n} from \"../_internal/node-tls-config.js\";\n\ntype MessageIds = \"default\";\n\nconst TLS_DEFAULT_CIPHERS_PROPERTY_NAMES = new Set([\"DEFAULT_CIPHERS\"]);\nconst TLS_SECURITY_LEVEL_ZERO_PATTERN = /@seclevel\\s*=\\s*0\\b/iu;\n\nconst isExpressionNode = (node: TSESTree.Node): node is TSESTree.Expression =>\n node.type !== \"ArrayPattern\" &&\n node.type !== \"AssignmentPattern\" &&\n node.type !== \"ObjectPattern\";\n\nconst isSecurityLevelZeroCipherString = (value: string): boolean =>\n TLS_SECURITY_LEVEL_ZERO_PATTERN.test(value);\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (\n node.operator !== \"=\" ||\n !isNodeTlsStaticMember(\n node.left,\n TLS_DEFAULT_CIPHERS_PROPERTY_NAMES\n )\n ) {\n return;\n }\n\n const configuredValue = getStaticStringValue(node.right);\n\n if (\n typeof configuredValue !== \"string\" ||\n !isSecurityLevelZeroCipherString(configuredValue)\n ) {\n return;\n }\n\n context.report({\n data: {\n configuredValue,\n propertyName: \"DEFAULT_CIPHERS\",\n },\n messageId: \"default\",\n node: node.right,\n });\n },\n ObjectExpression(node: TSESTree.ObjectExpression) {\n if (!isRelevantNodeTlsOptionsObject(node)) {\n return;\n }\n\n for (const propertyNode of node.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.kind !== \"init\" ||\n getPropertyName(propertyNode) !== \"ciphers\" ||\n !isExpressionNode(propertyNode.value)\n ) {\n continue;\n }\n\n const configuredValue = getStaticStringValue(\n propertyNode.value\n );\n\n if (\n typeof configuredValue !== \"string\" ||\n !isSecurityLevelZeroCipherString(configuredValue)\n ) {\n continue;\n }\n\n context.report({\n data: {\n configuredValue,\n propertyName: \"ciphers\",\n },\n messageId: \"default\",\n node: propertyNode.value,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow lowering Node.js TLS cipher security to OpenSSL security level 0.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-security-level-zero\",\n },\n messages: {\n default:\n \"Do not lower TLS cipher security with {{propertyName}}={{configuredValue}}; keep Node's default security level or use a reviewed stronger cipher policy instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-node-tls-security-level-zero\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined, setHas } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getPropertyName,\n} from \"../_internal/estree-utils.js\";\n\ntype DisallowedVmCallName =\n | \"compileFunction\"\n | \"runInContext\"\n | \"runInNewContext\"\n | \"runInThisContext\";\n\ntype DisallowedVmConstructorName = \"Script\";\n\ntype MessageIds = \"default\";\n\nconst VM_MODULE_NAMES = new Set([\"node:vm\", \"vm\"]);\nconst DISALLOWED_VM_CALL_NAMES = new Set([\n \"compileFunction\",\n \"runInContext\",\n \"runInNewContext\",\n \"runInThisContext\",\n]);\nconst DISALLOWED_VM_CONSTRUCTOR_NAMES = new Set([\"Script\"]);\n\nconst isVmModuleSource = (value: string): boolean =>\n setHas(VM_MODULE_NAMES, value);\n\nconst isDisallowedVmCallName = (\n value: string | undefined\n): value is DisallowedVmCallName =>\n isDefined(value) && setHas(DISALLOWED_VM_CALL_NAMES, value);\n\nconst isDisallowedVmConstructorName = (\n value: string | undefined\n): value is DisallowedVmConstructorName =>\n isDefined(value) && setHas(DISALLOWED_VM_CONSTRUCTOR_NAMES, value);\n\nconst isRequireCallFromVmModule = (\n expression: null | TSESTree.Expression\n): expression is TSESTree.CallExpression => {\n if (\n expression?.type !== \"CallExpression\" ||\n expression.callee.type !== \"Identifier\" ||\n expression.callee.name !== \"require\"\n ) {\n return false;\n }\n\n const [firstArgument] = expression.arguments;\n\n return (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n firstArgument.type === \"Literal\" &&\n typeof firstArgument.value === \"string\" &&\n isVmModuleSource(firstArgument.value)\n );\n};\n\nconst getPatternIdentifier = (\n pattern: TSESTree.Property[\"value\"]\n): TSESTree.Identifier | undefined => {\n if (pattern.type === \"Identifier\") {\n return pattern;\n }\n\n if (\n pattern.type === \"AssignmentPattern\" &&\n pattern.left.type === \"Identifier\"\n ) {\n return pattern.left;\n }\n\n return undefined;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const vmCallBindingNames = new Set<string>();\n const vmConstructorBindingNames = new Set<string>();\n const vmNamespaceBindingNames = new Set<string>();\n\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type === \"Identifier\") {\n if (!setHas(vmCallBindingNames, node.callee.name)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n\n return;\n }\n\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (!isDisallowedVmCallName(methodName)) {\n return;\n }\n\n if (\n node.callee.object.type === \"Identifier\" &&\n setHas(vmNamespaceBindingNames, node.callee.object.name)\n ) {\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n\n return;\n }\n\n if (\n node.callee.object.type === \"CallExpression\" &&\n isRequireCallFromVmModule(node.callee.object)\n ) {\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n }\n },\n ImportDeclaration(node: TSESTree.ImportDeclaration) {\n if (!isVmModuleSource(node.source.value)) {\n return;\n }\n\n for (const specifierNode of node.specifiers) {\n if (\n specifierNode.type === \"ImportDefaultSpecifier\" ||\n specifierNode.type === \"ImportNamespaceSpecifier\"\n ) {\n vmNamespaceBindingNames.add(specifierNode.local.name);\n continue;\n }\n\n const importedName =\n specifierNode.imported.type === \"Identifier\"\n ? specifierNode.imported.name\n : specifierNode.imported.value;\n\n if (isDisallowedVmCallName(importedName)) {\n vmCallBindingNames.add(specifierNode.local.name);\n continue;\n }\n\n if (isDisallowedVmConstructorName(importedName)) {\n vmConstructorBindingNames.add(specifierNode.local.name);\n }\n }\n },\n NewExpression(node: TSESTree.NewExpression) {\n if (node.callee.type === \"Identifier\") {\n if (!setHas(vmConstructorBindingNames, node.callee.name)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n\n return;\n }\n\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n const constructorName = getMemberPropertyName(node.callee);\n\n if (!isDisallowedVmConstructorName(constructorName)) {\n return;\n }\n\n if (\n node.callee.object.type === \"Identifier\" &&\n setHas(vmNamespaceBindingNames, node.callee.object.name)\n ) {\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n\n return;\n }\n\n if (\n node.callee.object.type === \"CallExpression\" &&\n isRequireCallFromVmModule(node.callee.object)\n ) {\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n }\n },\n VariableDeclarator(node: TSESTree.VariableDeclarator) {\n if (!isRequireCallFromVmModule(node.init)) {\n return;\n }\n\n if (node.id.type === \"Identifier\") {\n vmNamespaceBindingNames.add(node.id.name);\n return;\n }\n\n if (node.id.type !== \"ObjectPattern\") {\n return;\n }\n\n for (const propertyNode of node.id.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.computed\n ) {\n continue;\n }\n\n const importedName = getPropertyName(propertyNode);\n const localIdentifier = getPatternIdentifier(\n propertyNode.value\n );\n\n if (localIdentifier === undefined) {\n continue;\n }\n\n if (isDisallowedVmCallName(importedName)) {\n vmCallBindingNames.add(localIdentifier.name);\n continue;\n }\n\n if (isDisallowedVmConstructorName(importedName)) {\n vmConstructorBindingNames.add(localIdentifier.name);\n }\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow node:vm dynamic code execution APIs that are commonly mistaken for a security sandbox.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-vm-run-in-context\",\n },\n messages: {\n default:\n \"Do not execute dynamic code through node:vm run/compile APIs; the vm module is not a security boundary.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-node-vm-run-in-context\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { setHas } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getPropertyName,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst VM_MODULE_NAMES = new Set([\"node:vm\", \"vm\"]);\nconst SOURCE_TEXT_MODULE_NAME = \"SourceTextModule\";\n\nconst isVmModuleSource = (value: string): boolean =>\n setHas(VM_MODULE_NAMES, value);\n\nconst isRequireCallFromVmModule = (\n expression: null | TSESTree.Expression\n): expression is TSESTree.CallExpression => {\n if (\n expression?.type !== \"CallExpression\" ||\n expression.callee.type !== \"Identifier\" ||\n expression.callee.name !== \"require\"\n ) {\n return false;\n }\n\n const [firstArgument] = expression.arguments;\n\n return (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n firstArgument.type === \"Literal\" &&\n typeof firstArgument.value === \"string\" &&\n isVmModuleSource(firstArgument.value)\n );\n};\n\nconst getPatternIdentifier = (\n pattern: TSESTree.Property[\"value\"]\n): TSESTree.Identifier | undefined => {\n if (pattern.type === \"Identifier\") {\n return pattern;\n }\n\n if (\n pattern.type === \"AssignmentPattern\" &&\n pattern.left.type === \"Identifier\"\n ) {\n return pattern.left;\n }\n\n return undefined;\n};\n\nconst isSourceTextModuleConstructor = (\n callee: Readonly<TSESTree.NewExpression[\"callee\"]>,\n sourceTextModuleBindingNames: ReadonlySet<string>,\n vmNamespaceBindingNames: ReadonlySet<string>\n): boolean => {\n if (callee.type === \"Identifier\") {\n return setHas(sourceTextModuleBindingNames, callee.name);\n }\n\n if (callee.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(callee) !== SOURCE_TEXT_MODULE_NAME) {\n return false;\n }\n\n return (\n (callee.object.type === \"Identifier\" &&\n setHas(vmNamespaceBindingNames, callee.object.name)) ||\n (callee.object.type === \"CallExpression\" &&\n isRequireCallFromVmModule(callee.object))\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const sourceTextModuleBindingNames = new Set<string>();\n const vmNamespaceBindingNames = new Set<string>();\n\n return {\n ImportDeclaration(node: TSESTree.ImportDeclaration) {\n if (!isVmModuleSource(node.source.value)) {\n return;\n }\n\n for (const specifierNode of node.specifiers) {\n if (\n specifierNode.type === \"ImportDefaultSpecifier\" ||\n specifierNode.type === \"ImportNamespaceSpecifier\"\n ) {\n vmNamespaceBindingNames.add(specifierNode.local.name);\n continue;\n }\n\n const importedName =\n specifierNode.imported.type === \"Identifier\"\n ? specifierNode.imported.name\n : specifierNode.imported.value;\n\n if (importedName === SOURCE_TEXT_MODULE_NAME) {\n sourceTextModuleBindingNames.add(\n specifierNode.local.name\n );\n }\n }\n },\n NewExpression(node: TSESTree.NewExpression) {\n if (\n !isSourceTextModuleConstructor(\n node.callee,\n sourceTextModuleBindingNames,\n vmNamespaceBindingNames\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n },\n VariableDeclarator(node: TSESTree.VariableDeclarator) {\n if (!isRequireCallFromVmModule(node.init)) {\n return;\n }\n\n if (node.id.type === \"Identifier\") {\n vmNamespaceBindingNames.add(node.id.name);\n return;\n }\n\n if (node.id.type !== \"ObjectPattern\") {\n return;\n }\n\n for (const propertyNode of node.id.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.computed\n ) {\n continue;\n }\n\n if (\n getPropertyName(propertyNode) !==\n SOURCE_TEXT_MODULE_NAME\n ) {\n continue;\n }\n\n const localIdentifier = getPatternIdentifier(\n propertyNode.value\n );\n\n if (localIdentifier === undefined) {\n continue;\n }\n\n sourceTextModuleBindingNames.add(localIdentifier.name);\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow node:vm SourceTextModule constructors that compile JavaScript source strings into executable modules.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-vm-source-text-module\",\n },\n messages: {\n default:\n \"Do not compile code with node:vm SourceTextModule; loading executable modules from source strings is not a security boundary.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-node-vm-source-text-module\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { setHas } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getPropertyName,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst WORKER_THREADS_MODULE_NAMES = new Set([\n \"node:worker_threads\",\n \"worker_threads\",\n]);\n\nconst isWorkerThreadsModuleSource = (value: string): boolean =>\n setHas(WORKER_THREADS_MODULE_NAMES, value);\n\nconst isRequireCallFromWorkerThreads = (\n expression: null | TSESTree.Expression\n): expression is TSESTree.CallExpression => {\n if (\n expression?.type !== \"CallExpression\" ||\n expression.callee.type !== \"Identifier\" ||\n expression.callee.name !== \"require\"\n ) {\n return false;\n }\n\n const [firstArgument] = expression.arguments;\n\n return (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n firstArgument.type === \"Literal\" &&\n typeof firstArgument.value === \"string\" &&\n isWorkerThreadsModuleSource(firstArgument.value)\n );\n};\n\nconst getPatternIdentifier = (\n pattern: TSESTree.Property[\"value\"]\n): TSESTree.Identifier | undefined => {\n if (pattern.type === \"Identifier\") {\n return pattern;\n }\n\n if (\n pattern.type === \"AssignmentPattern\" &&\n pattern.left.type === \"Identifier\"\n ) {\n return pattern.left;\n }\n\n return undefined;\n};\n\nconst hasEvalTrueOption = (\n optionsNode: Readonly<TSESTree.Expression>\n): boolean => {\n if (optionsNode.type !== \"ObjectExpression\") {\n return false;\n }\n\n for (const propertyNode of optionsNode.properties) {\n if (propertyNode.type !== \"Property\" || propertyNode.kind !== \"init\") {\n continue;\n }\n\n if (getPropertyName(propertyNode) !== \"eval\") {\n continue;\n }\n\n if (\n propertyNode.value.type === \"Literal\" &&\n propertyNode.value.value === true\n ) {\n return true;\n }\n }\n\n return false;\n};\n\nconst isWorkerThreadsWorkerConstructor = (\n callee: Readonly<TSESTree.NewExpression[\"callee\"]>,\n workerBindingNames: ReadonlySet<string>,\n workerThreadsNamespaceBindingNames: ReadonlySet<string>\n): boolean => {\n if (callee.type === \"Identifier\") {\n return setHas(workerBindingNames, callee.name);\n }\n\n if (callee.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(callee) !== \"Worker\") {\n return false;\n }\n\n return (\n (callee.object.type === \"Identifier\" &&\n setHas(workerThreadsNamespaceBindingNames, callee.object.name)) ||\n (callee.object.type === \"CallExpression\" &&\n isRequireCallFromWorkerThreads(callee.object))\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const workerBindingNames = new Set<string>();\n const workerThreadsNamespaceBindingNames = new Set<string>();\n\n return {\n ImportDeclaration(node: TSESTree.ImportDeclaration) {\n if (!isWorkerThreadsModuleSource(node.source.value)) {\n return;\n }\n\n for (const specifierNode of node.specifiers) {\n if (\n specifierNode.type === \"ImportDefaultSpecifier\" ||\n specifierNode.type === \"ImportNamespaceSpecifier\"\n ) {\n workerThreadsNamespaceBindingNames.add(\n specifierNode.local.name\n );\n continue;\n }\n\n const importedName =\n specifierNode.imported.type === \"Identifier\"\n ? specifierNode.imported.name\n : specifierNode.imported.value;\n\n if (importedName === \"Worker\") {\n workerBindingNames.add(specifierNode.local.name);\n }\n }\n },\n NewExpression(node: TSESTree.NewExpression) {\n if (\n !isWorkerThreadsWorkerConstructor(\n node.callee,\n workerBindingNames,\n workerThreadsNamespaceBindingNames\n )\n ) {\n return;\n }\n\n const [, secondArgument] = node.arguments;\n\n if (\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\" ||\n !hasEvalTrueOption(secondArgument)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: secondArgument,\n });\n },\n VariableDeclarator(node: TSESTree.VariableDeclarator) {\n if (!isRequireCallFromWorkerThreads(node.init)) {\n return;\n }\n\n if (node.id.type === \"Identifier\") {\n workerThreadsNamespaceBindingNames.add(node.id.name);\n return;\n }\n\n if (node.id.type !== \"ObjectPattern\") {\n return;\n }\n\n for (const propertyNode of node.id.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.computed\n ) {\n continue;\n }\n\n if (getPropertyName(propertyNode) !== \"Worker\") {\n continue;\n }\n\n const localIdentifier = getPatternIdentifier(\n propertyNode.value\n );\n\n if (localIdentifier === undefined) {\n continue;\n }\n\n workerBindingNames.add(localIdentifier.name);\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow node:worker_threads Worker options that enable eval: true string execution.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-worker-threads-eval\",\n },\n messages: {\n default:\n \"Do not enable eval: true for node:worker_threads Worker instances; prefer reviewed worker script files instead of string-backed execution.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-node-worker-threads-eval\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst SECURITY_INPUT_PATTERN = /html|input|message|origin|payload|token|url/iu;\n\nconst isSecuritySensitiveExpression = (\n expression: TSESTree.Expression\n): boolean => {\n if (expression.type === \"Identifier\") {\n return SECURITY_INPUT_PATTERN.test(expression.name);\n }\n\n if (\n expression.type === \"MemberExpression\" &&\n !expression.computed &&\n expression.property.type === \"Identifier\"\n ) {\n return SECURITY_INPUT_PATTERN.test(expression.property.name);\n }\n\n return false;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n TSNonNullExpression(node: TSESTree.TSNonNullExpression) {\n if (!isSecuritySensitiveExpression(node.expression)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow non-null assertions on likely security-sensitive input values.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-nonnull-assertion-on-security-input\",\n },\n messages: {\n default:\n \"Avoid non-null assertions on security-sensitive inputs; validate before use.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-nonnull-assertion-on-security-input\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayIncludes, isDefined } from \"ts-extras\";\n\nimport {\n getFullTypeChecker,\n getNodeTypeAsString,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\" | \"replaceWithExplicitOrigin\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n \"CallExpression[arguments.length>=2][arguments.length<=3][callee.property.name='postMessage']\"(\n node: TSESTree.CallExpression\n ) {\n const [, targetOrigin] = node.arguments;\n\n if (\n !isDefined(targetOrigin) ||\n targetOrigin.type !== \"Literal\" ||\n targetOrigin.value !== \"*\"\n ) {\n return;\n }\n\n if (\n isDefined(fullTypeChecker) &&\n node.callee.type === \"MemberExpression\"\n ) {\n const calleeObjectType = getNodeTypeAsString(\n fullTypeChecker,\n node.callee.object,\n context\n );\n\n if (!arrayIncludes([\"any\", \"Window\"], calleeObjectType)) {\n return;\n }\n }\n\n context.report({\n messageId: \"default\",\n node: targetOrigin,\n suggest: [\n {\n fix(fixer) {\n return fixer.replaceText(\n targetOrigin,\n \"location.origin\"\n );\n },\n messageId: \"replaceWithExplicitOrigin\",\n },\n ],\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow '*' targetOrigin in postMessage calls to prevent cross-origin data leakage.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-postmessage-star-origin\",\n },\n hasSuggestions: true,\n messages: {\n default:\n \"Do not use '*' as targetOrigin when sending data with postMessage.\",\n replaceWithExplicitOrigin:\n \"Replace '*' with a specific trusted origin, such as location.origin.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-postmessage-star-origin\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst getStaticStringValue = (\n node: TSESTree.Expression\n): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\" && node.expressions.length === 0) {\n return arrayFirst(node.quasis)?.value.cooked ?? undefined;\n }\n\n return undefined;\n};\n\nconst isAllowedOriginLiteral = (origin: string): boolean => {\n const normalizedOrigin = origin.trim();\n\n if (normalizedOrigin === \"\") {\n return false;\n }\n\n if (normalizedOrigin.includes(\"*\")) {\n return false;\n }\n\n return /^https?:\\/\\//iu.test(normalizedOrigin);\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (getMemberPropertyName(node.callee) !== \"postMessage\") {\n return;\n }\n\n const [, secondArgument] = node.arguments;\n\n if (\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const secondArgumentValue =\n getStaticStringValue(secondArgument);\n\n if (\n typeof secondArgumentValue === \"string\" &&\n isAllowedOriginLiteral(secondArgumentValue)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: secondArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"require explicit, allowlisted postMessage target origins instead of wildcard/dynamic values.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-postmessage-without-origin-allowlist\",\n },\n messages: {\n default:\n \"Use a strict, explicit allowlisted origin for postMessage targetOrigin.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-postmessage-without-origin-allowlist\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst isSanitizedExpression = (node: TSESTree.Expression): boolean => {\n if (node.type !== \"CallExpression\") {\n return false;\n }\n\n if (node.callee.type === \"Identifier\") {\n return /createhtml|sanitize|trusted/u.test(\n node.callee.name.toLowerCase()\n );\n }\n\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n const propertyName = getMemberPropertyName(node.callee);\n\n return (\n typeof propertyName === \"string\" &&\n /createhtml|sanitize|trusted/u.test(propertyName.toLowerCase())\n );\n};\n\nconst isCreateContextualFragmentCall = (\n node: TSESTree.CallExpression\n): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n return getMemberPropertyName(node.callee) === \"createContextualFragment\";\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isCreateContextualFragmentCall(node)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n getStaticStringValue(firstArgument) === \"\" ||\n isSanitizedExpression(firstArgument)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Range.createContextualFragment(...) calls on unsanitized HTML input.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-range-create-contextual-fragment\",\n },\n messages: {\n default:\n \"Sanitize HTML before passing it to Range.createContextualFragment().\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-range-create-contextual-fragment\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { type getFullTypeChecker, getNodeTypeAsString } from \"./ast-utils.js\";\nimport { getMemberPropertyName, getStaticStringValue } from \"./estree-utils.js\";\n\n/** ESLint rule context shape accepted by AST/type helper utilities. */\nexport type AstUtilsRuleContext = Parameters<typeof getFullTypeChecker>[0];\n\nconst isLikelyScriptIdentifierName = (identifierName: string): boolean =>\n identifierName === \"currentScript\" ||\n identifierName === \"script\" ||\n identifierName === \"scriptElement\" ||\n identifierName.endsWith(\"Script\") ||\n identifierName.endsWith(\"ScriptElement\") ||\n identifierName.endsWith(\"_script\") ||\n identifierName.endsWith(\"_script_element\");\n\nconst isCreateElementScriptCall = (node: TSESTree.Node): boolean => {\n if (\n node.type !== \"CallExpression\" ||\n node.callee.type !== \"MemberExpression\"\n ) {\n return false;\n }\n\n if (getMemberPropertyName(node.callee) !== \"createElement\") {\n return false;\n }\n\n const [firstArgument] = node.arguments;\n\n return (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n getStaticStringValue(firstArgument) === \"script\"\n );\n};\n\n/** Returns whether an AST node likely refers to an `HTMLScriptElement`. */\nexport const isLikelyScriptElement = (\n node: TSESTree.Node,\n context: AstUtilsRuleContext,\n fullTypeChecker: ReturnType<typeof getFullTypeChecker>\n): boolean => {\n if (fullTypeChecker !== undefined) {\n const nodeType = getNodeTypeAsString(fullTypeChecker, node, context);\n\n if (nodeType.includes(\"HTMLScriptElement\")) {\n return true;\n }\n }\n\n if (isCreateElementScriptCall(node)) {\n return true;\n }\n\n if (node.type === \"Identifier\") {\n return isLikelyScriptIdentifierName(node.name);\n }\n\n if (node.type !== \"MemberExpression\") {\n return false;\n }\n\n const propertyName = getMemberPropertyName(node);\n\n return (\n typeof propertyName === \"string\" &&\n (propertyName === \"currentScript\" ||\n isLikelyScriptIdentifierName(propertyName))\n );\n};\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { getFullTypeChecker } from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getStaticJsxAttributeStringValue,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\nimport { isLikelyScriptElement } from \"../_internal/script-element.js\";\n\ntype MessageIds = \"default\";\n\nconst isDataUrl = (value: string): boolean => /^\\s*data:/iu.test(value);\n\nconst isJsxScriptElement = (node: TSESTree.JSXOpeningElement): boolean =>\n node.name.type === \"JSXIdentifier\" &&\n node.name.name.toLowerCase() === \"script\";\n\nconst getJsxAttributeName = (\n attributeNode: TSESTree.JSXAttribute\n): string | undefined => {\n if (attributeNode.name.type !== \"JSXIdentifier\") {\n return undefined;\n }\n\n return attributeNode.name.name.toLowerCase();\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (node.left.type !== \"MemberExpression\") {\n return;\n }\n\n if (getMemberPropertyName(node.left) !== \"src\") {\n return;\n }\n\n const configuredValue = getStaticStringValue(node.right);\n\n if (\n typeof configuredValue !== \"string\" ||\n !isDataUrl(configuredValue) ||\n !isLikelyScriptElement(\n node.left.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.right,\n });\n },\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (\n methodName !== \"setAttribute\" &&\n methodName !== \"setAttributeNS\"\n ) {\n return;\n }\n\n const [firstArgument, secondArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n getStaticStringValue(firstArgument) !== \"src\" ||\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const configuredValue = getStaticStringValue(secondArgument);\n\n if (\n typeof configuredValue !== \"string\" ||\n !isDataUrl(configuredValue) ||\n !isLikelyScriptElement(\n node.callee.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: secondArgument,\n });\n },\n JSXOpeningElement(node: TSESTree.JSXOpeningElement) {\n if (!isJsxScriptElement(node)) {\n return;\n }\n\n for (const attributeNode of node.attributes) {\n if (attributeNode.type !== \"JSXAttribute\") {\n continue;\n }\n\n if (getJsxAttributeName(attributeNode) !== \"src\") {\n continue;\n }\n\n const staticValue = getStaticJsxAttributeStringValue(\n attributeNode.value\n );\n\n if (\n typeof staticValue !== \"string\" ||\n !isDataUrl(staticValue)\n ) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: attributeNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow HTMLScriptElement src values that load executable code from data: URLs.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-script-src-data-url\",\n },\n messages: {\n default:\n \"Do not load script code from a data: URL; use a reviewed external resource or module instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-script-src-data-url\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { getFullTypeChecker } from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\nimport { isLikelyScriptElement } from \"../_internal/script-element.js\";\n\ntype MessageIds = \"default\";\n\nconst isScriptTextPropertyName = (propertyName: string | undefined): boolean =>\n propertyName === \"innerText\" ||\n propertyName === \"text\" ||\n propertyName === \"textContent\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (node.left.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n !isScriptTextPropertyName(getMemberPropertyName(node.left))\n ) {\n return;\n }\n\n if (getStaticStringValue(node.right) === \"\") {\n return;\n }\n\n if (\n !isLikelyScriptElement(\n node.left.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.right,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow assigning executable code through HTMLScriptElement text, textContent, or innerText sinks.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-script-text\",\n },\n messages: {\n default:\n \"Do not inject executable code through script text sinks; load a reviewed script resource or module instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-script-text\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getStaticStringValue } from \"../_internal/estree-utils.js\";\nimport {\n isBlobUrl,\n isDataUrl,\n isServiceWorkerRegisterCall,\n isUrlCreateObjectUrlCall,\n} from \"../_internal/worker-code-loading.js\";\n\ntype MessageIds = \"default\";\n\nconst isJavaScriptUrl = (value: string): boolean =>\n /^\\s*javascript\\s*:/iu.test(value);\n\nconst isUnsafeServiceWorkerScriptUrl = (\n expression: Readonly<TSESTree.Expression>\n): boolean => {\n const configuredValue = getStaticStringValue(expression);\n\n return (\n (typeof configuredValue === \"string\" &&\n (isBlobUrl(configuredValue) ||\n isDataUrl(configuredValue) ||\n isJavaScriptUrl(configuredValue))) ||\n isUrlCreateObjectUrlCall(expression)\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isServiceWorkerRegisterCall(node.callee)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n !isUnsafeServiceWorkerScriptUrl(firstArgument)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow unsafe service worker script URLs such as data:, blob:, javascript:, and direct URL.createObjectURL(...) registrations.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-service-worker-unsafe-script-url\",\n },\n messages: {\n default:\n \"Do not register a service worker from data:, blob:, javascript:, or URL.createObjectURL(...) script URLs.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-service-worker-unsafe-script-url\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst isSetHtmlUnsafeCall = (node: TSESTree.CallExpression): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n return getMemberPropertyName(node.callee) === \"setHTMLUnsafe\";\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isSetHtmlUnsafeCall(node)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n getStaticStringValue(firstArgument) === \"\"\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow setHTMLUnsafe() calls that bypass the safer HTML Sanitizer API path.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-set-html-unsafe\",\n },\n messages: {\n default:\n \"Do not call setHTMLUnsafe(); use setHTML() or build DOM nodes safely instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-set-html-unsafe\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst, isDefined, setHas } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getPropertyName,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\ntype PolicyFactoryFunction =\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression;\n\nconst isExpressionNode = (node: TSESTree.Node): node is TSESTree.Expression =>\n node.type !== \"ArrayPattern\" &&\n node.type !== \"AssignmentPattern\" &&\n node.type !== \"ObjectPattern\";\n\nconst POLICY_FACTORY_NAMES = new Set([\n \"createHTML\",\n \"createScript\",\n \"createScriptURL\",\n]);\n\nconst isFunctionExpression = (\n expression: TSESTree.Expression\n): expression is PolicyFactoryFunction =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst unwrapTransparentExpression = (\n expression: TSESTree.Expression\n): TSESTree.Expression => {\n if (\n expression.type === \"TSAsExpression\" ||\n expression.type === \"TSTypeAssertion\"\n ) {\n return unwrapTransparentExpression(expression.expression);\n }\n\n return expression;\n};\n\nconst isPassThroughFactory = (factoryNode: PolicyFactoryFunction): boolean => {\n const [firstParameter] = factoryNode.params;\n\n if (firstParameter?.type !== \"Identifier\") {\n return false;\n }\n\n if (factoryNode.body.type !== \"BlockStatement\") {\n const expressionBody = unwrapTransparentExpression(factoryNode.body);\n\n return (\n expressionBody.type === \"Identifier\" &&\n expressionBody.name === firstParameter.name\n );\n }\n\n if (factoryNode.body.body.length !== 1) {\n return false;\n }\n\n const onlyStatement = arrayFirst(factoryNode.body.body);\n\n if (\n onlyStatement?.type !== \"ReturnStatement\" ||\n onlyStatement.argument === null\n ) {\n return false;\n }\n\n const returnedExpression = unwrapTransparentExpression(\n onlyStatement.argument\n );\n\n return (\n returnedExpression.type === \"Identifier\" &&\n returnedExpression.name === firstParameter.name\n );\n};\n\nconst isTrustedTypesCreatePolicyCall = (\n node: TSESTree.CallExpression\n): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(node.callee) !== \"createPolicy\") {\n return false;\n }\n\n if (node.callee.object.type === \"Identifier\") {\n return node.callee.object.name === \"trustedTypes\";\n }\n\n if (node.callee.object.type !== \"MemberExpression\") {\n return false;\n }\n\n return getMemberPropertyName(node.callee.object) === \"trustedTypes\";\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isTrustedTypesCreatePolicyCall(node)) {\n return;\n }\n\n const [, secondArgument] = node.arguments;\n\n if (\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\" ||\n secondArgument.type !== \"ObjectExpression\"\n ) {\n return;\n }\n\n for (const propertyNode of secondArgument.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.kind !== \"init\"\n ) {\n continue;\n }\n\n const propertyName = getPropertyName(propertyNode);\n\n if (\n !isDefined(propertyName) ||\n !setHas(POLICY_FACTORY_NAMES, propertyName) ||\n !isExpressionNode(propertyNode.value) ||\n !isFunctionExpression(propertyNode.value) ||\n !isPassThroughFactory(propertyNode.value)\n ) {\n continue;\n }\n\n context.report({\n data: {\n methodName: propertyName,\n },\n messageId: \"default\",\n node: propertyNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow pass-through Trusted Types policies that return unvalidated input unchanged.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-trusted-types-policy-pass-through\",\n },\n messages: {\n default:\n \"Do not implement {{methodName}} as a Trusted Types pass-through; sanitize or validate the input first.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-trusted-types-policy-pass-through\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n return {\n \"MemberExpression[object.name='Buffer'][property.name=/^(?:allocUnsafe|allocUnsafeSlow)$/]\"(\n node: TSESTree.MemberExpression\n ) {\n const parentNode = node.parent;\n\n if (\n parentNode?.type === \"CallExpression\" &&\n parentNode.arguments.length === 1\n ) {\n const [firstArgument] = parentNode.arguments;\n\n if (\n firstArgument?.type === \"Literal\" &&\n (firstArgument.value === 0 ||\n firstArgument.value === \"0\")\n ) {\n return;\n }\n }\n\n context.report({\n fix(fixer) {\n if (\n node.computed ||\n node.property.type !== \"Identifier\"\n ) {\n return null;\n }\n\n return fixer.replaceText(node.property, \"alloc\");\n },\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Buffer.allocUnsafe/allocUnsafeSlow allocations that may expose uninitialized memory.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-unsafe-alloc\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not allocate uninitialized buffers in Node.js.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-unsafe-alloc\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined, setHas } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst TRUSTED_TYPE_NAMES = new Set([\n \"TrustedHTML\",\n \"TrustedScript\",\n \"TrustedScriptURL\",\n]);\n\nconst getTypeName = (node: TSESTree.TypeNode): string | undefined => {\n if (\n node.type === \"TSTypeReference\" &&\n node.typeName.type === \"Identifier\"\n ) {\n return node.typeName.name;\n }\n\n return undefined;\n};\n\nconst isTrustedTypeNode = (node: TSESTree.TypeNode): boolean => {\n const typeName = getTypeName(node);\n\n return isDefined(typeName) && setHas(TRUSTED_TYPE_NAMES, typeName);\n};\n\nconst getExpressionCalleeName = (\n expression: TSESTree.Expression\n): string | undefined => {\n if (expression.type !== \"CallExpression\") {\n return undefined;\n }\n\n if (expression.callee.type === \"Identifier\") {\n return expression.callee.name;\n }\n\n if (\n expression.callee.type === \"MemberExpression\" &&\n !expression.callee.computed &&\n expression.callee.property.type === \"Identifier\"\n ) {\n return expression.callee.property.name;\n }\n\n return undefined;\n};\n\nconst isKnownTrustedFactoryCall = (\n expression: TSESTree.Expression\n): boolean => {\n const calleeName = getExpressionCalleeName(expression);\n\n if (!isDefined(calleeName)) {\n return false;\n }\n\n return /sanitize|createhtml|createscripturl|createscript|trusted/u.test(\n calleeName.toLowerCase()\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n TSAsExpression(node: TSESTree.TSAsExpression) {\n if (!isTrustedTypeNode(node.typeAnnotation)) {\n return;\n }\n\n if (isKnownTrustedFactoryCall(node.expression)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n TSTypeAssertion(node: TSESTree.TSTypeAssertion) {\n if (!isTrustedTypeNode(node.typeAnnotation)) {\n return;\n }\n\n if (isKnownTrustedFactoryCall(node.expression)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow unsafe casts to Trusted Types without validated/trusted factory paths.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-unsafe-cast-to-trusted-types\",\n },\n messages: {\n default: \"Do not cast unvalidated values to Trusted Types.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-unsafe-cast-to-trusted-types\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst, isDefined, stringSplit } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getStaticStringValue = (\n node: TSESTree.Expression\n): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\" && node.expressions.length === 0) {\n const firstQuasi = arrayFirst(node.quasis);\n\n if (\n !isDefined(firstQuasi) ||\n typeof firstQuasi.value.cooked !== \"string\"\n ) {\n return undefined;\n }\n\n return firstQuasi.value.cooked;\n }\n\n return undefined;\n};\n\nconst isWindowOpenCallee = (\n callee: TSESTree.CallExpression[\"callee\"]\n): boolean => {\n if (callee.type !== \"MemberExpression\" || callee.computed) {\n return false;\n }\n\n return (\n callee.object.type === \"Identifier\" &&\n callee.object.name === \"window\" &&\n callee.property.type === \"Identifier\" &&\n callee.property.name === \"open\"\n );\n};\n\nconst hasNoopenerToken = (features: string): boolean =>\n stringSplit(features.toLowerCase(), \",\")\n .map((token) => token.trim())\n .some((token) => token === \"noopener\" || token.startsWith(\"noopener=\"));\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isWindowOpenCallee(node.callee)) {\n return;\n }\n\n const [\n ,\n secondArgument,\n thirdArgument,\n ] = node.arguments;\n\n if (\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const targetValue = getStaticStringValue(secondArgument);\n\n if (targetValue !== \"_blank\") {\n return;\n }\n\n if (\n thirdArgument === undefined ||\n thirdArgument.type === \"SpreadElement\"\n ) {\n context.report({\n messageId: \"default\",\n node,\n });\n\n return;\n }\n\n const featuresValue = getStaticStringValue(thirdArgument);\n\n if (\n typeof featuresValue !== \"string\" ||\n !hasNoopenerToken(featuresValue)\n ) {\n context.report({\n messageId: \"default\",\n node: thirdArgument,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"require noopener when using window.open with a _blank target.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-window-open-without-noopener\",\n },\n messages: {\n default:\n \"Include 'noopener' in window.open features when target is '_blank'.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-window-open-without-noopener\",\n});\n\nexport default rule;\n", "import { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n return {\n \"CallExpression[callee.object.object.name='WinJS'][callee.object.property.name='Utilities'][callee.property.name=/^(?:insertAdjacent|setInner|setOuter)HTMLUnsafe$/]\"(\n node\n ) {\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow WinJS.Utilities unsafe HTML write APIs (setInnerHTMLUnsafe, setOuterHTMLUnsafe, insertAdjacentHTMLUnsafe).\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-winjs-html-unsafe\",\n },\n messages: {\n default:\n \"Do not set HTML using unsafe methods from WinJS.Utilities.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-winjs-html-unsafe\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getStaticStringValue } from \"../_internal/estree-utils.js\";\nimport {\n isBlobUrl,\n isImportScriptsCall,\n isUrlCreateObjectUrlCall,\n isWorkerConstructor,\n} from \"../_internal/worker-code-loading.js\";\n\ntype MessageIds = \"default\";\n\nconst isBlobBackedWorkerCodeExpression = (\n expression: Readonly<TSESTree.Expression>\n): boolean => {\n const configuredValue = getStaticStringValue(expression);\n\n return (\n (typeof configuredValue === \"string\" && isBlobUrl(configuredValue)) ||\n isUrlCreateObjectUrlCall(expression)\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isImportScriptsCall(node.callee)) {\n return;\n }\n\n for (const argumentNode of node.arguments) {\n if (\n argumentNode.type === \"SpreadElement\" ||\n !isBlobBackedWorkerCodeExpression(argumentNode)\n ) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: argumentNode,\n });\n }\n },\n NewExpression(node: TSESTree.NewExpression) {\n if (!isWorkerConstructor(node.callee)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n !isBlobBackedWorkerCodeExpression(firstArgument)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow worker code-loading APIs that use blob: URLs or URL.createObjectURL(...) for executable scripts.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-worker-blob-url\",\n },\n messages: {\n default:\n \"Do not load worker code from a blob: URL or URL.createObjectURL(...); use a reviewed worker script resource instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-worker-blob-url\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getStaticStringValue } from \"../_internal/estree-utils.js\";\nimport {\n isDataUrl,\n isImportScriptsCall,\n isWorkerConstructor,\n} from \"../_internal/worker-code-loading.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isImportScriptsCall(node.callee)) {\n return;\n }\n\n for (const argumentNode of node.arguments) {\n if (argumentNode.type === \"SpreadElement\") {\n continue;\n }\n\n const configuredValue = getStaticStringValue(argumentNode);\n\n if (\n typeof configuredValue !== \"string\" ||\n !isDataUrl(configuredValue)\n ) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: argumentNode,\n });\n }\n },\n NewExpression(node: TSESTree.NewExpression) {\n if (!isWorkerConstructor(node.callee)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const configuredValue = getStaticStringValue(firstArgument);\n\n if (\n typeof configuredValue !== \"string\" ||\n !isDataUrl(configuredValue)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow worker code-loading APIs that use static data: URLs for executable scripts.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-worker-data-url\",\n },\n messages: {\n default:\n \"Do not load worker code from a data: URL; use a reviewed worker script resource instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-worker-data-url\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable canonical/no-re-export -- Rule registry intentionally aggregates imported rule modules into a single exported map. */\nimport type { TSESLint } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\nimport noAngularBypassSanitizerRule from \"../rules/no-angular-bypass-sanitizer.js\";\nimport noAngularBypassSecurityTrustHtmlRule from \"../rules/no-angular-bypass-security-trust-html.js\";\nimport noAngularInnerhtmlBindingRule from \"../rules/no-angular-innerhtml-binding.js\";\nimport noAngularSanitizationTrustedUrlsRule from \"../rules/no-angular-sanitization-trusted-urls.js\";\nimport noAngularjsBypassSceRule from \"../rules/no-angularjs-bypass-sce.js\";\nimport noAngularjsEnableSvgRule from \"../rules/no-angularjs-enable-svg.js\";\nimport noAngularjsNgBindHtmlWithoutSanitizeRule from \"../rules/no-angularjs-ng-bind-html-without-sanitize.js\";\nimport noAngularjsSanitizationWhitelistRule from \"../rules/no-angularjs-sanitization-whitelist.js\";\nimport noAngularjsSceResourceUrlWildcardRule from \"../rules/no-angularjs-sce-resource-url-wildcard.js\";\nimport noChildProcessExecRule from \"../rules/no-child-process-exec.js\";\nimport noChildProcessShellTrueRule from \"../rules/no-child-process-shell-true.js\";\nimport noCookiesRule from \"../rules/no-cookies.js\";\nimport noDocumentDomainRule from \"../rules/no-document-domain.js\";\nimport noDocumentExeccommandInsertHtmlRule from \"../rules/no-document-execcommand-insert-html.js\";\nimport noDocumentParseHtmlUnsafeRule from \"../rules/no-document-parse-html-unsafe.js\";\nimport noDocumentWriteRule from \"../rules/no-document-write.js\";\nimport noDomparserHtmlWithoutSanitizationRule from \"../rules/no-domparser-html-without-sanitization.js\";\nimport noDomparserSvgWithoutSanitizationRule from \"../rules/no-domparser-svg-without-sanitization.js\";\nimport noDynamicImportUnsafeUrlRule from \"../rules/no-dynamic-import-unsafe-url.js\";\nimport noElectronAllowRunningInsecureContentRule from \"../rules/no-electron-allow-running-insecure-content.js\";\nimport noElectronDangerousBlinkFeaturesRule from \"../rules/no-electron-dangerous-blink-features.js\";\nimport noElectronDisableContextIsolationRule from \"../rules/no-electron-disable-context-isolation.js\";\nimport noElectronDisableSandboxRule from \"../rules/no-electron-disable-sandbox.js\";\nimport noElectronDisableWebSecurityRule from \"../rules/no-electron-disable-web-security.js\";\nimport noElectronEnableRemoteModuleRule from \"../rules/no-electron-enable-remote-module.js\";\nimport noElectronEnableWebviewTagRule from \"../rules/no-electron-enable-webview-tag.js\";\nimport noElectronExperimentalFeaturesRule from \"../rules/no-electron-experimental-features.js\";\nimport noElectronExposeRawIpcRendererRule from \"../rules/no-electron-expose-raw-ipc-renderer.js\";\nimport noElectronInsecureCertificateErrorHandlerRule from \"../rules/no-electron-insecure-certificate-error-handler.js\";\nimport noElectronInsecureCertificateVerifyProcRule from \"../rules/no-electron-insecure-certificate-verify-proc.js\";\nimport noElectronInsecurePermissionRequestHandlerRule from \"../rules/no-electron-insecure-permission-request-handler.js\";\nimport noElectronNodeIntegrationRule from \"../rules/no-electron-node-integration.js\";\nimport noElectronPermissionCheckHandlerAllowAllRule from \"../rules/no-electron-permission-check-handler-allow-all.js\";\nimport noElectronUncheckedIpcSenderRule from \"../rules/no-electron-unchecked-ipc-sender.js\";\nimport noElectronUnrestrictedNavigationRule from \"../rules/no-electron-unrestricted-navigation.js\";\nimport noElectronUntrustedOpenExternalRule from \"../rules/no-electron-untrusted-open-external.js\";\nimport noElectronWebviewAllowpopupsRule from \"../rules/no-electron-webview-allowpopups.js\";\nimport noElectronWebviewInsecureWebpreferencesRule from \"../rules/no-electron-webview-insecure-webpreferences.js\";\nimport noElectronWebviewNodeIntegrationRule from \"../rules/no-electron-webview-node-integration.js\";\nimport noHtmlMethodRule from \"../rules/no-html-method.js\";\nimport noHttpRequestToInsecureProtocolRule from \"../rules/no-http-request-to-insecure-protocol.js\";\nimport noIframeSrcdocRule from \"../rules/no-iframe-srcdoc.js\";\nimport noInnerHtmlRule from \"../rules/no-inner-html.js\";\nimport noInsecureRandomRule from \"../rules/no-insecure-random.js\";\nimport noInsecureTlsAgentOptionsRule from \"../rules/no-insecure-tls-agent-options.js\";\nimport noInsecureUrlRule from \"../rules/no-insecure-url.js\";\nimport noLocationJavascriptUrlRule from \"../rules/no-location-javascript-url.js\";\nimport noMessageEventWithoutOriginCheckRule from \"../rules/no-message-event-without-origin-check.js\";\nimport noMsappExecUnsafeRule from \"../rules/no-msapp-exec-unsafe.js\";\nimport noNodeTlsCheckServerIdentityBypassRule from \"../rules/no-node-tls-check-server-identity-bypass.js\";\nimport noNodeTlsLegacyProtocolRule from \"../rules/no-node-tls-legacy-protocol.js\";\nimport noNodeTlsRejectUnauthorizedZeroRule from \"../rules/no-node-tls-reject-unauthorized-zero.js\";\nimport noNodeTlsSecurityLevelZeroRule from \"../rules/no-node-tls-security-level-zero.js\";\nimport noNodeVmRunInContextRule from \"../rules/no-node-vm-run-in-context.js\";\nimport noNodeVmSourceTextModuleRule from \"../rules/no-node-vm-source-text-module.js\";\nimport noNodeWorkerThreadsEvalRule from \"../rules/no-node-worker-threads-eval.js\";\nimport noNonnullAssertionOnSecurityInputRule from \"../rules/no-nonnull-assertion-on-security-input.js\";\nimport noPostmessageStarOriginRule from \"../rules/no-postmessage-star-origin.js\";\nimport noPostmessageWithoutOriginAllowlistRule from \"../rules/no-postmessage-without-origin-allowlist.js\";\nimport noRangeCreateContextualFragmentRule from \"../rules/no-range-create-contextual-fragment.js\";\nimport noScriptSrcDataUrlRule from \"../rules/no-script-src-data-url.js\";\nimport noScriptTextRule from \"../rules/no-script-text.js\";\nimport noServiceWorkerUnsafeScriptUrlRule from \"../rules/no-service-worker-unsafe-script-url.js\";\nimport noSetHtmlUnsafeRule from \"../rules/no-set-html-unsafe.js\";\nimport noTrustedTypesPolicyPassThroughRule from \"../rules/no-trusted-types-policy-pass-through.js\";\nimport noUnsafeAllocRule from \"../rules/no-unsafe-alloc.js\";\nimport noUnsafeCastToTrustedTypesRule from \"../rules/no-unsafe-cast-to-trusted-types.js\";\nimport noWindowOpenWithoutNoopenerRule from \"../rules/no-window-open-without-noopener.js\";\nimport noWinjsHtmlUnsafeRule from \"../rules/no-winjs-html-unsafe.js\";\nimport noWorkerBlobUrlRule from \"../rules/no-worker-blob-url.js\";\nimport noWorkerDataUrlRule from \"../rules/no-worker-data-url.js\";\n\n/** Canonical SDL rule module type used in the exported registry map. */\nexport type SdlRuleModule = TSESLint.RuleModule<string, Readonly<UnknownArray>>;\n\n/** Naming convention for SDL security rule identifiers. */\nexport type SdlRuleNamePattern = `no-${string}`;\n\n/** SDL rule registry keyed by rule name for plugin export wiring. */\nexport const sdlRules: Readonly<Record<SdlRuleNamePattern, SdlRuleModule>> = {\n \"no-angular-bypass-sanitizer\": noAngularBypassSanitizerRule,\n \"no-angular-bypass-security-trust-html\":\n noAngularBypassSecurityTrustHtmlRule,\n \"no-angular-innerhtml-binding\": noAngularInnerhtmlBindingRule,\n \"no-angular-sanitization-trusted-urls\":\n noAngularSanitizationTrustedUrlsRule,\n \"no-angularjs-bypass-sce\": noAngularjsBypassSceRule,\n \"no-angularjs-enable-svg\": noAngularjsEnableSvgRule,\n \"no-angularjs-ng-bind-html-without-sanitize\":\n noAngularjsNgBindHtmlWithoutSanitizeRule,\n \"no-angularjs-sanitization-whitelist\": noAngularjsSanitizationWhitelistRule,\n \"no-angularjs-sce-resource-url-wildcard\":\n noAngularjsSceResourceUrlWildcardRule,\n \"no-child-process-exec\": noChildProcessExecRule,\n \"no-child-process-shell-true\": noChildProcessShellTrueRule,\n \"no-cookies\": noCookiesRule,\n \"no-document-domain\": noDocumentDomainRule,\n \"no-document-execcommand-insert-html\": noDocumentExeccommandInsertHtmlRule,\n \"no-document-parse-html-unsafe\": noDocumentParseHtmlUnsafeRule,\n \"no-document-write\": noDocumentWriteRule,\n \"no-domparser-html-without-sanitization\":\n noDomparserHtmlWithoutSanitizationRule,\n \"no-domparser-svg-without-sanitization\":\n noDomparserSvgWithoutSanitizationRule,\n \"no-dynamic-import-unsafe-url\": noDynamicImportUnsafeUrlRule,\n \"no-electron-allow-running-insecure-content\":\n noElectronAllowRunningInsecureContentRule,\n \"no-electron-dangerous-blink-features\":\n noElectronDangerousBlinkFeaturesRule,\n \"no-electron-disable-context-isolation\":\n noElectronDisableContextIsolationRule,\n \"no-electron-disable-sandbox\": noElectronDisableSandboxRule,\n \"no-electron-disable-web-security\": noElectronDisableWebSecurityRule,\n \"no-electron-enable-remote-module\": noElectronEnableRemoteModuleRule,\n \"no-electron-enable-webview-tag\": noElectronEnableWebviewTagRule,\n \"no-electron-experimental-features\": noElectronExperimentalFeaturesRule,\n \"no-electron-expose-raw-ipc-renderer\": noElectronExposeRawIpcRendererRule,\n \"no-electron-insecure-certificate-error-handler\":\n noElectronInsecureCertificateErrorHandlerRule,\n \"no-electron-insecure-certificate-verify-proc\":\n noElectronInsecureCertificateVerifyProcRule,\n \"no-electron-insecure-permission-request-handler\":\n noElectronInsecurePermissionRequestHandlerRule,\n \"no-electron-node-integration\": noElectronNodeIntegrationRule,\n \"no-electron-permission-check-handler-allow-all\":\n noElectronPermissionCheckHandlerAllowAllRule,\n \"no-electron-unchecked-ipc-sender\": noElectronUncheckedIpcSenderRule,\n \"no-electron-unrestricted-navigation\": noElectronUnrestrictedNavigationRule,\n \"no-electron-untrusted-open-external\": noElectronUntrustedOpenExternalRule,\n \"no-electron-webview-allowpopups\": noElectronWebviewAllowpopupsRule,\n \"no-electron-webview-insecure-webpreferences\":\n noElectronWebviewInsecureWebpreferencesRule,\n \"no-electron-webview-node-integration\":\n noElectronWebviewNodeIntegrationRule,\n \"no-html-method\": noHtmlMethodRule,\n \"no-http-request-to-insecure-protocol\": noHttpRequestToInsecureProtocolRule,\n \"no-iframe-srcdoc\": noIframeSrcdocRule,\n \"no-inner-html\": noInnerHtmlRule,\n \"no-insecure-random\": noInsecureRandomRule,\n \"no-insecure-tls-agent-options\": noInsecureTlsAgentOptionsRule,\n \"no-insecure-url\": noInsecureUrlRule,\n \"no-location-javascript-url\": noLocationJavascriptUrlRule,\n \"no-message-event-without-origin-check\":\n noMessageEventWithoutOriginCheckRule,\n \"no-msapp-exec-unsafe\": noMsappExecUnsafeRule,\n \"no-node-tls-check-server-identity-bypass\":\n noNodeTlsCheckServerIdentityBypassRule,\n \"no-node-tls-legacy-protocol\": noNodeTlsLegacyProtocolRule,\n \"no-node-tls-reject-unauthorized-zero\": noNodeTlsRejectUnauthorizedZeroRule,\n \"no-node-tls-security-level-zero\": noNodeTlsSecurityLevelZeroRule,\n \"no-node-vm-run-in-context\": noNodeVmRunInContextRule,\n \"no-node-vm-source-text-module\": noNodeVmSourceTextModuleRule,\n \"no-node-worker-threads-eval\": noNodeWorkerThreadsEvalRule,\n \"no-nonnull-assertion-on-security-input\":\n noNonnullAssertionOnSecurityInputRule,\n \"no-postmessage-star-origin\": noPostmessageStarOriginRule,\n \"no-postmessage-without-origin-allowlist\":\n noPostmessageWithoutOriginAllowlistRule,\n \"no-range-create-contextual-fragment\": noRangeCreateContextualFragmentRule,\n \"no-script-src-data-url\": noScriptSrcDataUrlRule,\n \"no-script-text\": noScriptTextRule,\n \"no-service-worker-unsafe-script-url\": noServiceWorkerUnsafeScriptUrlRule,\n \"no-set-html-unsafe\": noSetHtmlUnsafeRule,\n \"no-trusted-types-policy-pass-through\": noTrustedTypesPolicyPassThroughRule,\n \"no-unsafe-alloc\": noUnsafeAllocRule,\n \"no-unsafe-cast-to-trusted-types\": noUnsafeCastToTrustedTypesRule,\n \"no-window-open-without-noopener\": noWindowOpenWithoutNoopenerRule,\n \"no-winjs-html-unsafe\": noWinjsHtmlUnsafeRule,\n \"no-worker-blob-url\": noWorkerBlobUrlRule,\n \"no-worker-data-url\": noWorkerDataUrlRule,\n};\n\nexport default sdlRules;\n/* eslint-enable canonical/no-re-export -- End of intentional registry aggregation. */\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;;;2BAA6B;AAC7B,oBAA6B;AAC7B,6BAAuB;AACvB,oCAA2B;;;ACL3B;AAAA,EACI,SAAW;AAAA,EACX,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,SAAW;AAAA,EACX,aAAe;AAAA,EACf,UAAY;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA,UAAY;AAAA,EACZ,MAAQ;AAAA,IACJ,KAAO;AAAA,IACP,OAAS;AAAA,EACb;AAAA,EACA,YAAc;AAAA,IACV,MAAQ;AAAA,IACR,KAAO;AAAA,EACX;AAAA,EACA,SAAW;AAAA,EACX,QAAU;AAAA,EACV,cAAgB;AAAA,IACZ;AAAA,MACI,MAAQ;AAAA,MACR,OAAS;AAAA,MACT,KAAO;AAAA,IACX;AAAA,EACJ;AAAA,EACA,aAAe;AAAA,EACf,MAAQ;AAAA,EACR,SAAW;AAAA,IACP,KAAK;AAAA,MACD,QAAU;AAAA,QACN,OAAS;AAAA,QACT,SAAW;AAAA,MACf;AAAA,MACA,SAAW;AAAA,QACP,OAAS;AAAA,QACT,SAAW;AAAA,MACf;AAAA,MACA,SAAW;AAAA,IACf;AAAA,IACA,kBAAkB;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F,OAAO,gBAAY,YAAY,YAAY,gBAAY,QAAQ,SAAS,IAClE,gBAAY,UACZ;AAEV,IAAM,aAAwB;EAC1B,MAAM;IACF,MAAM;IACN,WAAW;IACX,SAAS;;EAEb,OAAO;;AAGX,IAAM,UAAwB;EAC1B,SAAS,oBAAoB,UAAU;EACvC,WAAW,sBAAsB,UAAU;EAC3C,QAAQ,mBAAmB,UAAU;EACrC,UAAU,qBAAqB,UAAU;EACzC,MAAM,iBAAiB,UAAU;EACjC,OAAO,kBAAkB,UAAU;EACnC,aAAa,CAAA;EACb,UAAU,CAAA;EACV,YAAY,uBAAuB,UAAU;;AAGjD,QAAQ,WAAW,qBAAqB,OAAO;AAC/C,QAAQ,cAAc,wBAAwB,OAAO;AAGrD,IAAM,YAAkC;EACpC,GAAG;EACH;EACA,OAAO;;AAGX,IAAA,iBAAe;",
4
+ "sourcesContent": ["import type { ESLint, Linter } from \"eslint\";\n\nimport typeScriptPlugin from \"@typescript-eslint/eslint-plugin\";\nimport typeScriptParser from \"@typescript-eslint/parser\";\nimport nodePlugin from \"eslint-plugin-n\";\nimport securityPlugin from \"eslint-plugin-security\";\n\nimport type { SdlConfigName } from \"./_internal/config-references.js\";\n\nimport packageJson from \"../package.json\" with { type: \"json\" };\nimport sdlRules from \"./_internal/rules-registry.js\";\n\ntype SdlConfig = Readonly<Linter.Config>;\ntype SdlConfigArray = readonly SdlConfig[];\ntype SdlConfigMap = Record<SdlConfigName, SdlConfigArray>;\ntype SdlPlugin = Readonly<ESLint.Plugin>;\ntype SdlPluginWithConfigs = ESLint.Plugin & {\n readonly configs: Readonly<Record<SdlConfigName, SdlConfigArray>>;\n};\n\nconst typeScriptEslintPlugin = typeScriptPlugin as unknown as ESLint.Plugin;\nconst nodeEslintPlugin = nodePlugin as unknown as ESLint.Plugin;\nconst securityEslintPlugin = securityPlugin as unknown as ESLint.Plugin;\n\nconst typeScriptFiles = [\"**/*.{ts,tsx,mts,cts}\"];\n\nconst createAngularConfig = (plugin: SdlPlugin): SdlConfigArray => [\n {\n plugins: {\n sdl: plugin,\n },\n rules: {\n \"sdl/no-angular-bypass-sanitizer\": \"error\",\n \"sdl/no-angular-bypass-security-trust-html\": \"error\",\n \"sdl/no-angular-innerhtml-binding\": \"error\",\n \"sdl/no-angular-sanitization-trusted-urls\": \"error\",\n },\n },\n];\n\nconst createAngularJsConfig = (plugin: SdlPlugin): SdlConfigArray => [\n {\n plugins: {\n sdl: plugin,\n },\n rules: {\n \"sdl/no-angularjs-bypass-sce\": \"error\",\n \"sdl/no-angularjs-enable-svg\": \"error\",\n \"sdl/no-angularjs-ng-bind-html-without-sanitize\": \"error\",\n \"sdl/no-angularjs-sanitization-whitelist\": \"error\",\n \"sdl/no-angularjs-sce-resource-url-wildcard\": \"error\",\n },\n },\n];\n\nconst createCommonConfig = (plugin: SdlPlugin): SdlConfigArray => [\n {\n plugins: {\n sdl: plugin,\n },\n rules: {\n \"no-caller\": \"error\",\n \"no-delete-var\": \"error\",\n \"no-eval\": \"error\",\n \"no-implied-eval\": \"error\",\n \"no-new-func\": \"error\",\n \"sdl/no-cookies\": \"error\",\n \"sdl/no-document-domain\": \"error\",\n \"sdl/no-document-execcommand-insert-html\": \"error\",\n \"sdl/no-document-parse-html-unsafe\": \"error\",\n \"sdl/no-document-write\": \"error\",\n \"sdl/no-domparser-html-without-sanitization\": \"error\",\n \"sdl/no-domparser-svg-without-sanitization\": \"error\",\n \"sdl/no-dynamic-import-unsafe-url\": \"error\",\n \"sdl/no-html-method\": \"error\",\n \"sdl/no-iframe-srcdoc\": \"error\",\n \"sdl/no-inner-html\": \"error\",\n \"sdl/no-insecure-random\": \"error\",\n \"sdl/no-insecure-url\": \"error\",\n \"sdl/no-location-javascript-url\": \"error\",\n \"sdl/no-message-event-without-origin-check\": \"error\",\n \"sdl/no-msapp-exec-unsafe\": \"error\",\n \"sdl/no-postmessage-star-origin\": \"error\",\n \"sdl/no-postmessage-without-origin-allowlist\": \"error\",\n \"sdl/no-range-create-contextual-fragment\": \"error\",\n \"sdl/no-script-src-data-url\": \"error\",\n \"sdl/no-script-text\": \"error\",\n \"sdl/no-service-worker-unsafe-script-url\": \"error\",\n \"sdl/no-set-html-unsafe\": \"error\",\n \"sdl/no-window-open-without-noopener\": \"error\",\n \"sdl/no-winjs-html-unsafe\": \"error\",\n \"sdl/no-worker-blob-url\": \"error\",\n \"sdl/no-worker-data-url\": \"error\",\n },\n },\n];\n\nconst createElectronConfig = (plugin: SdlPlugin): SdlConfigArray => [\n {\n plugins: {\n sdl: plugin,\n },\n rules: {\n \"sdl/no-electron-allow-running-insecure-content\": \"error\",\n \"sdl/no-electron-dangerous-blink-features\": \"error\",\n \"sdl/no-electron-disable-context-isolation\": \"error\",\n \"sdl/no-electron-disable-sandbox\": \"error\",\n \"sdl/no-electron-disable-web-security\": \"error\",\n \"sdl/no-electron-enable-remote-module\": \"error\",\n \"sdl/no-electron-enable-webview-tag\": \"error\",\n \"sdl/no-electron-experimental-features\": \"error\",\n \"sdl/no-electron-expose-raw-ipc-renderer\": \"error\",\n \"sdl/no-electron-insecure-certificate-error-handler\": \"error\",\n \"sdl/no-electron-insecure-certificate-verify-proc\": \"error\",\n \"sdl/no-electron-insecure-permission-request-handler\": \"error\",\n \"sdl/no-electron-node-integration\": \"error\",\n \"sdl/no-electron-permission-check-handler-allow-all\": \"error\",\n \"sdl/no-electron-unchecked-ipc-sender\": \"error\",\n \"sdl/no-electron-unrestricted-navigation\": \"error\",\n \"sdl/no-electron-untrusted-open-external\": \"error\",\n \"sdl/no-electron-webview-allowpopups\": \"error\",\n \"sdl/no-electron-webview-insecure-webpreferences\": \"error\",\n \"sdl/no-electron-webview-node-integration\": \"error\",\n },\n },\n];\n\nconst createNodeConfig = (plugin: SdlPlugin): SdlConfigArray => [\n {\n plugins: {\n n: nodeEslintPlugin,\n },\n rules: {\n \"n/no-deprecated-api\": \"error\",\n },\n },\n {\n plugins: {\n sdl: plugin,\n },\n rules: {\n \"sdl/no-child-process-exec\": \"error\",\n \"sdl/no-child-process-shell-true\": \"error\",\n \"sdl/no-http-request-to-insecure-protocol\": \"error\",\n \"sdl/no-insecure-tls-agent-options\": \"error\",\n \"sdl/no-node-tls-check-server-identity-bypass\": \"error\",\n \"sdl/no-node-tls-legacy-protocol\": \"error\",\n \"sdl/no-node-tls-reject-unauthorized-zero\": \"error\",\n \"sdl/no-node-tls-security-level-zero\": \"error\",\n \"sdl/no-node-vm-run-in-context\": \"error\",\n \"sdl/no-node-vm-source-text-module\": \"error\",\n \"sdl/no-node-worker-threads-eval\": \"error\",\n \"sdl/no-unsafe-alloc\": \"error\",\n },\n },\n];\n\nconst createReactConfig = (plugin: SdlPlugin): SdlConfigArray => [\n {\n languageOptions: {\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n },\n },\n {\n plugins: {\n sdl: plugin,\n },\n },\n];\n\nconst createTypeScriptConfig = (plugin: SdlPlugin): SdlConfigArray => [\n {\n languageOptions: {\n parserOptions: {\n ecmaVersion: \"latest\",\n sourceType: \"module\",\n },\n },\n },\n {\n files: [...typeScriptFiles],\n languageOptions: {\n parser: typeScriptParser,\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n ecmaVersion: \"latest\",\n sourceType: \"module\",\n },\n },\n plugins: {\n \"@typescript-eslint\": typeScriptEslintPlugin,\n sdl: plugin,\n },\n rules: {\n \"@typescript-eslint/no-implied-eval\": \"error\",\n \"no-implied-eval\": \"off\",\n \"sdl/no-nonnull-assertion-on-security-input\": \"error\",\n \"sdl/no-trusted-types-policy-pass-through\": \"error\",\n \"sdl/no-unsafe-cast-to-trusted-types\": \"error\",\n },\n },\n];\n\nconst createRequiredConfig = (\n configs: Readonly<SdlConfigMap>\n): SdlConfigArray => [\n ...configs.angular,\n ...configs.angularjs,\n ...configs.common,\n ...configs.electron,\n ...configs.node,\n ...configs.react,\n];\n\nconst createRecommendedConfig = (\n configs: Readonly<SdlConfigMap>\n): SdlConfigArray => [\n ...configs.required,\n ...configs.typescript,\n {\n plugins: {\n security: securityEslintPlugin,\n },\n },\n];\n\nconst packageJsonVersion =\n typeof packageJson.version === \"string\" && packageJson.version.length > 0\n ? packageJson.version\n : \"0.0.0\";\n\nconst pluginCore: SdlPlugin = {\n meta: {\n name: \"eslint-plugin-sdl-2\",\n namespace: \"sdl\",\n version: packageJsonVersion,\n },\n rules: sdlRules as unknown as NonNullable<ESLint.Plugin[\"rules\"]>,\n};\n\nconst configs: SdlConfigMap = {\n angular: createAngularConfig(pluginCore),\n angularjs: createAngularJsConfig(pluginCore),\n common: createCommonConfig(pluginCore),\n electron: createElectronConfig(pluginCore),\n node: createNodeConfig(pluginCore),\n react: createReactConfig(pluginCore),\n recommended: [],\n required: [],\n typescript: createTypeScriptConfig(pluginCore),\n};\n\nconfigs.required = createRequiredConfig(configs);\nconfigs.recommended = createRecommendedConfig(configs);\n\n/** ESLint plugin entrypoint with SDL rule set and flat-config presets. */\nconst sdlPlugin: SdlPluginWithConfigs = {\n ...pluginCore,\n configs,\n rules: sdlRules as unknown as NonNullable<ESLint.Plugin[\"rules\"]>,\n};\n\nexport default sdlPlugin;\n", "{\n \"$schema\": \"https://www.schemastore.org/package.json\",\n \"name\": \"eslint-plugin-sdl-2\",\n \"version\": \"1.2.1\",\n \"private\": false,\n \"description\": \"ESLint plugin providing SDL-focused security and platform hardening rules.\",\n \"keywords\": [\n \"eslint\",\n \"eslint-plugin\",\n \"eslintplugin\",\n \"sdl\",\n \"security\",\n \"angular\",\n \"angularjs\",\n \"electron\",\n \"node\",\n \"typescript\"\n ],\n \"homepage\": \"https://github.com/Nick2bad4u/eslint-plugin-SDL-2\",\n \"bugs\": {\n \"url\": \"https://github.com/Nick2bad4u/eslint-plugin-SDL-2/issues\",\n \"email\": \"20943337+Nick2bad4u@users.noreply.github.com\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/Nick2bad4u/eslint-plugin-SDL-2.git\"\n },\n \"license\": \"MIT\",\n \"author\": \"Nick2bad4u <20943337+Nick2bad4u@users.noreply.github.com> (https://nick2bad4u.github.io/eslint-plugin-SDL-2)\",\n \"contributors\": [\n {\n \"name\": \"Nick2bad4u\",\n \"email\": \"20943337+Nick2bad4u@users.noreply.github.com\",\n \"url\": \"https://nick2bad4u.github.io/eslint-plugin-SDL-2\"\n }\n ],\n \"sideEffects\": false,\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/plugin.d.ts\",\n \"default\": \"./dist/plugin.js\"\n },\n \"require\": {\n \"types\": \"./dist/plugin.d.cts\",\n \"default\": \"./dist/plugin.cjs\"\n },\n \"default\": \"./dist/plugin.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"main\": \"./dist/plugin.cjs\",\n \"types\": \"./dist/plugin.d.ts\",\n \"files\": [\n \"dist\",\n \"docs/rules/**\",\n \"CHANGELOG.md\"\n ],\n \"workspaces\": [\n \"docs/docusaurus\"\n ],\n \"scripts\": {\n \"prebench\": \"npm run build\",\n \"bench\": \"node benchmarks/run-eslint-stats.mjs\",\n \"prebench:compare\": \"npm run build\",\n \"bench:compare\": \"node benchmarks/run-eslint-stats.mjs --iterations=6 --warmup=2 --compare=coverage/benchmarks/eslint-stats.json\",\n \"prebench:eslint:stats\": \"npm run build\",\n \"bench:eslint:stats\": \"node benchmarks/run-eslint-stats.mjs\",\n \"prebench:eslint:timing\": \"npm run build\",\n \"bench:eslint:timing\": \"cross-env TIMING=all eslint --config benchmarks/eslint-timing.config.mjs --stats \\\"test/fixtures/ts/compat-no-insecure-*.invalid.ts\\\"\",\n \"prebench:rule-benchmark\": \"npm run build\",\n \"bench:rule-benchmark\": \"eslint-rule-benchmark run\",\n \"prebench:ui\": \"npm run build\",\n \"bench:ui\": \"vitest bench --ui\",\n \"prebench:watch\": \"npm run build\",\n \"bench:watch\": \"vitest bench\",\n \"build\": \"tsc -p tsconfig.build.json && npm run build:types:cjs && npm run build:cjs\",\n \"build:cjs\": \"esbuild dist/plugin.js --bundle --format=cjs --platform=node --packages=external --sourcemap --outfile=dist/plugin.cjs --footer:js=\\\"module.exports = module.exports.default;\\\"\",\n \"build:clean\": \"node -e \\\"require('node:fs').rmSync('dist',{recursive:true,force:true})\\\"\",\n \"build:eslint-inspector\": \"npx -y @eslint/config-inspector@1.4.2 build --outDir \\\"docs/docusaurus/static/eslint-inspector\\\" --base \\\"/eslint-plugin-SDL-2/eslint-inspector/\\\"\",\n \"build:eslint-inspector:local\": \"npx @eslint/config-inspector\",\n \"build:stylelint-inspector\": \"npx -y stylelint-config-inspector@latest build --outDir \\\"docs/docusaurus/static/stylelint-inspector\\\" --base \\\"/eslint-plugin-SDL-2/stylelint-inspector/\\\"\",\n \"build:stylelint-inspector:local\": \"npx stylelint-config-inspector@latest\",\n \"build:types:cjs\": \"node -e \\\"require('node:fs').copyFileSync('dist/plugin.d.ts','dist/plugin.d.cts')\\\"\",\n \"changelog:generate\": \"git-cliff --config cliff.toml --output CHANGELOG.md\",\n \"changelog:preview\": \"git-cliff --config cliff.toml --unreleased\",\n \"changelog:release-notes\": \"git-cliff --config cliff.toml --latest --strip all\",\n \"clean:cache\": \"rimraf dist coverage cache .cache .vite .turbo\",\n \"clean:cache:coverage\": \"rimraf coverage .coverage\",\n \"clean:cache:dist\": \"rimraf dist release\",\n \"clean:cache:eslint\": \"rimraf .cache/.eslintcache\",\n \"clean:cache:ncu\": \"rimraf .cache/.ncu-cache.json\",\n \"clean:cache:prettier\": \"rimraf .cache/.prettier-cache .prettier-cache .prettiercache\",\n \"clean:cache:stryker\": \"rimraf .stryker-tmp\",\n \"clean:cache:stylelint\": \"rimraf .cache/stylelintcache stylelintcache .stylelintcache\",\n \"clean:cache:temp\": \"rimraf \\\".temp/.**\\\" --glob\",\n \"clean:cache:typescript\": \"rimraf .cache/**.tsbuildinfo .cache/builds\",\n \"clean:cache:vite\": \"rimraf .cache/vite .cache/vitest .cache/vitest-zero-coverage .cache/vite-zero-coverage\",\n \"clean:database\": \"rimraf %appdata%/uptime-watcher/uptime-watcher.sqlite\",\n \"clean:docs\": \"rimraf docs/docusaurus/.docusaurus/** docs/docusaurus/build/** docs/docusaurus/site-docs/developer/api/**\",\n \"clean:docusaurus\": \"npm run clean:docs && npm run --workspace docs/docusaurus clear\",\n \"cognitive-complexity\": \"cognitive-complexity-ts --threshold 10\",\n \"commit\": \"git-cz\",\n \"contrib\": \"all-contributors\",\n \"contrib:add\": \"all-contributors add\",\n \"contrib:check\": \"all-contributors check\",\n \"contrib:compare\": \"npm run contrib:check\",\n \"contrib:generate\": \"all-contributors generate\",\n \"coverage\": \"vitest run --coverage\",\n \"docs:api\": \"npm run --workspace docs/docusaurus docs:api\",\n \"docs:build\": \"npm run --workspace docs/docusaurus build\",\n \"docs:build:local\": \"npm run --workspace docs/docusaurus build:local\",\n \"docs:check-links\": \"npm run docs:api && node ./scripts/check-doc-links.mjs\",\n \"docs:serve\": \"npm run --workspace docs/docusaurus serve\",\n \"docs:start\": \"npm run --workspace docs/docusaurus start\",\n \"docs:toc\": \"remark docs --use remark-toc --output\",\n \"docs:typecheck\": \"npm run --workspace docs/docusaurus typecheck\",\n \"docs:typedoc\": \"npm run --workspace docs/docusaurus docs:api\",\n \"docs:validate-links\": \"remark docs --use remark-validate-links --frail\",\n \"knip\": \"cross-env NODE_OPTIONS=--max_old_space_size=4096 NODE_NO_WARNINGS=1 npx knip -c knip.config.ts --include-libs --cache --cache-location .cache/knip --tsConfig tsconfig.json\",\n \"lint\": \"cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache\",\n \"lint:action\": \"npm run lint:actions\",\n \"lint:actions\": \"node scripts/lint-actionlint.mjs\",\n \"lint:all\": \"npm run lint && npm run lint:css && npm run lint:prettier && npm run lint:remark && npm run lint:package && npm run lint:secretlint && npm run lint:yaml && npm run lint:actions && npm run lint:circular\",\n \"lint:all:fix\": \"npm run lint:fix && npm run lint:css:fix && npm run lint:prettier:fix && npm run lint:remark && npm run lint:package && npm run lint:secretlint && npm run lint:yaml:fix && npm run lint:actions && npm run lint:circular\",\n \"lint:all:fix:quiet\": \"npm run lint:fix:quiet && npm run lint:css:fix && npm run lint:prettier:fix && npm run lint:remark && npm run lint:package && npm run lint:secretlint && npm run lint:yaml:fix && npm run lint:actions && npm run lint:circular\",\n \"lint:circular\": \"npm run madge:circular\",\n \"lint:compat:eslint9\": \"node scripts/eslint9-compat-smoke.mjs\",\n \"lint:config:build\": \"npm run build:eslint-inspector\",\n \"lint:config:inspect\": \"npx eslint --inspect-config\",\n \"lint:css\": \"stylelint --cache --config stylelint.config.mjs --cache-strategy content --cache-location .cache/stylelintcache --ignore-pattern \\\"docs/docusaurus/static/stylelint-inspector/**\\\" --ignore-pattern \\\"docs/docusaurus/static/eslint-inspector/**\\\" src/ docs/ --custom-formatter stylelint-formatter-pretty && echo \\\"Stylelint done!\\\"\",\n \"lint:css:fix\": \"stylelint --cache --config stylelint.config.mjs --cache-strategy content --cache-location .cache/stylelintcache --ignore-pattern \\\"docs/docusaurus/static/stylelint-inspector/**\\\" --ignore-pattern \\\"docs/docusaurus/static/eslint-inspector/**\\\" src/ docs/ --custom-formatter stylelint-formatter-pretty --fix && echo \\\"Stylelint done!\\\"\",\n \"lint:depcheck\": \"depcheck\",\n \"lint:deps\": \"depcheck && npm run knip\",\n \"lint:dupes\": \"jscpd src/ --config jscpd.json\",\n \"lint:dupes:all\": \"jscpd src/ --config jscpd.json --min-lines 3\",\n \"lint:dupes:skiplocal\": \"jscpd src/ --skipLocal --config jscpd.json\",\n \"lint:dupes:skiplocal:all\": \"jscpd src/ --skipLocal --config jscpd.json --min-lines 3\",\n \"lint:duplicates\": \"npm run lint:dupes\",\n \"lint:exports\": \"ts-unused-exports tsconfig.json src/plugin.ts --excludePathsFromReport=plugin.ts\",\n \"lint:fix\": \"cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache --fix\",\n \"lint:fix:quiet\": \"cross-env ESLINT_PROGRESS=off NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache --fix && echo \\\"Eslint fix done!\\\"\",\n \"lint:grype\": \"grype . -c .grype.yaml --name eslint-plugin-sdl-2\",\n \"lint:knip\": \"npm run knip\",\n \"lint:knip:exports\": \"npm run knip -- --include exports,nsExports,classMembers,types,nsTypes,enumMembers,duplicates\",\n \"lint:knip:unused:exports\": \"npm run knip -- --dependencies --exports\",\n \"lint:leaves\": \"npm run madge:leaves\",\n \"lint:metrics\": \"npm run sloc\",\n \"lint:node-version-files\": \"node scripts/sync-node-version-files.mjs --check\",\n \"lint:orphans\": \"npm run madge:orphans\",\n \"lint:package\": \"npm run lint:node-version-files && npm run lint:package-sort && npm run lint:packagelintrc && echo \\\"Package.json lint done!\\\"\",\n \"lint:package:strict\": \"npm run lint:node-version-files && npm run lint:package-sort && npm run lint:package-check && npm run lint:packagelintrc && echo \\\"Package.json lint done!\\\"\",\n \"lint:package-check\": \"publint && attw --pack .\",\n \"lint:package-check:strict\": \"publint && attw --pack . --profile strict\",\n \"lint:package-sort\": \"sort-package-json \\\"./package.json\\\" \\\"./docs/docusaurus/package.json\\\"\",\n \"lint:package-sort-check\": \"sort-package-json --check \\\"./package.json\\\" \\\"./docs/docusaurus/package.json\\\"\",\n \"lint:packagelintrc\": \"npmPkgJsonLint . --config .npmpackagejsonlintrc.json\",\n \"lint:prettier\": \"prettier . --log-level warn --cache --cache-location=.cache/.prettier-cache --cache-strategy=content --check\",\n \"lint:prettier:fix\": \"prettier . --log-level warn --cache --cache-location=.cache/.prettier-cache --cache-strategy=content --write\",\n \"lint:publint\": \"publint\",\n \"lint:quiet\": \"cross-env ESLINT_PROGRESS=nofile NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache && echo \\\"Eslint done!\\\"\",\n \"lint:remark\": \"remark --rc-path .remarkrc.mjs --silently-ignore --ignore-path .remarkignore --frail \\\"*.{md,mdx}\\\" \\\"docs/**/*.{md,mdx}\\\" --quiet\",\n \"lint:remark:fix\": \"prettier --log-level warn --ignore-path prettierignore.remark --cache --cache-location=.cache/.prettier-cache --cache-strategy=content --no-error-on-unmatched-pattern --write \\\"*.{md,mdx}\\\" \\\"docs/**/*.{md,mdx}\\\" && npm run remark:fix\",\n \"lint:secretlint\": \"secretlint --secretlintrc .secretlintrc.cjs --secretlintignore .secretlintignore \\\"./*\\\" \\\".vscode/**\\\" \\\"assets/**\\\" \\\"src/**\\\" \\\"electron/**\\\" \\\"shared/**\\\" \\\"config/**\\\" \\\"scripts/**\\\" \\\"playwright/**\\\" \\\"storybook/**\\\" \\\".storybook\\\" \\\"tests/**\\\" \\\"benchmarks/**\\\" \\\".devin/**\\\" \\\"public/**\\\" \\\".github/**\\\" \\\"docs/Architecture/**\\\" \\\"docs/*\\\" \\\"docs/assets/**\\\" \\\"docs/Guides/**\\\" \\\"docs/Testing/**\\\" \\\"docs/TSDoc/**\\\" \\\"docs/docusaurus/src/**\\\" \\\"docs/docusaurus/static/**\\\" \\\"docs/docusaurus/blog/**\\\" \\\"docs/docusaurus/docs/**\\\" \\\"docs/docusaurus/docs/*\\\"\",\n \"lint:secrets\": \"detect-secrets scan\",\n \"lint:unused\": \"npm run knip -- --include unlisted,unresolved,duplicates\",\n \"lint:unused-deps\": \"depcheck --ignores='@types/*,@testing-library/*,@vitest/*'\",\n \"lint:yaml\": \"cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache \\\"**/*.{yml,yaml}\\\" && echo \\\"YAML lint done!\\\"\",\n \"lint:yaml:fix\": \"cross-env NODE_OPTIONS=--max_old_space_size=16384 eslint --cache --cache-strategy content --cache-location .cache/.eslintcache --fix \\\"**/*.{yml,yaml}\\\" && echo \\\"YAML lint (fix) done!\\\"\",\n \"madge:circular\": \"madge --circular --no-spinner --ts-config tsconfig.json --extensions ts,tsx,js,jsx,mjs,cjs,cts,mts ./src --exclude \\\"(^|[\\\\/])(test|dist|node_modules|cache|.cache|coverage|build|eslint-inspector|temp|.docusaurus)($|[\\\\/])|\\\\.css$\\\"\",\n \"madge:leaves\": \"madge --leaves --no-spinner --ts-config tsconfig.json --extensions ts,tsx,js,jsx,mjs,cjs,cts,mts ./src --exclude \\\"(^|[\\\\/])(test|dist|node_modules|cache|.cache|coverage|build|eslint-inspector|temp|.docusaurus)($|[\\\\/])|\\\\.css$\\\"\",\n \"madge:orphans\": \"madge --orphans --no-spinner --ts-config tsconfig.json --extensions ts,tsx,js,jsx,mjs,cjs,cts,mts ./src --exclude \\\"(^|[\\\\/])(test|dist|node_modules|cache|.cache|coverage|build|eslint-inspector|temp|.docusaurus)($|[\\\\/])|\\\\.css$\\\"\",\n \"open:coverage\": \"open-cli coverage/index.html\",\n \"prepublishOnly\": \"npm run release:check\",\n \"release:check\": \"npm run release:verify\",\n \"release:verify\": \"npm run build && npm run lint && npm run typecheck && npm run test && npm run sync:readme-rules-table && npm run sync:presets-rules-matrix && npm run docs:check-links && npm pack --dry-run\",\n \"remark:fix\": \"remark --rc-path .remarkrc.mjs --silently-ignore --ignore-path .remarkignore --frail --quiet --output -- \\\"*.{md,mdx}\\\" \\\"docs/**/*.{md,mdx}\\\"\",\n \"remark:test-config\": \"remark --rc-path .remarkrc.mjs --silently-ignore --ignore-path .remarkignore --frail \\\"README.md\\\"\",\n \"sync:node-version-files\": \"node scripts/sync-node-version-files.mjs\",\n \"sync:peer-eslint-range\": \"node scripts/sync-peer-eslint-range.mjs\",\n \"sync:presets-rules-matrix\": \"node scripts/sync-presets-rules-matrix.mjs\",\n \"sync:readme-rules-table\": \"node scripts/sync-readme-rules-table.mjs\",\n \"sync:readme-rules-table:update\": \"npm run build && npm run sync:readme-rules-table:write\",\n \"sync:readme-rules-table:write\": \"node scripts/sync-readme-rules-table.mjs --write\",\n \"sync:rules:check\": \"npm run sync:readme-rules-table && npm run sync:presets-rules-matrix\",\n \"sync:rules:write\": \"npm run sync:readme-rules-table:write && npm run sync:presets-rules-matrix\",\n \"pretest\": \"npm run build\",\n \"test\": \"vitest run\",\n \"test:autofix:fixtures\": \"cross-env SDL_AUTOFIX_SMOKE=1 vitest run test/rules-sdl.test.ts\",\n \"test:autofix:fixtures:typed\": \"cross-env SDL_AUTOFIX_SMOKE=1 SDL_AUTOFIX_FIXTURE_DIR=test/fixtures/ts vitest run test/rules-sdl.test.ts\",\n \"test:ci\": \"cross-env CI=true vitest run --reporter=default\",\n \"test:coverage\": \"vitest run --coverage --reporter=default\",\n \"test:coverage:detailed\": \"vitest run --coverage --reporter=verbose\",\n \"test:coverage:minimal\": \"vitest run --coverage --reporter=dot\",\n \"test:coverage:open\": \"npm run test:coverage && npm run open:coverage\",\n \"test:coverage:quiet\": \"vitest run --coverage --reporter=default --silent\",\n \"test:coverage:verbose\": \"vitest run --coverage --reporter=verbose\",\n \"test:detailed\": \"vitest run --reporter=verbose\",\n \"test:minimal\": \"vitest run --reporter=dot\",\n \"test:open\": \"npm run test:coverage && npm run open:coverage\",\n \"test:quiet\": \"vitest run --reporter=default --silent\",\n \"test:serial\": \"cross-env MAX_THREADS=1 vitest run\",\n \"test:stryker\": \"stryker run --ignoreStatic --concurrency 12 --incrementalFile .cache/stryker/incremental-fast.json\",\n \"test:stryker:ci\": \"cross-env CI=true stryker run --ignoreStatic --concurrency 2 --incrementalFile .cache/stryker/incremental-fast-ci.json\",\n \"test:stryker:full\": \"stryker run --concurrency 12 --incrementalFile .cache/stryker/incremental-full.json\",\n \"test:stryker:full:ci\": \"cross-env CI=true stryker run --concurrency 2 --incrementalFile .cache/stryker/incremental-full-ci.json\",\n \"test:verbose\": \"vitest run --reporter=verbose\",\n \"test:watch\": \"vitest\",\n \"typecheck\": \"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.build.json --noEmit && tsc -p tsconfig.eslint.json --noEmit && tsc -p tsconfig.js.json --noEmit && npm run --workspace docs/docusaurus typecheck\",\n \"typecheck:all\": \"npm run typecheck\",\n \"types:update\": \"typesync\",\n \"update-deps\": \"npx ncu -i --install never && npm update --workspaces --force && npm install --force && npm run sync:peer-eslint-range && npm run sync:node-version-files && npm run sync:rules:write\",\n \"verify:readme-rules-table\": \"npm run build && npm run sync:readme-rules-table\"\n },\n \"overrides\": {\n \"jsonc-eslint-parser\": \"$jsonc-eslint-parser\"\n },\n \"dependencies\": {\n \"@types/eslint-plugin-security\": \"^3.0.1\",\n \"@typescript-eslint/eslint-plugin\": \"^8.59.1\",\n \"@typescript-eslint/parser\": \"^8.59.1\",\n \"@typescript-eslint/type-utils\": \"^8.59.1\",\n \"@typescript-eslint/utils\": \"^8.59.1\",\n \"eslint-plugin-n\": \"^17.24.0\",\n \"ts-extras\": \"^1.0.0\",\n \"type-fest\": \"^5.6.0\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"^0.18.2\",\n \"@csstools/stylelint-formatter-github\": \"^2.0.0\",\n \"@double-great/remark-lint-alt-text\": \"^1.1.1\",\n \"@eslint/compat\": \"^2.0.5\",\n \"@eslint/config-inspector\": \"^2.0.0\",\n \"@microsoft/tsdoc-config\": \"^0.18.1\",\n \"@stryker-ignorer/console-all\": \"^0.3.2\",\n \"@stryker-mutator/core\": \"^9.6.1\",\n \"@stryker-mutator/typescript-checker\": \"^9.6.1\",\n \"@stryker-mutator/vitest-runner\": \"^9.6.1\",\n \"@types/htmlhint\": \"^1.1.5\",\n \"@types/madge\": \"^5.0.3\",\n \"@types/node\": \"^25.6.0\",\n \"@types/postcss-clamp\": \"^4.1.3\",\n \"@types/postcss-flexbugs-fixes\": \"^5.0.3\",\n \"@types/postcss-html\": \"^1.5.3\",\n \"@types/postcss-import\": \"^14.0.3\",\n \"@types/postcss-inline-svg\": \"^5.0.4\",\n \"@types/postcss-normalize\": \"^9.0.4\",\n \"@types/postcss-reporter\": \"^7.0.5\",\n \"@types/sloc\": \"^0.2.3\",\n \"@typescript-eslint/rule-tester\": \"^8.59.1\",\n \"@vitest/coverage-v8\": \"^4.1.5\",\n \"@vitest/ui\": \"^4.1.5\",\n \"actionlint\": \"^2.0.6\",\n \"all-contributors-cli\": \"^6.26.1\",\n \"cognitive-complexity-ts\": \"^0.8.1\",\n \"commitlint\": \"^20.5.3\",\n \"commitlint-config-gitmoji\": \"^2.3.1\",\n \"cross-env\": \"^10.1.0\",\n \"depcheck\": \"^1.4.7\",\n \"detect-secrets\": \"^1.0.6\",\n \"eslint\": \"^10.3.0\",\n \"eslint-config-nick2bad4u\": \"^1.0.11\",\n \"eslint-formatter-unix\": \"^9.0.1\",\n \"eslint-rule-benchmark\": \"^0.8.0\",\n \"fast-check\": \"^4.7.0\",\n \"git-cliff\": \"^2.13.1\",\n \"gitleaks-secret-scanner\": \"^2.1.1\",\n \"htmlhint\": \"^1.9.2\",\n \"jscpd\": \"^4.0.9\",\n \"knip\": \"^6.11.0\",\n \"leasot\": \"^14.4.0\",\n \"madge\": \"^8.0.0\",\n \"markdown-link-check\": \"^3.14.2\",\n \"npm-check-updates\": \"^22.1.0\",\n \"npm-package-json-lint\": \"^10.4.0\",\n \"picocolors\": \"^1.1.1\",\n \"postcss\": \"^8.5.13\",\n \"postcss-assets\": \"^6.0.0\",\n \"postcss-clamp\": \"^4.1.0\",\n \"postcss-combine-duplicated-selectors\": \"^10.0.3\",\n \"postcss-flexbugs-fixes\": \"^5.0.2\",\n \"postcss-import\": \"^16.1.1\",\n \"postcss-inline-svg\": \"^6.0.0\",\n \"postcss-logical\": \"^9.0.0\",\n \"postcss-normalize\": \"^13.0.1\",\n \"postcss-reporter\": \"^7.1.0\",\n \"postcss-round-subpixels\": \"^2.0.0\",\n \"postcss-sort-media-queries\": \"^6.5.0\",\n \"postcss-viewport-height-correction\": \"^1.1.1\",\n \"prettier\": \"^3.8.3\",\n \"prettier-config-nick2bad4u\": \"^1.0.9\",\n \"publint\": \"^0.3.18\",\n \"rehype-katex\": \"^7.0.1\",\n \"remark\": \"^15.0.1\",\n \"remark-cli\": \"^12.0.1\",\n \"remark-config-nick2bad4u\": \"^1.0.1\",\n \"rimraf\": \"^6.1.3\",\n \"secretlint\": \"^12.3.1\",\n \"secretlint-config-nick2bad4u\": \"^1.0.3\",\n \"sloc\": \"^0.3.2\",\n \"sort-package-json\": \"^3.6.1\",\n \"stylelint\": \"^17.10.0\",\n \"stylelint-config-nick2bad4u\": \"^1.0.5\",\n \"ts-unused-exports\": \"^11.0.1\",\n \"typedoc\": \"^0.28.19\",\n \"typescript\": \"^6.0.3\",\n \"typescript-eslint\": \"^8.59.1\",\n \"typesync\": \"^0.14.3\",\n \"vfile\": \"^6.0.3\",\n \"vite\": \"^8.0.10\",\n \"vite-tsconfig-paths\": \"^6.1.1\",\n \"vitest\": \"^4.1.5\",\n \"yamllint-js\": \"^0.2.4\"\n },\n \"peerDependencies\": {\n \"eslint\": \"^9.0.0 || ^10.3.0\",\n \"typescript\": \">=5.0.0\"\n },\n \"packageManager\": \"npm@11.13.0\",\n \"engines\": {\n \"node\": \">=20.19.0\"\n },\n \"devEngines\": {\n \"runtime\": {\n \"name\": \"node\",\n \"version\": \">=20.19.0\",\n \"onFail\": \"error\"\n },\n \"packageManager\": {\n \"name\": \"npm\",\n \"version\": \">=11.0.0\",\n \"onFail\": \"error\"\n }\n },\n \"publishConfig\": {\n \"provenance\": true,\n \"registry\": \"https://registry.npmjs.org/\"\n },\n \"readme\": \"README.md\"\n}\n", "import type { TSESLint } from \"@typescript-eslint/utils\";\n\nimport { ESLintUtils } from \"@typescript-eslint/utils\";\n\ntype SdlRuleDocs = TSESLint.RuleMetaDataDocs & {\n recommended: boolean;\n};\n\nconst docsBaseUrl =\n \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules\";\n\n/** Shared SDL rule helper that injects canonical docs URLs. */\nexport const createRule: ReturnType<\n typeof ESLintUtils.RuleCreator<SdlRuleDocs>\n> = ESLintUtils.RuleCreator<SdlRuleDocs>((name) => `${docsBaseUrl}/${name}`);\n", "import { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"noBypass\">({\n create(context) {\n return {\n \"CallExpression[arguments.length>0][callee.property.name=/^bypassSecurityTrust(?:html|resourceurl|script|style|url)$/i]\"(\n node\n ) {\n context.report({\n messageId: \"noBypass\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow bypassing Angular DomSanitizer trust APIs such as bypassSecurityTrustHtml.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-bypass-sanitizer\",\n },\n messages: {\n noBypass: \"Do not bypass Angular's built-in sanitizer.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angular-bypass-sanitizer\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n getMemberPropertyName(node.callee) !==\n \"bypassSecurityTrustHtml\"\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Angular bypassSecurityTrustHtml usage in application code.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-bypass-security-trust-html\",\n },\n messages: {\n default:\n \"Avoid bypassSecurityTrustHtml; use validated/sanitized HTML flows instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angular-bypass-security-trust-html\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst hasInnerHtmlBindingPattern = (text: string): boolean =>\n /\\[\\s*innerhtml\\s*\\]\\s*=/iu.test(text);\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n Literal(node: TSESTree.Literal) {\n if (typeof node.value !== \"string\") {\n return;\n }\n\n if (!hasInnerHtmlBindingPattern(node.value)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n TemplateLiteral(node: TSESTree.TemplateLiteral) {\n if (node.expressions.length > 0) {\n return;\n }\n\n const templateValue = arrayFirst(node.quasis)?.value.cooked;\n\n if (typeof templateValue !== \"string\") {\n return;\n }\n\n if (!hasInnerHtmlBindingPattern(templateValue)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Angular [innerHTML] template bindings without a reviewed sanitization/trusted-types strategy.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-innerhtml-binding\",\n },\n messages: {\n default:\n \"Avoid raw [innerHTML] bindings unless input is strictly sanitized by a reviewed policy.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angular-innerhtml-binding\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<\n [],\n \"noSanitizationTrustedUrls\"\n>({\n create(context) {\n return {\n \"CallExpression[arguments.length>0][callee.object.name='$compileProvider'][callee.property.name=/^(?:aHref|imgSrc)SanitizationTrustedUrlList$/]\"(\n node\n ) {\n context.report({\n messageId: \"noSanitizationTrustedUrls\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow AngularJS trusted URL list mutations via $compileProvider.*SanitizationTrustedUrlList.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-sanitization-trusted-urls\",\n },\n messages: {\n noSanitizationTrustedUrls:\n \"Do not modify AngularJS sanitization trusted URL lists.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angular-sanitization-trusted-urls\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst, arrayIncludes } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\nconst isEmptyLiteral = (argument: TSESTree.Node | undefined): boolean =>\n argument?.type === \"Literal\" && argument.value === \"\";\n\nconst isSceProviderEnabledSafeLiteral = (\n argument: TSESTree.Node | undefined\n): boolean =>\n argument?.type === \"Literal\" &&\n arrayIncludes(\n [\n 1,\n \"1\",\n true,\n \"true\",\n ],\n argument.value\n );\n\nconst isBypassSceMethod = (methodName: string): boolean =>\n arrayIncludes(\n [\n \"trustAs\",\n \"trustAsCss\",\n \"trustAsHtml\",\n \"trustAsJs\",\n \"trustAsResourceUrl\",\n \"trustAsUrl\",\n ],\n methodName\n );\n\n/** Rule implementation for no-angularjs-bypass-sce. */\nexport const noAngularjsBypassSceRule: ReturnType<typeof createRule> =\n createRule<[], \"doNotBypass\">({\n create(context): TSESLint.RuleListener {\n const report = (node: TSESTree.CallExpression): void => {\n context.report({\n messageId: \"doNotBypass\",\n node,\n });\n };\n\n return {\n \"CallExpression[callee.type='MemberExpression'][callee.object.type='Identifier'][callee.object.name='$sce'][callee.property.type='Identifier']\"(\n node: TSESTree.CallExpression\n ) {\n if (\n node.callee.type !== \"MemberExpression\" ||\n node.callee.property.type !== \"Identifier\"\n ) {\n return;\n }\n\n if (!isBypassSceMethod(node.callee.property.name)) {\n return;\n }\n\n const firstArgument = arrayFirst(node.arguments);\n\n if (\n node.arguments.length === 1 &&\n isEmptyLiteral(firstArgument)\n ) {\n return;\n }\n\n report(node);\n },\n \"CallExpression[callee.type='MemberExpression'][callee.object.type='Identifier'][callee.object.name='$sceProvider'][callee.property.type='Identifier'][callee.property.name='enabled']\"(\n node: TSESTree.CallExpression\n ) {\n const firstArgument = arrayFirst(node.arguments);\n\n if (isSceProviderEnabledSafeLiteral(firstArgument)) {\n return;\n }\n\n report(node);\n },\n \"CallExpression[callee.type='MemberExpression'][callee.property.type='Identifier'][callee.property.name='trustAs']\"(\n node: TSESTree.CallExpression\n ) {\n const firstArgument = arrayFirst(node.arguments);\n\n if (\n node.arguments.length === 1 &&\n isEmptyLiteral(firstArgument)\n ) {\n return;\n }\n\n report(node);\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow AngularJS SCE bypass APIs that trust unvalidated values.\",\n frozen: false,\n recommended: false,\n url: \"https://github.com/Nick2bad4u/eslint-plugin-SDL-2/blob/main/docs/rules/no-angularjs-bypass-sce.md\",\n },\n messages: {\n doNotBypass:\n \"Do not bypass AngularJS SCE with untrusted values. Validate and sanitize content before marking it trusted.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angularjs-bypass-sce\",\n });\n\nexport default noAngularjsBypassSceRule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayIncludes } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\nconst isExplicitlyDisabledSvgLiteral = (\n argument: TSESTree.Node | undefined\n): boolean =>\n argument?.type === \"Literal\" &&\n arrayIncludes(\n [\n 0,\n \"0\",\n false,\n \"false\",\n ],\n argument.value\n );\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"doNotEnableSVG\">({\n create(context) {\n return {\n \"CallExpression[callee.object.name='$sanitizeProvider'][callee.property.name='enableSvg']\"(\n node: TSESTree.CallExpression\n ) {\n if (node.arguments.length !== 1) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (isExplicitlyDisabledSvgLiteral(firstArgument)) {\n return;\n }\n\n context.report({\n messageId: \"doNotEnableSVG\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling AngularJS sanitizer SVG support via $sanitizeProvider.enableSvg(true).\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-enable-svg\",\n },\n messages: {\n doNotEnableSVG: \"Do not enable SVG support in AngularJS sanitizer.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angularjs-enable-svg\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst hasNgBindHtmlPattern = (text: string): boolean =>\n /\\bng-bind-html\\b/iu.test(text);\n\nconst hasKnownSanitizePattern = (text: string): boolean =>\n /\\b(?:ngsanitize|\\$sanitize|sanitize)\\b/iu.test(text);\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n Literal(node: TSESTree.Literal) {\n if (typeof node.value !== \"string\") {\n return;\n }\n\n if (!hasNgBindHtmlPattern(node.value)) {\n return;\n }\n\n if (hasKnownSanitizePattern(node.value)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n TemplateLiteral(node: TSESTree.TemplateLiteral) {\n if (node.expressions.length > 0) {\n return;\n }\n\n const templateValue = arrayFirst(node.quasis)?.value.cooked;\n\n if (typeof templateValue !== \"string\") {\n return;\n }\n\n if (!hasNgBindHtmlPattern(templateValue)) {\n return;\n }\n\n if (hasKnownSanitizePattern(templateValue)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow AngularJS ng-bind-html usage without explicit sanitization context.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-ng-bind-html-without-sanitize\",\n },\n messages: {\n default:\n \"Avoid ng-bind-html unless sanitization is explicitly configured and enforced.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angularjs-ng-bind-html-without-sanitize\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<\n [],\n \"noSanitizationWhitelist\"\n>({\n create(context) {\n return {\n \"CallExpression[arguments.length>0][callee.object.name='$compileProvider'][callee.property.name=/^(?:aHref|imgSrc)SanitizationWhitelist$/]\"(\n node\n ) {\n context.report({\n messageId: \"noSanitizationWhitelist\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow AngularJS sanitizer whitelist mutations via $compileProvider.*SanitizationWhitelist.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-sanitization-whitelist\",\n },\n messages: {\n noSanitizationWhitelist:\n \"Do not modify AngularJS sanitization whitelists.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angularjs-sanitization-whitelist\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isWildcardValue = (value: string): boolean => value.includes(\"*\");\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n getMemberPropertyName(node.callee) !==\n \"resourceUrlWhitelist\"\n ) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n firstArgument.type !== \"ArrayExpression\"\n ) {\n return;\n }\n\n for (const elementNode of firstArgument.elements) {\n if (\n elementNode === null ||\n elementNode.type === \"SpreadElement\" ||\n elementNode.type !== \"Literal\" ||\n typeof elementNode.value !== \"string\"\n ) {\n continue;\n }\n\n if (!isWildcardValue(elementNode.value)) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: elementNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow wildcard entries in AngularJS SCE resource URL whitelists.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-sce-resource-url-wildcard\",\n },\n messages: {\n default:\n \"Do not use wildcard resourceUrlWhitelist entries for AngularJS SCE configuration.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-angularjs-sce-resource-url-wildcard\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined, setHas } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getPropertyName,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst CHILD_PROCESS_MODULE_NAMES = new Set([\n \"child_process\",\n \"node:child_process\",\n]);\nconst DISALLOWED_CHILD_PROCESS_METHOD_NAMES = new Set([\"exec\", \"execSync\"]);\n\nconst isDisallowedChildProcessMethodName = (\n value: string | undefined\n): value is \"exec\" | \"execSync\" =>\n isDefined(value) && setHas(DISALLOWED_CHILD_PROCESS_METHOD_NAMES, value);\n\nconst isChildProcessModuleSource = (value: string): boolean =>\n setHas(CHILD_PROCESS_MODULE_NAMES, value);\n\nconst isRequireCallFromChildProcess = (\n expression: null | TSESTree.Expression\n): expression is TSESTree.CallExpression => {\n if (\n expression?.type !== \"CallExpression\" ||\n expression.callee.type !== \"Identifier\" ||\n expression.callee.name !== \"require\"\n ) {\n return false;\n }\n\n const [firstArgument] = expression.arguments;\n\n return (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n firstArgument.type === \"Literal\" &&\n typeof firstArgument.value === \"string\" &&\n isChildProcessModuleSource(firstArgument.value)\n );\n};\n\nconst getPatternIdentifier = (\n pattern: TSESTree.Property[\"value\"]\n): TSESTree.Identifier | undefined => {\n if (pattern.type === \"Identifier\") {\n return pattern;\n }\n\n if (\n pattern.type === \"AssignmentPattern\" &&\n pattern.left.type === \"Identifier\"\n ) {\n return pattern.left;\n }\n\n return undefined;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const childProcessExecBindingNames = new Set<string>();\n const childProcessNamespaceBindingNames = new Set<string>();\n\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type === \"Identifier\") {\n if (\n !setHas(childProcessExecBindingNames, node.callee.name)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n\n return;\n }\n\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (!isDisallowedChildProcessMethodName(methodName)) {\n return;\n }\n\n if (\n node.callee.object.type === \"Identifier\" &&\n setHas(\n childProcessNamespaceBindingNames,\n node.callee.object.name\n )\n ) {\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n\n return;\n }\n\n if (\n node.callee.object.type === \"CallExpression\" &&\n isRequireCallFromChildProcess(node.callee.object)\n ) {\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n }\n },\n ImportDeclaration(node: TSESTree.ImportDeclaration) {\n if (!isChildProcessModuleSource(node.source.value)) {\n return;\n }\n\n for (const specifierNode of node.specifiers) {\n if (\n specifierNode.type === \"ImportDefaultSpecifier\" ||\n specifierNode.type === \"ImportNamespaceSpecifier\"\n ) {\n childProcessNamespaceBindingNames.add(\n specifierNode.local.name\n );\n continue;\n }\n\n const importedName =\n specifierNode.imported.type === \"Identifier\"\n ? specifierNode.imported.name\n : specifierNode.imported.value;\n\n if (!isDisallowedChildProcessMethodName(importedName)) {\n continue;\n }\n\n childProcessExecBindingNames.add(specifierNode.local.name);\n }\n },\n VariableDeclarator(node: TSESTree.VariableDeclarator) {\n if (!isRequireCallFromChildProcess(node.init)) {\n return;\n }\n\n if (node.id.type === \"Identifier\") {\n childProcessNamespaceBindingNames.add(node.id.name);\n return;\n }\n\n if (node.id.type !== \"ObjectPattern\") {\n return;\n }\n\n for (const propertyNode of node.id.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.computed\n ) {\n continue;\n }\n\n const importedName = getPropertyName(propertyNode);\n\n if (!isDisallowedChildProcessMethodName(importedName)) {\n continue;\n }\n\n const localIdentifier = getPatternIdentifier(\n propertyNode.value\n );\n\n if (localIdentifier === undefined) {\n continue;\n }\n\n childProcessExecBindingNames.add(localIdentifier.name);\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow child_process.exec() and execSync() shell-backed execution APIs.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-child-process-exec\",\n },\n messages: {\n default:\n \"Do not use child_process.exec() or execSync(); prefer execFile(), spawn(), or other argv-separated process launches.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-child-process-exec\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\n/**\n * Get the static property name accessed by a member expression.\n *\n * Returns `undefined` for computed members whose property key cannot be\n * resolved to a static string.\n *\n * @param memberExpression - Member expression to inspect.\n *\n * @returns Static property name when available.\n */\nexport const getMemberPropertyName = (\n memberExpression: Readonly<TSESTree.MemberExpression>\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\n/**\n * Get the static key name for an object literal property.\n *\n * @param property - Object property node to inspect.\n *\n * @returns Static property key when available.\n */\nexport const getPropertyName = (\n property: Readonly<TSESTree.Property>\n): string | undefined => {\n if (property.computed) {\n return undefined;\n }\n\n if (property.key.type === \"Identifier\") {\n return property.key.name;\n }\n\n if (\n property.key.type === \"Literal\" &&\n typeof property.key.value === \"string\"\n ) {\n return property.key.value;\n }\n\n return undefined;\n};\n\n/**\n * Find an initialized object literal property by its static key name.\n *\n * @param objectExpression - Object expression to search.\n * @param propertyName - Property name to match.\n *\n * @returns Matching property node when present.\n */\nexport const getPropertyByName = (\n objectExpression: Readonly<TSESTree.ObjectExpression>,\n propertyName: string\n): TSESTree.Property | undefined => {\n for (const propertyNode of objectExpression.properties) {\n if (propertyNode.type !== \"Property\" || propertyNode.kind !== \"init\") {\n continue;\n }\n\n if (getPropertyName(propertyNode) === propertyName) {\n return propertyNode;\n }\n }\n\n return undefined;\n};\n\n/**\n * Resolve a string value from a static expression.\n *\n * Supports plain string literals and template literals without expressions.\n *\n * @param node - Expression node to inspect.\n *\n * @returns Static string value when available.\n */\nexport const getStaticStringValue = (\n node: Readonly<TSESTree.Expression>\n): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\" && node.expressions.length === 0) {\n return arrayFirst(node.quasis)?.value.cooked ?? undefined;\n }\n\n return undefined;\n};\n\n/**\n * Resolve a string value from a JSX attribute value.\n *\n * Supports plain string literals and JSX expression containers that wrap a\n * static string literal or expression-free template literal.\n *\n * @param attributeValue - JSX attribute value node to inspect.\n *\n * @returns Static string value when available.\n */\nexport const getStaticJsxAttributeStringValue = (\n attributeValue: Readonly<TSESTree.JSXAttribute[\"value\"]>\n): string | undefined => {\n if (attributeValue === null) {\n return undefined;\n }\n\n if (\n attributeValue.type === \"Literal\" &&\n typeof attributeValue.value === \"string\"\n ) {\n return attributeValue.value;\n }\n\n if (attributeValue.type !== \"JSXExpressionContainer\") {\n return undefined;\n }\n\n if (\n attributeValue.expression.type === \"Literal\" &&\n typeof attributeValue.expression.value === \"string\"\n ) {\n return attributeValue.expression.value;\n }\n\n if (\n attributeValue.expression.type === \"TemplateLiteral\" &&\n attributeValue.expression.expressions.length === 0\n ) {\n return (\n arrayFirst(attributeValue.expression.quasis)?.value.cooked ??\n undefined\n );\n }\n\n return undefined;\n};\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isTruthyLiteral = (node: TSESTree.Property[\"value\"]): boolean =>\n node.type === \"Literal\" && node.value === true;\n\nconst hasShellTrueOption = (optionsNode: TSESTree.Expression): boolean => {\n if (optionsNode.type !== \"ObjectExpression\") {\n return false;\n }\n\n for (const propertyNode of optionsNode.properties) {\n if (propertyNode.type !== \"Property\" || propertyNode.kind !== \"init\") {\n continue;\n }\n\n const keyName =\n propertyNode.key.type === \"Identifier\"\n ? propertyNode.key.name\n : propertyNode.key.type === \"Literal\" &&\n typeof propertyNode.key.value === \"string\"\n ? propertyNode.key.value\n : undefined;\n\n if (keyName !== \"shell\") {\n continue;\n }\n\n if (isTruthyLiteral(propertyNode.value)) {\n return true;\n }\n }\n\n return false;\n};\n\nconst isTargetChildProcessMethod = (node: TSESTree.CallExpression): boolean => {\n if (node.callee.type === \"Identifier\") {\n return node.callee.name === \"spawn\" || node.callee.name === \"execFile\";\n }\n\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n return methodName === \"spawn\" || methodName === \"execFile\";\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isTargetChildProcessMethod(node)) {\n return;\n }\n\n for (const argumentNode of node.arguments) {\n if (argumentNode.type === \"SpreadElement\") {\n continue;\n }\n\n if (!hasShellTrueOption(argumentNode)) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: argumentNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow child_process spawn/execFile options that enable shell: true.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-child-process-shell-true\",\n },\n messages: {\n default:\n \"Do not enable shell: true for child_process execution paths.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-child-process-shell-true\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\nimport type {\n UnknownRecord as TypeFestUnknownRecord,\n UnknownMap,\n} from \"type-fest\";\nimport type ts from \"typescript\";\n\nimport { isDefined } from \"ts-extras\";\n\ntype RuleSourceCodeLike = Readonly<{\n parserServices?: unknown;\n}>;\n\ntype TypeScriptParserServices = Readonly<{\n esTreeNodeToTSNodeMap: ReadonlyMap<TSESTree.Node, ts.Node>;\n program: ts.Program;\n tsNodeToESTreeNodeMap: ReadonlyMap<ts.Node, TSESTree.Node>;\n}>;\n\ntype UnknownObjectRecord = Readonly<TypeFestUnknownRecord>;\n\nconst isUnknownRecord = (value: unknown): value is UnknownObjectRecord =>\n typeof value === \"object\" && value !== null;\n\nconst isMapLike = (value: unknown): value is Readonly<UnknownMap> =>\n isUnknownRecord(value) && typeof value[\"get\"] === \"function\";\n\nconst isProgramLike = (value: unknown): value is ts.Program =>\n isUnknownRecord(value) && typeof value[\"getTypeChecker\"] === \"function\";\n\nconst isTypeScriptParserServices = (\n parserServices: unknown\n): parserServices is TypeScriptParserServices => {\n if (!isUnknownRecord(parserServices)) {\n return false;\n }\n\n const candidate = parserServices;\n\n return (\n isProgramLike(candidate[\"program\"]) &&\n isMapLike(candidate[\"esTreeNodeToTSNodeMap\"]) &&\n isMapLike(candidate[\"tsNodeToESTreeNodeMap\"])\n );\n};\n\nconst isRuleSourceCodeLike = (value: unknown): value is RuleSourceCodeLike =>\n isUnknownRecord(value);\n\nconst getParserServices = (\n context: unknown\n): TypeScriptParserServices | undefined => {\n if (!isUnknownRecord(context)) {\n return undefined;\n }\n\n const sourceCode = context[\"sourceCode\"];\n\n if (!isRuleSourceCodeLike(sourceCode)) {\n return undefined;\n }\n\n const parserServices = sourceCode.parserServices;\n\n return isTypeScriptParserServices(parserServices)\n ? parserServices\n : undefined;\n};\n\n/** Returns `true` when parser services expose complete TypeScript program data. */\nexport const hasFullTypeInformation = (context: unknown): boolean =>\n isDefined(getParserServices(context));\n\n/** Returns the TypeScript type checker when parser services are available. */\nexport const getFullTypeChecker = (\n context: unknown\n): ts.TypeChecker | undefined =>\n getParserServices(context)?.program.getTypeChecker();\n\n/** Resolve the textual type for an ESTree node via parser services. */\nexport const getNodeTypeAsString = (\n fullTypeChecker: Readonly<ts.TypeChecker> | undefined,\n node: null | Readonly<TSESTree.Node> | undefined,\n context: unknown\n): string => {\n if (!isDefined(fullTypeChecker) || node === null || node === undefined) {\n return \"any\";\n }\n\n const parserServices = getParserServices(context);\n\n if (!isDefined(parserServices)) {\n return \"any\";\n }\n\n const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);\n\n if (!isDefined(tsNode)) {\n return \"any\";\n }\n\n const tsType = fullTypeChecker.getTypeAtLocation(tsNode);\n\n return fullTypeChecker.typeToString(tsType);\n};\n\nconst isWindowIdentifierName = (name: string): boolean =>\n name.toLowerCase().endsWith(\"window\");\n\nconst getMemberPropertyName = (\n node: Readonly<TSESTree.MemberExpression>\n): string | undefined => {\n if (node.property.type === \"Identifier\") {\n return node.property.name;\n }\n\n if (\n node.property.type === \"Literal\" &&\n typeof node.property.value === \"string\"\n ) {\n return node.property.value;\n }\n\n return undefined;\n};\n\nconst isDocumentMemberReference = (\n node: Readonly<TSESTree.MemberExpression>\n): boolean => {\n const propertyName = getMemberPropertyName(node);\n\n if (propertyName !== \"document\") {\n return false;\n }\n\n if (node.object.type === \"Identifier\") {\n return isWindowIdentifierName(node.object.name);\n }\n\n if (node.object.type !== \"MemberExpression\") {\n return false;\n }\n\n const nestedPropertyName = getMemberPropertyName(node.object);\n\n if (nestedPropertyName !== \"window\") {\n return false;\n }\n\n if (node.object.object.type === \"ThisExpression\") {\n return true;\n }\n\n return (\n node.object.object.type === \"Identifier\" &&\n node.object.object.name === \"globalThis\"\n );\n};\n\n/**\n * Best-effort check for the browser `Document` object.\n *\n * Falls back to syntactic checks when parser services are unavailable.\n */\nexport const isDocumentObject = (\n node: Readonly<TSESTree.Node>,\n context: unknown,\n fullTypeChecker: Readonly<ts.TypeChecker> | undefined\n): boolean => {\n if (fullTypeChecker !== undefined) {\n return (\n getNodeTypeAsString(fullTypeChecker, node, context) === \"Document\"\n );\n }\n\n if (node.type === \"Identifier\") {\n return node.name === \"document\";\n }\n\n if (node.type === \"MemberExpression\") {\n return isDocumentMemberReference(node);\n }\n\n return false;\n};\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport {\n getFullTypeChecker,\n isDocumentObject,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"doNotUseCookies\">({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n \"MemberExpression[property.name='cookie']\"(\n node: TSESTree.MemberExpression\n ) {\n if (!isDocumentObject(node.object, context, fullTypeChecker)) {\n return;\n }\n\n context.report({\n messageId: \"doNotUseCookies\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow document.cookie usage to avoid insecure legacy client-side storage patterns.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-cookies\",\n },\n messages: {\n doNotUseCookies: \"Do not use HTTP cookies in modern applications.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-cookies\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport {\n getFullTypeChecker,\n isDocumentObject,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n \"AssignmentExpression[operator='='][left.property.name='domain']\"(\n node: TSESTree.AssignmentExpression\n ) {\n if (node.left.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n !isDocumentObject(\n node.left.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow writes to document.domain that can weaken same-origin policy guarantees.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-domain\",\n },\n messages: {\n default: \"Do not write to document.domain.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-document-domain\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport {\n getFullTypeChecker,\n isDocumentObject,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst isInsertHtmlCommand = (expression: TSESTree.Expression): boolean =>\n getStaticStringValue(expression)?.toLowerCase() === \"inserthtml\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (getMemberPropertyName(node.callee) !== \"execCommand\") {\n return;\n }\n\n if (\n !isDocumentObject(\n node.callee.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n const [\n firstArgument,\n ,\n thirdArgument,\n ] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n !isInsertHtmlCommand(firstArgument)\n ) {\n return;\n }\n\n if (\n thirdArgument === undefined ||\n thirdArgument.type === \"SpreadElement\" ||\n getStaticStringValue(thirdArgument) === \"\"\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: thirdArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow document.execCommand('insertHTML', ...) HTML insertion sinks.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-execcommand-insert-html\",\n },\n messages: {\n default:\n \"Do not inject HTML with document.execCommand('insertHTML', ...); build DOM nodes safely or use text-only insertion APIs instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-document-execcommand-insert-html\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst isDocumentConstructorReference = (\n expression: TSESTree.Expression\n): boolean => {\n if (expression.type === \"Identifier\") {\n return expression.name === \"Document\";\n }\n\n if (expression.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(expression) !== \"Document\") {\n return false;\n }\n\n return (\n expression.object.type === \"Identifier\" &&\n (expression.object.name === \"globalThis\" ||\n expression.object.name === \"self\" ||\n expression.object.name === \"window\")\n );\n};\n\nconst isDocumentParseHtmlUnsafeCall = (\n node: TSESTree.CallExpression\n): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(node.callee) !== \"parseHTMLUnsafe\") {\n return false;\n }\n\n return isDocumentConstructorReference(node.callee.object);\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isDocumentParseHtmlUnsafeCall(node)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n getStaticStringValue(firstArgument) === \"\"\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument ?? node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Document.parseHTMLUnsafe() because it preserves unsafe HTML unless a reviewed sanitization path is enforced separately.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-parse-html-unsafe\",\n },\n messages: {\n default:\n \"Do not call Document.parseHTMLUnsafe(); prefer Document.parseHTML() or a reviewed sanitization pipeline.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-document-parse-html-unsafe\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport {\n getFullTypeChecker,\n isDocumentObject,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n \"CallExpression[arguments.length=1][callee.property.name=/^(?:write|writeln)$/]\"(\n node: TSESTree.CallExpression\n ) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n !isDocumentObject(\n node.callee.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow document.write/document.writeln because they bypass safe DOM construction patterns.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-write\",\n },\n messages: {\n default:\n \"Do not write to the DOM directly using document.write/document.writeln.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-document-write\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n isDomParserParseFromStringCall,\n isSanitizedExpression,\n} from \"../_internal/domparser.js\";\nimport { getStaticStringValue } from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isDomParserParseFromStringCall(node)) {\n return;\n }\n\n if (node.arguments.length < 2) {\n return;\n }\n\n const [firstArgument, secondArgument] = node.arguments;\n\n if (!isDefined(firstArgument) || !isDefined(secondArgument)) {\n return;\n }\n\n if (\n firstArgument.type === \"SpreadElement\" ||\n secondArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const mimeTypeValue = getStaticStringValue(secondArgument);\n\n if (mimeTypeValue !== \"text/html\") {\n return;\n }\n\n if (isSanitizedExpression(firstArgument)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow DOMParser.parseFromString(..., 'text/html') calls on unsanitized input.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-domparser-html-without-sanitization\",\n },\n messages: {\n default:\n \"Sanitize HTML input before parsing with DOMParser.parseFromString(..., 'text/html').\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-domparser-html-without-sanitization\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { getMemberPropertyName } from \"./estree-utils.js\";\n\nconst SANITIZER_NAME_PATTERN = /createhtml|sanitize|trusted/u;\n\n/**\n * Check whether a call is `new DOMParser().parseFromString(...)`.\n *\n * @param node - Call expression to inspect.\n *\n * @returns Whether the call matches the DOMParser parsing sink.\n */\nexport const isDomParserParseFromStringCall = (\n node: Readonly<TSESTree.CallExpression>\n): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(node.callee) !== \"parseFromString\") {\n return false;\n }\n\n if (node.callee.object.type !== \"NewExpression\") {\n return false;\n }\n\n return (\n node.callee.object.callee.type === \"Identifier\" &&\n node.callee.object.callee.name === \"DOMParser\"\n );\n};\n\n/**\n * Check whether an expression appears to run through a sanitizer or trusted\n * policy helper.\n *\n * @param node - Expression to inspect.\n *\n * @returns Whether the expression is an explicit sanitization call.\n */\nexport const isSanitizedExpression = (\n node: Readonly<TSESTree.Expression>\n): boolean => {\n if (node.type !== \"CallExpression\") {\n return false;\n }\n\n if (node.callee.type === \"Identifier\") {\n return SANITIZER_NAME_PATTERN.test(node.callee.name.toLowerCase());\n }\n\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n const propertyName = getMemberPropertyName(node.callee);\n\n return (\n typeof propertyName === \"string\" &&\n SANITIZER_NAME_PATTERN.test(propertyName.toLowerCase())\n );\n};\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n isDomParserParseFromStringCall,\n isSanitizedExpression,\n} from \"../_internal/domparser.js\";\nimport { getStaticStringValue } from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isDomParserParseFromStringCall(node)) {\n return;\n }\n\n if (node.arguments.length < 2) {\n return;\n }\n\n const [firstArgument, secondArgument] = node.arguments;\n\n if (!isDefined(firstArgument) || !isDefined(secondArgument)) {\n return;\n }\n\n if (\n firstArgument.type === \"SpreadElement\" ||\n secondArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const mimeTypeValue = getStaticStringValue(secondArgument);\n\n if (mimeTypeValue !== \"image/svg+xml\") {\n return;\n }\n\n if (isSanitizedExpression(firstArgument)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow DOMParser.parseFromString(..., 'image/svg+xml') calls on unsanitized input.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-domparser-svg-without-sanitization\",\n },\n messages: {\n default:\n \"Sanitize SVG input before parsing with DOMParser.parseFromString(..., 'image/svg+xml').\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-domparser-svg-without-sanitization\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined, setHas } from \"ts-extras\";\n\nimport { getMemberPropertyName } from \"./estree-utils.js\";\n\ntype WorkerConstructorName = \"SharedWorker\" | \"Worker\";\n\nconst WORKER_CONSTRUCTOR_NAMES = new Set([\"SharedWorker\", \"Worker\"]);\nconst GLOBAL_OBJECT_NAMES = new Set([\n \"globalThis\",\n \"self\",\n \"window\",\n]);\n\nconst isNavigatorObject = (value: Readonly<TSESTree.Expression>): boolean => {\n if (value.type === \"Identifier\") {\n return value.name === \"navigator\";\n }\n\n if (value.type !== \"MemberExpression\") {\n return false;\n }\n\n return (\n getMemberPropertyName(value) === \"navigator\" &&\n value.object.type === \"Identifier\" &&\n setHas(GLOBAL_OBJECT_NAMES, value.object.name)\n );\n};\n\n/**\n * Check whether a value is a static `blob:` URL.\n *\n * @param value - URL string to inspect.\n *\n * @returns Whether the string starts with `blob:`.\n */\nexport const isBlobUrl = (value: string): boolean => /^\\s*blob:/iu.test(value);\n\n/**\n * Check whether a value is a static `data:` URL.\n *\n * @param value - URL string to inspect.\n *\n * @returns Whether the string starts with `data:`.\n */\nexport const isDataUrl = (value: string): boolean => /^\\s*data:/iu.test(value);\n\nconst isWorkerConstructorName = (\n value: string | undefined\n): value is WorkerConstructorName =>\n isDefined(value) && setHas(WORKER_CONSTRUCTOR_NAMES, value);\n\nconst isGlobalObjectName = (value: string): boolean =>\n setHas(GLOBAL_OBJECT_NAMES, value);\n\n/**\n * Check whether an expression is one of the common global objects used for\n * worker-related APIs.\n *\n * @param value - Expression to inspect.\n *\n * @returns Whether the expression is `window`, `self`, or `globalThis`.\n */\nexport const isWorkerGlobalObject = (\n value: Readonly<TSESTree.Expression>\n): boolean => value.type === \"Identifier\" && isGlobalObjectName(value.name);\n\n/**\n * Check whether a constructor callee targets `Worker` or `SharedWorker`.\n *\n * @param callee - Constructor callee to inspect.\n *\n * @returns Whether the callee is a worker constructor.\n */\nexport const isWorkerConstructor = (\n callee: Readonly<TSESTree.NewExpression[\"callee\"]>\n): boolean => {\n if (callee.type === \"Identifier\") {\n return isWorkerConstructorName(callee.name);\n }\n\n if (callee.type !== \"MemberExpression\") {\n return false;\n }\n\n return (\n isWorkerConstructorName(getMemberPropertyName(callee)) &&\n isWorkerGlobalObject(callee.object)\n );\n};\n\n/**\n * Check whether a call targets `importScripts(...)`.\n *\n * @param callee - Call callee to inspect.\n *\n * @returns Whether the callee is an importScripts sink.\n */\nexport const isImportScriptsCall = (\n callee: Readonly<TSESTree.CallExpression[\"callee\"]>\n): boolean => {\n if (callee.type === \"Identifier\") {\n return callee.name === \"importScripts\";\n }\n\n if (callee.type !== \"MemberExpression\") {\n return false;\n }\n\n return (\n getMemberPropertyName(callee) === \"importScripts\" &&\n isWorkerGlobalObject(callee.object)\n );\n};\n\n/**\n * Check whether an expression resolves the service worker container from\n * `navigator.serviceWorker`.\n *\n * @param value - Expression to inspect.\n *\n * @returns Whether the expression is a service worker container access.\n */\nexport const isServiceWorkerContainerAccess = (\n value: Readonly<TSESTree.Expression>\n): value is TSESTree.MemberExpression => {\n if (value.type !== \"MemberExpression\") {\n return false;\n }\n\n return (\n getMemberPropertyName(value) === \"serviceWorker\" &&\n isNavigatorObject(value.object)\n );\n};\n\n/**\n * Check whether a call targets `navigator.serviceWorker.register(...)`.\n *\n * @param callee - Call callee to inspect.\n *\n * @returns Whether the callee is a service worker registration sink.\n */\nexport const isServiceWorkerRegisterCall = (\n callee: Readonly<TSESTree.CallExpression[\"callee\"]>\n): boolean =>\n callee.type === \"MemberExpression\" &&\n getMemberPropertyName(callee) === \"register\" &&\n isServiceWorkerContainerAccess(callee.object);\n\nconst isGlobalUrlObject = (\n node: Readonly<TSESTree.MemberExpression>\n): boolean => {\n if (getMemberPropertyName(node) !== \"URL\") {\n return false;\n }\n\n return (\n node.object.type === \"Identifier\" &&\n isGlobalObjectName(node.object.name)\n );\n};\n\n/**\n * Check whether an expression is a direct `URL.createObjectURL(...)` call.\n *\n * @param node - Expression to inspect.\n *\n * @returns Whether the expression creates an object URL from the global URL\n * API.\n */\nexport const isUrlCreateObjectUrlCall = (\n node: Readonly<TSESTree.Expression>\n): node is TSESTree.CallExpression => {\n if (\n node.type !== \"CallExpression\" ||\n node.callee.type !== \"MemberExpression\"\n ) {\n return false;\n }\n\n if (getMemberPropertyName(node.callee) !== \"createObjectURL\") {\n return false;\n }\n\n return (\n (node.callee.object.type === \"Identifier\" &&\n node.callee.object.name === \"URL\") ||\n (node.callee.object.type === \"MemberExpression\" &&\n isGlobalUrlObject(node.callee.object))\n );\n};\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getStaticStringValue } from \"../_internal/estree-utils.js\";\nimport {\n isBlobUrl,\n isDataUrl,\n isUrlCreateObjectUrlCall,\n} from \"../_internal/worker-code-loading.js\";\n\ntype MessageIds = \"default\";\n\nconst isJavaScriptUrl = (value: string): boolean =>\n /^\\s*javascript\\s*:/iu.test(value);\n\nconst isUnsafeDynamicImportSource = (\n expression: Readonly<TSESTree.Expression>\n): boolean => {\n const configuredValue = getStaticStringValue(expression);\n\n return (\n (typeof configuredValue === \"string\" &&\n (isBlobUrl(configuredValue) ||\n isDataUrl(configuredValue) ||\n isJavaScriptUrl(configuredValue))) ||\n isUrlCreateObjectUrlCall(expression)\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n ImportExpression(node: TSESTree.ImportExpression) {\n if (!isUnsafeDynamicImportSource(node.source)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.source,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow dynamic import() calls that load code from data:, blob:, javascript:, or direct URL.createObjectURL(...) URLs.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-dynamic-import-unsafe-url\",\n },\n messages: {\n default:\n \"Do not dynamically import code from data:, blob:, javascript:, or URL.createObjectURL(...) URLs.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-dynamic-import-unsafe-url\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\ntype ElectronPreferenceMessageIds = \"default\";\n\ntype ElectronWebPreferenceCheck = Readonly<{\n disallowedValue: boolean;\n preferenceName: string;\n}>;\n\ntype RuleContext = Readonly<\n TSESLint.RuleContext<ElectronPreferenceMessageIds, unknown[]>\n>;\n\nconst getPropertyName = (\n property: Readonly<TSESTree.Property>\n): string | undefined => {\n if (property.computed) {\n return undefined;\n }\n\n if (property.key.type === \"Identifier\") {\n return property.key.name;\n }\n\n if (\n property.key.type === \"Literal\" &&\n typeof property.key.value === \"string\"\n ) {\n return property.key.value;\n }\n\n return undefined;\n};\n\nconst getPropertyByName = (\n objectExpression: Readonly<TSESTree.ObjectExpression>,\n propertyName: string\n): TSESTree.Property | undefined => {\n for (const propertyNode of objectExpression.properties) {\n if (propertyNode.type !== \"Property\" || propertyNode.kind !== \"init\") {\n continue;\n }\n\n if (getPropertyName(propertyNode) === propertyName) {\n return propertyNode;\n }\n }\n\n return undefined;\n};\n\nconst getBooleanLiteralValue = (\n valueNode: Readonly<TSESTree.Node>\n): boolean | undefined => {\n if (valueNode.type !== \"Literal\" || typeof valueNode.value !== \"boolean\") {\n return undefined;\n }\n\n return valueNode.value;\n};\n\n/**\n * Creates a listener that reports unsafe boolean Electron `webPreferences`\n * values.\n */\nexport const createElectronWebPreferencesBooleanListener = (\n context: RuleContext,\n check: ElectronWebPreferenceCheck\n): TSESLint.RuleListener => ({\n \"NewExpression[callee.name=/^(?:BrowserWindow|BrowserView)$/]\"(\n node: Readonly<TSESTree.NewExpression>\n ) {\n const [firstArgument] = node.arguments;\n\n if (firstArgument?.type !== \"ObjectExpression\") {\n return;\n }\n\n const webPreferencesProperty = getPropertyByName(\n firstArgument,\n \"webPreferences\"\n );\n\n if (webPreferencesProperty?.value.type !== \"ObjectExpression\") {\n return;\n }\n\n const preferenceProperty = getPropertyByName(\n webPreferencesProperty.value,\n check.preferenceName\n );\n\n if (preferenceProperty === undefined) {\n return;\n }\n\n const preferenceValueNode = preferenceProperty.value;\n const literalValue = getBooleanLiteralValue(preferenceValueNode);\n\n if (literalValue !== check.disallowedValue) {\n return;\n }\n\n context.report({\n fix(fixer) {\n return fixer.replaceText(\n preferenceValueNode,\n String(!check.disallowedValue)\n );\n },\n messageId: \"default\",\n node: preferenceProperty,\n });\n },\n});\n", "import { createRule } from \"../_internal/create-rule.js\";\nimport { createElectronWebPreferencesBooleanListener } from \"../_internal/electron-web-preferences.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return createElectronWebPreferencesBooleanListener(context, {\n disallowedValue: true,\n preferenceName: \"allowRunningInsecureContent\",\n });\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling allowRunningInsecureContent in Electron webPreferences.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-allow-running-insecure-content\",\n },\n fixable: \"code\",\n messages: {\n default:\n \"Do not set webPreferences.allowRunningInsecureContent to true.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-allow-running-insecure-content\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getPropertyName = (property: TSESTree.Property): string | undefined => {\n if (property.computed) {\n return undefined;\n }\n\n if (property.key.type === \"Identifier\") {\n return property.key.name;\n }\n\n if (\n property.key.type === \"Literal\" &&\n typeof property.key.value === \"string\"\n ) {\n return property.key.value;\n }\n\n return undefined;\n};\n\nconst getPropertyByName = (\n objectExpression: TSESTree.ObjectExpression,\n propertyName: string\n): TSESTree.Property | undefined => {\n for (const propertyNode of objectExpression.properties) {\n if (propertyNode.type !== \"Property\" || propertyNode.kind !== \"init\") {\n continue;\n }\n\n if (getPropertyName(propertyNode) === propertyName) {\n return propertyNode;\n }\n }\n\n return undefined;\n};\n\nconst getStaticStringValue = (node: TSESTree.Node): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\" && node.expressions.length === 0) {\n return arrayFirst(node.quasis)?.value.cooked ?? undefined;\n }\n\n return undefined;\n};\n\nconst isDangerousBlinkFeaturesValue = (node: TSESTree.Node): boolean => {\n const staticStringValue = getStaticStringValue(node);\n\n if (typeof staticStringValue !== \"string\") {\n return false;\n }\n\n return staticStringValue.trim().length > 0;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n \"NewExpression[callee.name=/^(?:BrowserWindow|BrowserView)$/]\"(\n node: TSESTree.NewExpression\n ) {\n const [firstArgument] = node.arguments;\n\n if (firstArgument?.type !== \"ObjectExpression\") {\n return;\n }\n\n const webPreferencesProperty = getPropertyByName(\n firstArgument,\n \"webPreferences\"\n );\n\n if (webPreferencesProperty?.value.type !== \"ObjectExpression\") {\n return;\n }\n\n const enableBlinkFeaturesProperty = getPropertyByName(\n webPreferencesProperty.value,\n \"enableBlinkFeatures\"\n );\n\n if (enableBlinkFeaturesProperty === undefined) {\n return;\n }\n\n if (\n !isDangerousBlinkFeaturesValue(\n enableBlinkFeaturesProperty.value\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: enableBlinkFeaturesProperty,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling risky Blink runtime features through Electron webPreferences.enableBlinkFeatures.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-dangerous-blink-features\",\n },\n messages: {\n default:\n \"Do not set webPreferences.enableBlinkFeatures to a non-empty value.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-dangerous-blink-features\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import { createRule } from \"../_internal/create-rule.js\";\nimport { createElectronWebPreferencesBooleanListener } from \"../_internal/electron-web-preferences.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return createElectronWebPreferencesBooleanListener(context, {\n disallowedValue: false,\n preferenceName: \"contextIsolation\",\n });\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow disabling contextIsolation in Electron webPreferences.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-disable-context-isolation\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not set webPreferences.contextIsolation to false.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-disable-context-isolation\",\n});\n\nexport default rule;\n", "import { createRule } from \"../_internal/create-rule.js\";\nimport { createElectronWebPreferencesBooleanListener } from \"../_internal/electron-web-preferences.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return createElectronWebPreferencesBooleanListener(context, {\n disallowedValue: false,\n preferenceName: \"sandbox\",\n });\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow disabling Electron sandbox in webPreferences.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-disable-sandbox\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not set webPreferences.sandbox to false.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-disable-sandbox\",\n});\n\nexport default rule;\n", "import { createRule } from \"../_internal/create-rule.js\";\nimport { createElectronWebPreferencesBooleanListener } from \"../_internal/electron-web-preferences.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return createElectronWebPreferencesBooleanListener(context, {\n disallowedValue: false,\n preferenceName: \"webSecurity\",\n });\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow disabling webSecurity in Electron webPreferences.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-disable-web-security\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not set webPreferences.webSecurity to false.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-disable-web-security\",\n});\n\nexport default rule;\n", "import { createRule } from \"../_internal/create-rule.js\";\nimport { createElectronWebPreferencesBooleanListener } from \"../_internal/electron-web-preferences.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return createElectronWebPreferencesBooleanListener(context, {\n disallowedValue: true,\n preferenceName: \"enableRemoteModule\",\n });\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling enableRemoteModule in Electron webPreferences.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-enable-remote-module\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not set webPreferences.enableRemoteModule to true.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-enable-remote-module\",\n});\n\nexport default rule;\n", "import { createRule } from \"../_internal/create-rule.js\";\nimport { createElectronWebPreferencesBooleanListener } from \"../_internal/electron-web-preferences.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return createElectronWebPreferencesBooleanListener(context, {\n disallowedValue: true,\n preferenceName: \"webviewTag\",\n });\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling Electron webPreferences.webviewTag.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-enable-webview-tag\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not set webPreferences.webviewTag to true.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-enable-webview-tag\",\n});\n\nexport default rule;\n", "import { createRule } from \"../_internal/create-rule.js\";\nimport { createElectronWebPreferencesBooleanListener } from \"../_internal/electron-web-preferences.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return createElectronWebPreferencesBooleanListener(context, {\n disallowedValue: true,\n preferenceName: \"experimentalFeatures\",\n });\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling Electron webPreferences.experimentalFeatures.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-experimental-features\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not set webPreferences.experimentalFeatures to true.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-experimental-features\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getMemberPropertyName } from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst isExpressionNode = (node: TSESTree.Node): node is TSESTree.Expression =>\n node.type !== \"ArrayPattern\" &&\n node.type !== \"AssignmentPattern\" &&\n node.type !== \"ObjectPattern\";\n\nconst isContextBridgeObjectExpression = (\n expression: TSESTree.Expression\n): boolean => {\n if (expression.type === \"Identifier\") {\n return expression.name === \"contextBridge\";\n }\n\n if (expression.type !== \"MemberExpression\") {\n return false;\n }\n\n return getMemberPropertyName(expression) === \"contextBridge\";\n};\n\nconst isContextBridgeExposeCall = (node: TSESTree.CallExpression): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (\n methodName !== \"exposeInIsolatedWorld\" &&\n methodName !== \"exposeInMainWorld\"\n ) {\n return false;\n }\n\n return isContextBridgeObjectExpression(node.callee.object);\n};\n\nconst isIpcRendererReference = (expression: TSESTree.Expression): boolean => {\n if (expression.type === \"Identifier\") {\n return expression.name === \"ipcRenderer\";\n }\n\n if (expression.type !== \"MemberExpression\") {\n return false;\n }\n\n if (expression.object.type === \"Identifier\") {\n return expression.object.name === \"ipcRenderer\";\n }\n\n if (expression.object.type !== \"MemberExpression\") {\n return false;\n }\n\n return getMemberPropertyName(expression.object) === \"ipcRenderer\";\n};\n\nconst isUnsafeExposedValue = (expression: TSESTree.Expression): boolean => {\n if (isIpcRendererReference(expression)) {\n return true;\n }\n\n if (\n expression.type === \"CallExpression\" &&\n expression.callee.type === \"MemberExpression\" &&\n getMemberPropertyName(expression.callee) === \"bind\" &&\n expression.callee.object.type === \"MemberExpression\"\n ) {\n return isIpcRendererReference(expression.callee.object);\n }\n\n if (expression.type === \"ArrayExpression\") {\n return expression.elements.some(\n (element): element is TSESTree.Expression =>\n element !== null &&\n element.type !== \"SpreadElement\" &&\n isUnsafeExposedValue(element)\n );\n }\n\n if (expression.type !== \"ObjectExpression\") {\n return false;\n }\n\n return expression.properties.some((propertyNode) => {\n if (propertyNode.type === \"SpreadElement\") {\n return isUnsafeExposedValue(propertyNode.argument);\n }\n\n return (\n propertyNode.kind === \"init\" &&\n isExpressionNode(propertyNode.value) &&\n isUnsafeExposedValue(propertyNode.value)\n );\n });\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isContextBridgeExposeCall(node)) {\n return;\n }\n\n const [, exposedValue] = node.arguments;\n\n if (\n exposedValue === undefined ||\n exposedValue.type === \"SpreadElement\" ||\n !isUnsafeExposedValue(exposedValue)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: exposedValue,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow exposing raw Electron ipcRenderer objects or methods through contextBridge APIs.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-expose-raw-ipc-renderer\",\n },\n messages: {\n default:\n \"Expose narrow preload wrapper functions instead of raw ipcRenderer objects or methods.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-expose-raw-ipc-renderer\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayAt, arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getStaticStringValue = (\n node: TSESTree.Expression\n): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\" && node.expressions.length === 0) {\n return arrayFirst(node.quasis)?.value.cooked ?? undefined;\n }\n\n return undefined;\n};\n\nconst isOnMemberExpression = (\n callee: TSESTree.CallExpression[\"callee\"]\n): boolean => {\n if (callee.type !== \"MemberExpression\" || callee.computed) {\n return false;\n }\n\n return (\n callee.property.type === \"Identifier\" && callee.property.name === \"on\"\n );\n};\n\nconst getCallbackParameterName = (\n node: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression\n): string | undefined => {\n const callbackParameter = arrayAt(node.params, -1);\n\n return callbackParameter?.type === \"Identifier\"\n ? callbackParameter.name\n : undefined;\n};\n\nconst toUnsafeCallbackTruePattern = (callbackName: string): RegExp =>\n // eslint-disable-next-line security/detect-non-literal-regexp -- Callback identifier is static source text and safely interpolated for targeted pattern matching.\n new RegExp(String.raw`\\b${callbackName}\\s*\\(\\s*true\\b`, \"u\");\n\nconst hasUnsafeCallbackTrueCall = (\n callbackName: string,\n handlerNode: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression,\n context: TSESLint.RuleContext<MessageIds, unknown[]>\n): boolean => {\n const handlerSourceText = context.sourceCode.getText(handlerNode);\n\n return toUnsafeCallbackTruePattern(callbackName).test(handlerSourceText);\n};\n\nconst isCertificateErrorEventRegistration = (\n node: TSESTree.CallExpression\n): boolean => {\n if (!isOnMemberExpression(node.callee)) {\n return false;\n }\n\n const [firstArgument] = node.arguments;\n\n if (firstArgument === undefined || firstArgument.type === \"SpreadElement\") {\n return false;\n }\n\n return getStaticStringValue(firstArgument) === \"certificate-error\";\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isCertificateErrorEventRegistration(node)) {\n return;\n }\n\n const [, secondArgument] = node.arguments;\n\n if (\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n if (\n secondArgument.type !== \"ArrowFunctionExpression\" &&\n secondArgument.type !== \"FunctionExpression\"\n ) {\n return;\n }\n\n const callbackParameterName =\n getCallbackParameterName(secondArgument);\n\n if (typeof callbackParameterName !== \"string\") {\n return;\n }\n\n if (\n !hasUnsafeCallbackTrueCall(\n callbackParameterName,\n secondArgument,\n context\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: secondArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Electron certificate-error handlers that call the callback with true.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-insecure-certificate-error-handler\",\n },\n messages: {\n default:\n \"Do not bypass certificate validation by calling the certificate-error callback with true.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-insecure-certificate-error-handler\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayAt } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isFunctionExpression = (\n expression: TSESTree.CallExpressionArgument\n): expression is\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst hasInsecureCertificateOverride = (\n callbackNode:\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression,\n context: TSESLint.RuleContext<MessageIds, unknown[]>,\n callbackParameterName: string\n): boolean => {\n const callbackSourceText = context.sourceCode.getText(callbackNode);\n const escapedName = callbackParameterName.replaceAll(\"$\", String.raw`\\$`);\n // eslint-disable-next-line security/detect-non-literal-regexp -- Callback identifier is escaped before interpolation for strict handler-call detection.\n const callbackPattern = new RegExp(\n String.raw`\\b${escapedName}\\s*\\(\\s*0\\b`,\n \"u\"\n );\n\n return (\n callbackPattern.test(callbackSourceText) ||\n /\\breturn\\s+0\\b/u.test(callbackSourceText)\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n getMemberPropertyName(node.callee) !==\n \"setCertificateVerifyProc\"\n ) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n !isFunctionExpression(firstArgument)\n ) {\n return;\n }\n\n const callbackParameter = arrayAt(firstArgument.params, -1);\n\n if (callbackParameter?.type !== \"Identifier\") {\n return;\n }\n\n if (\n !hasInsecureCertificateOverride(\n firstArgument,\n context,\n callbackParameter.name\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Electron certificate verify proc callbacks that accept invalid certificates.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-insecure-certificate-verify-proc\",\n },\n messages: {\n default:\n \"Do not override certificate verification by returning/callbacking with 0 in setCertificateVerifyProc handlers.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-insecure-certificate-verify-proc\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayAt } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isFunctionExpression = (\n expression: TSESTree.CallExpressionArgument\n): expression is\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst hasUnsafePermissionAllowPattern = (\n callbackNode:\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression,\n context: TSESLint.RuleContext<MessageIds, unknown[]>,\n callbackParameterName: string\n): boolean => {\n const callbackSourceText = context.sourceCode.getText(callbackNode);\n const escapedName = callbackParameterName.replaceAll(\"$\", String.raw`\\$`);\n // eslint-disable-next-line security/detect-non-literal-regexp -- Callback identifier is escaped before interpolation for strict permission-allow detection.\n const callbackPattern = new RegExp(\n String.raw`\\b${escapedName}\\s*\\(\\s*true\\b`,\n \"u\"\n );\n\n return (\n callbackPattern.test(callbackSourceText) ||\n /\\breturn\\s+true\\b/u.test(callbackSourceText)\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n getMemberPropertyName(node.callee) !==\n \"setPermissionRequestHandler\"\n ) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n !isFunctionExpression(firstArgument)\n ) {\n return;\n }\n\n const callbackParameter = arrayAt(firstArgument.params, -1);\n\n if (callbackParameter?.type !== \"Identifier\") {\n return;\n }\n\n if (\n !hasUnsafePermissionAllowPattern(\n firstArgument,\n context,\n callbackParameter.name\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Electron permission request handlers that blanket-allow permission requests.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-insecure-permission-request-handler\",\n },\n messages: {\n default:\n \"Do not blanket-allow permissions in setPermissionRequestHandler callbacks.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-insecure-permission-request-handler\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n return {\n \"NewExpression[callee.name=/^(?:BrowserWindow|BrowserView)$/] > ObjectExpression.arguments > Property.properties[key.name='webPreferences'] > ObjectExpression.value > Property.properties[key.name=/^(?:nodeIntegration|nodeIntegrationInWorker|nodeIntegrationInSubFrames)$/][value.value=true]\"(\n node\n ) {\n context.report({\n fix(fixer) {\n const propertyText = context.sourceCode.getText(node);\n const separatorIndex = propertyText.indexOf(\":\");\n\n if (separatorIndex === -1) {\n return null;\n }\n\n const valuePortion = propertyText.slice(\n separatorIndex + 1\n );\n const trimmedValuePortion = valuePortion.trimStart();\n\n if (!trimmedValuePortion.startsWith(\"true\")) {\n return null;\n }\n\n const leadingWhitespaceLength =\n valuePortion.length - trimmedValuePortion.length;\n const nextValuePortion = `${valuePortion.slice(0, leadingWhitespaceLength)}false${trimmedValuePortion.slice(\"true\".length)}`;\n const nextPropertyText = `${propertyText.slice(0, separatorIndex + 1)}${nextValuePortion}`;\n\n if (nextPropertyText === propertyText) {\n return null;\n }\n\n return fixer.replaceText(node, nextPropertyText);\n },\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling Electron Node.js integration in BrowserWindow/BrowserView webPreferences.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-node-integration\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not enable Node.js integration for remote content.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-node-integration\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getMemberPropertyName } from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst isFunctionExpression = (\n expression: TSESTree.CallExpressionArgument\n): expression is\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst isBooleanTrueLiteral = (\n expression: null | TSESTree.Expression | undefined\n): boolean => expression?.type === \"Literal\" && expression.value === true;\n\nconst isAllowAllPermissionCheckHandler = (\n callbackNode: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression\n): boolean => {\n if (callbackNode.body.type !== \"BlockStatement\") {\n return isBooleanTrueLiteral(callbackNode.body);\n }\n\n if (callbackNode.body.body.length !== 1) {\n return false;\n }\n\n const onlyStatement = arrayFirst(callbackNode.body.body);\n\n return (\n onlyStatement?.type === \"ReturnStatement\" &&\n isBooleanTrueLiteral(onlyStatement.argument)\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n getMemberPropertyName(node.callee) !==\n \"setPermissionCheckHandler\"\n ) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n !isFunctionExpression(firstArgument) ||\n !isAllowAllPermissionCheckHandler(firstArgument)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Electron permission check handlers that unconditionally allow every permission request.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-permission-check-handler-allow-all\",\n },\n messages: {\n default:\n \"Do not unconditionally return true from setPermissionCheckHandler callbacks.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-permission-check-handler-allow-all\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isIpcMainObjectExpression = (\n expression: TSESTree.Expression\n): boolean => {\n if (expression.type === \"Identifier\") {\n return expression.name === \"ipcMain\";\n }\n\n if (expression.type !== \"MemberExpression\") {\n return false;\n }\n\n return getMemberPropertyName(expression) === \"ipcMain\";\n};\n\nconst isIpcMainHandlerRegistration = (\n node: TSESTree.CallExpression\n): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (methodName !== \"on\" && methodName !== \"handle\") {\n return false;\n }\n\n return isIpcMainObjectExpression(node.callee.object);\n};\n\nconst isFunctionExpression = (\n expression: TSESTree.CallExpressionArgument\n): expression is\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst hasSenderValidationPattern = (\n callbackNode:\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression,\n context: TSESLint.RuleContext<MessageIds, unknown[]>,\n eventParameterName: string\n): boolean => {\n const callbackSourceText = context.sourceCode.getText(callbackNode);\n const escapedEventName = eventParameterName.replaceAll(\"$\", String.raw`\\$`);\n // eslint-disable-next-line security/detect-non-literal-regexp -- Event parameter identifier is escaped before interpolation for sender-access detection.\n const eventSenderPattern = new RegExp(\n String.raw`\\b${escapedEventName}\\s*\\.\\s*(?:sender|senderFrame)\\b`,\n \"u\"\n );\n\n return (\n eventSenderPattern.test(callbackSourceText) ||\n /\\b(?:allowlist|getURL|isTrusted|origin|validate|whitelist)\\b/u.test(\n callbackSourceText\n )\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isIpcMainHandlerRegistration(node)) {\n return;\n }\n\n const [, handlerNode] = node.arguments;\n\n if (\n handlerNode === undefined ||\n handlerNode.type === \"SpreadElement\" ||\n !isFunctionExpression(handlerNode)\n ) {\n return;\n }\n\n const eventParameter = arrayFirst(handlerNode.params);\n\n if (eventParameter?.type !== \"Identifier\") {\n return;\n }\n\n if (\n hasSenderValidationPattern(\n handlerNode,\n context,\n eventParameter.name\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: handlerNode,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow privileged ipcMain handlers that do not validate sender/frame trust.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-unchecked-ipc-sender\",\n },\n messages: {\n default:\n \"Validate the IPC sender or sender frame before handling privileged ipcMain requests.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-unchecked-ipc-sender\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isFunctionExpression = (\n expression: TSESTree.CallExpressionArgument\n): expression is\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst hasUnsafeAllowAction = (\n callbackNode:\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression,\n context: TSESLint.RuleContext<MessageIds, unknown[]>\n): boolean => {\n const callbackSourceText = context.sourceCode.getText(callbackNode);\n\n return /\\baction\\s*:\\s*[\"'`]allow[\"'`]/u.test(callbackSourceText);\n};\n\nconst hasPreventDefaultCall = (\n callbackNode:\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression,\n context: TSESLint.RuleContext<MessageIds, unknown[]>,\n eventParameterName: string\n): boolean => {\n const callbackSourceText = context.sourceCode.getText(callbackNode);\n const escapedName = eventParameterName.replaceAll(\"$\", String.raw`\\$`);\n // eslint-disable-next-line security/detect-non-literal-regexp -- Event parameter identifier is escaped before interpolation for preventDefault-call detection.\n const preventDefaultPattern = new RegExp(\n String.raw`\\b${escapedName}\\s*\\.\\s*preventDefault\\s*\\(`,\n \"u\"\n );\n\n return preventDefaultPattern.test(callbackSourceText);\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (methodName === \"setWindowOpenHandler\") {\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n !isFunctionExpression(firstArgument)\n ) {\n return;\n }\n\n if (!hasUnsafeAllowAction(firstArgument, context)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n\n return;\n }\n\n if (methodName !== \"on\") {\n return;\n }\n\n const [firstArgument, secondArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\" ||\n !isFunctionExpression(secondArgument)\n ) {\n return;\n }\n\n if (\n firstArgument.type !== \"Literal\" ||\n firstArgument.value !== \"will-navigate\"\n ) {\n return;\n }\n\n const eventParameter = arrayFirst(secondArgument.params);\n\n if (eventParameter?.type !== \"Identifier\") {\n return;\n }\n\n if (\n hasPreventDefaultCall(\n secondArgument,\n context,\n eventParameter.name\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: secondArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Electron navigation handlers that allow unrestricted navigation or window opening.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-unrestricted-navigation\",\n },\n messages: {\n default:\n \"Restrict Electron navigation/window-opening handlers with explicit blocking or allowlist logic.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-unrestricted-navigation\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getStaticTemplateLiteralValue = (\n templateLiteral: TSESTree.TemplateLiteral\n): string | undefined => {\n if (templateLiteral.expressions.length > 0) {\n return undefined;\n }\n\n return arrayFirst(templateLiteral.quasis)?.value.cooked ?? undefined;\n};\n\nconst getStringValue = (node: TSESTree.Expression): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\") {\n return getStaticTemplateLiteralValue(node);\n }\n\n return undefined;\n};\n\nconst isAllowedExternalProtocol = (value: string): boolean =>\n /^(?:https|mailto):/iu.test(value.trim());\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isShellObjectExpression = (node: TSESTree.Expression): boolean => {\n if (node.type === \"Identifier\") {\n return node.name === \"shell\";\n }\n\n if (node.type !== \"MemberExpression\") {\n return false;\n }\n\n return getMemberPropertyName(node) === \"shell\";\n};\n\nconst isShellOpenExternalCallee = (\n callee: TSESTree.CallExpression[\"callee\"]\n): boolean => {\n if (callee.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(callee) !== \"openExternal\") {\n return false;\n }\n\n return isShellObjectExpression(callee.object);\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node) {\n if (!isShellOpenExternalCallee(node.callee)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const firstArgumentValue = getStringValue(firstArgument);\n\n if (\n typeof firstArgumentValue === \"string\" &&\n isAllowedExternalProtocol(firstArgumentValue)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow untrusted or non-HTTPS/non-mailto URLs in Electron shell.openExternal calls.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-untrusted-open-external\",\n },\n messages: {\n default:\n \"Only open trusted https: or mailto: URLs with shell.openExternal.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-untrusted-open-external\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst isJsxWebviewElement = (node: TSESTree.JSXOpeningElement): boolean => {\n if (node.name.type === \"JSXIdentifier\") {\n return node.name.name.toLowerCase() === \"webview\";\n }\n\n return false;\n};\n\nconst getJsxAttributeName = (\n attributeNode: TSESTree.JSXAttribute\n): string | undefined => {\n if (attributeNode.name.type !== \"JSXIdentifier\") {\n return undefined;\n }\n\n return attributeNode.name.name.toLowerCase();\n};\n\nconst isTruthyJsxAttributeValue = (\n attributeValue: TSESTree.JSXAttribute[\"value\"]\n): boolean => {\n if (attributeValue === null) {\n return true;\n }\n\n if (attributeValue.type === \"Literal\") {\n if (typeof attributeValue.value === \"boolean\") {\n return attributeValue.value;\n }\n\n if (typeof attributeValue.value === \"string\") {\n return attributeValue.value.toLowerCase() !== \"false\";\n }\n\n return false;\n }\n\n if (attributeValue.type !== \"JSXExpressionContainer\") {\n return false;\n }\n\n if (\n attributeValue.expression.type === \"Literal\" &&\n typeof attributeValue.expression.value === \"boolean\"\n ) {\n return attributeValue.expression.value;\n }\n\n return true;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n JSXOpeningElement(node: TSESTree.JSXOpeningElement) {\n if (!isJsxWebviewElement(node)) {\n return;\n }\n\n for (const attributeNode of node.attributes) {\n if (attributeNode.type !== \"JSXAttribute\") {\n continue;\n }\n\n if (getJsxAttributeName(attributeNode) !== \"allowpopups\") {\n continue;\n }\n\n if (!isTruthyJsxAttributeValue(attributeNode.value)) {\n continue;\n }\n\n context.report({\n fix(fixer) {\n return fixer.remove(attributeNode);\n },\n messageId: \"default\",\n node: attributeNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow enabling allowpopups in Electron webview elements.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-webview-allowpopups\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not enable allowpopups on Electron webview elements.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-webview-allowpopups\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayJoin, isEmpty } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getStaticJsxAttributeStringValue } from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst UNSAFE_WEBPREFERENCES_PATTERNS = [\n {\n flagName: \"allowRunningInsecureContent\",\n pattern: /\\ballowrunninginsecurecontent\\s*=\\s*(?:1|on|true|yes)\\b/iu,\n },\n {\n flagName: \"contextIsolation\",\n pattern: /\\bcontextisolation\\s*=\\s*(?:0|false|no|off)\\b/iu,\n },\n {\n flagName: \"experimentalFeatures\",\n pattern: /\\bexperimentalfeatures\\s*=\\s*(?:1|on|true|yes)\\b/iu,\n },\n {\n flagName: \"sandbox\",\n pattern: /\\bsandbox\\s*=\\s*(?:0|false|no|off)\\b/iu,\n },\n {\n flagName: \"webSecurity\",\n pattern: /\\bwebsecurity\\s*=\\s*(?:0|false|no|off)\\b/iu,\n },\n] as const;\n\nconst isJsxWebviewElement = (node: TSESTree.JSXOpeningElement): boolean =>\n node.name.type === \"JSXIdentifier\" &&\n node.name.name.toLowerCase() === \"webview\";\n\nconst getJsxAttributeName = (attributeNode: TSESTree.JSXAttribute): string => {\n if (attributeNode.name.type === \"JSXIdentifier\") {\n return attributeNode.name.name.toLowerCase();\n }\n\n return `${attributeNode.name.namespace.name}:${attributeNode.name.name.name}`.toLowerCase();\n};\n\nconst getUnsafeWebPreferencesFlags = (\n attributeValue: string\n): readonly string[] =>\n UNSAFE_WEBPREFERENCES_PATTERNS.flatMap(({ flagName, pattern }) =>\n pattern.test(attributeValue) ? [flagName] : []\n );\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n JSXOpeningElement(node: TSESTree.JSXOpeningElement) {\n if (!isJsxWebviewElement(node)) {\n return;\n }\n\n for (const attributeNode of node.attributes) {\n if (attributeNode.type !== \"JSXAttribute\") {\n continue;\n }\n\n if (\n getJsxAttributeName(attributeNode) !== \"webpreferences\"\n ) {\n continue;\n }\n\n const staticValue = getStaticJsxAttributeStringValue(\n attributeNode.value\n );\n\n if (typeof staticValue !== \"string\") {\n continue;\n }\n\n const unsafeFlags =\n getUnsafeWebPreferencesFlags(staticValue);\n\n if (isEmpty(unsafeFlags)) {\n continue;\n }\n\n context.report({\n data: {\n flags: arrayJoin(unsafeFlags, \", \"),\n },\n messageId: \"default\",\n node: attributeNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow unsafe Electron webview webpreferences string flags.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-webview-insecure-webpreferences\",\n },\n messages: {\n default:\n \"Do not enable unsafe Electron webview webpreferences flags: {{flags}}.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-webview-insecure-webpreferences\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst isJsxWebviewElement = (node: TSESTree.JSXOpeningElement): boolean =>\n node.name.type === \"JSXIdentifier\" &&\n node.name.name.toLowerCase() === \"webview\";\n\nconst getJsxAttributeName = (attributeNode: TSESTree.JSXAttribute): string => {\n if (attributeNode.name.type === \"JSXIdentifier\") {\n return attributeNode.name.name.toLowerCase();\n }\n\n return `${attributeNode.name.namespace.name}:${attributeNode.name.name.name}`.toLowerCase();\n};\n\nconst isNodeIntegrationAttribute = (attributeName: string): boolean => {\n const normalizedName = attributeName.toLowerCase();\n\n return (\n normalizedName === \"nodeintegration\" ||\n normalizedName === \"nodeintegrationinsubframes\"\n );\n};\n\nconst isTruthyJsxAttributeValue = (\n attributeValue: TSESTree.JSXAttribute[\"value\"]\n): boolean => {\n if (attributeValue === null) {\n return true;\n }\n\n if (attributeValue.type === \"Literal\") {\n if (typeof attributeValue.value === \"boolean\") {\n return attributeValue.value;\n }\n\n if (typeof attributeValue.value === \"string\") {\n return attributeValue.value.toLowerCase() !== \"false\";\n }\n\n return false;\n }\n\n if (attributeValue.type !== \"JSXExpressionContainer\") {\n return false;\n }\n\n if (\n attributeValue.expression.type === \"Literal\" &&\n typeof attributeValue.expression.value === \"boolean\"\n ) {\n return attributeValue.expression.value;\n }\n\n return true;\n};\n\nconst webPreferencesHasNodeIntegration = (\n attributeValue: TSESTree.JSXAttribute[\"value\"]\n): boolean => {\n if (attributeValue === null) {\n return false;\n }\n\n if (\n attributeValue.type === \"Literal\" &&\n typeof attributeValue.value === \"string\"\n ) {\n return /\\bnodeintegration\\b/iu.test(attributeValue.value);\n }\n\n return false;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n JSXOpeningElement(node: TSESTree.JSXOpeningElement) {\n if (!isJsxWebviewElement(node)) {\n return;\n }\n\n for (const attributeNode of node.attributes) {\n if (attributeNode.type !== \"JSXAttribute\") {\n continue;\n }\n\n const attributeName = getJsxAttributeName(attributeNode);\n\n if (isNodeIntegrationAttribute(attributeName)) {\n if (!isTruthyJsxAttributeValue(attributeNode.value)) {\n continue;\n }\n\n context.report({\n fix(fixer) {\n return fixer.remove(attributeNode);\n },\n messageId: \"default\",\n node: attributeNode,\n });\n\n continue;\n }\n\n if (attributeName !== \"webpreferences\") {\n continue;\n }\n\n if (\n !webPreferencesHasNodeIntegration(attributeNode.value)\n ) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: attributeNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow node integration flags on Electron webview elements.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-webview-node-integration\",\n },\n fixable: \"code\",\n messages: {\n default:\n \"Do not enable node integration options on Electron webview elements.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-electron-webview-node-integration\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n return {\n \"CallExpression[arguments.length=1] > MemberExpression.callee[property.name='html']\"(\n node: TSESTree.MemberExpression\n ) {\n const parentCall = node.parent;\n\n if (parentCall.type !== \"CallExpression\") {\n return;\n }\n\n const [firstArgument] = parentCall.arguments;\n\n if (\n firstArgument?.type === \"Literal\" &&\n (firstArgument.value === \"\" || firstArgument.value === null)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow direct html(...) DOM writes (for example jQuery html()) that bypass sanitization.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-html-method\",\n },\n messages: {\n default: \"Do not write to the DOM directly using html(...).\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-html-method\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst getStaticStringValue = (\n node: TSESTree.Expression\n): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\" && node.expressions.length === 0) {\n return arrayFirst(node.quasis)?.value.cooked ?? undefined;\n }\n\n return undefined;\n};\n\nconst isInsecureHttpUrl = (value: string): boolean =>\n /^http:\\/\\//iu.test(value.trim());\n\nconst isTargetRequestMethod = (node: TSESTree.CallExpression): boolean => {\n if (node.callee.type === \"Identifier\") {\n return node.callee.name === \"fetch\";\n }\n\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (methodName !== \"request\" && methodName !== \"get\") {\n return false;\n }\n\n if (node.callee.object.type !== \"Identifier\") {\n return false;\n }\n\n return (\n node.callee.object.name === \"http\" ||\n node.callee.object.name === \"https\"\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isTargetRequestMethod(node)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const firstArgumentValue = getStaticStringValue(firstArgument);\n\n if (\n typeof firstArgumentValue !== \"string\" ||\n !isInsecureHttpUrl(firstArgumentValue)\n ) {\n return;\n }\n\n context.report({\n fix(fixer) {\n const sourceText =\n context.sourceCode.getText(firstArgument);\n const fixedSourceText = sourceText.replace(\n /^(?<quote>[\"'`]?)http:\\/\\//iu,\n \"$<quote>https://\"\n );\n\n if (fixedSourceText === sourceText) {\n return null;\n }\n\n return fixer.replaceText(\n firstArgument,\n fixedSourceText\n );\n },\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Node HTTP client calls that use insecure http:// URLs.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-http-request-to-insecure-protocol\",\n },\n fixable: \"code\",\n messages: {\n default: \"Use HTTPS endpoints instead of insecure http:// URLs.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-http-request-to-insecure-protocol\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport {\n getFullTypeChecker,\n getNodeTypeAsString,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getStaticJsxAttributeStringValue,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\n\ntype AstUtilsRuleContext = Parameters<typeof getFullTypeChecker>[0];\ntype MessageIds = \"default\";\n\nconst isJsxIframeElement = (node: TSESTree.JSXOpeningElement): boolean => {\n if (node.name.type !== \"JSXIdentifier\") {\n return false;\n }\n\n return node.name.name.toLowerCase() === \"iframe\";\n};\n\nconst getJsxAttributeName = (\n attributeNode: TSESTree.JSXAttribute\n): string | undefined => {\n if (attributeNode.name.type !== \"JSXIdentifier\") {\n return undefined;\n }\n\n return attributeNode.name.name.toLowerCase();\n};\n\nconst isCreateElementIFrameCall = (node: TSESTree.Node): boolean => {\n if (\n node.type !== \"CallExpression\" ||\n node.callee.type !== \"MemberExpression\"\n ) {\n return false;\n }\n\n if (getMemberPropertyName(node.callee) !== \"createElement\") {\n return false;\n }\n\n const [firstArgument] = node.arguments;\n\n return (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n getStaticStringValue(firstArgument) === \"iframe\"\n );\n};\n\nconst isLikelyIFrameElement = (\n node: TSESTree.Node,\n context: AstUtilsRuleContext,\n fullTypeChecker: ReturnType<typeof getFullTypeChecker>\n): boolean => {\n if (fullTypeChecker !== undefined) {\n const nodeType = getNodeTypeAsString(fullTypeChecker, node, context);\n\n if (nodeType === \"any\" || nodeType.includes(\"HTMLIFrameElement\")) {\n return true;\n }\n }\n\n if (isCreateElementIFrameCall(node)) {\n return true;\n }\n\n if (node.type === \"Identifier\") {\n const normalizedName = node.name.toLowerCase();\n\n return normalizedName === \"frame\" || normalizedName.endsWith(\"iframe\");\n }\n\n if (node.type !== \"MemberExpression\") {\n return false;\n }\n\n const propertyName = getMemberPropertyName(node);\n\n if (typeof propertyName !== \"string\") {\n return false;\n }\n\n return propertyName.toLowerCase().endsWith(\"iframe\");\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (node.left.type !== \"MemberExpression\") {\n return;\n }\n\n if (getMemberPropertyName(node.left) !== \"srcdoc\") {\n return;\n }\n\n if (getStaticStringValue(node.right) === \"\") {\n return;\n }\n\n if (\n !isLikelyIFrameElement(\n node.left.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.right,\n });\n },\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (\n methodName !== \"setAttribute\" &&\n methodName !== \"setAttributeNS\"\n ) {\n return;\n }\n\n const [firstArgument, secondArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n getStaticStringValue(firstArgument) !== \"srcdoc\"\n ) {\n return;\n }\n\n if (\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\" ||\n getStaticStringValue(secondArgument) === \"\"\n ) {\n return;\n }\n\n if (\n !isLikelyIFrameElement(\n node.callee.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: secondArgument,\n });\n },\n JSXOpeningElement(node: TSESTree.JSXOpeningElement) {\n if (!isJsxIframeElement(node)) {\n return;\n }\n\n for (const attributeNode of node.attributes) {\n if (attributeNode.type !== \"JSXAttribute\") {\n continue;\n }\n\n if (getJsxAttributeName(attributeNode) !== \"srcdoc\") {\n continue;\n }\n\n if (\n getStaticJsxAttributeStringValue(\n attributeNode.value\n ) === \"\"\n ) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: attributeNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow iframe srcdoc assignments and JSX srcDoc attributes that embed inline HTML documents.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-iframe-srcdoc\",\n },\n messages: {\n default:\n \"Do not populate iframe srcdoc with inline HTML; load a reviewed document URL instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-iframe-srcdoc\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport {\n getFullTypeChecker,\n getNodeTypeAsString,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\n\nconst isEmptyStringLiteral = (node: TSESTree.Node): boolean =>\n node.type === \"Literal\" && node.value === \"\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<\n [],\n \"noInnerHtml\" | \"noInsertAdjacentHTML\"\n>({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n const mightBeHTMLElement = (node: TSESTree.Node): boolean => {\n const nodeType = getNodeTypeAsString(\n fullTypeChecker,\n node,\n context\n );\n\n return /HTML.*Element/u.test(nodeType) || nodeType === \"any\";\n };\n\n return {\n \"AssignmentExpression[left.type='MemberExpression'][left.property.name=/^(?:innerHTML|outerHTML)$/]\"(\n node: TSESTree.AssignmentExpression\n ) {\n if (isEmptyStringLiteral(node.right)) {\n return;\n }\n\n if (node.left.type !== \"MemberExpression\") {\n return;\n }\n\n if (!mightBeHTMLElement(node.left.object)) {\n return;\n }\n\n context.report({\n messageId: \"noInnerHtml\",\n node,\n });\n },\n \"CallExpression[arguments.length=2] > MemberExpression.callee[property.name='insertAdjacentHTML']\"(\n node: TSESTree.MemberExpression\n ) {\n if (node.parent.type !== \"CallExpression\") {\n return;\n }\n\n const secondArgument = node.parent.arguments[1];\n\n if (\n secondArgument !== undefined &&\n isEmptyStringLiteral(secondArgument)\n ) {\n return;\n }\n\n if (!mightBeHTMLElement(node.object)) {\n return;\n }\n\n context.report({\n messageId: \"noInsertAdjacentHTML\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow unsafe direct DOM HTML writes via innerHTML/outerHTML/insertAdjacentHTML.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-inner-html\",\n },\n messages: {\n noInnerHtml:\n \"Do not write to the DOM directly using innerHTML/outerHTML.\",\n noInsertAdjacentHTML:\n \"Do not write to the DOM using insertAdjacentHTML.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-inner-html\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { basename, parse } from \"node:path\";\nimport { arrayIncludes, isDefined } from \"ts-extras\";\n\nimport {\n getFullTypeChecker,\n getNodeTypeAsString,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\n\nconst bannedRandomLibraries = [\n \"chance\",\n \"random-number\",\n \"random-int\",\n \"random-float\",\n \"random-seed\",\n \"unique-random\",\n] as const;\n\nconst isBannedRandomLibrary = (value: string): boolean =>\n arrayIncludes(\n bannedRandomLibraries,\n value as (typeof bannedRandomLibraries)[number]\n );\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n \"CallExpression > MemberExpression[property.name='pseudoRandomBytes']\"(\n node: TSESTree.MemberExpression\n ) {\n const isUnsafe = isDefined(fullTypeChecker)\n ? arrayIncludes(\n [\"any\", \"Crypto\"],\n getNodeTypeAsString(\n fullTypeChecker,\n node.object,\n context\n )\n )\n : node.object.type === \"Identifier\" &&\n node.object.name === \"crypto\";\n\n if (!isUnsafe) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n \"CallExpression > MemberExpression[property.name='random']\"(\n node: TSESTree.MemberExpression\n ) {\n const isUnsafe = isDefined(fullTypeChecker)\n ? arrayIncludes(\n [\"any\", \"Math\"],\n getNodeTypeAsString(\n fullTypeChecker,\n node.object,\n context\n )\n )\n : node.object.type === \"Identifier\" &&\n node.object.name === \"Math\";\n\n if (!isUnsafe) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n \"CallExpression[callee.name='require'][arguments.length=1]\"(\n node: TSESTree.CallExpression\n ) {\n const [sourceArgument] = node.arguments;\n\n if (\n !isDefined(sourceArgument) ||\n sourceArgument.type !== \"Literal\" ||\n typeof sourceArgument.value !== \"string\"\n ) {\n return;\n }\n\n const requireName = parse(basename(sourceArgument.value)).name;\n\n if (!isBannedRandomLibrary(requireName)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n ImportDeclaration(node) {\n const sourceText = node.source.value;\n\n if (typeof sourceText !== \"string\") {\n return;\n }\n\n if (!isBannedRandomLibrary(basename(sourceText))) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow insecure pseudo-random APIs and known non-cryptographic random libraries for security-sensitive code.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-insecure-random\",\n },\n messages: {\n default:\n \"Do not use pseudo-random generators for secrets such as tokens, keys, or passwords.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-insecure-random\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst isFalseLiteral = (node: TSESTree.Property[\"value\"]): boolean =>\n node.type === \"Literal\" && node.value === false;\n\nconst getObjectPropertyName = (\n propertyNode: TSESTree.Property\n): string | undefined => {\n if (propertyNode.computed) {\n return undefined;\n }\n\n if (propertyNode.key.type === \"Identifier\") {\n return propertyNode.key.name;\n }\n\n if (\n propertyNode.key.type === \"Literal\" &&\n typeof propertyNode.key.value === \"string\"\n ) {\n return propertyNode.key.value;\n }\n\n return undefined;\n};\n\nconst findRejectUnauthorizedFalseProperty = (\n objectExpression: TSESTree.ObjectExpression\n): TSESTree.Property | undefined => {\n for (const propertyNode of objectExpression.properties) {\n if (propertyNode.type !== \"Property\" || propertyNode.kind !== \"init\") {\n continue;\n }\n\n if (getObjectPropertyName(propertyNode) !== \"rejectUnauthorized\") {\n continue;\n }\n\n if (isFalseLiteral(propertyNode.value)) {\n return propertyNode;\n }\n }\n\n return undefined;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n ObjectExpression(node: TSESTree.ObjectExpression) {\n const insecureOptionProperty =\n findRejectUnauthorizedFalseProperty(node);\n\n if (insecureOptionProperty === undefined) {\n return;\n }\n\n context.report({\n fix(fixer) {\n if (\n insecureOptionProperty.value.type !== \"Literal\" ||\n insecureOptionProperty.value.value !== false\n ) {\n return null;\n }\n\n return fixer.replaceText(\n insecureOptionProperty.value,\n \"true\"\n );\n },\n messageId: \"default\",\n node: insecureOptionProperty,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow rejectUnauthorized: false in TLS/HTTPS option objects.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-insecure-tls-agent-options\",\n },\n fixable: \"code\",\n messages: {\n default:\n \"Do not disable TLS certificate verification with rejectUnauthorized: false.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-insecure-tls-agent-options\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\n/** Default insecure-protocol blocklist patterns. */\nconst defaultBlocklist: readonly RegExp[] = [/^(?:ftp|http|telnet|ws):\\/\\//iu];\n\n/** Default allowlisted literal URL exceptions. */\nconst defaultExceptions: readonly RegExp[] = [\n /^http:(?:\\/\\/|\\\\u002f\\\\u002f)schemas\\.microsoft\\.com.*/iu,\n /^http:(?:\\/\\/|\\\\u002f\\\\u002f)schemas\\.openxmlformats\\.org.*/iu,\n /^http:(?:\\/|\\\\u002f){2}localhost(?::|\\/|\\\\u002f)*/iu,\n /^http:\\/\\/w{3}\\.w3\\.org\\/1999\\/xhtml/iu,\n /^http:\\/\\/w{3}\\.w3\\.org\\/2000\\/svg/iu,\n];\n\n/** Default source-text exceptions for variable/template contexts. */\nconst defaultVariableExceptions: readonly RegExp[] = [];\n\ntype MessageIds = \"doNotUseInsecureUrl\";\n\ntype NoInsecureUrlOptions = Readonly<{\n blocklist?: readonly string[];\n exceptions?: readonly string[];\n varExceptions?: readonly string[];\n}>;\n\ntype Options = [NoInsecureUrlOptions];\n\nconst asCaseInsensitiveRegex = (pattern: RegExp | string): RegExp => {\n if (pattern instanceof RegExp) {\n // eslint-disable-next-line security/detect-non-literal-regexp -- Rebuild trusted RegExp source with normalized flags only.\n return new RegExp(pattern.source, \"iu\");\n }\n\n // eslint-disable-next-line security/detect-non-literal-regexp -- User-configured regex patterns are intentionally compiled for matching behavior.\n return new RegExp(pattern, \"iu\");\n};\n\nconst matches = (patterns: readonly RegExp[], value: string): boolean =>\n patterns.some((pattern) => pattern.test(value));\n\nconst toRegexSources = (patterns: readonly RegExp[]): readonly string[] =>\n patterns.map((pattern) => pattern.source);\n\nconst shouldAttemptFix = (\n variableExceptions: readonly RegExp[],\n context: TSESLint.RuleContext<MessageIds, Options>,\n node: TSESTree.Node\n): boolean => {\n const targetNode = node.parent ?? node;\n const targetText = context.sourceCode.getText(targetNode);\n\n return !matches(variableExceptions, targetText);\n};\n\nconst reportInsecureUrl = (\n context: TSESLint.RuleContext<MessageIds, Options>,\n node: TSESTree.Node,\n replacementSourceText: string\n): void => {\n context.report({\n fix(fixer) {\n if (!/http:/iu.test(replacementSourceText)) {\n return null;\n }\n\n return fixer.replaceText(\n node,\n replacementSourceText.replace(/http:/iu, \"https:\")\n );\n },\n messageId: \"doNotUseInsecureUrl\",\n node,\n });\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<Options, MessageIds>({\n create(context) {\n const [options = {}] = context.options;\n const blocklist = (options.blocklist ?? defaultBlocklist).map(\n (pattern) => asCaseInsensitiveRegex(pattern)\n );\n const exceptions = (options.exceptions ?? defaultExceptions).map(\n (pattern) => asCaseInsensitiveRegex(pattern)\n );\n const variableExceptions = (\n options.varExceptions ?? defaultVariableExceptions\n ).map((pattern) => asCaseInsensitiveRegex(pattern));\n\n return {\n Literal(node) {\n if (typeof node.value !== \"string\") {\n return;\n }\n\n if (\n node.parent?.type === \"JSXAttribute\" &&\n node.parent.name.type === \"JSXIdentifier\" &&\n node.parent.name.name === \"xmlns\"\n ) {\n return;\n }\n\n if (\n !matches(blocklist, node.value) ||\n matches(exceptions, node.value)\n ) {\n return;\n }\n\n if (!shouldAttemptFix(variableExceptions, context, node)) {\n return;\n }\n\n reportInsecureUrl(context, node, JSON.stringify(node.value));\n },\n TemplateElement(node) {\n if (\n typeof node.value.raw !== \"string\" ||\n typeof node.value.cooked !== \"string\"\n ) {\n return;\n }\n\n const isRawMatch =\n shouldAttemptFix(variableExceptions, context, node) &&\n matches(blocklist, node.value.raw) &&\n !matches(exceptions, node.value.raw);\n const isCookedMatch =\n matches(blocklist, node.value.cooked) &&\n !matches(exceptions, node.value.cooked);\n\n if (!isRawMatch && !isCookedMatch) {\n return;\n }\n\n const escapedTemplatePart = JSON.stringify(\n context.sourceCode.getText(node)\n ).slice(1, -1);\n\n reportInsecureUrl(context, node, escapedTemplatePart);\n },\n };\n },\n meta: {\n defaultOptions: [\n {\n blocklist: toRegexSources(defaultBlocklist),\n exceptions: toRegexSources(defaultExceptions),\n varExceptions: toRegexSources(defaultVariableExceptions),\n },\n ],\n deprecated: false,\n docs: {\n description:\n \"disallow insecure URL protocols such as http:// and ftp:// with configurable exceptions.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-insecure-url\",\n },\n fixable: \"code\",\n messages: {\n doNotUseInsecureUrl: \"Do not use insecure URLs.\",\n },\n schema: [\n {\n additionalProperties: false,\n properties: {\n blocklist: {\n description:\n \"Regular-expression strings that identify insecure URL patterns to block.\",\n items: { type: \"string\" },\n type: \"array\",\n },\n exceptions: {\n description:\n \"Regular-expression strings that identify allowed URL literals excluded from blocklist checks.\",\n items: { type: \"string\" },\n type: \"array\",\n },\n varExceptions: {\n description:\n \"Regular-expression strings that identify source-text contexts where automatic fixing should be skipped.\",\n items: { type: \"string\" },\n type: \"array\",\n },\n },\n type: \"object\",\n },\n ],\n type: \"problem\",\n },\n name: \"no-insecure-url\",\n});\n\nexport { defaultBlocklist, defaultExceptions, defaultVariableExceptions };\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst getStaticStringValue = (\n node: TSESTree.Expression\n): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\" && node.expressions.length === 0) {\n return arrayFirst(node.quasis)?.value.cooked ?? undefined;\n }\n\n return undefined;\n};\n\nconst isJavaScriptUrl = (value: string): boolean =>\n /^\\s*javascript\\s*:/iu.test(value);\n\nconst isLocationLikeLeftHand = (\n expression: TSESTree.AssignmentExpression[\"left\"]\n): boolean => {\n if (expression.type !== \"MemberExpression\") {\n return false;\n }\n\n const propertyName = getMemberPropertyName(expression);\n\n return propertyName === \"location\" || propertyName === \"href\";\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (node.operator !== \"=\") {\n return;\n }\n\n if (!isLocationLikeLeftHand(node.left)) {\n return;\n }\n\n const assignedValue = getStaticStringValue(node.right);\n\n if (\n typeof assignedValue !== \"string\" ||\n !isJavaScriptUrl(assignedValue)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (\n methodName !== \"assign\" &&\n methodName !== \"replace\" &&\n methodName !== \"open\"\n ) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const argumentValue = getStaticStringValue(firstArgument);\n\n if (\n typeof argumentValue !== \"string\" ||\n !isJavaScriptUrl(argumentValue)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow assigning javascript: URLs to location-like navigation sinks.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-location-javascript-url\",\n },\n messages: {\n default:\n \"Do not use javascript: URLs in location or open-like navigation sinks.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-location-javascript-url\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESLint, TSESTree } from \"@typescript-eslint/utils\";\nimport type { UnknownRecord } from \"type-fest\";\n\nimport { keyIn, objectEntries } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\n\ntype CallbackFunction =\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression;\n\ntype MessageIds = \"default\";\ntype RuleContext = Readonly<TSESLint.RuleContext<MessageIds, unknown[]>>;\n\nconst isFunctionExpression = (\n expression: Readonly<TSESTree.Node>\n): expression is CallbackFunction =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst hasMessageEventGuardKeywords = (callbackText: string): boolean =>\n /\\b(?:allowlist|origin|trusted|validate|verify|whitelist)\\b/iu.test(\n callbackText\n );\n\nconst toNode = (value: unknown): Readonly<TSESTree.Node> | undefined => {\n if (typeof value !== \"object\" || value === null) {\n return undefined;\n }\n\n const recordValue = value as UnknownRecord;\n\n if (\n !keyIn(recordValue, \"type\") ||\n typeof recordValue[\"type\"] !== \"string\"\n ) {\n return undefined;\n }\n\n return recordValue as unknown as Readonly<TSESTree.Node>;\n};\n\nconst someDescendantNode = (\n node: Readonly<TSESTree.Node>,\n predicate: (node: Readonly<TSESTree.Node>) => boolean\n): boolean => {\n if (predicate(node)) {\n return true;\n }\n\n for (const [propertyName, propertyValue] of objectEntries(node)) {\n if (propertyName === \"parent\") {\n continue;\n }\n\n if (Array.isArray(propertyValue)) {\n for (const element of propertyValue) {\n const childNode = toNode(element);\n\n if (\n childNode !== undefined &&\n someDescendantNode(childNode, predicate)\n ) {\n return true;\n }\n }\n\n continue;\n }\n\n const childNode = toNode(propertyValue);\n\n if (\n childNode !== undefined &&\n someDescendantNode(childNode, predicate)\n ) {\n return true;\n }\n }\n\n return false;\n};\n\nconst isIdentifierNamed = (\n node: Readonly<TSESTree.Node>,\n identifierName: string\n): node is TSESTree.Identifier =>\n node.type === \"Identifier\" && node.name === identifierName;\n\nconst isStaticPropertyMatch = (\n memberExpression: Readonly<TSESTree.MemberExpression>,\n objectName: string,\n propertyName: string\n): boolean =>\n isIdentifierNamed(memberExpression.object, objectName) &&\n getMemberPropertyName(memberExpression) === propertyName;\n\nconst patternContainsProperty = (\n pattern: Readonly<TSESTree.ObjectPattern>,\n propertyName: string\n): boolean =>\n pattern.properties.some((propertyNode) => {\n if (propertyNode.type !== \"Property\") {\n return false;\n }\n\n return getPropertyName(propertyNode) === propertyName;\n });\n\nconst containsObjectDestructureFromIdentifier = (\n rootNode: Readonly<TSESTree.Node>,\n sourceName: string,\n propertyName: string\n): boolean =>\n someDescendantNode(rootNode, (node) => {\n if (node.type === \"VariableDeclarator\") {\n return (\n node.id.type === \"ObjectPattern\" &&\n node.init !== null &&\n isIdentifierNamed(node.init, sourceName) &&\n patternContainsProperty(node.id, propertyName)\n );\n }\n\n if (node.type !== \"AssignmentExpression\") {\n return false;\n }\n\n return (\n node.left.type === \"ObjectPattern\" &&\n isIdentifierNamed(node.right, sourceName) &&\n patternContainsProperty(node.left, propertyName)\n );\n });\n\nconst containsMemberPropertyAccess = (\n rootNode: Readonly<TSESTree.Node>,\n objectName: string,\n propertyName: string\n): boolean =>\n someDescendantNode(rootNode, (node) =>\n node.type === \"MemberExpression\"\n ? isStaticPropertyMatch(node, objectName, propertyName)\n : false\n );\n\nconst hasObjectPatternProperty = (\n objectPattern: TSESTree.ObjectPattern,\n propertyName: string\n): boolean =>\n objectPattern.properties.some((propertyNode) => {\n if (propertyNode.type !== \"Property\") {\n return false;\n }\n\n return getPropertyName(propertyNode) === propertyName;\n });\n\nconst callbackUsesMessageData = (\n callbackNode: CallbackFunction,\n eventParameterName: string\n): boolean =>\n containsMemberPropertyAccess(\n callbackNode.body,\n eventParameterName,\n \"data\"\n ) ||\n containsObjectDestructureFromIdentifier(\n callbackNode.body,\n eventParameterName,\n \"data\"\n );\n\nconst callbackHasOriginValidation = (\n callbackNode: CallbackFunction,\n context: RuleContext,\n eventParameterName: string\n): boolean => {\n const callbackSourceText = context.sourceCode.getText(callbackNode);\n\n return (\n containsMemberPropertyAccess(\n callbackNode.body,\n eventParameterName,\n \"origin\"\n ) ||\n containsObjectDestructureFromIdentifier(\n callbackNode.body,\n eventParameterName,\n \"origin\"\n ) ||\n hasMessageEventGuardKeywords(callbackSourceText)\n );\n};\n\nconst reportsIdentifierCallback = (\n callbackNode: CallbackFunction,\n context: RuleContext,\n eventParameter: TSESTree.Identifier\n): boolean =>\n callbackUsesMessageData(callbackNode, eventParameter.name) &&\n !callbackHasOriginValidation(callbackNode, context, eventParameter.name);\n\nconst reportsObjectPatternCallback = (\n callbackNode: CallbackFunction,\n context: RuleContext,\n eventParameter: TSESTree.ObjectPattern\n): boolean => {\n if (!hasObjectPatternProperty(eventParameter, \"data\")) {\n return false;\n }\n\n if (hasObjectPatternProperty(eventParameter, \"origin\")) {\n return false;\n }\n\n return !hasMessageEventGuardKeywords(\n context.sourceCode.getText(callbackNode)\n );\n};\n\nconst shouldReportMessageEventCallback = (\n callbackNode: CallbackFunction,\n context: RuleContext\n): boolean => {\n const [firstParameter] = callbackNode.params;\n\n if (firstParameter === undefined || firstParameter.type === \"RestElement\") {\n return false;\n }\n\n if (firstParameter.type === \"Identifier\") {\n return reportsIdentifierCallback(callbackNode, context, firstParameter);\n }\n\n if (firstParameter.type === \"ObjectPattern\") {\n return reportsObjectPatternCallback(\n callbackNode,\n context,\n firstParameter\n );\n }\n\n return false;\n};\n\nconst isMessageEventListenerCall = (node: TSESTree.CallExpression): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(node.callee) !== \"addEventListener\") {\n return false;\n }\n\n const [firstArgument] = node.arguments;\n\n return (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n getStaticStringValue(firstArgument) === \"message\"\n );\n};\n\nconst isOnMessageAssignment = (node: TSESTree.AssignmentExpression): boolean =>\n node.operator === \"=\" &&\n node.left.type === \"MemberExpression\" &&\n getMemberPropertyName(node.left) === \"onmessage\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (!isOnMessageAssignment(node)) {\n return;\n }\n\n if (!isFunctionExpression(node.right)) {\n return;\n }\n\n if (!shouldReportMessageEventCallback(node.right, context)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.right,\n });\n },\n CallExpression(node: TSESTree.CallExpression) {\n if (!isMessageEventListenerCall(node)) {\n return;\n }\n\n const [, secondArgument] = node.arguments;\n\n if (\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n if (!isFunctionExpression(secondArgument)) {\n return;\n }\n\n if (\n !shouldReportMessageEventCallback(secondArgument, context)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: secondArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow MessageEvent handlers that consume event data without validating event.origin.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-message-event-without-origin-check\",\n },\n messages: {\n default:\n \"Validate MessageEvent.origin before consuming data from received message events.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-message-event-without-origin-check\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n return {\n \"CallExpression[arguments.length=1][callee.object.name='MSApp'][callee.property.name='execUnsafeLocalFunction']\"(\n node\n ) {\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow MSApp.execUnsafeLocalFunction which bypasses script-injection safeguards.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-msapp-exec-unsafe\",\n },\n messages: {\n default: \"Do not bypass script injection validation.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-msapp-exec-unsafe\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getPropertyName } from \"../_internal/estree-utils.js\";\nimport {\n isNodeTlsStaticMember,\n isRelevantNodeTlsOptionsObject,\n} from \"../_internal/node-tls-config.js\";\n\ntype CheckServerIdentityFunction =\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression;\n\ntype MessageIds = \"default\";\n\nconst CHECK_SERVER_IDENTITY_PROPERTY_NAMES = new Set([\"checkServerIdentity\"]);\n\nconst isFunctionExpression = (\n expression: TSESTree.Expression\n): expression is CheckServerIdentityFunction =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst isExpressionNode = (node: TSESTree.Node): node is TSESTree.Expression =>\n node.type !== \"ArrayPattern\" &&\n node.type !== \"AssignmentPattern\" &&\n node.type !== \"ObjectPattern\";\n\nconst isAlwaysSuccessfulReturnExpression = (\n expression: TSESTree.Expression\n): boolean => {\n if (expression.type === \"Identifier\") {\n return expression.name === \"undefined\";\n }\n\n if (expression.type === \"Literal\") {\n return expression.value === null;\n }\n\n return (\n expression.type === \"UnaryExpression\" && expression.operator === \"void\"\n );\n};\n\nconst isAlwaysSuccessfulCheckServerIdentity = (\n callbackNode: CheckServerIdentityFunction\n): boolean => {\n if (callbackNode.body.type !== \"BlockStatement\") {\n return isAlwaysSuccessfulReturnExpression(callbackNode.body);\n }\n\n if (callbackNode.body.body.length === 0) {\n return true;\n }\n\n if (callbackNode.body.body.length !== 1) {\n return false;\n }\n\n const onlyStatement = arrayFirst(callbackNode.body.body);\n\n if (onlyStatement?.type !== \"ReturnStatement\") {\n return false;\n }\n\n return (\n onlyStatement.argument === null ||\n (onlyStatement.argument !== null &&\n isAlwaysSuccessfulReturnExpression(onlyStatement.argument))\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (\n node.operator !== \"=\" ||\n !isNodeTlsStaticMember(\n node.left,\n CHECK_SERVER_IDENTITY_PROPERTY_NAMES\n ) ||\n !isFunctionExpression(node.right) ||\n !isAlwaysSuccessfulCheckServerIdentity(node.right)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.right,\n });\n },\n ObjectExpression(node: TSESTree.ObjectExpression) {\n if (!isRelevantNodeTlsOptionsObject(node)) {\n return;\n }\n\n for (const propertyNode of node.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.kind !== \"init\" ||\n getPropertyName(propertyNode) !==\n \"checkServerIdentity\" ||\n !isExpressionNode(propertyNode.value) ||\n !isFunctionExpression(propertyNode.value) ||\n !isAlwaysSuccessfulCheckServerIdentity(\n propertyNode.value\n )\n ) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: propertyNode.value,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Node.js checkServerIdentity overrides that always accept the peer hostname.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-check-server-identity-bypass\",\n },\n messages: {\n default:\n \"Do not bypass Node.js hostname verification with a checkServerIdentity implementation that always succeeds.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-node-tls-check-server-identity-bypass\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined, setHas } from \"ts-extras\";\n\nimport { getMemberPropertyName } from \"./estree-utils.js\";\n\nconst NODE_TLS_OBJECT_NAMES = new Set([\n \"http2\",\n \"https\",\n \"tls\",\n]);\nconst NODE_TLS_CALL_METHOD_NAMES = new Set([\n \"connect\",\n \"createSecureContext\",\n \"createSecureServer\",\n \"createServer\",\n \"get\",\n \"request\",\n]);\n\n/**\n * Check whether an expression targets a Node TLS-capable module object.\n *\n * @param expression - Expression to inspect.\n *\n * @returns Whether the expression resolves to `tls`, `https`, or `http2`.\n */\nexport const isNodeTlsObjectExpression = (\n expression: Readonly<TSESTree.Expression>\n): boolean => {\n if (expression.type === \"Identifier\") {\n return setHas(NODE_TLS_OBJECT_NAMES, expression.name);\n }\n\n if (expression.type !== \"MemberExpression\") {\n return false;\n }\n\n const propertyName = getMemberPropertyName(expression);\n\n return (\n isDefined(propertyName) && setHas(NODE_TLS_OBJECT_NAMES, propertyName)\n );\n};\n\n/**\n * Check whether a call expression targets a relevant Node TLS API sink.\n *\n * @param callee - Call-expression callee to inspect.\n *\n * @returns Whether the callee matches a TLS-relevant call site.\n */\nexport const isRelevantNodeTlsCall = (\n callee: Readonly<TSESTree.CallExpression[\"callee\"]>\n): boolean => {\n if (callee.type === \"Identifier\") {\n return callee.name === \"createSecureContext\";\n }\n\n if (callee.type !== \"MemberExpression\") {\n return false;\n }\n\n const methodName = getMemberPropertyName(callee);\n\n return (\n isDefined(methodName) &&\n setHas(NODE_TLS_CALL_METHOD_NAMES, methodName) &&\n isNodeTlsObjectExpression(callee.object)\n );\n};\n\n/**\n * Check whether a constructor call targets a relevant Node TLS constructor.\n *\n * @param callee - New-expression callee to inspect.\n *\n * @returns Whether the callee matches a TLS-relevant constructor site.\n */\nexport const isRelevantNodeTlsConstructor = (\n callee: Readonly<TSESTree.NewExpression[\"callee\"]>\n): boolean => {\n if (callee.type !== \"MemberExpression\") {\n return false;\n }\n\n return (\n getMemberPropertyName(callee) === \"Agent\" &&\n isNodeTlsObjectExpression(callee.object)\n );\n};\n\n/**\n * Check whether an object literal is being used as options for a relevant Node\n * TLS API.\n *\n * @param node - Object expression to inspect.\n *\n * @returns Whether the object expression belongs to a TLS-relevant call site.\n */\nexport const isRelevantNodeTlsOptionsObject = (\n node: Readonly<TSESTree.ObjectExpression>\n): boolean => {\n const parentNode = node.parent;\n\n if (parentNode?.type === \"CallExpression\") {\n return isRelevantNodeTlsCall(parentNode.callee);\n }\n\n if (parentNode?.type === \"NewExpression\") {\n return isRelevantNodeTlsConstructor(parentNode.callee);\n }\n\n return false;\n};\n\n/**\n * Check whether an assignment left-hand side targets a static TLS member.\n *\n * @param node - Assignment left-hand side expression to inspect.\n * @param propertyNames - Allowed member names for matching.\n *\n * @returns Whether the node matches one of the targeted TLS static members.\n */\nexport const isNodeTlsStaticMember = (\n node: Readonly<TSESTree.AssignmentExpression[\"left\"]>,\n propertyNames: ReadonlySet<string>\n): node is TSESTree.MemberExpression => {\n if (node.type !== \"MemberExpression\") {\n return false;\n }\n\n const propertyName = getMemberPropertyName(node);\n\n return (\n isDefined(propertyName) &&\n setHas(propertyNames, propertyName) &&\n isNodeTlsObjectExpression(node.object)\n );\n};\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined, setHas } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\nimport {\n isNodeTlsStaticMember,\n isRelevantNodeTlsOptionsObject,\n} from \"../_internal/node-tls-config.js\";\n\ntype LegacyTlsPropertyName = \"maxVersion\" | \"minVersion\" | \"secureProtocol\";\ntype MessageIds = \"default\";\n\nconst LEGACY_TLS_VERSION_VALUES = new Set([\n \"TLSv1\",\n \"TLSv1.0\",\n \"TLSv1.1\",\n]);\n\nconst isLegacySecureProtocolValue = (value: string): boolean =>\n /^(?:SSLv2|SSLv3|TLSv1(?:_1)?)(?:_(?:client|server))?_method$/u.test(value);\n\nconst isExpressionNode = (node: TSESTree.Node): node is TSESTree.Expression =>\n node.type !== \"ArrayPattern\" &&\n node.type !== \"AssignmentPattern\" &&\n node.type !== \"ObjectPattern\";\n\nconst isLegacyTlsPropertyValue = (\n propertyName: LegacyTlsPropertyName,\n configuredValue: string\n): boolean => {\n if (propertyName === \"secureProtocol\") {\n return isLegacySecureProtocolValue(configuredValue);\n }\n\n return setHas(LEGACY_TLS_VERSION_VALUES, configuredValue);\n};\n\nconst getLegacyTlsPropertyName = (\n propertyNode: TSESTree.Property\n): LegacyTlsPropertyName | undefined => {\n const propertyName = getPropertyName(propertyNode);\n\n if (\n propertyName === \"maxVersion\" ||\n propertyName === \"minVersion\" ||\n propertyName === \"secureProtocol\"\n ) {\n return propertyName;\n }\n\n return undefined;\n};\n\nconst isTlsDefaultVersionMember = (\n node: TSESTree.AssignmentExpression[\"left\"]\n): node is TSESTree.MemberExpression =>\n isNodeTlsStaticMember(\n node,\n new Set([\"DEFAULT_MAX_VERSION\", \"DEFAULT_MIN_VERSION\"])\n );\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (\n node.operator !== \"=\" ||\n !isTlsDefaultVersionMember(node.left)\n ) {\n return;\n }\n\n const configuredValue = getStaticStringValue(node.right);\n\n if (\n typeof configuredValue !== \"string\" ||\n !setHas(LEGACY_TLS_VERSION_VALUES, configuredValue)\n ) {\n return;\n }\n\n context.report({\n data: {\n configuredValue,\n propertyName:\n getMemberPropertyName(node.left) ??\n \"DEFAULT_MIN_VERSION\",\n },\n messageId: \"default\",\n node: node.right,\n });\n },\n ObjectExpression(node: TSESTree.ObjectExpression) {\n if (!isRelevantNodeTlsOptionsObject(node)) {\n return;\n }\n\n for (const propertyNode of node.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.kind !== \"init\"\n ) {\n continue;\n }\n\n if (!isExpressionNode(propertyNode.value)) {\n continue;\n }\n\n const propertyName = getLegacyTlsPropertyName(propertyNode);\n\n if (!isDefined(propertyName)) {\n continue;\n }\n\n const configuredValue = getStaticStringValue(\n propertyNode.value\n );\n\n if (\n typeof configuredValue !== \"string\" ||\n !isLegacyTlsPropertyValue(propertyName, configuredValue)\n ) {\n continue;\n }\n\n context.report({\n data: {\n configuredValue,\n propertyName,\n },\n messageId: \"default\",\n node: propertyNode.value,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow legacy TLS protocol selection such as TLSv1/TLSv1.1 in Node.js TLS and HTTPS configuration.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-legacy-protocol\",\n },\n messages: {\n default:\n \"Do not configure {{propertyName}} with legacy TLS protocol {{configuredValue}}; require TLSv1.2 or newer instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-node-tls-legacy-protocol\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\" | \"replaceWithTlsRejectUnauthorizedOne\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst isProcessEnvAccess = (node: TSESTree.Expression): boolean => {\n if (node.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(node) !== \"env\") {\n return false;\n }\n\n return node.object.type === \"Identifier\" && node.object.name === \"process\";\n};\n\nconst isTlsRejectUnauthorizedMember = (\n node: TSESTree.AssignmentExpression[\"left\"]\n): boolean => {\n if (node.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(node) !== \"NODE_TLS_REJECT_UNAUTHORIZED\") {\n return false;\n }\n\n return isProcessEnvAccess(node.object);\n};\n\nconst isUnsafeOverrideValue = (node: TSESTree.Expression): boolean => {\n if (node.type === \"Literal\") {\n return node.value === 0 || node.value === \"0\";\n }\n\n return (\n node.type === \"TemplateLiteral\" &&\n node.expressions.length === 0 &&\n arrayFirst(node.quasis)?.value.cooked === \"0\"\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (node.operator !== \"=\") {\n return;\n }\n\n if (!isTlsRejectUnauthorizedMember(node.left)) {\n return;\n }\n\n if (!isUnsafeOverrideValue(node.right)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n suggest: [\n {\n fix(fixer) {\n const replacementValue =\n node.right.type === \"TemplateLiteral\"\n ? \"`1`\"\n : \"'1'\";\n\n return fixer.replaceText(\n node.right,\n replacementValue\n );\n },\n messageId: \"replaceWithTlsRejectUnauthorizedOne\",\n },\n ],\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0' overrides in Node.js runtime code.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-reject-unauthorized-zero\",\n },\n hasSuggestions: true,\n messages: {\n default:\n \"Do not disable TLS certificate validation with NODE_TLS_REJECT_UNAUTHORIZED=0.\",\n replaceWithTlsRejectUnauthorizedOne:\n \"Set NODE_TLS_REJECT_UNAUTHORIZED to '1' to keep TLS certificate validation enabled.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-node-tls-reject-unauthorized-zero\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\nimport {\n isNodeTlsStaticMember,\n isRelevantNodeTlsOptionsObject,\n} from \"../_internal/node-tls-config.js\";\n\ntype MessageIds = \"default\";\n\nconst TLS_DEFAULT_CIPHERS_PROPERTY_NAMES = new Set([\"DEFAULT_CIPHERS\"]);\nconst TLS_SECURITY_LEVEL_ZERO_PATTERN = /@seclevel\\s*=\\s*0\\b/iu;\n\nconst isExpressionNode = (node: TSESTree.Node): node is TSESTree.Expression =>\n node.type !== \"ArrayPattern\" &&\n node.type !== \"AssignmentPattern\" &&\n node.type !== \"ObjectPattern\";\n\nconst isSecurityLevelZeroCipherString = (value: string): boolean =>\n TLS_SECURITY_LEVEL_ZERO_PATTERN.test(value);\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (\n node.operator !== \"=\" ||\n !isNodeTlsStaticMember(\n node.left,\n TLS_DEFAULT_CIPHERS_PROPERTY_NAMES\n )\n ) {\n return;\n }\n\n const configuredValue = getStaticStringValue(node.right);\n\n if (\n typeof configuredValue !== \"string\" ||\n !isSecurityLevelZeroCipherString(configuredValue)\n ) {\n return;\n }\n\n context.report({\n data: {\n configuredValue,\n propertyName: \"DEFAULT_CIPHERS\",\n },\n messageId: \"default\",\n node: node.right,\n });\n },\n ObjectExpression(node: TSESTree.ObjectExpression) {\n if (!isRelevantNodeTlsOptionsObject(node)) {\n return;\n }\n\n for (const propertyNode of node.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.kind !== \"init\" ||\n getPropertyName(propertyNode) !== \"ciphers\" ||\n !isExpressionNode(propertyNode.value)\n ) {\n continue;\n }\n\n const configuredValue = getStaticStringValue(\n propertyNode.value\n );\n\n if (\n typeof configuredValue !== \"string\" ||\n !isSecurityLevelZeroCipherString(configuredValue)\n ) {\n continue;\n }\n\n context.report({\n data: {\n configuredValue,\n propertyName: \"ciphers\",\n },\n messageId: \"default\",\n node: propertyNode.value,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow lowering Node.js TLS cipher security to OpenSSL security level 0.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-security-level-zero\",\n },\n messages: {\n default:\n \"Do not lower TLS cipher security with {{propertyName}}={{configuredValue}}; keep Node's default security level or use a reviewed stronger cipher policy instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-node-tls-security-level-zero\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined, setHas } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getPropertyName,\n} from \"../_internal/estree-utils.js\";\n\ntype DisallowedVmCallName =\n | \"compileFunction\"\n | \"runInContext\"\n | \"runInNewContext\"\n | \"runInThisContext\";\n\ntype DisallowedVmConstructorName = \"Script\";\n\ntype MessageIds = \"default\";\n\nconst VM_MODULE_NAMES = new Set([\"node:vm\", \"vm\"]);\nconst DISALLOWED_VM_CALL_NAMES = new Set([\n \"compileFunction\",\n \"runInContext\",\n \"runInNewContext\",\n \"runInThisContext\",\n]);\nconst DISALLOWED_VM_CONSTRUCTOR_NAMES = new Set([\"Script\"]);\n\nconst isVmModuleSource = (value: string): boolean =>\n setHas(VM_MODULE_NAMES, value);\n\nconst isDisallowedVmCallName = (\n value: string | undefined\n): value is DisallowedVmCallName =>\n isDefined(value) && setHas(DISALLOWED_VM_CALL_NAMES, value);\n\nconst isDisallowedVmConstructorName = (\n value: string | undefined\n): value is DisallowedVmConstructorName =>\n isDefined(value) && setHas(DISALLOWED_VM_CONSTRUCTOR_NAMES, value);\n\nconst isRequireCallFromVmModule = (\n expression: null | TSESTree.Expression\n): expression is TSESTree.CallExpression => {\n if (\n expression?.type !== \"CallExpression\" ||\n expression.callee.type !== \"Identifier\" ||\n expression.callee.name !== \"require\"\n ) {\n return false;\n }\n\n const [firstArgument] = expression.arguments;\n\n return (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n firstArgument.type === \"Literal\" &&\n typeof firstArgument.value === \"string\" &&\n isVmModuleSource(firstArgument.value)\n );\n};\n\nconst getPatternIdentifier = (\n pattern: TSESTree.Property[\"value\"]\n): TSESTree.Identifier | undefined => {\n if (pattern.type === \"Identifier\") {\n return pattern;\n }\n\n if (\n pattern.type === \"AssignmentPattern\" &&\n pattern.left.type === \"Identifier\"\n ) {\n return pattern.left;\n }\n\n return undefined;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const vmCallBindingNames = new Set<string>();\n const vmConstructorBindingNames = new Set<string>();\n const vmNamespaceBindingNames = new Set<string>();\n\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type === \"Identifier\") {\n if (!setHas(vmCallBindingNames, node.callee.name)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n\n return;\n }\n\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (!isDisallowedVmCallName(methodName)) {\n return;\n }\n\n if (\n node.callee.object.type === \"Identifier\" &&\n setHas(vmNamespaceBindingNames, node.callee.object.name)\n ) {\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n\n return;\n }\n\n if (\n node.callee.object.type === \"CallExpression\" &&\n isRequireCallFromVmModule(node.callee.object)\n ) {\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n }\n },\n ImportDeclaration(node: TSESTree.ImportDeclaration) {\n if (!isVmModuleSource(node.source.value)) {\n return;\n }\n\n for (const specifierNode of node.specifiers) {\n if (\n specifierNode.type === \"ImportDefaultSpecifier\" ||\n specifierNode.type === \"ImportNamespaceSpecifier\"\n ) {\n vmNamespaceBindingNames.add(specifierNode.local.name);\n continue;\n }\n\n const importedName =\n specifierNode.imported.type === \"Identifier\"\n ? specifierNode.imported.name\n : specifierNode.imported.value;\n\n if (isDisallowedVmCallName(importedName)) {\n vmCallBindingNames.add(specifierNode.local.name);\n continue;\n }\n\n if (isDisallowedVmConstructorName(importedName)) {\n vmConstructorBindingNames.add(specifierNode.local.name);\n }\n }\n },\n NewExpression(node: TSESTree.NewExpression) {\n if (node.callee.type === \"Identifier\") {\n if (!setHas(vmConstructorBindingNames, node.callee.name)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n\n return;\n }\n\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n const constructorName = getMemberPropertyName(node.callee);\n\n if (!isDisallowedVmConstructorName(constructorName)) {\n return;\n }\n\n if (\n node.callee.object.type === \"Identifier\" &&\n setHas(vmNamespaceBindingNames, node.callee.object.name)\n ) {\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n\n return;\n }\n\n if (\n node.callee.object.type === \"CallExpression\" &&\n isRequireCallFromVmModule(node.callee.object)\n ) {\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n }\n },\n VariableDeclarator(node: TSESTree.VariableDeclarator) {\n if (!isRequireCallFromVmModule(node.init)) {\n return;\n }\n\n if (node.id.type === \"Identifier\") {\n vmNamespaceBindingNames.add(node.id.name);\n return;\n }\n\n if (node.id.type !== \"ObjectPattern\") {\n return;\n }\n\n for (const propertyNode of node.id.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.computed\n ) {\n continue;\n }\n\n const importedName = getPropertyName(propertyNode);\n const localIdentifier = getPatternIdentifier(\n propertyNode.value\n );\n\n if (localIdentifier === undefined) {\n continue;\n }\n\n if (isDisallowedVmCallName(importedName)) {\n vmCallBindingNames.add(localIdentifier.name);\n continue;\n }\n\n if (isDisallowedVmConstructorName(importedName)) {\n vmConstructorBindingNames.add(localIdentifier.name);\n }\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow node:vm dynamic code execution APIs that are commonly mistaken for a security sandbox.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-vm-run-in-context\",\n },\n messages: {\n default:\n \"Do not execute dynamic code through node:vm run/compile APIs; the vm module is not a security boundary.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-node-vm-run-in-context\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { setHas } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getPropertyName,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst VM_MODULE_NAMES = new Set([\"node:vm\", \"vm\"]);\nconst SOURCE_TEXT_MODULE_NAME = \"SourceTextModule\";\n\nconst isVmModuleSource = (value: string): boolean =>\n setHas(VM_MODULE_NAMES, value);\n\nconst isRequireCallFromVmModule = (\n expression: null | TSESTree.Expression\n): expression is TSESTree.CallExpression => {\n if (\n expression?.type !== \"CallExpression\" ||\n expression.callee.type !== \"Identifier\" ||\n expression.callee.name !== \"require\"\n ) {\n return false;\n }\n\n const [firstArgument] = expression.arguments;\n\n return (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n firstArgument.type === \"Literal\" &&\n typeof firstArgument.value === \"string\" &&\n isVmModuleSource(firstArgument.value)\n );\n};\n\nconst getPatternIdentifier = (\n pattern: TSESTree.Property[\"value\"]\n): TSESTree.Identifier | undefined => {\n if (pattern.type === \"Identifier\") {\n return pattern;\n }\n\n if (\n pattern.type === \"AssignmentPattern\" &&\n pattern.left.type === \"Identifier\"\n ) {\n return pattern.left;\n }\n\n return undefined;\n};\n\nconst isSourceTextModuleConstructor = (\n callee: Readonly<TSESTree.NewExpression[\"callee\"]>,\n sourceTextModuleBindingNames: ReadonlySet<string>,\n vmNamespaceBindingNames: ReadonlySet<string>\n): boolean => {\n if (callee.type === \"Identifier\") {\n return setHas(sourceTextModuleBindingNames, callee.name);\n }\n\n if (callee.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(callee) !== SOURCE_TEXT_MODULE_NAME) {\n return false;\n }\n\n return (\n (callee.object.type === \"Identifier\" &&\n setHas(vmNamespaceBindingNames, callee.object.name)) ||\n (callee.object.type === \"CallExpression\" &&\n isRequireCallFromVmModule(callee.object))\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const sourceTextModuleBindingNames = new Set<string>();\n const vmNamespaceBindingNames = new Set<string>();\n\n return {\n ImportDeclaration(node: TSESTree.ImportDeclaration) {\n if (!isVmModuleSource(node.source.value)) {\n return;\n }\n\n for (const specifierNode of node.specifiers) {\n if (\n specifierNode.type === \"ImportDefaultSpecifier\" ||\n specifierNode.type === \"ImportNamespaceSpecifier\"\n ) {\n vmNamespaceBindingNames.add(specifierNode.local.name);\n continue;\n }\n\n const importedName =\n specifierNode.imported.type === \"Identifier\"\n ? specifierNode.imported.name\n : specifierNode.imported.value;\n\n if (importedName === SOURCE_TEXT_MODULE_NAME) {\n sourceTextModuleBindingNames.add(\n specifierNode.local.name\n );\n }\n }\n },\n NewExpression(node: TSESTree.NewExpression) {\n if (\n !isSourceTextModuleConstructor(\n node.callee,\n sourceTextModuleBindingNames,\n vmNamespaceBindingNames\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.callee,\n });\n },\n VariableDeclarator(node: TSESTree.VariableDeclarator) {\n if (!isRequireCallFromVmModule(node.init)) {\n return;\n }\n\n if (node.id.type === \"Identifier\") {\n vmNamespaceBindingNames.add(node.id.name);\n return;\n }\n\n if (node.id.type !== \"ObjectPattern\") {\n return;\n }\n\n for (const propertyNode of node.id.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.computed\n ) {\n continue;\n }\n\n if (\n getPropertyName(propertyNode) !==\n SOURCE_TEXT_MODULE_NAME\n ) {\n continue;\n }\n\n const localIdentifier = getPatternIdentifier(\n propertyNode.value\n );\n\n if (localIdentifier === undefined) {\n continue;\n }\n\n sourceTextModuleBindingNames.add(localIdentifier.name);\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow node:vm SourceTextModule constructors that compile JavaScript source strings into executable modules.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-vm-source-text-module\",\n },\n messages: {\n default:\n \"Do not compile code with node:vm SourceTextModule; loading executable modules from source strings is not a security boundary.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-node-vm-source-text-module\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { setHas } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getPropertyName,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst WORKER_THREADS_MODULE_NAMES = new Set([\n \"node:worker_threads\",\n \"worker_threads\",\n]);\n\nconst isWorkerThreadsModuleSource = (value: string): boolean =>\n setHas(WORKER_THREADS_MODULE_NAMES, value);\n\nconst isRequireCallFromWorkerThreads = (\n expression: null | TSESTree.Expression\n): expression is TSESTree.CallExpression => {\n if (\n expression?.type !== \"CallExpression\" ||\n expression.callee.type !== \"Identifier\" ||\n expression.callee.name !== \"require\"\n ) {\n return false;\n }\n\n const [firstArgument] = expression.arguments;\n\n return (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n firstArgument.type === \"Literal\" &&\n typeof firstArgument.value === \"string\" &&\n isWorkerThreadsModuleSource(firstArgument.value)\n );\n};\n\nconst getPatternIdentifier = (\n pattern: TSESTree.Property[\"value\"]\n): TSESTree.Identifier | undefined => {\n if (pattern.type === \"Identifier\") {\n return pattern;\n }\n\n if (\n pattern.type === \"AssignmentPattern\" &&\n pattern.left.type === \"Identifier\"\n ) {\n return pattern.left;\n }\n\n return undefined;\n};\n\nconst hasEvalTrueOption = (\n optionsNode: Readonly<TSESTree.Expression>\n): boolean => {\n if (optionsNode.type !== \"ObjectExpression\") {\n return false;\n }\n\n for (const propertyNode of optionsNode.properties) {\n if (propertyNode.type !== \"Property\" || propertyNode.kind !== \"init\") {\n continue;\n }\n\n if (getPropertyName(propertyNode) !== \"eval\") {\n continue;\n }\n\n if (\n propertyNode.value.type === \"Literal\" &&\n propertyNode.value.value === true\n ) {\n return true;\n }\n }\n\n return false;\n};\n\nconst isWorkerThreadsWorkerConstructor = (\n callee: Readonly<TSESTree.NewExpression[\"callee\"]>,\n workerBindingNames: ReadonlySet<string>,\n workerThreadsNamespaceBindingNames: ReadonlySet<string>\n): boolean => {\n if (callee.type === \"Identifier\") {\n return setHas(workerBindingNames, callee.name);\n }\n\n if (callee.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(callee) !== \"Worker\") {\n return false;\n }\n\n return (\n (callee.object.type === \"Identifier\" &&\n setHas(workerThreadsNamespaceBindingNames, callee.object.name)) ||\n (callee.object.type === \"CallExpression\" &&\n isRequireCallFromWorkerThreads(callee.object))\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const workerBindingNames = new Set<string>();\n const workerThreadsNamespaceBindingNames = new Set<string>();\n\n return {\n ImportDeclaration(node: TSESTree.ImportDeclaration) {\n if (!isWorkerThreadsModuleSource(node.source.value)) {\n return;\n }\n\n for (const specifierNode of node.specifiers) {\n if (\n specifierNode.type === \"ImportDefaultSpecifier\" ||\n specifierNode.type === \"ImportNamespaceSpecifier\"\n ) {\n workerThreadsNamespaceBindingNames.add(\n specifierNode.local.name\n );\n continue;\n }\n\n const importedName =\n specifierNode.imported.type === \"Identifier\"\n ? specifierNode.imported.name\n : specifierNode.imported.value;\n\n if (importedName === \"Worker\") {\n workerBindingNames.add(specifierNode.local.name);\n }\n }\n },\n NewExpression(node: TSESTree.NewExpression) {\n if (\n !isWorkerThreadsWorkerConstructor(\n node.callee,\n workerBindingNames,\n workerThreadsNamespaceBindingNames\n )\n ) {\n return;\n }\n\n const [, secondArgument] = node.arguments;\n\n if (\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\" ||\n !hasEvalTrueOption(secondArgument)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: secondArgument,\n });\n },\n VariableDeclarator(node: TSESTree.VariableDeclarator) {\n if (!isRequireCallFromWorkerThreads(node.init)) {\n return;\n }\n\n if (node.id.type === \"Identifier\") {\n workerThreadsNamespaceBindingNames.add(node.id.name);\n return;\n }\n\n if (node.id.type !== \"ObjectPattern\") {\n return;\n }\n\n for (const propertyNode of node.id.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.computed\n ) {\n continue;\n }\n\n if (getPropertyName(propertyNode) !== \"Worker\") {\n continue;\n }\n\n const localIdentifier = getPatternIdentifier(\n propertyNode.value\n );\n\n if (localIdentifier === undefined) {\n continue;\n }\n\n workerBindingNames.add(localIdentifier.name);\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow node:worker_threads Worker options that enable eval: true string execution.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-worker-threads-eval\",\n },\n messages: {\n default:\n \"Do not enable eval: true for node:worker_threads Worker instances; prefer reviewed worker script files instead of string-backed execution.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-node-worker-threads-eval\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst SECURITY_INPUT_PATTERN = /html|input|message|origin|payload|token|url/iu;\n\nconst isSecuritySensitiveExpression = (\n expression: TSESTree.Expression\n): boolean => {\n if (expression.type === \"Identifier\") {\n return SECURITY_INPUT_PATTERN.test(expression.name);\n }\n\n if (\n expression.type === \"MemberExpression\" &&\n !expression.computed &&\n expression.property.type === \"Identifier\"\n ) {\n return SECURITY_INPUT_PATTERN.test(expression.property.name);\n }\n\n return false;\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n TSNonNullExpression(node: TSESTree.TSNonNullExpression) {\n if (!isSecuritySensitiveExpression(node.expression)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow non-null assertions on likely security-sensitive input values.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-nonnull-assertion-on-security-input\",\n },\n messages: {\n default:\n \"Avoid non-null assertions on security-sensitive inputs; validate before use.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-nonnull-assertion-on-security-input\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayIncludes, isDefined } from \"ts-extras\";\n\nimport {\n getFullTypeChecker,\n getNodeTypeAsString,\n} from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\" | \"replaceWithExplicitOrigin\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n \"CallExpression[arguments.length>=2][arguments.length<=3][callee.property.name='postMessage']\"(\n node: TSESTree.CallExpression\n ) {\n const [, targetOrigin] = node.arguments;\n\n if (\n !isDefined(targetOrigin) ||\n targetOrigin.type !== \"Literal\" ||\n targetOrigin.value !== \"*\"\n ) {\n return;\n }\n\n if (\n isDefined(fullTypeChecker) &&\n node.callee.type === \"MemberExpression\"\n ) {\n const calleeObjectType = getNodeTypeAsString(\n fullTypeChecker,\n node.callee.object,\n context\n );\n\n if (!arrayIncludes([\"any\", \"Window\"], calleeObjectType)) {\n return;\n }\n }\n\n context.report({\n messageId: \"default\",\n node: targetOrigin,\n suggest: [\n {\n fix(fixer) {\n return fixer.replaceText(\n targetOrigin,\n \"location.origin\"\n );\n },\n messageId: \"replaceWithExplicitOrigin\",\n },\n ],\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow '*' targetOrigin in postMessage calls to prevent cross-origin data leakage.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-postmessage-star-origin\",\n },\n hasSuggestions: true,\n messages: {\n default:\n \"Do not use '*' as targetOrigin when sending data with postMessage.\",\n replaceWithExplicitOrigin:\n \"Replace '*' with a specific trusted origin, such as location.origin.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-postmessage-star-origin\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getMemberPropertyName = (\n memberExpression: TSESTree.MemberExpression\n): string | undefined => {\n if (\n !memberExpression.computed &&\n memberExpression.property.type === \"Identifier\"\n ) {\n return memberExpression.property.name;\n }\n\n if (\n memberExpression.property.type === \"Literal\" &&\n typeof memberExpression.property.value === \"string\"\n ) {\n return memberExpression.property.value;\n }\n\n return undefined;\n};\n\nconst getStaticStringValue = (\n node: TSESTree.Expression\n): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\" && node.expressions.length === 0) {\n return arrayFirst(node.quasis)?.value.cooked ?? undefined;\n }\n\n return undefined;\n};\n\nconst isAllowedOriginLiteral = (origin: string): boolean => {\n const normalizedOrigin = origin.trim();\n\n if (normalizedOrigin === \"\") {\n return false;\n }\n\n if (normalizedOrigin.includes(\"*\")) {\n return false;\n }\n\n return /^https?:\\/\\//iu.test(normalizedOrigin);\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n if (getMemberPropertyName(node.callee) !== \"postMessage\") {\n return;\n }\n\n const [, secondArgument] = node.arguments;\n\n if (\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const secondArgumentValue =\n getStaticStringValue(secondArgument);\n\n if (\n typeof secondArgumentValue === \"string\" &&\n isAllowedOriginLiteral(secondArgumentValue)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: secondArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"require explicit, allowlisted postMessage target origins instead of wildcard/dynamic values.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-postmessage-without-origin-allowlist\",\n },\n messages: {\n default:\n \"Use a strict, explicit allowlisted origin for postMessage targetOrigin.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-postmessage-without-origin-allowlist\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst isSanitizedExpression = (node: TSESTree.Expression): boolean => {\n if (node.type !== \"CallExpression\") {\n return false;\n }\n\n if (node.callee.type === \"Identifier\") {\n return /createhtml|sanitize|trusted/u.test(\n node.callee.name.toLowerCase()\n );\n }\n\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n const propertyName = getMemberPropertyName(node.callee);\n\n return (\n typeof propertyName === \"string\" &&\n /createhtml|sanitize|trusted/u.test(propertyName.toLowerCase())\n );\n};\n\nconst isCreateContextualFragmentCall = (\n node: TSESTree.CallExpression\n): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n return getMemberPropertyName(node.callee) === \"createContextualFragment\";\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isCreateContextualFragmentCall(node)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n getStaticStringValue(firstArgument) === \"\" ||\n isSanitizedExpression(firstArgument)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Range.createContextualFragment(...) calls on unsanitized HTML input.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-range-create-contextual-fragment\",\n },\n messages: {\n default:\n \"Sanitize HTML before passing it to Range.createContextualFragment().\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-range-create-contextual-fragment\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { type getFullTypeChecker, getNodeTypeAsString } from \"./ast-utils.js\";\nimport { getMemberPropertyName, getStaticStringValue } from \"./estree-utils.js\";\n\n/** ESLint rule context shape accepted by AST/type helper utilities. */\nexport type AstUtilsRuleContext = Parameters<typeof getFullTypeChecker>[0];\n\nconst isLikelyScriptIdentifierName = (identifierName: string): boolean =>\n identifierName === \"currentScript\" ||\n identifierName === \"script\" ||\n identifierName === \"scriptElement\" ||\n identifierName.endsWith(\"Script\") ||\n identifierName.endsWith(\"ScriptElement\") ||\n identifierName.endsWith(\"_script\") ||\n identifierName.endsWith(\"_script_element\");\n\nconst isCreateElementScriptCall = (node: TSESTree.Node): boolean => {\n if (\n node.type !== \"CallExpression\" ||\n node.callee.type !== \"MemberExpression\"\n ) {\n return false;\n }\n\n if (getMemberPropertyName(node.callee) !== \"createElement\") {\n return false;\n }\n\n const [firstArgument] = node.arguments;\n\n return (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n getStaticStringValue(firstArgument) === \"script\"\n );\n};\n\n/** Returns whether an AST node likely refers to an `HTMLScriptElement`. */\nexport const isLikelyScriptElement = (\n node: TSESTree.Node,\n context: AstUtilsRuleContext,\n fullTypeChecker: ReturnType<typeof getFullTypeChecker>\n): boolean => {\n if (fullTypeChecker !== undefined) {\n const nodeType = getNodeTypeAsString(fullTypeChecker, node, context);\n\n if (nodeType.includes(\"HTMLScriptElement\")) {\n return true;\n }\n }\n\n if (isCreateElementScriptCall(node)) {\n return true;\n }\n\n if (node.type === \"Identifier\") {\n return isLikelyScriptIdentifierName(node.name);\n }\n\n if (node.type !== \"MemberExpression\") {\n return false;\n }\n\n const propertyName = getMemberPropertyName(node);\n\n return (\n typeof propertyName === \"string\" &&\n (propertyName === \"currentScript\" ||\n isLikelyScriptIdentifierName(propertyName))\n );\n};\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { getFullTypeChecker } from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getStaticJsxAttributeStringValue,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\nimport { isLikelyScriptElement } from \"../_internal/script-element.js\";\n\ntype MessageIds = \"default\";\n\nconst isDataUrl = (value: string): boolean => /^\\s*data:/iu.test(value);\n\nconst isJsxScriptElement = (node: TSESTree.JSXOpeningElement): boolean =>\n node.name.type === \"JSXIdentifier\" &&\n node.name.name.toLowerCase() === \"script\";\n\nconst getJsxAttributeName = (\n attributeNode: TSESTree.JSXAttribute\n): string | undefined => {\n if (attributeNode.name.type !== \"JSXIdentifier\") {\n return undefined;\n }\n\n return attributeNode.name.name.toLowerCase();\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (node.left.type !== \"MemberExpression\") {\n return;\n }\n\n if (getMemberPropertyName(node.left) !== \"src\") {\n return;\n }\n\n const configuredValue = getStaticStringValue(node.right);\n\n if (\n typeof configuredValue !== \"string\" ||\n !isDataUrl(configuredValue) ||\n !isLikelyScriptElement(\n node.left.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.right,\n });\n },\n CallExpression(node: TSESTree.CallExpression) {\n if (node.callee.type !== \"MemberExpression\") {\n return;\n }\n\n const methodName = getMemberPropertyName(node.callee);\n\n if (\n methodName !== \"setAttribute\" &&\n methodName !== \"setAttributeNS\"\n ) {\n return;\n }\n\n const [firstArgument, secondArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n getStaticStringValue(firstArgument) !== \"src\" ||\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const configuredValue = getStaticStringValue(secondArgument);\n\n if (\n typeof configuredValue !== \"string\" ||\n !isDataUrl(configuredValue) ||\n !isLikelyScriptElement(\n node.callee.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: secondArgument,\n });\n },\n JSXOpeningElement(node: TSESTree.JSXOpeningElement) {\n if (!isJsxScriptElement(node)) {\n return;\n }\n\n for (const attributeNode of node.attributes) {\n if (attributeNode.type !== \"JSXAttribute\") {\n continue;\n }\n\n if (getJsxAttributeName(attributeNode) !== \"src\") {\n continue;\n }\n\n const staticValue = getStaticJsxAttributeStringValue(\n attributeNode.value\n );\n\n if (\n typeof staticValue !== \"string\" ||\n !isDataUrl(staticValue)\n ) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: attributeNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow HTMLScriptElement src values that load executable code from data: URLs.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-script-src-data-url\",\n },\n messages: {\n default:\n \"Do not load script code from a data: URL; use a reviewed external resource or module instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-script-src-data-url\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { getFullTypeChecker } from \"../_internal/ast-utils.js\";\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\nimport { isLikelyScriptElement } from \"../_internal/script-element.js\";\n\ntype MessageIds = \"default\";\n\nconst isScriptTextPropertyName = (propertyName: string | undefined): boolean =>\n propertyName === \"innerText\" ||\n propertyName === \"text\" ||\n propertyName === \"textContent\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n const fullTypeChecker = getFullTypeChecker(context);\n\n return {\n AssignmentExpression(node: TSESTree.AssignmentExpression) {\n if (node.left.type !== \"MemberExpression\") {\n return;\n }\n\n if (\n !isScriptTextPropertyName(getMemberPropertyName(node.left))\n ) {\n return;\n }\n\n if (getStaticStringValue(node.right) === \"\") {\n return;\n }\n\n if (\n !isLikelyScriptElement(\n node.left.object,\n context,\n fullTypeChecker\n )\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: node.right,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow assigning executable code through HTMLScriptElement text, textContent, or innerText sinks.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-script-text\",\n },\n messages: {\n default:\n \"Do not inject executable code through script text sinks; load a reviewed script resource or module instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-script-text\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getStaticStringValue } from \"../_internal/estree-utils.js\";\nimport {\n isBlobUrl,\n isDataUrl,\n isServiceWorkerRegisterCall,\n isUrlCreateObjectUrlCall,\n} from \"../_internal/worker-code-loading.js\";\n\ntype MessageIds = \"default\";\n\nconst isJavaScriptUrl = (value: string): boolean =>\n /^\\s*javascript\\s*:/iu.test(value);\n\nconst isUnsafeServiceWorkerScriptUrl = (\n expression: Readonly<TSESTree.Expression>\n): boolean => {\n const configuredValue = getStaticStringValue(expression);\n\n return (\n (typeof configuredValue === \"string\" &&\n (isBlobUrl(configuredValue) ||\n isDataUrl(configuredValue) ||\n isJavaScriptUrl(configuredValue))) ||\n isUrlCreateObjectUrlCall(expression)\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isServiceWorkerRegisterCall(node.callee)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n !isUnsafeServiceWorkerScriptUrl(firstArgument)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow unsafe service worker script URLs such as data:, blob:, javascript:, and direct URL.createObjectURL(...) registrations.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-service-worker-unsafe-script-url\",\n },\n messages: {\n default:\n \"Do not register a service worker from data:, blob:, javascript:, or URL.createObjectURL(...) script URLs.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-service-worker-unsafe-script-url\",\n});\n\nexport default rule;\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getStaticStringValue,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\nconst isSetHtmlUnsafeCall = (node: TSESTree.CallExpression): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n return getMemberPropertyName(node.callee) === \"setHTMLUnsafe\";\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isSetHtmlUnsafeCall(node)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument !== undefined &&\n firstArgument.type !== \"SpreadElement\" &&\n getStaticStringValue(firstArgument) === \"\"\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow setHTMLUnsafe() calls that bypass the safer HTML Sanitizer API path.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-set-html-unsafe\",\n },\n messages: {\n default:\n \"Do not call setHTMLUnsafe(); use setHTML() or build DOM nodes safely instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-set-html-unsafe\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst, isDefined, setHas } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport {\n getMemberPropertyName,\n getPropertyName,\n} from \"../_internal/estree-utils.js\";\n\ntype MessageIds = \"default\";\n\ntype PolicyFactoryFunction =\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionExpression;\n\nconst isExpressionNode = (node: TSESTree.Node): node is TSESTree.Expression =>\n node.type !== \"ArrayPattern\" &&\n node.type !== \"AssignmentPattern\" &&\n node.type !== \"ObjectPattern\";\n\nconst POLICY_FACTORY_NAMES = new Set([\n \"createHTML\",\n \"createScript\",\n \"createScriptURL\",\n]);\n\nconst isFunctionExpression = (\n expression: TSESTree.Expression\n): expression is PolicyFactoryFunction =>\n expression.type === \"ArrowFunctionExpression\" ||\n expression.type === \"FunctionExpression\";\n\nconst unwrapTransparentExpression = (\n expression: TSESTree.Expression\n): TSESTree.Expression => {\n if (\n expression.type === \"TSAsExpression\" ||\n expression.type === \"TSTypeAssertion\"\n ) {\n return unwrapTransparentExpression(expression.expression);\n }\n\n return expression;\n};\n\nconst isPassThroughFactory = (factoryNode: PolicyFactoryFunction): boolean => {\n const [firstParameter] = factoryNode.params;\n\n if (firstParameter?.type !== \"Identifier\") {\n return false;\n }\n\n if (factoryNode.body.type !== \"BlockStatement\") {\n const expressionBody = unwrapTransparentExpression(factoryNode.body);\n\n return (\n expressionBody.type === \"Identifier\" &&\n expressionBody.name === firstParameter.name\n );\n }\n\n if (factoryNode.body.body.length !== 1) {\n return false;\n }\n\n const onlyStatement = arrayFirst(factoryNode.body.body);\n\n if (\n onlyStatement?.type !== \"ReturnStatement\" ||\n onlyStatement.argument === null\n ) {\n return false;\n }\n\n const returnedExpression = unwrapTransparentExpression(\n onlyStatement.argument\n );\n\n return (\n returnedExpression.type === \"Identifier\" &&\n returnedExpression.name === firstParameter.name\n );\n};\n\nconst isTrustedTypesCreatePolicyCall = (\n node: TSESTree.CallExpression\n): boolean => {\n if (node.callee.type !== \"MemberExpression\") {\n return false;\n }\n\n if (getMemberPropertyName(node.callee) !== \"createPolicy\") {\n return false;\n }\n\n if (node.callee.object.type === \"Identifier\") {\n return node.callee.object.name === \"trustedTypes\";\n }\n\n if (node.callee.object.type !== \"MemberExpression\") {\n return false;\n }\n\n return getMemberPropertyName(node.callee.object) === \"trustedTypes\";\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isTrustedTypesCreatePolicyCall(node)) {\n return;\n }\n\n const [, secondArgument] = node.arguments;\n\n if (\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\" ||\n secondArgument.type !== \"ObjectExpression\"\n ) {\n return;\n }\n\n for (const propertyNode of secondArgument.properties) {\n if (\n propertyNode.type !== \"Property\" ||\n propertyNode.kind !== \"init\"\n ) {\n continue;\n }\n\n const propertyName = getPropertyName(propertyNode);\n\n if (\n !isDefined(propertyName) ||\n !setHas(POLICY_FACTORY_NAMES, propertyName) ||\n !isExpressionNode(propertyNode.value) ||\n !isFunctionExpression(propertyNode.value) ||\n !isPassThroughFactory(propertyNode.value)\n ) {\n continue;\n }\n\n context.report({\n data: {\n methodName: propertyName,\n },\n messageId: \"default\",\n node: propertyNode,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow pass-through Trusted Types policies that return unvalidated input unchanged.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-trusted-types-policy-pass-through\",\n },\n messages: {\n default:\n \"Do not implement {{methodName}} as a Trusted Types pass-through; sanitize or validate the input first.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-trusted-types-policy-pass-through\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n return {\n \"MemberExpression[object.name='Buffer'][property.name=/^(?:allocUnsafe|allocUnsafeSlow)$/]\"(\n node: TSESTree.MemberExpression\n ) {\n const parentNode = node.parent;\n\n if (\n parentNode?.type === \"CallExpression\" &&\n parentNode.arguments.length === 1\n ) {\n const [firstArgument] = parentNode.arguments;\n\n if (\n firstArgument?.type === \"Literal\" &&\n (firstArgument.value === 0 ||\n firstArgument.value === \"0\")\n ) {\n return;\n }\n }\n\n context.report({\n fix(fixer) {\n if (\n node.computed ||\n node.property.type !== \"Identifier\"\n ) {\n return null;\n }\n\n return fixer.replaceText(node.property, \"alloc\");\n },\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow Buffer.allocUnsafe/allocUnsafeSlow allocations that may expose uninitialized memory.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-unsafe-alloc\",\n },\n fixable: \"code\",\n messages: {\n default: \"Do not allocate uninitialized buffers in Node.js.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-unsafe-alloc\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { isDefined, setHas } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst TRUSTED_TYPE_NAMES = new Set([\n \"TrustedHTML\",\n \"TrustedScript\",\n \"TrustedScriptURL\",\n]);\n\nconst getTypeName = (node: TSESTree.TypeNode): string | undefined => {\n if (\n node.type === \"TSTypeReference\" &&\n node.typeName.type === \"Identifier\"\n ) {\n return node.typeName.name;\n }\n\n return undefined;\n};\n\nconst isTrustedTypeNode = (node: TSESTree.TypeNode): boolean => {\n const typeName = getTypeName(node);\n\n return isDefined(typeName) && setHas(TRUSTED_TYPE_NAMES, typeName);\n};\n\nconst getExpressionCalleeName = (\n expression: TSESTree.Expression\n): string | undefined => {\n if (expression.type !== \"CallExpression\") {\n return undefined;\n }\n\n if (expression.callee.type === \"Identifier\") {\n return expression.callee.name;\n }\n\n if (\n expression.callee.type === \"MemberExpression\" &&\n !expression.callee.computed &&\n expression.callee.property.type === \"Identifier\"\n ) {\n return expression.callee.property.name;\n }\n\n return undefined;\n};\n\nconst isKnownTrustedFactoryCall = (\n expression: TSESTree.Expression\n): boolean => {\n const calleeName = getExpressionCalleeName(expression);\n\n if (!isDefined(calleeName)) {\n return false;\n }\n\n return /sanitize|createhtml|createscripturl|createscript|trusted/u.test(\n calleeName.toLowerCase()\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n TSAsExpression(node: TSESTree.TSAsExpression) {\n if (!isTrustedTypeNode(node.typeAnnotation)) {\n return;\n }\n\n if (isKnownTrustedFactoryCall(node.expression)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n TSTypeAssertion(node: TSESTree.TSTypeAssertion) {\n if (!isTrustedTypeNode(node.typeAnnotation)) {\n return;\n }\n\n if (isKnownTrustedFactoryCall(node.expression)) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow unsafe casts to Trusted Types without validated/trusted factory paths.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-unsafe-cast-to-trusted-types\",\n },\n messages: {\n default: \"Do not cast unvalidated values to Trusted Types.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-unsafe-cast-to-trusted-types\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "import type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { arrayFirst, isDefined, stringSplit } from \"ts-extras\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\n\ntype MessageIds = \"default\";\n\nconst getStaticStringValue = (\n node: TSESTree.Expression\n): string | undefined => {\n if (node.type === \"Literal\" && typeof node.value === \"string\") {\n return node.value;\n }\n\n if (node.type === \"TemplateLiteral\" && node.expressions.length === 0) {\n const firstQuasi = arrayFirst(node.quasis);\n\n if (\n !isDefined(firstQuasi) ||\n typeof firstQuasi.value.cooked !== \"string\"\n ) {\n return undefined;\n }\n\n return firstQuasi.value.cooked;\n }\n\n return undefined;\n};\n\nconst isWindowOpenCallee = (\n callee: TSESTree.CallExpression[\"callee\"]\n): boolean => {\n if (callee.type !== \"MemberExpression\" || callee.computed) {\n return false;\n }\n\n return (\n callee.object.type === \"Identifier\" &&\n callee.object.name === \"window\" &&\n callee.property.type === \"Identifier\" &&\n callee.property.name === \"open\"\n );\n};\n\nconst hasNoopenerToken = (features: string): boolean =>\n stringSplit(features.toLowerCase(), \",\")\n .map((token) => token.trim())\n .some((token) => token === \"noopener\" || token.startsWith(\"noopener=\"));\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isWindowOpenCallee(node.callee)) {\n return;\n }\n\n const [\n ,\n secondArgument,\n thirdArgument,\n ] = node.arguments;\n\n if (\n secondArgument === undefined ||\n secondArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const targetValue = getStaticStringValue(secondArgument);\n\n if (targetValue !== \"_blank\") {\n return;\n }\n\n if (\n thirdArgument === undefined ||\n thirdArgument.type === \"SpreadElement\"\n ) {\n context.report({\n messageId: \"default\",\n node,\n });\n\n return;\n }\n\n const featuresValue = getStaticStringValue(thirdArgument);\n\n if (\n typeof featuresValue !== \"string\" ||\n !hasNoopenerToken(featuresValue)\n ) {\n context.report({\n messageId: \"default\",\n node: thirdArgument,\n });\n }\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"require noopener when using window.open with a _blank target.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-window-open-without-noopener\",\n },\n messages: {\n default:\n \"Include 'noopener' in window.open features when target is '_blank'.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-window-open-without-noopener\",\n});\n\nexport default rule;\n", "import { createRule } from \"../_internal/create-rule.js\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], \"default\">({\n create(context) {\n return {\n \"CallExpression[callee.object.object.name='WinJS'][callee.object.property.name='Utilities'][callee.property.name=/^(?:insertAdjacent|setInner|setOuter)HTMLUnsafe$/]\"(\n node\n ) {\n context.report({\n messageId: \"default\",\n node,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow WinJS.Utilities unsafe HTML write APIs (setInnerHTMLUnsafe, setOuterHTMLUnsafe, insertAdjacentHTMLUnsafe).\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-winjs-html-unsafe\",\n },\n messages: {\n default:\n \"Do not set HTML using unsafe methods from WinJS.Utilities.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-winjs-html-unsafe\",\n});\n\nexport default rule;\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getStaticStringValue } from \"../_internal/estree-utils.js\";\nimport {\n isBlobUrl,\n isImportScriptsCall,\n isUrlCreateObjectUrlCall,\n isWorkerConstructor,\n} from \"../_internal/worker-code-loading.js\";\n\ntype MessageIds = \"default\";\n\nconst isBlobBackedWorkerCodeExpression = (\n expression: Readonly<TSESTree.Expression>\n): boolean => {\n const configuredValue = getStaticStringValue(expression);\n\n return (\n (typeof configuredValue === \"string\" && isBlobUrl(configuredValue)) ||\n isUrlCreateObjectUrlCall(expression)\n );\n};\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isImportScriptsCall(node.callee)) {\n return;\n }\n\n for (const argumentNode of node.arguments) {\n if (\n argumentNode.type === \"SpreadElement\" ||\n !isBlobBackedWorkerCodeExpression(argumentNode)\n ) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: argumentNode,\n });\n }\n },\n NewExpression(node: TSESTree.NewExpression) {\n if (!isWorkerConstructor(node.callee)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\" ||\n !isBlobBackedWorkerCodeExpression(firstArgument)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow worker code-loading APIs that use blob: URLs or URL.createObjectURL(...) for executable scripts.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-worker-blob-url\",\n },\n messages: {\n default:\n \"Do not load worker code from a blob: URL or URL.createObjectURL(...); use a reviewed worker script resource instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-worker-blob-url\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable @typescript-eslint/prefer-readonly-parameter-types -- ESTree/ESLint callback parameter shapes are mutable in upstream types and cannot be represented as fully readonly without invasive casts. */\nimport type { TSESTree } from \"@typescript-eslint/utils\";\n\nimport { createRule } from \"../_internal/create-rule.js\";\nimport { getStaticStringValue } from \"../_internal/estree-utils.js\";\nimport {\n isDataUrl,\n isImportScriptsCall,\n isWorkerConstructor,\n} from \"../_internal/worker-code-loading.js\";\n\ntype MessageIds = \"default\";\n\n/** Rule implementation. */\nconst rule: ReturnType<typeof createRule> = createRule<[], MessageIds>({\n create(context) {\n return {\n CallExpression(node: TSESTree.CallExpression) {\n if (!isImportScriptsCall(node.callee)) {\n return;\n }\n\n for (const argumentNode of node.arguments) {\n if (argumentNode.type === \"SpreadElement\") {\n continue;\n }\n\n const configuredValue = getStaticStringValue(argumentNode);\n\n if (\n typeof configuredValue !== \"string\" ||\n !isDataUrl(configuredValue)\n ) {\n continue;\n }\n\n context.report({\n messageId: \"default\",\n node: argumentNode,\n });\n }\n },\n NewExpression(node: TSESTree.NewExpression) {\n if (!isWorkerConstructor(node.callee)) {\n return;\n }\n\n const [firstArgument] = node.arguments;\n\n if (\n firstArgument === undefined ||\n firstArgument.type === \"SpreadElement\"\n ) {\n return;\n }\n\n const configuredValue = getStaticStringValue(firstArgument);\n\n if (\n typeof configuredValue !== \"string\" ||\n !isDataUrl(configuredValue)\n ) {\n return;\n }\n\n context.report({\n messageId: \"default\",\n node: firstArgument,\n });\n },\n };\n },\n meta: {\n deprecated: false,\n docs: {\n description:\n \"disallow worker code-loading APIs that use static data: URLs for executable scripts.\",\n frozen: false,\n recommended: false,\n url: \"https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-worker-data-url\",\n },\n messages: {\n default:\n \"Do not load worker code from a data: URL; use a reviewed worker script resource instead.\",\n },\n schema: [],\n type: \"problem\",\n },\n name: \"no-worker-data-url\",\n});\n\nexport default rule;\n/* eslint-enable @typescript-eslint/prefer-readonly-parameter-types -- Restore linting after rule implementation declarations. */\n", "/* eslint-disable canonical/no-re-export -- Rule registry intentionally aggregates imported rule modules into a single exported map. */\nimport type { TSESLint } from \"@typescript-eslint/utils\";\nimport type { UnknownArray } from \"type-fest\";\n\nimport noAngularBypassSanitizerRule from \"../rules/no-angular-bypass-sanitizer.js\";\nimport noAngularBypassSecurityTrustHtmlRule from \"../rules/no-angular-bypass-security-trust-html.js\";\nimport noAngularInnerhtmlBindingRule from \"../rules/no-angular-innerhtml-binding.js\";\nimport noAngularSanitizationTrustedUrlsRule from \"../rules/no-angular-sanitization-trusted-urls.js\";\nimport noAngularjsBypassSceRule from \"../rules/no-angularjs-bypass-sce.js\";\nimport noAngularjsEnableSvgRule from \"../rules/no-angularjs-enable-svg.js\";\nimport noAngularjsNgBindHtmlWithoutSanitizeRule from \"../rules/no-angularjs-ng-bind-html-without-sanitize.js\";\nimport noAngularjsSanitizationWhitelistRule from \"../rules/no-angularjs-sanitization-whitelist.js\";\nimport noAngularjsSceResourceUrlWildcardRule from \"../rules/no-angularjs-sce-resource-url-wildcard.js\";\nimport noChildProcessExecRule from \"../rules/no-child-process-exec.js\";\nimport noChildProcessShellTrueRule from \"../rules/no-child-process-shell-true.js\";\nimport noCookiesRule from \"../rules/no-cookies.js\";\nimport noDocumentDomainRule from \"../rules/no-document-domain.js\";\nimport noDocumentExeccommandInsertHtmlRule from \"../rules/no-document-execcommand-insert-html.js\";\nimport noDocumentParseHtmlUnsafeRule from \"../rules/no-document-parse-html-unsafe.js\";\nimport noDocumentWriteRule from \"../rules/no-document-write.js\";\nimport noDomparserHtmlWithoutSanitizationRule from \"../rules/no-domparser-html-without-sanitization.js\";\nimport noDomparserSvgWithoutSanitizationRule from \"../rules/no-domparser-svg-without-sanitization.js\";\nimport noDynamicImportUnsafeUrlRule from \"../rules/no-dynamic-import-unsafe-url.js\";\nimport noElectronAllowRunningInsecureContentRule from \"../rules/no-electron-allow-running-insecure-content.js\";\nimport noElectronDangerousBlinkFeaturesRule from \"../rules/no-electron-dangerous-blink-features.js\";\nimport noElectronDisableContextIsolationRule from \"../rules/no-electron-disable-context-isolation.js\";\nimport noElectronDisableSandboxRule from \"../rules/no-electron-disable-sandbox.js\";\nimport noElectronDisableWebSecurityRule from \"../rules/no-electron-disable-web-security.js\";\nimport noElectronEnableRemoteModuleRule from \"../rules/no-electron-enable-remote-module.js\";\nimport noElectronEnableWebviewTagRule from \"../rules/no-electron-enable-webview-tag.js\";\nimport noElectronExperimentalFeaturesRule from \"../rules/no-electron-experimental-features.js\";\nimport noElectronExposeRawIpcRendererRule from \"../rules/no-electron-expose-raw-ipc-renderer.js\";\nimport noElectronInsecureCertificateErrorHandlerRule from \"../rules/no-electron-insecure-certificate-error-handler.js\";\nimport noElectronInsecureCertificateVerifyProcRule from \"../rules/no-electron-insecure-certificate-verify-proc.js\";\nimport noElectronInsecurePermissionRequestHandlerRule from \"../rules/no-electron-insecure-permission-request-handler.js\";\nimport noElectronNodeIntegrationRule from \"../rules/no-electron-node-integration.js\";\nimport noElectronPermissionCheckHandlerAllowAllRule from \"../rules/no-electron-permission-check-handler-allow-all.js\";\nimport noElectronUncheckedIpcSenderRule from \"../rules/no-electron-unchecked-ipc-sender.js\";\nimport noElectronUnrestrictedNavigationRule from \"../rules/no-electron-unrestricted-navigation.js\";\nimport noElectronUntrustedOpenExternalRule from \"../rules/no-electron-untrusted-open-external.js\";\nimport noElectronWebviewAllowpopupsRule from \"../rules/no-electron-webview-allowpopups.js\";\nimport noElectronWebviewInsecureWebpreferencesRule from \"../rules/no-electron-webview-insecure-webpreferences.js\";\nimport noElectronWebviewNodeIntegrationRule from \"../rules/no-electron-webview-node-integration.js\";\nimport noHtmlMethodRule from \"../rules/no-html-method.js\";\nimport noHttpRequestToInsecureProtocolRule from \"../rules/no-http-request-to-insecure-protocol.js\";\nimport noIframeSrcdocRule from \"../rules/no-iframe-srcdoc.js\";\nimport noInnerHtmlRule from \"../rules/no-inner-html.js\";\nimport noInsecureRandomRule from \"../rules/no-insecure-random.js\";\nimport noInsecureTlsAgentOptionsRule from \"../rules/no-insecure-tls-agent-options.js\";\nimport noInsecureUrlRule from \"../rules/no-insecure-url.js\";\nimport noLocationJavascriptUrlRule from \"../rules/no-location-javascript-url.js\";\nimport noMessageEventWithoutOriginCheckRule from \"../rules/no-message-event-without-origin-check.js\";\nimport noMsappExecUnsafeRule from \"../rules/no-msapp-exec-unsafe.js\";\nimport noNodeTlsCheckServerIdentityBypassRule from \"../rules/no-node-tls-check-server-identity-bypass.js\";\nimport noNodeTlsLegacyProtocolRule from \"../rules/no-node-tls-legacy-protocol.js\";\nimport noNodeTlsRejectUnauthorizedZeroRule from \"../rules/no-node-tls-reject-unauthorized-zero.js\";\nimport noNodeTlsSecurityLevelZeroRule from \"../rules/no-node-tls-security-level-zero.js\";\nimport noNodeVmRunInContextRule from \"../rules/no-node-vm-run-in-context.js\";\nimport noNodeVmSourceTextModuleRule from \"../rules/no-node-vm-source-text-module.js\";\nimport noNodeWorkerThreadsEvalRule from \"../rules/no-node-worker-threads-eval.js\";\nimport noNonnullAssertionOnSecurityInputRule from \"../rules/no-nonnull-assertion-on-security-input.js\";\nimport noPostmessageStarOriginRule from \"../rules/no-postmessage-star-origin.js\";\nimport noPostmessageWithoutOriginAllowlistRule from \"../rules/no-postmessage-without-origin-allowlist.js\";\nimport noRangeCreateContextualFragmentRule from \"../rules/no-range-create-contextual-fragment.js\";\nimport noScriptSrcDataUrlRule from \"../rules/no-script-src-data-url.js\";\nimport noScriptTextRule from \"../rules/no-script-text.js\";\nimport noServiceWorkerUnsafeScriptUrlRule from \"../rules/no-service-worker-unsafe-script-url.js\";\nimport noSetHtmlUnsafeRule from \"../rules/no-set-html-unsafe.js\";\nimport noTrustedTypesPolicyPassThroughRule from \"../rules/no-trusted-types-policy-pass-through.js\";\nimport noUnsafeAllocRule from \"../rules/no-unsafe-alloc.js\";\nimport noUnsafeCastToTrustedTypesRule from \"../rules/no-unsafe-cast-to-trusted-types.js\";\nimport noWindowOpenWithoutNoopenerRule from \"../rules/no-window-open-without-noopener.js\";\nimport noWinjsHtmlUnsafeRule from \"../rules/no-winjs-html-unsafe.js\";\nimport noWorkerBlobUrlRule from \"../rules/no-worker-blob-url.js\";\nimport noWorkerDataUrlRule from \"../rules/no-worker-data-url.js\";\n\n/** Canonical SDL rule module type used in the exported registry map. */\nexport type SdlRuleModule = TSESLint.RuleModule<string, Readonly<UnknownArray>>;\n\n/** Naming convention for SDL security rule identifiers. */\nexport type SdlRuleNamePattern = `no-${string}`;\n\n/** SDL rule registry keyed by rule name for plugin export wiring. */\nexport const sdlRules: Readonly<Record<SdlRuleNamePattern, SdlRuleModule>> = {\n \"no-angular-bypass-sanitizer\": noAngularBypassSanitizerRule,\n \"no-angular-bypass-security-trust-html\":\n noAngularBypassSecurityTrustHtmlRule,\n \"no-angular-innerhtml-binding\": noAngularInnerhtmlBindingRule,\n \"no-angular-sanitization-trusted-urls\":\n noAngularSanitizationTrustedUrlsRule,\n \"no-angularjs-bypass-sce\": noAngularjsBypassSceRule,\n \"no-angularjs-enable-svg\": noAngularjsEnableSvgRule,\n \"no-angularjs-ng-bind-html-without-sanitize\":\n noAngularjsNgBindHtmlWithoutSanitizeRule,\n \"no-angularjs-sanitization-whitelist\": noAngularjsSanitizationWhitelistRule,\n \"no-angularjs-sce-resource-url-wildcard\":\n noAngularjsSceResourceUrlWildcardRule,\n \"no-child-process-exec\": noChildProcessExecRule,\n \"no-child-process-shell-true\": noChildProcessShellTrueRule,\n \"no-cookies\": noCookiesRule,\n \"no-document-domain\": noDocumentDomainRule,\n \"no-document-execcommand-insert-html\": noDocumentExeccommandInsertHtmlRule,\n \"no-document-parse-html-unsafe\": noDocumentParseHtmlUnsafeRule,\n \"no-document-write\": noDocumentWriteRule,\n \"no-domparser-html-without-sanitization\":\n noDomparserHtmlWithoutSanitizationRule,\n \"no-domparser-svg-without-sanitization\":\n noDomparserSvgWithoutSanitizationRule,\n \"no-dynamic-import-unsafe-url\": noDynamicImportUnsafeUrlRule,\n \"no-electron-allow-running-insecure-content\":\n noElectronAllowRunningInsecureContentRule,\n \"no-electron-dangerous-blink-features\":\n noElectronDangerousBlinkFeaturesRule,\n \"no-electron-disable-context-isolation\":\n noElectronDisableContextIsolationRule,\n \"no-electron-disable-sandbox\": noElectronDisableSandboxRule,\n \"no-electron-disable-web-security\": noElectronDisableWebSecurityRule,\n \"no-electron-enable-remote-module\": noElectronEnableRemoteModuleRule,\n \"no-electron-enable-webview-tag\": noElectronEnableWebviewTagRule,\n \"no-electron-experimental-features\": noElectronExperimentalFeaturesRule,\n \"no-electron-expose-raw-ipc-renderer\": noElectronExposeRawIpcRendererRule,\n \"no-electron-insecure-certificate-error-handler\":\n noElectronInsecureCertificateErrorHandlerRule,\n \"no-electron-insecure-certificate-verify-proc\":\n noElectronInsecureCertificateVerifyProcRule,\n \"no-electron-insecure-permission-request-handler\":\n noElectronInsecurePermissionRequestHandlerRule,\n \"no-electron-node-integration\": noElectronNodeIntegrationRule,\n \"no-electron-permission-check-handler-allow-all\":\n noElectronPermissionCheckHandlerAllowAllRule,\n \"no-electron-unchecked-ipc-sender\": noElectronUncheckedIpcSenderRule,\n \"no-electron-unrestricted-navigation\": noElectronUnrestrictedNavigationRule,\n \"no-electron-untrusted-open-external\": noElectronUntrustedOpenExternalRule,\n \"no-electron-webview-allowpopups\": noElectronWebviewAllowpopupsRule,\n \"no-electron-webview-insecure-webpreferences\":\n noElectronWebviewInsecureWebpreferencesRule,\n \"no-electron-webview-node-integration\":\n noElectronWebviewNodeIntegrationRule,\n \"no-html-method\": noHtmlMethodRule,\n \"no-http-request-to-insecure-protocol\": noHttpRequestToInsecureProtocolRule,\n \"no-iframe-srcdoc\": noIframeSrcdocRule,\n \"no-inner-html\": noInnerHtmlRule,\n \"no-insecure-random\": noInsecureRandomRule,\n \"no-insecure-tls-agent-options\": noInsecureTlsAgentOptionsRule,\n \"no-insecure-url\": noInsecureUrlRule,\n \"no-location-javascript-url\": noLocationJavascriptUrlRule,\n \"no-message-event-without-origin-check\":\n noMessageEventWithoutOriginCheckRule,\n \"no-msapp-exec-unsafe\": noMsappExecUnsafeRule,\n \"no-node-tls-check-server-identity-bypass\":\n noNodeTlsCheckServerIdentityBypassRule,\n \"no-node-tls-legacy-protocol\": noNodeTlsLegacyProtocolRule,\n \"no-node-tls-reject-unauthorized-zero\": noNodeTlsRejectUnauthorizedZeroRule,\n \"no-node-tls-security-level-zero\": noNodeTlsSecurityLevelZeroRule,\n \"no-node-vm-run-in-context\": noNodeVmRunInContextRule,\n \"no-node-vm-source-text-module\": noNodeVmSourceTextModuleRule,\n \"no-node-worker-threads-eval\": noNodeWorkerThreadsEvalRule,\n \"no-nonnull-assertion-on-security-input\":\n noNonnullAssertionOnSecurityInputRule,\n \"no-postmessage-star-origin\": noPostmessageStarOriginRule,\n \"no-postmessage-without-origin-allowlist\":\n noPostmessageWithoutOriginAllowlistRule,\n \"no-range-create-contextual-fragment\": noRangeCreateContextualFragmentRule,\n \"no-script-src-data-url\": noScriptSrcDataUrlRule,\n \"no-script-text\": noScriptTextRule,\n \"no-service-worker-unsafe-script-url\": noServiceWorkerUnsafeScriptUrlRule,\n \"no-set-html-unsafe\": noSetHtmlUnsafeRule,\n \"no-trusted-types-policy-pass-through\": noTrustedTypesPolicyPassThroughRule,\n \"no-unsafe-alloc\": noUnsafeAllocRule,\n \"no-unsafe-cast-to-trusted-types\": noUnsafeCastToTrustedTypesRule,\n \"no-window-open-without-noopener\": noWindowOpenWithoutNoopenerRule,\n \"no-winjs-html-unsafe\": noWinjsHtmlUnsafeRule,\n \"no-worker-blob-url\": noWorkerBlobUrlRule,\n \"no-worker-data-url\": noWorkerDataUrlRule,\n};\n\nexport default sdlRules;\n/* eslint-enable canonical/no-re-export -- End of intentional registry aggregation. */\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;;;2BAA6B;AAC7B,oBAA6B;AAC7B,6BAAuB;AACvB,oCAA2B;;;ACL3B;AAAA,EACI,SAAW;AAAA,EACX,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,SAAW;AAAA,EACX,aAAe;AAAA,EACf,UAAY;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA,UAAY;AAAA,EACZ,M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EACX,GAAGA,SAAQ;EACX,GAAGA,SAAQ;EACX,GAAGA,SAAQ;EACX,GAAGA,SAAQ;EACX,GAAGA,SAAQ;;AAGf,IAAM,0BAA0B,CAC5BA,aACiB;EACjB,GAAGA,SAAQ;EACX,GAAGA,SAAQ;EACX;IACI,SAAS;MACL,UAAU;;;;AAKtB,IAAM,qBACF,OAAO,gBAAY,YAAY,YAAY,gBAAY,QAAQ,SAAS,IAClE,gBAAY,UACZ;AAEV,IAAM,aAAwB;EAC1B,MAAM;IACF,MAAM;IACN,WAAW;IACX,SAAS;;EAEb,OAAO;;AAGX,IAAM,UAAwB;EAC1B,SAAS,oBAAoB,UAAU;EACvC,WAAW,sBAAsB,UAAU;EAC3C,QAAQ,mBAAmB,UAAU;EACrC,UAAU,qBAAqB,UAAU;EACzC,MAAM,iBAAiB,UAAU;EACjC,OAAO,kBAAkB,UAAU;EACnC,aAAa,CAAA;EACb,UAAU,CAAA;EACV,YAAY,uBAAuB,UAAU;;AAGjD,QAAQ,WAAW,qBAAqB,OAAO;AAC/C,QAAQ,cAAc,wBAAwB,OAAO;AAGrD,IAAM,YAAkC;EACpC,GAAG;EACH;EACA,OAAO;;AAGX,IAAA,iBAAe;",
6
6
  "names": ["rule", "rule", "rule", "import_ts_extras", "import_ts_extras", "rule", "import_ts_extras", "rule", "rule", "getMemberPropertyName", "rule", "import_ts_extras", "import_ts_extras", "getMemberPropertyName", "rule", "getMemberPropertyName", "getMemberPropertyName", "rule", "import_ts_extras", "getMemberPropertyName", "rule", "rule", "rule", "getMemberPropertyName", "getMemberPropertyName", "rule", "rule", "import_ts_extras", "getMemberPropertyName", "rule", "import_ts_extras", "rule", "import_ts_extras", "getMemberPropertyName", "rule", "getPropertyName", "rule", "import_ts_extras", "getPropertyName", "getPropertyByName", "getStaticStringValue", "rule", "rule", "rule", "rule", "rule", "rule", "rule", "getMemberPropertyName", "rule", "import_ts_extras", "getStaticStringValue", "rule", "import_ts_extras", "getMemberPropertyName", "rule", "import_ts_extras", "getMemberPropertyName", "isFunctionExpression", "rule", "rule", "import_ts_extras", "isFunctionExpression", "rule", "getMemberPropertyName", "import_ts_extras", "getMemberPropertyName", "isFunctionExpression", "rule", "import_ts_extras", "getMemberPropertyName", "isFunctionExpression", "rule", "firstArgument", "import_ts_extras", "getMemberPropertyName", "rule", "rule", "import_ts_extras", "isJsxWebviewElement", "getJsxAttributeName", "rule", "isJsxWebviewElement", "getJsxAttributeName", "isTruthyJsxAttributeValue", "rule", "rule", "import_ts_extras", "getMemberPropertyName", "getStaticStringValue", "rule", "getJsxAttributeName", "getMemberPropertyName", "rule", "rule", "import_ts_extras", "rule", "rule", "rule", "rule", "import_ts_extras", "getMemberPropertyName", "getStaticStringValue", "isJavaScriptUrl", "rule", "import_ts_extras", "isFunctionExpression", "childNode", "getMemberPropertyName", "rule", "rule", "import_ts_extras", "import_ts_extras", "getMemberPropertyName", "isFunctionExpression", "isExpressionNode", "rule", "import_ts_extras", "isExpressionNode", "rule", "getMemberPropertyName", "import_ts_extras", "getMemberPropertyName", "rule", "isExpressionNode", "rule", "import_ts_extras", "getPatternIdentifier", "rule", "getMemberPropertyName", "import_ts_extras", "VM_MODULE_NAMES", "isVmModuleSource", "isRequireCallFromVmModule", "getPatternIdentifier", "getMemberPropertyName", "rule", "import_ts_extras", "getPatternIdentifier", "getMemberPropertyName", "rule", "rule", "import_ts_extras", "rule", "import_ts_extras", "getMemberPropertyName", "getStaticStringValue", "rule", "isSanitizedExpression", "getMemberPropertyName", "rule", "getMemberPropertyName", "isDataUrl", "getJsxAttributeName", "rule", "getMemberPropertyName", "rule", "getMemberPropertyName", "isJavaScriptUrl", "rule", "getMemberPropertyName", "rule", "import_ts_extras", "isExpressionNode", "isFunctionExpression", "getMemberPropertyName", "rule", "rule", "import_ts_extras", "rule", "import_ts_extras", "getStaticStringValue", "rule", "rule", "rule", "rule", "typeScriptPlugin", "nodePlugin", "securityPlugin", "typeScriptParser", "configs"]
7
7
  }