@oculum/scanner 1.0.14 → 1.0.15
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.
- package/dist/detect/ai-code/index.d.ts +6 -11
- package/dist/detect/ai-code/index.d.ts.map +1 -1
- package/dist/detect/ai-code/index.js +6 -24
- package/dist/detect/ai-code/index.js.map +1 -1
- package/dist/detect/ast-rules/agent-tools-ast.d.ts +14 -0
- package/dist/detect/ast-rules/agent-tools-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/agent-tools-ast.js +809 -0
- package/dist/detect/ast-rules/agent-tools-ast.js.map +1 -0
- package/dist/detect/ast-rules/ai-fingerprinting-ast.d.ts +14 -0
- package/dist/detect/ast-rules/ai-fingerprinting-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/ai-fingerprinting-ast.js +344 -0
- package/dist/detect/ast-rules/ai-fingerprinting-ast.js.map +1 -0
- package/dist/detect/ast-rules/auth-patterns-ast.d.ts +14 -0
- package/dist/detect/ast-rules/auth-patterns-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/auth-patterns-ast.js +280 -0
- package/dist/detect/ast-rules/auth-patterns-ast.js.map +1 -0
- package/dist/detect/ast-rules/byok-ast.d.ts +13 -0
- package/dist/detect/ast-rules/byok-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/byok-ast.js +180 -0
- package/dist/detect/ast-rules/byok-ast.js.map +1 -0
- package/dist/detect/ast-rules/child-process-ast.d.ts +13 -0
- package/dist/detect/ast-rules/child-process-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/child-process-ast.js +252 -0
- package/dist/detect/ast-rules/child-process-ast.js.map +1 -0
- package/dist/detect/ast-rules/dangerous-eval-ast.d.ts +13 -0
- package/dist/detect/ast-rules/dangerous-eval-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/dangerous-eval-ast.js +218 -0
- package/dist/detect/ast-rules/dangerous-eval-ast.js.map +1 -0
- package/dist/detect/ast-rules/data-exposure-ast.d.ts +13 -0
- package/dist/detect/ast-rules/data-exposure-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/data-exposure-ast.js +158 -0
- package/dist/detect/ast-rules/data-exposure-ast.js.map +1 -0
- package/dist/detect/ast-rules/dom-xss-ast.d.ts +14 -0
- package/dist/detect/ast-rules/dom-xss-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/dom-xss-ast.js +217 -0
- package/dist/detect/ast-rules/dom-xss-ast.js.map +1 -0
- package/dist/detect/ast-rules/endpoint-protection-ast.d.ts +13 -0
- package/dist/detect/ast-rules/endpoint-protection-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/endpoint-protection-ast.js +228 -0
- package/dist/detect/ast-rules/endpoint-protection-ast.js.map +1 -0
- package/dist/detect/ast-rules/entropy-ast.d.ts +17 -0
- package/dist/detect/ast-rules/entropy-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/entropy-ast.js +265 -0
- package/dist/detect/ast-rules/entropy-ast.js.map +1 -0
- package/dist/detect/ast-rules/flask-debug-ast.d.ts +10 -0
- package/dist/detect/ast-rules/flask-debug-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/flask-debug-ast.js +125 -0
- package/dist/detect/ast-rules/flask-debug-ast.js.map +1 -0
- package/dist/detect/ast-rules/framework-checks-ast.d.ts +13 -0
- package/dist/detect/ast-rules/framework-checks-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/framework-checks-ast.js +185 -0
- package/dist/detect/ast-rules/framework-checks-ast.js.map +1 -0
- package/dist/detect/ast-rules/helpers/call-analysis.d.ts +62 -0
- package/dist/detect/ast-rules/helpers/call-analysis.d.ts.map +1 -0
- package/dist/detect/ast-rules/helpers/call-analysis.js +217 -0
- package/dist/detect/ast-rules/helpers/call-analysis.js.map +1 -0
- package/dist/detect/ast-rules/helpers/context-detection.d.ts +33 -0
- package/dist/detect/ast-rules/helpers/context-detection.d.ts.map +1 -0
- package/dist/detect/ast-rules/helpers/context-detection.js +256 -0
- package/dist/detect/ast-rules/helpers/context-detection.js.map +1 -0
- package/dist/detect/ast-rules/helpers/control-flow.d.ts +40 -0
- package/dist/detect/ast-rules/helpers/control-flow.d.ts.map +1 -0
- package/dist/detect/ast-rules/helpers/control-flow.js +174 -0
- package/dist/detect/ast-rules/helpers/control-flow.js.map +1 -0
- package/dist/detect/ast-rules/helpers/import-analysis.d.ts +43 -0
- package/dist/detect/ast-rules/helpers/import-analysis.d.ts.map +1 -0
- package/dist/detect/ast-rules/helpers/import-analysis.js +149 -0
- package/dist/detect/ast-rules/helpers/import-analysis.js.map +1 -0
- package/dist/detect/ast-rules/helpers/index.d.ts +16 -0
- package/dist/detect/ast-rules/helpers/index.d.ts.map +1 -0
- package/dist/detect/ast-rules/helpers/index.js +112 -0
- package/dist/detect/ast-rules/helpers/index.js.map +1 -0
- package/dist/detect/ast-rules/helpers/python-helpers.d.ts +215 -0
- package/dist/detect/ast-rules/helpers/python-helpers.d.ts.map +1 -0
- package/dist/detect/ast-rules/helpers/python-helpers.js +935 -0
- package/dist/detect/ast-rules/helpers/python-helpers.js.map +1 -0
- package/dist/detect/ast-rules/helpers/scope-analysis.d.ts +50 -0
- package/dist/detect/ast-rules/helpers/scope-analysis.d.ts.map +1 -0
- package/dist/detect/ast-rules/helpers/scope-analysis.js +194 -0
- package/dist/detect/ast-rules/helpers/scope-analysis.js.map +1 -0
- package/dist/detect/ast-rules/helpers/string-analysis.d.ts +57 -0
- package/dist/detect/ast-rules/helpers/string-analysis.d.ts.map +1 -0
- package/dist/detect/ast-rules/helpers/string-analysis.js +184 -0
- package/dist/detect/ast-rules/helpers/string-analysis.js.map +1 -0
- package/dist/detect/ast-rules/helpers/type-extraction.d.ts +44 -0
- package/dist/detect/ast-rules/helpers/type-extraction.d.ts.map +1 -0
- package/dist/detect/ast-rules/helpers/type-extraction.js +125 -0
- package/dist/detect/ast-rules/helpers/type-extraction.js.map +1 -0
- package/dist/detect/ast-rules/helpers/user-input.d.ts +35 -0
- package/dist/detect/ast-rules/helpers/user-input.d.ts.map +1 -0
- package/dist/detect/ast-rules/helpers/user-input.js +243 -0
- package/dist/detect/ast-rules/helpers/user-input.js.map +1 -0
- package/dist/detect/ast-rules/index.d.ts +112 -0
- package/dist/detect/ast-rules/index.d.ts.map +1 -0
- package/dist/detect/ast-rules/index.js +232 -0
- package/dist/detect/ast-rules/index.js.map +1 -0
- package/dist/detect/ast-rules/json-parse-ast.d.ts +13 -0
- package/dist/detect/ast-rules/json-parse-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/json-parse-ast.js +143 -0
- package/dist/detect/ast-rules/json-parse-ast.js.map +1 -0
- package/dist/detect/ast-rules/log-injection-ast.d.ts +14 -0
- package/dist/detect/ast-rules/log-injection-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/log-injection-ast.js +235 -0
- package/dist/detect/ast-rules/log-injection-ast.js.map +1 -0
- package/dist/detect/ast-rules/logic-gates-ast.d.ts +14 -0
- package/dist/detect/ast-rules/logic-gates-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/logic-gates-ast.js +312 -0
- package/dist/detect/ast-rules/logic-gates-ast.js.map +1 -0
- package/dist/detect/ast-rules/mcp-security-ast.d.ts +14 -0
- package/dist/detect/ast-rules/mcp-security-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/mcp-security-ast.js +755 -0
- package/dist/detect/ast-rules/mcp-security-ast.js.map +1 -0
- package/dist/detect/ast-rules/model-supply-chain-ast.d.ts +13 -0
- package/dist/detect/ast-rules/model-supply-chain-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/model-supply-chain-ast.js +188 -0
- package/dist/detect/ast-rules/model-supply-chain-ast.js.map +1 -0
- package/dist/detect/ast-rules/package-hallucination-ast.d.ts +13 -0
- package/dist/detect/ast-rules/package-hallucination-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/package-hallucination-ast.js +607 -0
- package/dist/detect/ast-rules/package-hallucination-ast.js.map +1 -0
- package/dist/detect/ast-rules/prompt-hygiene-ast.d.ts +15 -0
- package/dist/detect/ast-rules/prompt-hygiene-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/prompt-hygiene-ast.js +332 -0
- package/dist/detect/ast-rules/prompt-hygiene-ast.js.map +1 -0
- package/dist/detect/ast-rules/rag-safety-ast.d.ts +18 -0
- package/dist/detect/ast-rules/rag-safety-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/rag-safety-ast.js +640 -0
- package/dist/detect/ast-rules/rag-safety-ast.js.map +1 -0
- package/dist/detect/ast-rules/request-validation-ast.d.ts +13 -0
- package/dist/detect/ast-rules/request-validation-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/request-validation-ast.js +116 -0
- package/dist/detect/ast-rules/request-validation-ast.js.map +1 -0
- package/dist/detect/ast-rules/risky-imports-ast.d.ts +14 -0
- package/dist/detect/ast-rules/risky-imports-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/risky-imports-ast.js +114 -0
- package/dist/detect/ast-rules/risky-imports-ast.js.map +1 -0
- package/dist/detect/ast-rules/schema-validation-ast.d.ts +14 -0
- package/dist/detect/ast-rules/schema-validation-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/schema-validation-ast.js +233 -0
- package/dist/detect/ast-rules/schema-validation-ast.js.map +1 -0
- package/dist/detect/ast-rules/secret-patterns-ast.d.ts +17 -0
- package/dist/detect/ast-rules/secret-patterns-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/secret-patterns-ast.js +199 -0
- package/dist/detect/ast-rules/secret-patterns-ast.js.map +1 -0
- package/dist/detect/ast-rules/security-headers-ast.d.ts +14 -0
- package/dist/detect/ast-rules/security-headers-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/security-headers-ast.js +187 -0
- package/dist/detect/ast-rules/security-headers-ast.js.map +1 -0
- package/dist/detect/ast-rules/sql-injection-ast.d.ts +17 -0
- package/dist/detect/ast-rules/sql-injection-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/sql-injection-ast.js +497 -0
- package/dist/detect/ast-rules/sql-injection-ast.js.map +1 -0
- package/dist/detect/ast-rules/ssrf-ast.d.ts +14 -0
- package/dist/detect/ast-rules/ssrf-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/ssrf-ast.js +573 -0
- package/dist/detect/ast-rules/ssrf-ast.js.map +1 -0
- package/dist/detect/ast-rules/taint-fix-templates.d.ts +18 -0
- package/dist/detect/ast-rules/taint-fix-templates.d.ts.map +1 -0
- package/dist/detect/ast-rules/taint-fix-templates.js +92 -0
- package/dist/detect/ast-rules/taint-fix-templates.js.map +1 -0
- package/dist/detect/ast-rules/taint-flow-ast.d.ts +24 -0
- package/dist/detect/ast-rules/taint-flow-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/taint-flow-ast.js +340 -0
- package/dist/detect/ast-rules/taint-flow-ast.js.map +1 -0
- package/dist/detect/ast-rules/variables-ast.d.ts +24 -0
- package/dist/detect/ast-rules/variables-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/variables-ast.js +362 -0
- package/dist/detect/ast-rules/variables-ast.js.map +1 -0
- package/dist/detect/ast-rules/weak-crypto-ast.d.ts +15 -0
- package/dist/detect/ast-rules/weak-crypto-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/weak-crypto-ast.js +406 -0
- package/dist/detect/ast-rules/weak-crypto-ast.js.map +1 -0
- package/dist/detect/ast-rules/xxe-ast.d.ts +13 -0
- package/dist/detect/ast-rules/xxe-ast.d.ts.map +1 -0
- package/dist/detect/ast-rules/xxe-ast.js +157 -0
- package/dist/detect/ast-rules/xxe-ast.js.map +1 -0
- package/dist/detect/config/agent-skill-injection.d.ts.map +1 -1
- package/dist/detect/config/agent-skill-injection.js +2 -24
- package/dist/detect/config/agent-skill-injection.js.map +1 -1
- package/dist/detect/config/index.d.ts +1 -0
- package/dist/detect/config/index.d.ts.map +1 -1
- package/dist/detect/config/index.js +3 -1
- package/dist/detect/config/index.js.map +1 -1
- package/dist/detect/config/osv-check.d.ts.map +1 -1
- package/dist/detect/config/osv-check.js +6 -1
- package/dist/detect/config/osv-check.js.map +1 -1
- package/dist/detect/config/package-check.d.ts.map +1 -1
- package/dist/detect/config/package-check.js +6 -1
- package/dist/detect/config/package-check.js.map +1 -1
- package/dist/detect/config/rules-file-backdoor.d.ts +36 -0
- package/dist/detect/config/rules-file-backdoor.d.ts.map +1 -0
- package/dist/detect/config/rules-file-backdoor.js +379 -0
- package/dist/detect/config/rules-file-backdoor.js.map +1 -0
- package/dist/detect/index.d.ts +43 -6
- package/dist/detect/index.d.ts.map +1 -1
- package/dist/detect/index.js +70 -7
- package/dist/detect/index.js.map +1 -1
- package/dist/detect/secrets/config-audit.d.ts.map +1 -1
- package/dist/detect/secrets/config-audit.js +36 -3
- package/dist/detect/secrets/config-audit.js.map +1 -1
- package/dist/detect/secrets/entropy.d.ts.map +1 -1
- package/dist/detect/secrets/entropy.js +180 -0
- package/dist/detect/secrets/entropy.js.map +1 -1
- package/dist/detect/secrets/index.d.ts +0 -2
- package/dist/detect/secrets/index.d.ts.map +1 -1
- package/dist/detect/secrets/index.js +7 -17
- package/dist/detect/secrets/index.js.map +1 -1
- package/dist/detect/structural/index.d.ts +15 -28
- package/dist/detect/structural/index.d.ts.map +1 -1
- package/dist/detect/structural/index.js +20 -497
- package/dist/detect/structural/index.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/model/auth-helper-detector.d.ts.map +1 -1
- package/dist/model/auth-helper-detector.js +2 -7
- package/dist/model/auth-helper-detector.js.map +1 -1
- package/dist/model/import-resolver.d.ts.map +1 -1
- package/dist/model/import-resolver.js +94 -0
- package/dist/model/import-resolver.js.map +1 -1
- package/dist/model/imported-auth-detector.js +8 -8
- package/dist/model/imported-auth-detector.js.map +1 -1
- package/dist/model/index.d.ts +8 -0
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/index.js +198 -73
- package/dist/model/index.js.map +1 -1
- package/dist/model/module-graph.d.ts.map +1 -1
- package/dist/model/module-graph.js +22 -9
- package/dist/model/module-graph.js.map +1 -1
- package/dist/model/project-context.d.ts +1 -1
- package/dist/model/project-context.d.ts.map +1 -1
- package/dist/model/project-context.js +34 -0
- package/dist/model/project-context.js.map +1 -1
- package/dist/model/route-auth-resolver.d.ts.map +1 -1
- package/dist/model/route-auth-resolver.js +17 -2
- package/dist/model/route-auth-resolver.js.map +1 -1
- package/dist/model/route-discovery/index.js +1 -1
- package/dist/model/route-discovery/index.js.map +1 -1
- package/dist/model/route-discovery/nextjs.js +1 -1
- package/dist/model/route-discovery/nextjs.js.map +1 -1
- package/dist/model/route-discovery/python.d.ts +6 -3
- package/dist/model/route-discovery/python.d.ts.map +1 -1
- package/dist/model/route-discovery/python.js +132 -9
- package/dist/model/route-discovery/python.js.map +1 -1
- package/dist/model/route-discovery/types.d.ts +1 -1
- package/dist/model/route-discovery/types.d.ts.map +1 -1
- package/dist/model/route-discovery/utils.d.ts +8 -0
- package/dist/model/route-discovery/utils.d.ts.map +1 -1
- package/dist/model/route-discovery/utils.js +70 -0
- package/dist/model/route-discovery/utils.js.map +1 -1
- package/dist/model/taint-types.d.ts +0 -4
- package/dist/model/taint-types.d.ts.map +1 -1
- package/dist/parse/ast.d.ts +58 -0
- package/dist/parse/ast.d.ts.map +1 -0
- package/dist/parse/ast.js +230 -0
- package/dist/parse/ast.js.map +1 -0
- package/dist/parse/call-graph.d.ts +41 -0
- package/dist/parse/call-graph.d.ts.map +1 -0
- package/dist/parse/call-graph.js +386 -0
- package/dist/parse/call-graph.js.map +1 -0
- package/dist/parse/file-classifier.d.ts +11 -0
- package/dist/parse/file-classifier.d.ts.map +1 -1
- package/dist/parse/file-classifier.js +63 -15
- package/dist/parse/file-classifier.js.map +1 -1
- package/dist/parse/node-index.d.ts +32 -0
- package/dist/parse/node-index.d.ts.map +1 -0
- package/dist/parse/node-index.js +103 -0
- package/dist/parse/node-index.js.map +1 -0
- package/dist/parse/type-extractor.d.ts +50 -0
- package/dist/parse/type-extractor.d.ts.map +1 -0
- package/dist/parse/type-extractor.js +243 -0
- package/dist/parse/type-extractor.js.map +1 -0
- package/dist/pipeline/config.d.ts +7 -1
- package/dist/pipeline/config.d.ts.map +1 -1
- package/dist/pipeline/config.js.map +1 -1
- package/dist/pipeline/index.d.ts +3 -3
- package/dist/pipeline/index.d.ts.map +1 -1
- package/dist/pipeline/index.js +192 -64
- package/dist/pipeline/index.js.map +1 -1
- package/dist/pipeline/modes/incremental.d.ts.map +1 -1
- package/dist/pipeline/modes/incremental.js +2 -7
- package/dist/pipeline/modes/incremental.js.map +1 -1
- package/dist/postprocess/dedup.d.ts +5 -2
- package/dist/postprocess/dedup.d.ts.map +1 -1
- package/dist/postprocess/dedup.js +47 -16
- package/dist/postprocess/dedup.js.map +1 -1
- package/dist/report/build-result.d.ts +9 -4
- package/dist/report/build-result.d.ts.map +1 -1
- package/dist/report/build-result.js +15 -4
- package/dist/report/build-result.js.map +1 -1
- package/dist/report/formatters/cli-terminal.d.ts +1 -1
- package/dist/report/formatters/cli-terminal.d.ts.map +1 -1
- package/dist/report/formatters/cli-terminal.js +434 -231
- package/dist/report/formatters/cli-terminal.js.map +1 -1
- package/dist/report/sanitize.d.ts +10 -0
- package/dist/report/sanitize.d.ts.map +1 -0
- package/dist/report/sanitize.js +19 -0
- package/dist/report/sanitize.js.map +1 -0
- package/dist/score/adjustments.d.ts +20 -2
- package/dist/score/adjustments.d.ts.map +1 -1
- package/dist/score/adjustments.js +108 -37
- package/dist/score/adjustments.js.map +1 -1
- package/dist/score/confidence.d.ts +6 -0
- package/dist/score/confidence.d.ts.map +1 -1
- package/dist/score/confidence.js +10 -4
- package/dist/score/confidence.js.map +1 -1
- package/dist/score/evidence.d.ts +25 -0
- package/dist/score/evidence.d.ts.map +1 -0
- package/dist/score/evidence.js +51 -0
- package/dist/score/evidence.js.map +1 -0
- package/dist/score/index.d.ts +3 -1
- package/dist/score/index.d.ts.map +1 -1
- package/dist/score/index.js +25 -50
- package/dist/score/index.js.map +1 -1
- package/dist/score/types.d.ts +5 -1
- package/dist/score/types.d.ts.map +1 -1
- package/dist/shared/category-filter.d.ts.map +1 -1
- package/dist/shared/category-filter.js +12 -0
- package/dist/shared/category-filter.js.map +1 -1
- package/dist/shared/regex-utils.d.ts +3 -0
- package/dist/shared/regex-utils.d.ts.map +1 -0
- package/dist/shared/regex-utils.js +8 -0
- package/dist/shared/regex-utils.js.map +1 -0
- package/dist/shared/registry-clients.d.ts +7 -0
- package/dist/shared/registry-clients.d.ts.map +1 -1
- package/dist/shared/registry-clients.js +94 -17
- package/dist/shared/registry-clients.js.map +1 -1
- package/dist/shared/rules/metadata.d.ts.map +1 -1
- package/dist/shared/rules/metadata.js +17 -0
- package/dist/shared/rules/metadata.js.map +1 -1
- package/dist/shared/types.d.ts +59 -15
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/shared/types.js +38 -21
- package/dist/shared/types.js.map +1 -1
- package/dist/taint/async-flow.d.ts +44 -0
- package/dist/taint/async-flow.d.ts.map +1 -0
- package/dist/taint/async-flow.js +271 -0
- package/dist/taint/async-flow.js.map +1 -0
- package/dist/taint/cfg-builder.d.ts +35 -0
- package/dist/taint/cfg-builder.d.ts.map +1 -0
- package/dist/taint/cfg-builder.js +980 -0
- package/dist/taint/cfg-builder.js.map +1 -0
- package/dist/taint/cfg-types.d.ts +76 -0
- package/dist/taint/cfg-types.d.ts.map +1 -0
- package/dist/taint/cfg-types.js +13 -0
- package/dist/taint/cfg-types.js.map +1 -0
- package/dist/taint/constant-propagation.d.ts +34 -0
- package/dist/taint/constant-propagation.d.ts.map +1 -0
- package/dist/taint/constant-propagation.js +164 -0
- package/dist/taint/constant-propagation.js.map +1 -0
- package/dist/taint/cross-file-analyzer.d.ts +27 -0
- package/dist/taint/cross-file-analyzer.d.ts.map +1 -0
- package/dist/taint/cross-file-analyzer.js +99 -0
- package/dist/taint/cross-file-analyzer.js.map +1 -0
- package/dist/taint/cross-file-index.d.ts +59 -0
- package/dist/taint/cross-file-index.d.ts.map +1 -0
- package/dist/taint/cross-file-index.js +183 -0
- package/dist/taint/cross-file-index.js.map +1 -0
- package/dist/taint/def-use.d.ts +27 -0
- package/dist/taint/def-use.d.ts.map +1 -0
- package/dist/taint/def-use.js +519 -0
- package/dist/taint/def-use.js.map +1 -0
- package/dist/taint/file-analysis-cache.d.ts +47 -0
- package/dist/taint/file-analysis-cache.d.ts.map +1 -0
- package/dist/taint/file-analysis-cache.js +107 -0
- package/dist/taint/file-analysis-cache.js.map +1 -0
- package/dist/taint/framework-models.d.ts +77 -0
- package/dist/taint/framework-models.d.ts.map +1 -0
- package/dist/taint/framework-models.js +258 -0
- package/dist/taint/framework-models.js.map +1 -0
- package/dist/taint/helpers.d.ts +31 -0
- package/dist/taint/helpers.d.ts.map +1 -0
- package/dist/taint/helpers.js +130 -0
- package/dist/taint/helpers.js.map +1 -0
- package/dist/taint/index.d.ts +28 -0
- package/dist/taint/index.d.ts.map +1 -0
- package/dist/taint/index.js +77 -0
- package/dist/taint/index.js.map +1 -0
- package/dist/taint/llm-registry.d.ts +47 -0
- package/dist/taint/llm-registry.d.ts.map +1 -0
- package/dist/taint/llm-registry.js +152 -0
- package/dist/taint/llm-registry.js.map +1 -0
- package/dist/taint/llm-risk-scoring.d.ts +54 -0
- package/dist/taint/llm-risk-scoring.d.ts.map +1 -0
- package/dist/taint/llm-risk-scoring.js +376 -0
- package/dist/taint/llm-risk-scoring.js.map +1 -0
- package/dist/taint/propagation-types.d.ts +104 -0
- package/dist/taint/propagation-types.d.ts.map +1 -0
- package/dist/taint/propagation-types.js +98 -0
- package/dist/taint/propagation-types.js.map +1 -0
- package/dist/taint/propagation.d.ts +111 -0
- package/dist/taint/propagation.d.ts.map +1 -0
- package/dist/taint/propagation.js +1576 -0
- package/dist/taint/propagation.js.map +1 -0
- package/dist/taint/sanitizer-registry.d.ts +26 -0
- package/dist/taint/sanitizer-registry.d.ts.map +1 -0
- package/dist/taint/sanitizer-registry.js +422 -0
- package/dist/taint/sanitizer-registry.js.map +1 -0
- package/dist/taint/sink-classifier.d.ts +27 -0
- package/dist/taint/sink-classifier.d.ts.map +1 -0
- package/dist/taint/sink-classifier.js +1166 -0
- package/dist/taint/sink-classifier.js.map +1 -0
- package/dist/taint/source-classifier.d.ts +29 -0
- package/dist/taint/source-classifier.d.ts.map +1 -0
- package/dist/taint/source-classifier.js +814 -0
- package/dist/taint/source-classifier.js.map +1 -0
- package/dist/taint/taint-analyzer.d.ts +33 -0
- package/dist/taint/taint-analyzer.d.ts.map +1 -0
- package/dist/taint/taint-analyzer.js +88 -0
- package/dist/taint/taint-analyzer.js.map +1 -0
- package/dist/taint/taint-summary.d.ts +37 -0
- package/dist/taint/taint-summary.d.ts.map +1 -0
- package/dist/taint/taint-summary.js +293 -0
- package/dist/taint/taint-summary.js.map +1 -0
- package/dist/taint/types.d.ts +47 -0
- package/dist/taint/types.d.ts.map +1 -0
- package/dist/taint/types.js +19 -0
- package/dist/taint/types.js.map +1 -0
- package/dist/validate/clients.d.ts +2 -1
- package/dist/validate/clients.d.ts.map +1 -1
- package/dist/validate/clients.js +3 -2
- package/dist/validate/clients.js.map +1 -1
- package/dist/validate/index.d.ts +5 -6
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js +22 -21
- package/dist/validate/index.js.map +1 -1
- package/dist/validate/prompts/modules/ai-patterns.d.ts +1 -1
- package/dist/validate/prompts/modules/ai-patterns.d.ts.map +1 -1
- package/dist/validate/prompts/modules/ai-patterns.js +16 -0
- package/dist/validate/prompts/modules/ai-patterns.js.map +1 -1
- package/dist/validate/prompts/modules/common.d.ts +1 -1
- package/dist/validate/prompts/modules/common.d.ts.map +1 -1
- package/dist/validate/prompts/modules/common.js +12 -3
- package/dist/validate/prompts/modules/common.js.map +1 -1
- package/dist/validate/providers/anthropic.d.ts +4 -4
- package/dist/validate/providers/anthropic.d.ts.map +1 -1
- package/dist/validate/providers/anthropic.js +85 -58
- package/dist/validate/providers/anthropic.js.map +1 -1
- package/dist/validate/providers/openai.d.ts +4 -4
- package/dist/validate/providers/openai.d.ts.map +1 -1
- package/dist/validate/providers/openai.js +149 -99
- package/dist/validate/providers/openai.js.map +1 -1
- package/dist/validate/request-builder.d.ts +2 -8
- package/dist/validate/request-builder.d.ts.map +1 -1
- package/dist/validate/request-builder.js +4 -34
- package/dist/validate/request-builder.js.map +1 -1
- package/dist/validate/types.d.ts +9 -0
- package/dist/validate/types.d.ts.map +1 -1
- package/dist/validate/types.js.map +1 -1
- package/dist/validate/utils/path-helpers.js +2 -2
- package/dist/validate/utils/path-helpers.js.map +1 -1
- package/dist/validate/utils/response-parser.d.ts +10 -0
- package/dist/validate/utils/response-parser.d.ts.map +1 -1
- package/dist/validate/utils/response-parser.js +21 -2
- package/dist/validate/utils/response-parser.js.map +1 -1
- package/dist/validate/utils/retry.d.ts.map +1 -1
- package/dist/validate/utils/retry.js +19 -4
- package/dist/validate/utils/retry.js.map +1 -1
- package/package.json +7 -4
- package/src/__tests__/benchmark/fixtures/layer2/ai-execution-sinks.ts +1 -1
- package/src/__tests__/benchmark/planted-benchmark.test.ts +337 -0
- package/src/__tests__/benchmark/utils/test-runner.ts +38 -4
- package/src/__tests__/category-filter.test.ts +5 -1
- package/src/__tests__/context-engine/route-discovery/python.test.ts +726 -0
- package/src/__tests__/detect/ast-rules.test.ts +1043 -0
- package/src/__tests__/detect/offline-mode.test.ts +147 -0
- package/src/__tests__/detect/python-ast-rules.test.ts +569 -0
- package/src/__tests__/detect/python-helpers.test.ts +536 -0
- package/src/__tests__/detect/python-sast-rules.test.ts +453 -0
- package/src/__tests__/detect/rules-file-backdoor-decoders.test.ts +151 -0
- package/src/__tests__/detect/rules-file-backdoor.test.ts +284 -0
- package/src/__tests__/detect/taint-fix-templates.test.ts +150 -0
- package/src/__tests__/detect/taint-path-serialization.test.ts +170 -0
- package/src/__tests__/parse/call-graph.test.ts +300 -0
- package/src/__tests__/parse/python-parser.test.ts +274 -0
- package/src/__tests__/regression/known-false-positives.test.ts +491 -9
- package/src/__tests__/regression/rules-file-backdoor.test.ts +137 -0
- package/src/__tests__/score/adjustments.test.ts +34 -16
- package/src/__tests__/score/confidence.test.ts +84 -57
- package/src/__tests__/score/evidence-scoring.test.ts +249 -0
- package/src/__tests__/score/evidence.test.ts +144 -0
- package/src/__tests__/score/scoring-integration.test.ts +56 -34
- package/src/__tests__/score/taint-adjustments.test.ts +14 -228
- package/src/__tests__/snapshots/__snapshots__/scan-depth.test.ts.snap +65 -59
- package/src/__tests__/snapshots/scan-depth.test.ts +39 -7
- package/src/__tests__/taint/async-flow.test.ts +247 -0
- package/src/__tests__/taint/cfg-builder.test.ts +835 -0
- package/src/__tests__/taint/constant-propagation.test.ts +302 -0
- package/src/__tests__/taint/cross-file-index.test.ts +683 -0
- package/src/__tests__/taint/cross-file-integration.test.ts +275 -0
- package/src/__tests__/taint/cross-file-propagation.test.ts +910 -0
- package/src/__tests__/taint/def-use.test.ts +132 -0
- package/src/__tests__/taint/field-sensitive-sinks.test.ts +179 -0
- package/src/__tests__/taint/field-sensitivity.test.ts +342 -0
- package/src/__tests__/taint/file-analysis-cache.test.ts +290 -0
- package/src/__tests__/taint/framework-models.test.ts +227 -0
- package/src/__tests__/taint/llm-flow-graph.test.ts +850 -0
- package/src/__tests__/taint/llm-risk-scoring.test.ts +439 -0
- package/src/__tests__/taint/performance-parity.test.ts +315 -0
- package/src/__tests__/taint/propagation.test.ts +621 -0
- package/src/__tests__/taint/python-cross-file.test.ts +494 -0
- package/src/__tests__/taint/python-taint.test.ts +1344 -0
- package/src/__tests__/taint/sanitizer-registry.test.ts +304 -0
- package/src/__tests__/taint/sanitizer-regression.test.ts +111 -0
- package/src/__tests__/taint/sink-classifier.test.ts +537 -0
- package/src/__tests__/taint/source-classifier.test.ts +367 -0
- package/src/__tests__/taint/taint-pipeline.test.ts +418 -0
- package/src/__tests__/taint/taint-smoke.test.ts +400 -0
- package/src/__tests__/taint/taint-summary.test.ts +472 -0
- package/src/detect/ai-code/index.ts +6 -11
- package/src/detect/ast-rules/agent-tools-ast.ts +861 -0
- package/src/detect/ast-rules/ai-fingerprinting-ast.ts +451 -0
- package/src/detect/ast-rules/auth-patterns-ast.ts +304 -0
- package/src/detect/ast-rules/byok-ast.ts +195 -0
- package/src/detect/ast-rules/child-process-ast.ts +276 -0
- package/src/detect/ast-rules/dangerous-eval-ast.ts +227 -0
- package/src/detect/ast-rules/data-exposure-ast.ts +162 -0
- package/src/detect/ast-rules/dom-xss-ast.ts +260 -0
- package/src/detect/ast-rules/endpoint-protection-ast.ts +231 -0
- package/src/detect/ast-rules/entropy-ast.ts +268 -0
- package/src/detect/ast-rules/flask-debug-ast.ts +148 -0
- package/src/detect/ast-rules/framework-checks-ast.ts +200 -0
- package/src/detect/ast-rules/helpers/call-analysis.ts +256 -0
- package/src/detect/ast-rules/helpers/context-detection.ts +277 -0
- package/src/detect/ast-rules/helpers/control-flow.ts +179 -0
- package/src/detect/ast-rules/helpers/import-analysis.ts +185 -0
- package/src/detect/ast-rules/helpers/index.ts +133 -0
- package/src/detect/ast-rules/helpers/python-helpers.ts +1054 -0
- package/src/detect/ast-rules/helpers/scope-analysis.ts +224 -0
- package/src/detect/ast-rules/helpers/string-analysis.ts +215 -0
- package/src/detect/ast-rules/helpers/type-extraction.ts +138 -0
- package/src/detect/ast-rules/helpers/user-input.ts +256 -0
- package/src/detect/ast-rules/index.ts +311 -0
- package/src/detect/ast-rules/json-parse-ast.ts +162 -0
- package/src/detect/ast-rules/log-injection-ast.ts +243 -0
- package/src/detect/ast-rules/logic-gates-ast.ts +343 -0
- package/src/detect/ast-rules/mcp-security-ast.ts +808 -0
- package/src/detect/ast-rules/model-supply-chain-ast.ts +202 -0
- package/src/detect/ast-rules/package-hallucination-ast.ts +664 -0
- package/src/detect/ast-rules/prompt-hygiene-ast.ts +329 -0
- package/src/detect/ast-rules/rag-safety-ast.ts +689 -0
- package/src/detect/ast-rules/request-validation-ast.ts +122 -0
- package/src/detect/ast-rules/risky-imports-ast.ts +133 -0
- package/src/detect/ast-rules/schema-validation-ast.ts +244 -0
- package/src/detect/ast-rules/secret-patterns-ast.ts +223 -0
- package/src/detect/ast-rules/security-headers-ast.ts +206 -0
- package/src/detect/ast-rules/sql-injection-ast.ts +614 -0
- package/src/detect/ast-rules/ssrf-ast.ts +601 -0
- package/src/detect/ast-rules/taint-fix-templates.ts +108 -0
- package/src/detect/ast-rules/taint-flow-ast.ts +416 -0
- package/src/detect/ast-rules/variables-ast.ts +446 -0
- package/src/detect/ast-rules/weak-crypto-ast.ts +441 -0
- package/src/detect/ast-rules/xxe-ast.ts +184 -0
- package/src/detect/config/agent-skill-injection.ts +2 -24
- package/src/detect/config/index.ts +1 -0
- package/src/detect/config/osv-check.ts +6 -1
- package/src/detect/config/package-check.ts +6 -1
- package/src/detect/config/rules-file-backdoor.ts +438 -0
- package/src/detect/index.ts +146 -52
- package/src/detect/secrets/config-audit.ts +37 -3
- package/src/detect/secrets/entropy.ts +195 -0
- package/src/detect/secrets/index.ts +7 -16
- package/src/detect/structural/index.ts +23 -566
- package/src/index.ts +7 -0
- package/src/model/auth-helper-detector.ts +1 -7
- package/src/model/import-resolver.ts +104 -0
- package/src/model/imported-auth-detector.ts +1 -1
- package/src/model/index.ts +240 -80
- package/src/model/module-graph.ts +17 -5
- package/src/model/project-context.ts +28 -1
- package/src/model/route-auth-resolver.ts +18 -3
- package/src/model/route-discovery/index.ts +1 -1
- package/src/model/route-discovery/nextjs.ts +1 -1
- package/src/model/route-discovery/python.ts +156 -9
- package/src/model/route-discovery/types.ts +1 -1
- package/src/model/route-discovery/utils.ts +73 -0
- package/src/model/taint-types.ts +1 -6
- package/src/parse/ast.ts +271 -0
- package/src/parse/call-graph.ts +419 -0
- package/src/parse/file-classifier.ts +69 -15
- package/src/parse/node-index.ts +118 -0
- package/src/parse/type-extractor.ts +293 -0
- package/src/pipeline/config.ts +7 -0
- package/src/pipeline/index.ts +464 -199
- package/src/pipeline/modes/incremental.ts +1 -7
- package/src/postprocess/dedup.ts +48 -17
- package/src/report/build-result.ts +57 -29
- package/src/report/formatters/cli-terminal.ts +731 -415
- package/src/report/sanitize.ts +27 -0
- package/src/score/adjustments.ts +113 -40
- package/src/score/confidence.ts +10 -5
- package/src/score/evidence.ts +55 -0
- package/src/score/index.ts +27 -55
- package/src/score/types.ts +4 -0
- package/src/shared/category-filter.ts +12 -0
- package/src/shared/regex-utils.ts +4 -0
- package/src/shared/registry-clients.ts +106 -18
- package/src/shared/rules/__tests__/metadata.test.ts +5 -1
- package/src/shared/rules/metadata.ts +19 -0
- package/src/shared/types.ts +372 -253
- package/src/taint/async-flow.ts +301 -0
- package/src/taint/cfg-builder.ts +1127 -0
- package/src/taint/cfg-types.ts +110 -0
- package/src/taint/constant-propagation.ts +170 -0
- package/src/taint/cross-file-analyzer.ts +118 -0
- package/src/taint/cross-file-index.ts +275 -0
- package/src/taint/def-use.ts +556 -0
- package/src/taint/file-analysis-cache.ts +145 -0
- package/src/taint/framework-models.ts +313 -0
- package/src/taint/helpers.ts +138 -0
- package/src/taint/index.ts +71 -0
- package/src/taint/llm-registry.ts +174 -0
- package/src/taint/llm-risk-scoring.ts +412 -0
- package/src/taint/propagation-types.ts +188 -0
- package/src/taint/propagation.ts +1750 -0
- package/src/taint/sanitizer-registry.ts +490 -0
- package/src/taint/sink-classifier.ts +1402 -0
- package/src/taint/source-classifier.ts +859 -0
- package/src/taint/taint-analyzer.ts +112 -0
- package/src/taint/taint-summary.ts +341 -0
- package/src/taint/types.ts +86 -0
- package/src/validate/clients.ts +3 -2
- package/src/validate/index.ts +89 -53
- package/src/validate/prompts/modules/ai-patterns.ts +16 -0
- package/src/validate/prompts/modules/common.ts +12 -3
- package/src/validate/providers/anthropic.ts +254 -148
- package/src/validate/providers/openai.ts +363 -218
- package/src/validate/request-builder.ts +2 -45
- package/src/validate/types.ts +9 -0
- package/src/validate/utils/path-helpers.ts +2 -2
- package/src/validate/utils/response-parser.ts +32 -3
- package/src/validate/utils/retry.ts +19 -4
- package/dist/ai-context/index.d.ts +0 -6
- package/dist/ai-context/index.d.ts.map +0 -1
- package/dist/ai-context/index.js +0 -13
- package/dist/ai-context/index.js.map +0 -1
- package/dist/ai-context/manager.d.ts +0 -67
- package/dist/ai-context/manager.d.ts.map +0 -1
- package/dist/ai-context/manager.js +0 -104
- package/dist/ai-context/manager.js.map +0 -1
- package/dist/baseline/diff.d.ts +0 -32
- package/dist/baseline/diff.d.ts.map +0 -1
- package/dist/baseline/diff.js +0 -119
- package/dist/baseline/diff.js.map +0 -1
- package/dist/baseline/index.d.ts +0 -9
- package/dist/baseline/index.d.ts.map +0 -1
- package/dist/baseline/index.js +0 -19
- package/dist/baseline/index.js.map +0 -1
- package/dist/baseline/manager.d.ts +0 -67
- package/dist/baseline/manager.d.ts.map +0 -1
- package/dist/baseline/manager.js +0 -180
- package/dist/baseline/manager.js.map +0 -1
- package/dist/baseline/types.d.ts +0 -91
- package/dist/baseline/types.d.ts.map +0 -1
- package/dist/baseline/types.js +0 -12
- package/dist/baseline/types.js.map +0 -1
- package/dist/category-filter.d.ts +0 -125
- package/dist/category-filter.d.ts.map +0 -1
- package/dist/category-filter.js +0 -360
- package/dist/category-filter.js.map +0 -1
- package/dist/detect/ai-code/agent-tools.d.ts +0 -22
- package/dist/detect/ai-code/agent-tools.d.ts.map +0 -1
- package/dist/detect/ai-code/agent-tools.js +0 -1509
- package/dist/detect/ai-code/agent-tools.js.map +0 -1
- package/dist/detect/ai-code/byok-patterns.d.ts +0 -15
- package/dist/detect/ai-code/byok-patterns.d.ts.map +0 -1
- package/dist/detect/ai-code/byok-patterns.js +0 -313
- package/dist/detect/ai-code/byok-patterns.js.map +0 -1
- package/dist/detect/ai-code/endpoint-protection.d.ts +0 -38
- package/dist/detect/ai-code/endpoint-protection.d.ts.map +0 -1
- package/dist/detect/ai-code/endpoint-protection.js +0 -349
- package/dist/detect/ai-code/endpoint-protection.js.map +0 -1
- package/dist/detect/ai-code/execution-sinks.d.ts +0 -21
- package/dist/detect/ai-code/execution-sinks.d.ts.map +0 -1
- package/dist/detect/ai-code/execution-sinks.js +0 -1158
- package/dist/detect/ai-code/execution-sinks.js.map +0 -1
- package/dist/detect/ai-code/fingerprinting.d.ts +0 -10
- package/dist/detect/ai-code/fingerprinting.d.ts.map +0 -1
- package/dist/detect/ai-code/fingerprinting.js +0 -665
- package/dist/detect/ai-code/fingerprinting.js.map +0 -1
- package/dist/detect/ai-code/mcp-security.d.ts +0 -20
- package/dist/detect/ai-code/mcp-security.d.ts.map +0 -1
- package/dist/detect/ai-code/mcp-security.js +0 -880
- package/dist/detect/ai-code/mcp-security.js.map +0 -1
- package/dist/detect/ai-code/model-supply-chain.d.ts +0 -23
- package/dist/detect/ai-code/model-supply-chain.d.ts.map +0 -1
- package/dist/detect/ai-code/model-supply-chain.js +0 -447
- package/dist/detect/ai-code/model-supply-chain.js.map +0 -1
- package/dist/detect/ai-code/package-hallucination.d.ts +0 -22
- package/dist/detect/ai-code/package-hallucination.d.ts.map +0 -1
- package/dist/detect/ai-code/package-hallucination.js +0 -841
- package/dist/detect/ai-code/package-hallucination.js.map +0 -1
- package/dist/detect/ai-code/prompt-hygiene.d.ts +0 -22
- package/dist/detect/ai-code/prompt-hygiene.d.ts.map +0 -1
- package/dist/detect/ai-code/prompt-hygiene.js +0 -1177
- package/dist/detect/ai-code/prompt-hygiene.js.map +0 -1
- package/dist/detect/ai-code/rag-safety.d.ts +0 -24
- package/dist/detect/ai-code/rag-safety.d.ts.map +0 -1
- package/dist/detect/ai-code/rag-safety.js +0 -913
- package/dist/detect/ai-code/rag-safety.js.map +0 -1
- package/dist/detect/ai-code/schema-validation.d.ts +0 -28
- package/dist/detect/ai-code/schema-validation.d.ts.map +0 -1
- package/dist/detect/ai-code/schema-validation.js +0 -378
- package/dist/detect/ai-code/schema-validation.js.map +0 -1
- package/dist/detect/secrets/patterns.d.ts +0 -11
- package/dist/detect/secrets/patterns.d.ts.map +0 -1
- package/dist/detect/secrets/patterns.js +0 -518
- package/dist/detect/secrets/patterns.js.map +0 -1
- package/dist/detect/secrets/weak-crypto.d.ts +0 -10
- package/dist/detect/secrets/weak-crypto.d.ts.map +0 -1
- package/dist/detect/secrets/weak-crypto.js +0 -432
- package/dist/detect/secrets/weak-crypto.js.map +0 -1
- package/dist/detect/structural/auth-patterns.d.ts +0 -22
- package/dist/detect/structural/auth-patterns.d.ts.map +0 -1
- package/dist/detect/structural/auth-patterns.js +0 -533
- package/dist/detect/structural/auth-patterns.js.map +0 -1
- package/dist/detect/structural/dangerous-functions/child-process.d.ts +0 -16
- package/dist/detect/structural/dangerous-functions/child-process.d.ts.map +0 -1
- package/dist/detect/structural/dangerous-functions/child-process.js +0 -74
- package/dist/detect/structural/dangerous-functions/child-process.js.map +0 -1
- package/dist/detect/structural/dangerous-functions/dom-xss.d.ts +0 -34
- package/dist/detect/structural/dangerous-functions/dom-xss.d.ts.map +0 -1
- package/dist/detect/structural/dangerous-functions/dom-xss.js +0 -230
- package/dist/detect/structural/dangerous-functions/dom-xss.js.map +0 -1
- package/dist/detect/structural/dangerous-functions/index.d.ts +0 -16
- package/dist/detect/structural/dangerous-functions/index.d.ts.map +0 -1
- package/dist/detect/structural/dangerous-functions/index.js +0 -1193
- package/dist/detect/structural/dangerous-functions/index.js.map +0 -1
- package/dist/detect/structural/dangerous-functions/json-parse.d.ts +0 -31
- package/dist/detect/structural/dangerous-functions/json-parse.d.ts.map +0 -1
- package/dist/detect/structural/dangerous-functions/json-parse.js +0 -326
- package/dist/detect/structural/dangerous-functions/json-parse.js.map +0 -1
- package/dist/detect/structural/dangerous-functions/math-random.d.ts +0 -111
- package/dist/detect/structural/dangerous-functions/math-random.d.ts.map +0 -1
- package/dist/detect/structural/dangerous-functions/math-random.js +0 -684
- package/dist/detect/structural/dangerous-functions/math-random.js.map +0 -1
- package/dist/detect/structural/dangerous-functions/patterns.d.ts +0 -21
- package/dist/detect/structural/dangerous-functions/patterns.d.ts.map +0 -1
- package/dist/detect/structural/dangerous-functions/patterns.js +0 -163
- package/dist/detect/structural/dangerous-functions/patterns.js.map +0 -1
- package/dist/detect/structural/dangerous-functions/request-validation.d.ts +0 -13
- package/dist/detect/structural/dangerous-functions/request-validation.d.ts.map +0 -1
- package/dist/detect/structural/dangerous-functions/request-validation.js +0 -126
- package/dist/detect/structural/dangerous-functions/request-validation.js.map +0 -1
- package/dist/detect/structural/dangerous-functions/utils/control-flow.d.ts +0 -24
- package/dist/detect/structural/dangerous-functions/utils/control-flow.d.ts.map +0 -1
- package/dist/detect/structural/dangerous-functions/utils/control-flow.js +0 -70
- package/dist/detect/structural/dangerous-functions/utils/control-flow.js.map +0 -1
- package/dist/detect/structural/dangerous-functions/utils/helpers.d.ts +0 -31
- package/dist/detect/structural/dangerous-functions/utils/helpers.d.ts.map +0 -1
- package/dist/detect/structural/dangerous-functions/utils/helpers.js +0 -147
- package/dist/detect/structural/dangerous-functions/utils/helpers.js.map +0 -1
- package/dist/detect/structural/dangerous-functions/utils/index.d.ts +0 -9
- package/dist/detect/structural/dangerous-functions/utils/index.d.ts.map +0 -1
- package/dist/detect/structural/dangerous-functions/utils/index.js +0 -23
- package/dist/detect/structural/dangerous-functions/utils/index.js.map +0 -1
- package/dist/detect/structural/dangerous-functions/utils/schema-validation.d.ts +0 -22
- package/dist/detect/structural/dangerous-functions/utils/schema-validation.d.ts.map +0 -1
- package/dist/detect/structural/dangerous-functions/utils/schema-validation.js +0 -102
- package/dist/detect/structural/dangerous-functions/utils/schema-validation.js.map +0 -1
- package/dist/detect/structural/data-exposure.d.ts +0 -19
- package/dist/detect/structural/data-exposure.d.ts.map +0 -1
- package/dist/detect/structural/data-exposure.js +0 -262
- package/dist/detect/structural/data-exposure.js.map +0 -1
- package/dist/detect/structural/framework-checks.d.ts +0 -10
- package/dist/detect/structural/framework-checks.d.ts.map +0 -1
- package/dist/detect/structural/framework-checks.js +0 -389
- package/dist/detect/structural/framework-checks.js.map +0 -1
- package/dist/detect/structural/log-injection.d.ts +0 -18
- package/dist/detect/structural/log-injection.d.ts.map +0 -1
- package/dist/detect/structural/log-injection.js +0 -217
- package/dist/detect/structural/log-injection.js.map +0 -1
- package/dist/detect/structural/logic-gates.d.ts +0 -10
- package/dist/detect/structural/logic-gates.d.ts.map +0 -1
- package/dist/detect/structural/logic-gates.js +0 -227
- package/dist/detect/structural/logic-gates.js.map +0 -1
- package/dist/detect/structural/risky-imports.d.ts +0 -10
- package/dist/detect/structural/risky-imports.d.ts.map +0 -1
- package/dist/detect/structural/risky-imports.js +0 -168
- package/dist/detect/structural/risky-imports.js.map +0 -1
- package/dist/detect/structural/security-headers.d.ts +0 -18
- package/dist/detect/structural/security-headers.d.ts.map +0 -1
- package/dist/detect/structural/security-headers.js +0 -196
- package/dist/detect/structural/security-headers.js.map +0 -1
- package/dist/detect/structural/ssrf-detection.d.ts +0 -18
- package/dist/detect/structural/ssrf-detection.d.ts.map +0 -1
- package/dist/detect/structural/ssrf-detection.js +0 -263
- package/dist/detect/structural/ssrf-detection.js.map +0 -1
- package/dist/detect/structural/variables.d.ts +0 -11
- package/dist/detect/structural/variables.d.ts.map +0 -1
- package/dist/detect/structural/variables.js +0 -159
- package/dist/detect/structural/variables.js.map +0 -1
- package/dist/detect/structural/xxe-detection.d.ts +0 -18
- package/dist/detect/structural/xxe-detection.d.ts.map +0 -1
- package/dist/detect/structural/xxe-detection.js +0 -245
- package/dist/detect/structural/xxe-detection.js.map +0 -1
- package/dist/filtering/context-adjustments.d.ts +0 -23
- package/dist/filtering/context-adjustments.d.ts.map +0 -1
- package/dist/filtering/context-adjustments.js +0 -100
- package/dist/filtering/context-adjustments.js.map +0 -1
- package/dist/filtering/index.d.ts +0 -3
- package/dist/filtering/index.d.ts.map +0 -1
- package/dist/filtering/index.js +0 -8
- package/dist/filtering/index.js.map +0 -1
- package/dist/filtering/pipeline.d.ts +0 -48
- package/dist/filtering/pipeline.d.ts.map +0 -1
- package/dist/filtering/pipeline.js +0 -76
- package/dist/filtering/pipeline.js.map +0 -1
- package/dist/formatters/ai-context.d.ts +0 -23
- package/dist/formatters/ai-context.d.ts.map +0 -1
- package/dist/formatters/ai-context.js +0 -238
- package/dist/formatters/ai-context.js.map +0 -1
- package/dist/formatters/cli-terminal.d.ts +0 -65
- package/dist/formatters/cli-terminal.d.ts.map +0 -1
- package/dist/formatters/cli-terminal.js +0 -735
- package/dist/formatters/cli-terminal.js.map +0 -1
- package/dist/formatters/github-comment.d.ts +0 -41
- package/dist/formatters/github-comment.d.ts.map +0 -1
- package/dist/formatters/github-comment.js +0 -370
- package/dist/formatters/github-comment.js.map +0 -1
- package/dist/formatters/grouping.d.ts +0 -52
- package/dist/formatters/grouping.d.ts.map +0 -1
- package/dist/formatters/grouping.js +0 -152
- package/dist/formatters/grouping.js.map +0 -1
- package/dist/formatters/ide/claude-code.d.ts +0 -17
- package/dist/formatters/ide/claude-code.d.ts.map +0 -1
- package/dist/formatters/ide/claude-code.js +0 -94
- package/dist/formatters/ide/claude-code.js.map +0 -1
- package/dist/formatters/ide/cursor.d.ts +0 -13
- package/dist/formatters/ide/cursor.d.ts.map +0 -1
- package/dist/formatters/ide/cursor.js +0 -125
- package/dist/formatters/ide/cursor.js.map +0 -1
- package/dist/formatters/ide/index.d.ts +0 -62
- package/dist/formatters/ide/index.d.ts.map +0 -1
- package/dist/formatters/ide/index.js +0 -184
- package/dist/formatters/ide/index.js.map +0 -1
- package/dist/formatters/ide/windsurf.d.ts +0 -13
- package/dist/formatters/ide/windsurf.d.ts.map +0 -1
- package/dist/formatters/ide/windsurf.js +0 -117
- package/dist/formatters/ide/windsurf.js.map +0 -1
- package/dist/formatters/index.d.ts +0 -11
- package/dist/formatters/index.d.ts.map +0 -1
- package/dist/formatters/index.js +0 -54
- package/dist/formatters/index.js.map +0 -1
- package/dist/formatters/vscode-diagnostic.d.ts +0 -103
- package/dist/formatters/vscode-diagnostic.d.ts.map +0 -1
- package/dist/formatters/vscode-diagnostic.js +0 -151
- package/dist/formatters/vscode-diagnostic.js.map +0 -1
- package/dist/layer1/comments.d.ts +0 -11
- package/dist/layer1/comments.d.ts.map +0 -1
- package/dist/layer1/comments.js +0 -203
- package/dist/layer1/comments.js.map +0 -1
- package/dist/layer1/config-audit.d.ts +0 -11
- package/dist/layer1/config-audit.d.ts.map +0 -1
- package/dist/layer1/config-audit.js +0 -311
- package/dist/layer1/config-audit.js.map +0 -1
- package/dist/layer1/config-mcp-audit.d.ts +0 -23
- package/dist/layer1/config-mcp-audit.d.ts.map +0 -1
- package/dist/layer1/config-mcp-audit.js +0 -239
- package/dist/layer1/config-mcp-audit.js.map +0 -1
- package/dist/layer1/entropy.d.ts +0 -11
- package/dist/layer1/entropy.d.ts.map +0 -1
- package/dist/layer1/entropy.js +0 -741
- package/dist/layer1/entropy.js.map +0 -1
- package/dist/layer1/file-flags.d.ts +0 -10
- package/dist/layer1/file-flags.d.ts.map +0 -1
- package/dist/layer1/file-flags.js +0 -119
- package/dist/layer1/file-flags.js.map +0 -1
- package/dist/layer1/index.d.ts +0 -38
- package/dist/layer1/index.d.ts.map +0 -1
- package/dist/layer1/index.js +0 -170
- package/dist/layer1/index.js.map +0 -1
- package/dist/layer1/patterns.d.ts +0 -11
- package/dist/layer1/patterns.d.ts.map +0 -1
- package/dist/layer1/patterns.js +0 -512
- package/dist/layer1/patterns.js.map +0 -1
- package/dist/layer1/urls.d.ts +0 -11
- package/dist/layer1/urls.d.ts.map +0 -1
- package/dist/layer1/urls.js +0 -444
- package/dist/layer1/urls.js.map +0 -1
- package/dist/layer1/weak-crypto.d.ts +0 -10
- package/dist/layer1/weak-crypto.d.ts.map +0 -1
- package/dist/layer1/weak-crypto.js +0 -428
- package/dist/layer1/weak-crypto.js.map +0 -1
- package/dist/layer2/ai-agent-tools.d.ts +0 -22
- package/dist/layer2/ai-agent-tools.d.ts.map +0 -1
- package/dist/layer2/ai-agent-tools.js +0 -1490
- package/dist/layer2/ai-agent-tools.js.map +0 -1
- package/dist/layer2/ai-endpoint-protection.d.ts +0 -38
- package/dist/layer2/ai-endpoint-protection.d.ts.map +0 -1
- package/dist/layer2/ai-endpoint-protection.js +0 -346
- package/dist/layer2/ai-endpoint-protection.js.map +0 -1
- package/dist/layer2/ai-execution-sinks.d.ts +0 -21
- package/dist/layer2/ai-execution-sinks.d.ts.map +0 -1
- package/dist/layer2/ai-execution-sinks.js +0 -1155
- package/dist/layer2/ai-execution-sinks.js.map +0 -1
- package/dist/layer2/ai-fingerprinting.d.ts +0 -10
- package/dist/layer2/ai-fingerprinting.d.ts.map +0 -1
- package/dist/layer2/ai-fingerprinting.js +0 -650
- package/dist/layer2/ai-fingerprinting.js.map +0 -1
- package/dist/layer2/ai-mcp-security.d.ts +0 -20
- package/dist/layer2/ai-mcp-security.d.ts.map +0 -1
- package/dist/layer2/ai-mcp-security.js +0 -877
- package/dist/layer2/ai-mcp-security.js.map +0 -1
- package/dist/layer2/ai-package-hallucination.d.ts +0 -22
- package/dist/layer2/ai-package-hallucination.d.ts.map +0 -1
- package/dist/layer2/ai-package-hallucination.js +0 -828
- package/dist/layer2/ai-package-hallucination.js.map +0 -1
- package/dist/layer2/ai-prompt-hygiene.d.ts +0 -22
- package/dist/layer2/ai-prompt-hygiene.d.ts.map +0 -1
- package/dist/layer2/ai-prompt-hygiene.js +0 -1156
- package/dist/layer2/ai-prompt-hygiene.js.map +0 -1
- package/dist/layer2/ai-rag-safety.d.ts +0 -24
- package/dist/layer2/ai-rag-safety.d.ts.map +0 -1
- package/dist/layer2/ai-rag-safety.js +0 -910
- package/dist/layer2/ai-rag-safety.js.map +0 -1
- package/dist/layer2/ai-schema-validation.d.ts +0 -28
- package/dist/layer2/ai-schema-validation.d.ts.map +0 -1
- package/dist/layer2/ai-schema-validation.js +0 -375
- package/dist/layer2/ai-schema-validation.js.map +0 -1
- package/dist/layer2/auth-antipatterns.d.ts +0 -22
- package/dist/layer2/auth-antipatterns.d.ts.map +0 -1
- package/dist/layer2/auth-antipatterns.js +0 -522
- package/dist/layer2/auth-antipatterns.js.map +0 -1
- package/dist/layer2/byok-patterns.d.ts +0 -15
- package/dist/layer2/byok-patterns.d.ts.map +0 -1
- package/dist/layer2/byok-patterns.js +0 -302
- package/dist/layer2/byok-patterns.js.map +0 -1
- package/dist/layer2/dangerous-functions/child-process.d.ts +0 -16
- package/dist/layer2/dangerous-functions/child-process.d.ts.map +0 -1
- package/dist/layer2/dangerous-functions/child-process.js +0 -74
- package/dist/layer2/dangerous-functions/child-process.js.map +0 -1
- package/dist/layer2/dangerous-functions/dom-xss.d.ts +0 -34
- package/dist/layer2/dangerous-functions/dom-xss.d.ts.map +0 -1
- package/dist/layer2/dangerous-functions/dom-xss.js +0 -230
- package/dist/layer2/dangerous-functions/dom-xss.js.map +0 -1
- package/dist/layer2/dangerous-functions/index.d.ts +0 -16
- package/dist/layer2/dangerous-functions/index.d.ts.map +0 -1
- package/dist/layer2/dangerous-functions/index.js +0 -1152
- package/dist/layer2/dangerous-functions/index.js.map +0 -1
- package/dist/layer2/dangerous-functions/json-parse.d.ts +0 -31
- package/dist/layer2/dangerous-functions/json-parse.d.ts.map +0 -1
- package/dist/layer2/dangerous-functions/json-parse.js +0 -319
- package/dist/layer2/dangerous-functions/json-parse.js.map +0 -1
- package/dist/layer2/dangerous-functions/math-random.d.ts +0 -111
- package/dist/layer2/dangerous-functions/math-random.d.ts.map +0 -1
- package/dist/layer2/dangerous-functions/math-random.js +0 -684
- package/dist/layer2/dangerous-functions/math-random.js.map +0 -1
- package/dist/layer2/dangerous-functions/patterns.d.ts +0 -21
- package/dist/layer2/dangerous-functions/patterns.d.ts.map +0 -1
- package/dist/layer2/dangerous-functions/patterns.js +0 -163
- package/dist/layer2/dangerous-functions/patterns.js.map +0 -1
- package/dist/layer2/dangerous-functions/request-validation.d.ts +0 -13
- package/dist/layer2/dangerous-functions/request-validation.d.ts.map +0 -1
- package/dist/layer2/dangerous-functions/request-validation.js +0 -119
- package/dist/layer2/dangerous-functions/request-validation.js.map +0 -1
- package/dist/layer2/dangerous-functions/utils/control-flow.d.ts +0 -24
- package/dist/layer2/dangerous-functions/utils/control-flow.d.ts.map +0 -1
- package/dist/layer2/dangerous-functions/utils/control-flow.js +0 -70
- package/dist/layer2/dangerous-functions/utils/control-flow.js.map +0 -1
- package/dist/layer2/dangerous-functions/utils/helpers.d.ts +0 -31
- package/dist/layer2/dangerous-functions/utils/helpers.d.ts.map +0 -1
- package/dist/layer2/dangerous-functions/utils/helpers.js +0 -147
- package/dist/layer2/dangerous-functions/utils/helpers.js.map +0 -1
- package/dist/layer2/dangerous-functions/utils/index.d.ts +0 -9
- package/dist/layer2/dangerous-functions/utils/index.d.ts.map +0 -1
- package/dist/layer2/dangerous-functions/utils/index.js +0 -23
- package/dist/layer2/dangerous-functions/utils/index.js.map +0 -1
- package/dist/layer2/dangerous-functions/utils/schema-validation.d.ts +0 -22
- package/dist/layer2/dangerous-functions/utils/schema-validation.d.ts.map +0 -1
- package/dist/layer2/dangerous-functions/utils/schema-validation.js +0 -102
- package/dist/layer2/dangerous-functions/utils/schema-validation.js.map +0 -1
- package/dist/layer2/data-exposure.d.ts +0 -19
- package/dist/layer2/data-exposure.d.ts.map +0 -1
- package/dist/layer2/data-exposure.js +0 -255
- package/dist/layer2/data-exposure.js.map +0 -1
- package/dist/layer2/framework-checks.d.ts +0 -10
- package/dist/layer2/framework-checks.d.ts.map +0 -1
- package/dist/layer2/framework-checks.js +0 -384
- package/dist/layer2/framework-checks.js.map +0 -1
- package/dist/layer2/index.d.ts +0 -74
- package/dist/layer2/index.d.ts.map +0 -1
- package/dist/layer2/index.js +0 -544
- package/dist/layer2/index.js.map +0 -1
- package/dist/layer2/log-injection.d.ts +0 -18
- package/dist/layer2/log-injection.d.ts.map +0 -1
- package/dist/layer2/log-injection.js +0 -214
- package/dist/layer2/log-injection.js.map +0 -1
- package/dist/layer2/logic-gates.d.ts +0 -10
- package/dist/layer2/logic-gates.d.ts.map +0 -1
- package/dist/layer2/logic-gates.js +0 -220
- package/dist/layer2/logic-gates.js.map +0 -1
- package/dist/layer2/model-supply-chain.d.ts +0 -23
- package/dist/layer2/model-supply-chain.d.ts.map +0 -1
- package/dist/layer2/model-supply-chain.js +0 -444
- package/dist/layer2/model-supply-chain.js.map +0 -1
- package/dist/layer2/risky-imports.d.ts +0 -10
- package/dist/layer2/risky-imports.d.ts.map +0 -1
- package/dist/layer2/risky-imports.js +0 -165
- package/dist/layer2/risky-imports.js.map +0 -1
- package/dist/layer2/security-headers.d.ts +0 -18
- package/dist/layer2/security-headers.d.ts.map +0 -1
- package/dist/layer2/security-headers.js +0 -187
- package/dist/layer2/security-headers.js.map +0 -1
- package/dist/layer2/ssrf-detection.d.ts +0 -18
- package/dist/layer2/ssrf-detection.d.ts.map +0 -1
- package/dist/layer2/ssrf-detection.js +0 -252
- package/dist/layer2/ssrf-detection.js.map +0 -1
- package/dist/layer2/variables.d.ts +0 -11
- package/dist/layer2/variables.d.ts.map +0 -1
- package/dist/layer2/variables.js +0 -156
- package/dist/layer2/variables.js.map +0 -1
- package/dist/layer2/xxe-detection.d.ts +0 -18
- package/dist/layer2/xxe-detection.d.ts.map +0 -1
- package/dist/layer2/xxe-detection.js +0 -242
- package/dist/layer2/xxe-detection.js.map +0 -1
- package/dist/layer3/anthropic/auto-dismiss.d.ts +0 -24
- package/dist/layer3/anthropic/auto-dismiss.d.ts.map +0 -1
- package/dist/layer3/anthropic/auto-dismiss.js +0 -199
- package/dist/layer3/anthropic/auto-dismiss.js.map +0 -1
- package/dist/layer3/anthropic/clients.d.ts +0 -44
- package/dist/layer3/anthropic/clients.d.ts.map +0 -1
- package/dist/layer3/anthropic/clients.js +0 -81
- package/dist/layer3/anthropic/clients.js.map +0 -1
- package/dist/layer3/anthropic/index.d.ts +0 -41
- package/dist/layer3/anthropic/index.d.ts.map +0 -1
- package/dist/layer3/anthropic/index.js +0 -141
- package/dist/layer3/anthropic/index.js.map +0 -1
- package/dist/layer3/anthropic/prompts/index.d.ts +0 -8
- package/dist/layer3/anthropic/prompts/index.d.ts.map +0 -1
- package/dist/layer3/anthropic/prompts/index.js +0 -16
- package/dist/layer3/anthropic/prompts/index.js.map +0 -1
- package/dist/layer3/anthropic/prompts/modules/ai-patterns.d.ts +0 -19
- package/dist/layer3/anthropic/prompts/modules/ai-patterns.d.ts.map +0 -1
- package/dist/layer3/anthropic/prompts/modules/ai-patterns.js +0 -156
- package/dist/layer3/anthropic/prompts/modules/ai-patterns.js.map +0 -1
- package/dist/layer3/anthropic/prompts/modules/auth-access.d.ts +0 -9
- package/dist/layer3/anthropic/prompts/modules/auth-access.d.ts.map +0 -1
- package/dist/layer3/anthropic/prompts/modules/auth-access.js +0 -25
- package/dist/layer3/anthropic/prompts/modules/auth-access.js.map +0 -1
- package/dist/layer3/anthropic/prompts/modules/common.d.ts +0 -11
- package/dist/layer3/anthropic/prompts/modules/common.d.ts.map +0 -1
- package/dist/layer3/anthropic/prompts/modules/common.js +0 -152
- package/dist/layer3/anthropic/prompts/modules/common.js.map +0 -1
- package/dist/layer3/anthropic/prompts/modules/index.d.ts +0 -54
- package/dist/layer3/anthropic/prompts/modules/index.d.ts.map +0 -1
- package/dist/layer3/anthropic/prompts/modules/index.js +0 -185
- package/dist/layer3/anthropic/prompts/modules/index.js.map +0 -1
- package/dist/layer3/anthropic/prompts/modules/owasp-classic.d.ts +0 -8
- package/dist/layer3/anthropic/prompts/modules/owasp-classic.d.ts.map +0 -1
- package/dist/layer3/anthropic/prompts/modules/owasp-classic.js +0 -84
- package/dist/layer3/anthropic/prompts/modules/owasp-classic.js.map +0 -1
- package/dist/layer3/anthropic/prompts/modules/secrets-crypto.d.ts +0 -8
- package/dist/layer3/anthropic/prompts/modules/secrets-crypto.d.ts.map +0 -1
- package/dist/layer3/anthropic/prompts/modules/secrets-crypto.js +0 -68
- package/dist/layer3/anthropic/prompts/modules/secrets-crypto.js.map +0 -1
- package/dist/layer3/anthropic/prompts/modules/xss-prompt.d.ts +0 -8
- package/dist/layer3/anthropic/prompts/modules/xss-prompt.d.ts.map +0 -1
- package/dist/layer3/anthropic/prompts/modules/xss-prompt.js +0 -22
- package/dist/layer3/anthropic/prompts/modules/xss-prompt.js.map +0 -1
- package/dist/layer3/anthropic/prompts/semantic-analysis.d.ts +0 -15
- package/dist/layer3/anthropic/prompts/semantic-analysis.d.ts.map +0 -1
- package/dist/layer3/anthropic/prompts/semantic-analysis.js +0 -169
- package/dist/layer3/anthropic/prompts/semantic-analysis.js.map +0 -1
- package/dist/layer3/anthropic/prompts/validation.d.ts +0 -18
- package/dist/layer3/anthropic/prompts/validation.d.ts.map +0 -1
- package/dist/layer3/anthropic/prompts/validation.js +0 -25
- package/dist/layer3/anthropic/prompts/validation.js.map +0 -1
- package/dist/layer3/anthropic/providers/anthropic.d.ts +0 -21
- package/dist/layer3/anthropic/providers/anthropic.d.ts.map +0 -1
- package/dist/layer3/anthropic/providers/anthropic.js +0 -269
- package/dist/layer3/anthropic/providers/anthropic.js.map +0 -1
- package/dist/layer3/anthropic/providers/index.d.ts +0 -8
- package/dist/layer3/anthropic/providers/index.d.ts.map +0 -1
- package/dist/layer3/anthropic/providers/index.js +0 -15
- package/dist/layer3/anthropic/providers/index.js.map +0 -1
- package/dist/layer3/anthropic/providers/openai.d.ts +0 -18
- package/dist/layer3/anthropic/providers/openai.d.ts.map +0 -1
- package/dist/layer3/anthropic/providers/openai.js +0 -343
- package/dist/layer3/anthropic/providers/openai.js.map +0 -1
- package/dist/layer3/anthropic/request-builder.d.ts +0 -27
- package/dist/layer3/anthropic/request-builder.d.ts.map +0 -1
- package/dist/layer3/anthropic/request-builder.js +0 -150
- package/dist/layer3/anthropic/request-builder.js.map +0 -1
- package/dist/layer3/anthropic/types.d.ts +0 -88
- package/dist/layer3/anthropic/types.d.ts.map +0 -1
- package/dist/layer3/anthropic/types.js +0 -38
- package/dist/layer3/anthropic/types.js.map +0 -1
- package/dist/layer3/anthropic/utils/context-extractor.d.ts +0 -55
- package/dist/layer3/anthropic/utils/context-extractor.d.ts.map +0 -1
- package/dist/layer3/anthropic/utils/context-extractor.js +0 -161
- package/dist/layer3/anthropic/utils/context-extractor.js.map +0 -1
- package/dist/layer3/anthropic/utils/index.d.ts +0 -11
- package/dist/layer3/anthropic/utils/index.d.ts.map +0 -1
- package/dist/layer3/anthropic/utils/index.js +0 -27
- package/dist/layer3/anthropic/utils/index.js.map +0 -1
- package/dist/layer3/anthropic/utils/path-helpers.d.ts +0 -21
- package/dist/layer3/anthropic/utils/path-helpers.d.ts.map +0 -1
- package/dist/layer3/anthropic/utils/path-helpers.js +0 -69
- package/dist/layer3/anthropic/utils/path-helpers.js.map +0 -1
- package/dist/layer3/anthropic/utils/response-parser.d.ts +0 -40
- package/dist/layer3/anthropic/utils/response-parser.d.ts.map +0 -1
- package/dist/layer3/anthropic/utils/response-parser.js +0 -285
- package/dist/layer3/anthropic/utils/response-parser.js.map +0 -1
- package/dist/layer3/anthropic/utils/retry.d.ts +0 -15
- package/dist/layer3/anthropic/utils/retry.d.ts.map +0 -1
- package/dist/layer3/anthropic/utils/retry.js +0 -62
- package/dist/layer3/anthropic/utils/retry.js.map +0 -1
- package/dist/layer3/index.d.ts +0 -27
- package/dist/layer3/index.d.ts.map +0 -1
- package/dist/layer3/index.js +0 -150
- package/dist/layer3/index.js.map +0 -1
- package/dist/layer3/osv-check.d.ts +0 -75
- package/dist/layer3/osv-check.d.ts.map +0 -1
- package/dist/layer3/osv-check.js +0 -308
- package/dist/layer3/osv-check.js.map +0 -1
- package/dist/layer3/package-check.d.ts +0 -63
- package/dist/layer3/package-check.d.ts.map +0 -1
- package/dist/layer3/package-check.js +0 -508
- package/dist/layer3/package-check.js.map +0 -1
- package/dist/model/cross-file-taint.d.ts +0 -40
- package/dist/model/cross-file-taint.d.ts.map +0 -1
- package/dist/model/cross-file-taint.js +0 -290
- package/dist/model/cross-file-taint.js.map +0 -1
- package/dist/model/function-classifier.d.ts +0 -32
- package/dist/model/function-classifier.d.ts.map +0 -1
- package/dist/model/function-classifier.js +0 -143
- package/dist/model/function-classifier.js.map +0 -1
- package/dist/model/sanitiser-detection.d.ts +0 -27
- package/dist/model/sanitiser-detection.d.ts.map +0 -1
- package/dist/model/sanitiser-detection.js +0 -224
- package/dist/model/sanitiser-detection.js.map +0 -1
- package/dist/model/sink-matcher.d.ts +0 -17
- package/dist/model/sink-matcher.d.ts.map +0 -1
- package/dist/model/sink-matcher.js +0 -141
- package/dist/model/sink-matcher.js.map +0 -1
- package/dist/model/sink-patterns.d.ts +0 -19
- package/dist/model/sink-patterns.d.ts.map +0 -1
- package/dist/model/sink-patterns.js +0 -88
- package/dist/model/sink-patterns.js.map +0 -1
- package/dist/model/source-discovery.d.ts +0 -15
- package/dist/model/source-discovery.d.ts.map +0 -1
- package/dist/model/source-discovery.js +0 -170
- package/dist/model/source-discovery.js.map +0 -1
- package/dist/model/taint-tracker.d.ts +0 -21
- package/dist/model/taint-tracker.d.ts.map +0 -1
- package/dist/model/taint-tracker.js +0 -281
- package/dist/model/taint-tracker.js.map +0 -1
- package/dist/modes/incremental.d.ts +0 -66
- package/dist/modes/incremental.d.ts.map +0 -1
- package/dist/modes/incremental.js +0 -200
- package/dist/modes/incremental.js.map +0 -1
- package/dist/rules/framework-fixes.d.ts +0 -48
- package/dist/rules/framework-fixes.d.ts.map +0 -1
- package/dist/rules/framework-fixes.js +0 -439
- package/dist/rules/framework-fixes.js.map +0 -1
- package/dist/rules/index.d.ts +0 -8
- package/dist/rules/index.d.ts.map +0 -1
- package/dist/rules/index.js +0 -18
- package/dist/rules/index.js.map +0 -1
- package/dist/rules/metadata.d.ts +0 -43
- package/dist/rules/metadata.d.ts.map +0 -1
- package/dist/rules/metadata.js +0 -800
- package/dist/rules/metadata.js.map +0 -1
- package/dist/score/auto-dismiss.d.ts +0 -28
- package/dist/score/auto-dismiss.d.ts.map +0 -1
- package/dist/score/auto-dismiss.js +0 -200
- package/dist/score/auto-dismiss.js.map +0 -1
- package/dist/suppression/config-loader.d.ts +0 -74
- package/dist/suppression/config-loader.d.ts.map +0 -1
- package/dist/suppression/config-loader.js +0 -424
- package/dist/suppression/config-loader.js.map +0 -1
- package/dist/suppression/hash.d.ts +0 -48
- package/dist/suppression/hash.d.ts.map +0 -1
- package/dist/suppression/hash.js +0 -88
- package/dist/suppression/hash.js.map +0 -1
- package/dist/suppression/index.d.ts +0 -11
- package/dist/suppression/index.d.ts.map +0 -1
- package/dist/suppression/index.js +0 -39
- package/dist/suppression/index.js.map +0 -1
- package/dist/suppression/inline-parser.d.ts +0 -39
- package/dist/suppression/inline-parser.d.ts.map +0 -1
- package/dist/suppression/inline-parser.js +0 -218
- package/dist/suppression/inline-parser.js.map +0 -1
- package/dist/suppression/manager.d.ts +0 -94
- package/dist/suppression/manager.d.ts.map +0 -1
- package/dist/suppression/manager.js +0 -292
- package/dist/suppression/manager.js.map +0 -1
- package/dist/suppression/types.d.ts +0 -151
- package/dist/suppression/types.d.ts.map +0 -1
- package/dist/suppression/types.js +0 -28
- package/dist/suppression/types.js.map +0 -1
- package/dist/types.d.ts +0 -331
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -124
- package/dist/types.js.map +0 -1
- package/dist/utils/auth-helper-detector.d.ts +0 -56
- package/dist/utils/auth-helper-detector.d.ts.map +0 -1
- package/dist/utils/auth-helper-detector.js +0 -360
- package/dist/utils/auth-helper-detector.js.map +0 -1
- package/dist/utils/code-analysis.d.ts +0 -39
- package/dist/utils/code-analysis.d.ts.map +0 -1
- package/dist/utils/code-analysis.js +0 -159
- package/dist/utils/code-analysis.js.map +0 -1
- package/dist/utils/comment-analyzer.d.ts +0 -38
- package/dist/utils/comment-analyzer.d.ts.map +0 -1
- package/dist/utils/comment-analyzer.js +0 -218
- package/dist/utils/comment-analyzer.js.map +0 -1
- package/dist/utils/context-helpers.d.ts +0 -219
- package/dist/utils/context-helpers.d.ts.map +0 -1
- package/dist/utils/context-helpers.js +0 -886
- package/dist/utils/context-helpers.js.map +0 -1
- package/dist/utils/diff-detector.d.ts +0 -53
- package/dist/utils/diff-detector.d.ts.map +0 -1
- package/dist/utils/diff-detector.js +0 -104
- package/dist/utils/diff-detector.js.map +0 -1
- package/dist/utils/diff-parser.d.ts +0 -80
- package/dist/utils/diff-parser.d.ts.map +0 -1
- package/dist/utils/diff-parser.js +0 -202
- package/dist/utils/diff-parser.js.map +0 -1
- package/dist/utils/environment-context.d.ts +0 -76
- package/dist/utils/environment-context.d.ts.map +0 -1
- package/dist/utils/environment-context.js +0 -271
- package/dist/utils/environment-context.js.map +0 -1
- package/dist/utils/imported-auth-detector.d.ts +0 -37
- package/dist/utils/imported-auth-detector.d.ts.map +0 -1
- package/dist/utils/imported-auth-detector.js +0 -251
- package/dist/utils/imported-auth-detector.js.map +0 -1
- package/dist/utils/intent-detector.d.ts +0 -66
- package/dist/utils/intent-detector.d.ts.map +0 -1
- package/dist/utils/intent-detector.js +0 -282
- package/dist/utils/intent-detector.js.map +0 -1
- package/dist/utils/middleware-detector.d.ts +0 -55
- package/dist/utils/middleware-detector.d.ts.map +0 -1
- package/dist/utils/middleware-detector.js +0 -260
- package/dist/utils/middleware-detector.js.map +0 -1
- package/dist/utils/oauth-flow-detector.d.ts +0 -41
- package/dist/utils/oauth-flow-detector.d.ts.map +0 -1
- package/dist/utils/oauth-flow-detector.js +0 -202
- package/dist/utils/oauth-flow-detector.js.map +0 -1
- package/dist/utils/parsed-file.d.ts +0 -51
- package/dist/utils/parsed-file.d.ts.map +0 -1
- package/dist/utils/parsed-file.js +0 -95
- package/dist/utils/parsed-file.js.map +0 -1
- package/dist/utils/path-exclusions.d.ts +0 -55
- package/dist/utils/path-exclusions.d.ts.map +0 -1
- package/dist/utils/path-exclusions.js +0 -224
- package/dist/utils/path-exclusions.js.map +0 -1
- package/dist/utils/project-context-builder.d.ts +0 -119
- package/dist/utils/project-context-builder.d.ts.map +0 -1
- package/dist/utils/project-context-builder.js +0 -534
- package/dist/utils/project-context-builder.js.map +0 -1
- package/dist/utils/registry-clients.d.ts +0 -93
- package/dist/utils/registry-clients.d.ts.map +0 -1
- package/dist/utils/registry-clients.js +0 -273
- package/dist/utils/registry-clients.js.map +0 -1
- package/dist/utils/route-hierarchy.d.ts +0 -50
- package/dist/utils/route-hierarchy.d.ts.map +0 -1
- package/dist/utils/route-hierarchy.js +0 -226
- package/dist/utils/route-hierarchy.js.map +0 -1
- package/dist/utils/schema-semantics.d.ts +0 -45
- package/dist/utils/schema-semantics.d.ts.map +0 -1
- package/dist/utils/schema-semantics.js +0 -193
- package/dist/utils/schema-semantics.js.map +0 -1
- package/dist/utils/trpc-analyzer.d.ts +0 -78
- package/dist/utils/trpc-analyzer.d.ts.map +0 -1
- package/dist/utils/trpc-analyzer.js +0 -297
- package/dist/utils/trpc-analyzer.js.map +0 -1
- package/src/__tests__/context-engine/cross-file-taint.test.ts +0 -284
- package/src/__tests__/context-engine/function-classifier.test.ts +0 -146
- package/src/__tests__/context-engine/integration.test.ts +0 -320
- package/src/__tests__/context-engine/sanitiser-detection.test.ts +0 -187
- package/src/__tests__/context-engine/sink-matcher.test.ts +0 -251
- package/src/__tests__/context-engine/source-discovery.test.ts +0 -186
- package/src/__tests__/context-engine/taint-tracker.test.ts +0 -182
- package/src/__tests__/snapshots/__snapshots__/anthropic-validation-refactor.test.ts.snap +0 -750
- package/src/__tests__/snapshots/__snapshots__/dangerous-functions-refactor.test.ts.snap +0 -555
- package/src/__tests__/snapshots/anthropic-validation-refactor.test.ts +0 -321
- package/src/__tests__/snapshots/dangerous-functions-refactor.test.ts +0 -439
- package/src/detect/ai-code/agent-tools.ts +0 -1662
- package/src/detect/ai-code/byok-patterns.ts +0 -354
- package/src/detect/ai-code/endpoint-protection.ts +0 -406
- package/src/detect/ai-code/execution-sinks.ts +0 -1310
- package/src/detect/ai-code/fingerprinting.ts +0 -774
- package/src/detect/ai-code/mcp-security.ts +0 -937
- package/src/detect/ai-code/model-supply-chain.ts +0 -535
- package/src/detect/ai-code/package-hallucination.ts +0 -955
- package/src/detect/ai-code/prompt-hygiene.ts +0 -1314
- package/src/detect/ai-code/rag-safety.ts +0 -977
- package/src/detect/ai-code/schema-validation.ts +0 -427
- package/src/detect/secrets/patterns.ts +0 -561
- package/src/detect/secrets/weak-crypto.ts +0 -485
- package/src/detect/structural/__tests__/math-random-enhanced.test.ts +0 -405
- package/src/detect/structural/auth-patterns.ts +0 -621
- package/src/detect/structural/dangerous-functions/child-process.ts +0 -98
- package/src/detect/structural/dangerous-functions/dom-xss.ts +0 -292
- package/src/detect/structural/dangerous-functions/index.ts +0 -1556
- package/src/detect/structural/dangerous-functions/json-parse.ts +0 -393
- package/src/detect/structural/dangerous-functions/math-random.ts +0 -789
- package/src/detect/structural/dangerous-functions/patterns.ts +0 -176
- package/src/detect/structural/dangerous-functions/request-validation.ts +0 -153
- package/src/detect/structural/dangerous-functions/utils/control-flow.ts +0 -35
- package/src/detect/structural/dangerous-functions/utils/helpers.ts +0 -170
- package/src/detect/structural/dangerous-functions/utils/index.ts +0 -25
- package/src/detect/structural/dangerous-functions/utils/schema-validation.ts +0 -106
- package/src/detect/structural/data-exposure.ts +0 -302
- package/src/detect/structural/framework-checks.ts +0 -439
- package/src/detect/structural/log-injection.ts +0 -254
- package/src/detect/structural/logic-gates.ts +0 -256
- package/src/detect/structural/risky-imports.ts +0 -197
- package/src/detect/structural/security-headers.ts +0 -231
- package/src/detect/structural/ssrf-detection.ts +0 -300
- package/src/detect/structural/variables.ts +0 -177
- package/src/detect/structural/xxe-detection.ts +0 -295
- package/src/model/cross-file-taint.ts +0 -374
- package/src/model/function-classifier.ts +0 -184
- package/src/model/sanitiser-detection.ts +0 -268
- package/src/model/sink-matcher.ts +0 -178
- package/src/model/sink-patterns.ts +0 -109
- package/src/model/source-discovery.ts +0 -209
- package/src/model/taint-tracker.ts +0 -333
- package/src/score/auto-dismiss.ts +0 -224
package/dist/layer2/index.js
DELETED
|
@@ -1,544 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Layer 2: Structural Scan
|
|
4
|
-
* Contextual analysis using variable heuristics, logic gate detection,
|
|
5
|
-
* dangerous functions, risky imports, auth anti-patterns, framework checks,
|
|
6
|
-
* and AI code fingerprinting
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.detectXXEPatterns = exports.detectLogInjection = exports.detectSSRFPatterns = exports.detectSecurityHeaders = exports.detectModelSupplyChain = exports.detectMCPSecurity = exports.detectAIPackageHallucination = exports.detectAISchemaValidation = exports.detectAIEndpointProtection = exports.detectRAGSafetyIssues = exports.detectAIAgentTools = exports.detectAIExecutionSinks = exports.detectAIPromptHygiene = exports.detectBYOKPatterns = exports.detectDataExposure = exports.detectAIFingerprints = exports.detectFrameworkIssues = exports.detectAuthAntipatterns = exports.detectRiskyImports = exports.detectDangerousFunctions = exports.detectLogicGates = exports.detectSensitiveVariables = void 0;
|
|
10
|
-
exports.runLayer2Scan = runLayer2Scan;
|
|
11
|
-
const auth_helper_detector_1 = require("../utils/auth-helper-detector");
|
|
12
|
-
const path_exclusions_1 = require("../utils/path-exclusions");
|
|
13
|
-
const context_helpers_1 = require("../utils/context-helpers");
|
|
14
|
-
const variables_1 = require("./variables");
|
|
15
|
-
const logic_gates_1 = require("./logic-gates");
|
|
16
|
-
const dangerous_functions_1 = require("./dangerous-functions");
|
|
17
|
-
const risky_imports_1 = require("./risky-imports");
|
|
18
|
-
const auth_antipatterns_1 = require("./auth-antipatterns");
|
|
19
|
-
const framework_checks_1 = require("./framework-checks");
|
|
20
|
-
const ai_fingerprinting_1 = require("./ai-fingerprinting");
|
|
21
|
-
const data_exposure_1 = require("./data-exposure");
|
|
22
|
-
const byok_patterns_1 = require("./byok-patterns");
|
|
23
|
-
// Story B: AI-specific detection modules
|
|
24
|
-
const ai_prompt_hygiene_1 = require("./ai-prompt-hygiene");
|
|
25
|
-
const ai_execution_sinks_1 = require("./ai-execution-sinks");
|
|
26
|
-
const ai_agent_tools_1 = require("./ai-agent-tools");
|
|
27
|
-
// M5: New AI-era detectors
|
|
28
|
-
const ai_rag_safety_1 = require("./ai-rag-safety");
|
|
29
|
-
const ai_endpoint_protection_1 = require("./ai-endpoint-protection");
|
|
30
|
-
const ai_schema_validation_1 = require("./ai-schema-validation");
|
|
31
|
-
// AI Detection Roadmap Phase 1
|
|
32
|
-
const ai_package_hallucination_1 = require("./ai-package-hallucination");
|
|
33
|
-
const ai_mcp_security_1 = require("./ai-mcp-security");
|
|
34
|
-
// AI Detection Roadmap Phase 2
|
|
35
|
-
const model_supply_chain_1 = require("./model-supply-chain");
|
|
36
|
-
// OWASP Workstream 1
|
|
37
|
-
const security_headers_1 = require("./security-headers");
|
|
38
|
-
const ssrf_detection_1 = require("./ssrf-detection");
|
|
39
|
-
const log_injection_1 = require("./log-injection");
|
|
40
|
-
const xxe_detection_1 = require("./xxe-detection");
|
|
41
|
-
// Tier system imports
|
|
42
|
-
const tiers_1 = require("../tiers");
|
|
43
|
-
const parsed_file_1 = require("../utils/parsed-file");
|
|
44
|
-
const parsed_file_2 = require("../utils/parsed-file");
|
|
45
|
-
const context_adjustments_1 = require("../filtering/context-adjustments");
|
|
46
|
-
// Process a single file through all Layer 2 detectors
|
|
47
|
-
function processFileLayer2(file, options, authHelperContext) {
|
|
48
|
-
const stats = {
|
|
49
|
-
variables: 0,
|
|
50
|
-
logicGates: 0,
|
|
51
|
-
dangerousFunctions: 0,
|
|
52
|
-
riskyImports: 0,
|
|
53
|
-
authAntipatterns: 0,
|
|
54
|
-
frameworkIssues: 0,
|
|
55
|
-
aiFingerprints: 0,
|
|
56
|
-
dataExposure: 0,
|
|
57
|
-
byokPatterns: 0,
|
|
58
|
-
promptHygiene: 0,
|
|
59
|
-
executionSinks: 0,
|
|
60
|
-
agentTools: 0,
|
|
61
|
-
ragSafety: 0,
|
|
62
|
-
endpointProtection: 0,
|
|
63
|
-
schemaValidation: 0,
|
|
64
|
-
// AI Detection Roadmap Phase 1
|
|
65
|
-
packageHallucination: 0,
|
|
66
|
-
mcpSecurity: 0,
|
|
67
|
-
// AI Detection Roadmap Phase 2
|
|
68
|
-
modelSupplyChain: 0,
|
|
69
|
-
// OWASP Workstream 1
|
|
70
|
-
securityHeaders: 0,
|
|
71
|
-
ssrfDetection: 0,
|
|
72
|
-
logInjection: 0,
|
|
73
|
-
xxeDetection: 0,
|
|
74
|
-
};
|
|
75
|
-
// Build file-specific context for context-aware detection (Phase 2b)
|
|
76
|
-
const fileContext = (0, context_helpers_1.buildFileContext)(file.path);
|
|
77
|
-
// Create ParsedFile once for all detectors to share (avoids redundant content.split('\n'))
|
|
78
|
-
const parsed = parsed_file_2.ParsedFile.from(file);
|
|
79
|
-
// Check if this is a manifest file (package.json, requirements.txt, etc.)
|
|
80
|
-
const isManifestFile = (filePath) => {
|
|
81
|
-
const manifestFiles = ['package.json', 'requirements.txt', 'Pipfile', 'pyproject.toml', 'setup.py'];
|
|
82
|
-
return manifestFiles.some(f => filePath.endsWith(f));
|
|
83
|
-
};
|
|
84
|
-
// For non-code files, only run package hallucination detector on manifest files
|
|
85
|
-
if (!isCodeFile(file.path)) {
|
|
86
|
-
if (isManifestFile(file.path)) {
|
|
87
|
-
// Run package hallucination detector on manifest files
|
|
88
|
-
const packageHallucinationFindings = (0, ai_package_hallucination_1.detectAIPackageHallucination)(file.content, file.path);
|
|
89
|
-
stats.packageHallucination = packageHallucinationFindings.length;
|
|
90
|
-
return { findings: packageHallucinationFindings, stats };
|
|
91
|
-
}
|
|
92
|
-
return { findings: [], stats };
|
|
93
|
-
}
|
|
94
|
-
// Run all detectors — parsed is passed via options for detectors that support it
|
|
95
|
-
const variableFindings = (0, variables_1.detectSensitiveVariables)(file.content, file.path, { parsed });
|
|
96
|
-
const logicFindings = (0, logic_gates_1.detectLogicGates)(file.content, file.path, { parsed });
|
|
97
|
-
const dangerousFuncFindings = (0, dangerous_functions_1.detectDangerousFunctions)(file.content, file.path, { parsed });
|
|
98
|
-
const riskyImportFindings = (0, risky_imports_1.detectRiskyImports)(file.content, file.path, { parsed });
|
|
99
|
-
const authFindings = (0, auth_antipatterns_1.detectAuthAntipatterns)(file.content, file.path, {
|
|
100
|
-
middlewareConfig: options.middlewareConfig,
|
|
101
|
-
authHelpers: authHelperContext,
|
|
102
|
-
fileAuthImports: options.fileAuthImports,
|
|
103
|
-
parsed,
|
|
104
|
-
});
|
|
105
|
-
const frameworkFindings = (0, framework_checks_1.detectFrameworkIssues)(file.content, file.path, { parsed });
|
|
106
|
-
const aiFindings = (0, ai_fingerprinting_1.detectAIFingerprints)(file.content, file.path, { parsed });
|
|
107
|
-
const dataExposureFindings = (0, data_exposure_1.detectDataExposure)(file.content, file.path, { parsed });
|
|
108
|
-
const byokFindings = (0, byok_patterns_1.detectBYOKPatterns)(file.content, file.path, options.middlewareConfig, { parsed });
|
|
109
|
-
const promptHygieneFindings = (0, ai_prompt_hygiene_1.detectAIPromptHygiene)(file.content, file.path, { parsed });
|
|
110
|
-
const executionSinkFindings = (0, ai_execution_sinks_1.detectAIExecutionSinks)(file.content, file.path, { parsed });
|
|
111
|
-
const agentToolFindings = (0, ai_agent_tools_1.detectAIAgentTools)(file.content, file.path, { parsed });
|
|
112
|
-
const ragSafetyFindings = (0, ai_rag_safety_1.detectRAGSafetyIssues)(file.content, file.path, { parsed });
|
|
113
|
-
const endpointProtectionFindings = (0, ai_endpoint_protection_1.detectAIEndpointProtection)(file.content, file.path, {
|
|
114
|
-
middlewareConfig: options.middlewareConfig,
|
|
115
|
-
parsed,
|
|
116
|
-
});
|
|
117
|
-
const schemaValidationFindings = (0, ai_schema_validation_1.detectAISchemaValidation)(file.content, file.path, { parsed });
|
|
118
|
-
// AI Detection Roadmap Phase 1
|
|
119
|
-
const packageHallucinationFindings = (0, ai_package_hallucination_1.detectAIPackageHallucination)(file.content, file.path, { parsed });
|
|
120
|
-
const mcpSecurityFindings = (0, ai_mcp_security_1.detectMCPSecurity)(file.content, file.path, { parsed });
|
|
121
|
-
// AI Detection Roadmap Phase 2
|
|
122
|
-
const modelSupplyChainFindings = (0, model_supply_chain_1.detectModelSupplyChain)(file.content, file.path, { parsed });
|
|
123
|
-
// OWASP Workstream 1
|
|
124
|
-
const securityHeaderFindings = (0, security_headers_1.detectSecurityHeaders)(file.content, file.path, { parsed });
|
|
125
|
-
const ssrfFindings = (0, ssrf_detection_1.detectSSRFPatterns)(file.content, file.path, { parsed });
|
|
126
|
-
const logInjectionFindings = (0, log_injection_1.detectLogInjection)(file.content, file.path, { parsed });
|
|
127
|
-
const xxeFindings = (0, xxe_detection_1.detectXXEPatterns)(file.content, file.path, { parsed });
|
|
128
|
-
// Update stats
|
|
129
|
-
stats.variables = variableFindings.length;
|
|
130
|
-
stats.logicGates = logicFindings.length;
|
|
131
|
-
stats.dangerousFunctions = dangerousFuncFindings.length;
|
|
132
|
-
stats.riskyImports = riskyImportFindings.length;
|
|
133
|
-
stats.authAntipatterns = authFindings.length;
|
|
134
|
-
stats.frameworkIssues = frameworkFindings.length;
|
|
135
|
-
stats.aiFingerprints = aiFindings.length;
|
|
136
|
-
stats.dataExposure = dataExposureFindings.length;
|
|
137
|
-
stats.byokPatterns = byokFindings.length;
|
|
138
|
-
stats.promptHygiene = promptHygieneFindings.length;
|
|
139
|
-
stats.executionSinks = executionSinkFindings.length;
|
|
140
|
-
stats.agentTools = agentToolFindings.length;
|
|
141
|
-
stats.ragSafety = ragSafetyFindings.length;
|
|
142
|
-
stats.endpointProtection = endpointProtectionFindings.length;
|
|
143
|
-
stats.schemaValidation = schemaValidationFindings.length;
|
|
144
|
-
// AI Detection Roadmap Phase 1
|
|
145
|
-
stats.packageHallucination = packageHallucinationFindings.length;
|
|
146
|
-
stats.mcpSecurity = mcpSecurityFindings.length;
|
|
147
|
-
// AI Detection Roadmap Phase 2
|
|
148
|
-
stats.modelSupplyChain = modelSupplyChainFindings.length;
|
|
149
|
-
// OWASP Workstream 1
|
|
150
|
-
stats.securityHeaders = securityHeaderFindings.length;
|
|
151
|
-
stats.ssrfDetection = ssrfFindings.length;
|
|
152
|
-
stats.logInjection = logInjectionFindings.length;
|
|
153
|
-
stats.xxeDetection = xxeFindings.length;
|
|
154
|
-
// Combine all findings
|
|
155
|
-
const allFindings = [
|
|
156
|
-
...variableFindings,
|
|
157
|
-
...logicFindings,
|
|
158
|
-
...dangerousFuncFindings,
|
|
159
|
-
...riskyImportFindings,
|
|
160
|
-
...authFindings,
|
|
161
|
-
...frameworkFindings,
|
|
162
|
-
...aiFindings,
|
|
163
|
-
...dataExposureFindings,
|
|
164
|
-
...byokFindings,
|
|
165
|
-
...promptHygieneFindings,
|
|
166
|
-
...executionSinkFindings,
|
|
167
|
-
...agentToolFindings,
|
|
168
|
-
...ragSafetyFindings,
|
|
169
|
-
...endpointProtectionFindings,
|
|
170
|
-
...schemaValidationFindings,
|
|
171
|
-
// AI Detection Roadmap Phase 1
|
|
172
|
-
...packageHallucinationFindings,
|
|
173
|
-
...mcpSecurityFindings,
|
|
174
|
-
// AI Detection Roadmap Phase 2
|
|
175
|
-
...modelSupplyChainFindings,
|
|
176
|
-
// OWASP Workstream 1
|
|
177
|
-
...securityHeaderFindings,
|
|
178
|
-
...ssrfFindings,
|
|
179
|
-
...logInjectionFindings,
|
|
180
|
-
...xxeFindings,
|
|
181
|
-
];
|
|
182
|
-
// Apply context-based severity adjustments (Phase 2b)
|
|
183
|
-
const adjustedFindings = (0, context_adjustments_1.applyContextAdjustments)(allFindings, fileContext);
|
|
184
|
-
return {
|
|
185
|
-
findings: adjustedFindings,
|
|
186
|
-
stats,
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
// applyFileContextAdjustments consolidated into filtering/context-adjustments.ts
|
|
190
|
-
// Parallel batch size for Layer 2 processing (larger batches for performance)
|
|
191
|
-
const LAYER2_PARALLEL_BATCH_SIZE = 50;
|
|
192
|
-
// Progress update interval (report every N files for better UX)
|
|
193
|
-
const PROGRESS_UPDATE_INTERVAL = 10;
|
|
194
|
-
async function runLayer2Scan(files, options = {}, onProgress, cancellationToken) {
|
|
195
|
-
const startTime = Date.now();
|
|
196
|
-
const vulnerabilities = [];
|
|
197
|
-
const stats = {
|
|
198
|
-
variables: 0,
|
|
199
|
-
logicGates: 0,
|
|
200
|
-
dangerousFunctions: 0,
|
|
201
|
-
riskyImports: 0,
|
|
202
|
-
authAntipatterns: 0,
|
|
203
|
-
frameworkIssues: 0,
|
|
204
|
-
aiFingerprints: 0,
|
|
205
|
-
dataExposure: 0,
|
|
206
|
-
byokPatterns: 0,
|
|
207
|
-
promptHygiene: 0,
|
|
208
|
-
executionSinks: 0,
|
|
209
|
-
agentTools: 0,
|
|
210
|
-
ragSafety: 0,
|
|
211
|
-
endpointProtection: 0,
|
|
212
|
-
schemaValidation: 0,
|
|
213
|
-
// AI Detection Roadmap Phase 1
|
|
214
|
-
packageHallucination: 0,
|
|
215
|
-
mcpSecurity: 0,
|
|
216
|
-
// AI Detection Roadmap Phase 2
|
|
217
|
-
modelSupplyChain: 0,
|
|
218
|
-
// OWASP Workstream 1
|
|
219
|
-
securityHeaders: 0,
|
|
220
|
-
ssrfDetection: 0,
|
|
221
|
-
logInjection: 0,
|
|
222
|
-
xxeDetection: 0,
|
|
223
|
-
};
|
|
224
|
-
// Detect auth helpers once for all files (if not already provided)
|
|
225
|
-
const authHelperContext = options.authHelperContext || (0, auth_helper_detector_1.detectAuthHelpers)(files);
|
|
226
|
-
// Track progress for frequent updates
|
|
227
|
-
let filesProcessed = 0;
|
|
228
|
-
let lastProgressUpdate = 0;
|
|
229
|
-
// Process files in parallel batches for better performance on large codebases
|
|
230
|
-
for (let i = 0; i < files.length; i += LAYER2_PARALLEL_BATCH_SIZE) {
|
|
231
|
-
// Check for cancellation before processing batch
|
|
232
|
-
if (cancellationToken?.cancelled)
|
|
233
|
-
break;
|
|
234
|
-
const batch = files.slice(i, i + LAYER2_PARALLEL_BATCH_SIZE);
|
|
235
|
-
const results = await Promise.all(batch.map(file => Promise.resolve(processFileLayer2(file, options, authHelperContext))));
|
|
236
|
-
for (const result of results) {
|
|
237
|
-
vulnerabilities.push(...result.findings);
|
|
238
|
-
// Accumulate stats
|
|
239
|
-
for (const [key, value] of Object.entries(result.stats)) {
|
|
240
|
-
stats[key] += value;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
filesProcessed = Math.min(i + LAYER2_PARALLEL_BATCH_SIZE, files.length);
|
|
244
|
-
// Report progress every PROGRESS_UPDATE_INTERVAL files for better UX
|
|
245
|
-
if (onProgress && (filesProcessed - lastProgressUpdate >= PROGRESS_UPDATE_INTERVAL || filesProcessed === files.length)) {
|
|
246
|
-
onProgress({
|
|
247
|
-
status: 'layer2',
|
|
248
|
-
message: 'Running structural scan (variables, logic gates)...',
|
|
249
|
-
filesProcessed,
|
|
250
|
-
totalFiles: files.length,
|
|
251
|
-
vulnerabilitiesFound: vulnerabilities.length,
|
|
252
|
-
});
|
|
253
|
-
lastProgressUpdate = filesProcessed;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
// Deduplicate findings
|
|
257
|
-
const dedupedVulnerabilities = deduplicateFindings(vulnerabilities);
|
|
258
|
-
// Apply path exclusions (test files, seed files, etc.)
|
|
259
|
-
// By default, exclude test and seed files unless explicitly disabled
|
|
260
|
-
const excludeTestFiles = options.excludeTestFiles !== false;
|
|
261
|
-
const excludeSeedFiles = options.excludeSeedFiles !== false;
|
|
262
|
-
// Build exclusion config based on options
|
|
263
|
-
const exclusionConfig = {};
|
|
264
|
-
if (!excludeTestFiles) {
|
|
265
|
-
exclusionConfig.testPatterns = [];
|
|
266
|
-
}
|
|
267
|
-
if (!excludeSeedFiles) {
|
|
268
|
-
exclusionConfig.seedPatterns = [];
|
|
269
|
-
}
|
|
270
|
-
if (options.customExclusions) {
|
|
271
|
-
// Add custom exclusions to all pattern types
|
|
272
|
-
exclusionConfig.testPatterns = [
|
|
273
|
-
...(exclusionConfig.testPatterns || []),
|
|
274
|
-
...options.customExclusions,
|
|
275
|
-
];
|
|
276
|
-
}
|
|
277
|
-
const { kept: uniqueVulnerabilities, suppressed } = (0, path_exclusions_1.filterFindingsByPath)(dedupedVulnerabilities, Object.keys(exclusionConfig).length > 0 ? exclusionConfig : undefined);
|
|
278
|
-
// Track suppressed findings (debug info available in stats)
|
|
279
|
-
// Build raw stats map for logging
|
|
280
|
-
const rawStats = {
|
|
281
|
-
sensitive_variables: stats.variables,
|
|
282
|
-
logic_gates: stats.logicGates,
|
|
283
|
-
dangerous_functions: stats.dangerousFunctions,
|
|
284
|
-
risky_imports: stats.riskyImports,
|
|
285
|
-
auth_antipatterns: stats.authAntipatterns,
|
|
286
|
-
framework_issues: stats.frameworkIssues,
|
|
287
|
-
ai_fingerprints: stats.aiFingerprints,
|
|
288
|
-
data_exposure: stats.dataExposure,
|
|
289
|
-
byok_patterns: stats.byokPatterns,
|
|
290
|
-
ai_prompt_hygiene: stats.promptHygiene,
|
|
291
|
-
ai_execution_sinks: stats.executionSinks,
|
|
292
|
-
ai_agent_tools: stats.agentTools,
|
|
293
|
-
// M5: New AI-era detectors
|
|
294
|
-
ai_rag_safety: stats.ragSafety,
|
|
295
|
-
ai_endpoint_protection: stats.endpointProtection,
|
|
296
|
-
ai_schema_validation: stats.schemaValidation,
|
|
297
|
-
// AI Detection Roadmap Phase 1
|
|
298
|
-
ai_package_hallucination: stats.packageHallucination,
|
|
299
|
-
ai_mcp_security: stats.mcpSecurity,
|
|
300
|
-
// AI Detection Roadmap Phase 2
|
|
301
|
-
model_supply_chain: stats.modelSupplyChain,
|
|
302
|
-
// OWASP Workstream 1
|
|
303
|
-
security_headers: stats.securityHeaders,
|
|
304
|
-
ssrf_detection: stats.ssrfDetection,
|
|
305
|
-
log_injection: stats.logInjection,
|
|
306
|
-
xxe_detection: stats.xxeDetection,
|
|
307
|
-
};
|
|
308
|
-
// Compute deduped counts per category
|
|
309
|
-
const dedupedStats = {};
|
|
310
|
-
for (const vuln of uniqueVulnerabilities) {
|
|
311
|
-
const cat = vuln.category;
|
|
312
|
-
dedupedStats[cat] = (dedupedStats[cat] || 0) + 1;
|
|
313
|
-
}
|
|
314
|
-
// Compute severity distribution
|
|
315
|
-
const severityStats = { critical: 0, high: 0, medium: 0, low: 0, info: 0 };
|
|
316
|
-
for (const vuln of uniqueVulnerabilities) {
|
|
317
|
-
severityStats[vuln.severity] = (severityStats[vuln.severity] || 0) + 1;
|
|
318
|
-
}
|
|
319
|
-
// Compute tier breakdown (all Layer 2 findings have layer: 2)
|
|
320
|
-
const tierStats = (0, tiers_1.computeTierStats)(uniqueVulnerabilities.map(v => ({ category: v.category, layer: 2 })));
|
|
321
|
-
// Map raw stats keys to detector names for tier lookup
|
|
322
|
-
const detectorNameMap = {
|
|
323
|
-
sensitive_variables: 'variables',
|
|
324
|
-
logic_gates: 'logic_gates',
|
|
325
|
-
dangerous_functions: 'dangerous_functions',
|
|
326
|
-
risky_imports: 'risky_imports',
|
|
327
|
-
auth_antipatterns: 'auth_antipatterns',
|
|
328
|
-
framework_issues: 'framework_checks',
|
|
329
|
-
ai_fingerprints: 'ai_fingerprinting',
|
|
330
|
-
data_exposure: 'data_exposure',
|
|
331
|
-
byok_patterns: 'byok_patterns',
|
|
332
|
-
ai_prompt_hygiene: 'ai_prompt_hygiene',
|
|
333
|
-
ai_execution_sinks: 'ai_execution_sinks',
|
|
334
|
-
ai_agent_tools: 'ai_agent_tools',
|
|
335
|
-
// M5: New AI-era detectors
|
|
336
|
-
ai_rag_safety: 'ai_rag_safety',
|
|
337
|
-
ai_endpoint_protection: 'ai_endpoint_protection',
|
|
338
|
-
ai_schema_validation: 'ai_schema_validation',
|
|
339
|
-
// AI Detection Roadmap Phase 1
|
|
340
|
-
ai_package_hallucination: 'ai_package_hallucination',
|
|
341
|
-
ai_mcp_security: 'ai_mcp_security',
|
|
342
|
-
// AI Detection Roadmap Phase 2
|
|
343
|
-
model_supply_chain: 'model_supply_chain',
|
|
344
|
-
// OWASP Workstream 1
|
|
345
|
-
security_headers: 'security_headers',
|
|
346
|
-
ssrf_detection: 'ssrf_detection',
|
|
347
|
-
log_injection: 'log_injection',
|
|
348
|
-
xxe_detection: 'xxe_detection',
|
|
349
|
-
};
|
|
350
|
-
// Heuristic breakdown available in stats.raw and stats.tiers for debugging
|
|
351
|
-
return {
|
|
352
|
-
vulnerabilities: uniqueVulnerabilities,
|
|
353
|
-
filesScanned: files.filter(f => isCodeFile(f.path)).length,
|
|
354
|
-
duration: Date.now() - startTime,
|
|
355
|
-
stats: {
|
|
356
|
-
raw: rawStats,
|
|
357
|
-
deduped: dedupedStats,
|
|
358
|
-
bySeverity: severityStats,
|
|
359
|
-
tiers: tierStats,
|
|
360
|
-
suppressedByPath: suppressed.length,
|
|
361
|
-
},
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
// Check if file is a code file (not config/data)
|
|
365
|
-
function isCodeFile(filePath) {
|
|
366
|
-
const codeExtensions = [
|
|
367
|
-
'.js', '.jsx', '.ts', '.tsx', '.mjs', '.cjs',
|
|
368
|
-
'.py', '.rb', '.php', '.go', '.java', '.cs',
|
|
369
|
-
'.rs', '.swift', '.kt', '.scala',
|
|
370
|
-
];
|
|
371
|
-
return codeExtensions.some(ext => filePath.endsWith(ext));
|
|
372
|
-
}
|
|
373
|
-
// Remove duplicate findings on the same line and merge related findings
|
|
374
|
-
function deduplicateFindings(vulnerabilities) {
|
|
375
|
-
// First pass: exact deduplication by file:line:category
|
|
376
|
-
const seen = new Map();
|
|
377
|
-
for (const vuln of vulnerabilities) {
|
|
378
|
-
const key = `${vuln.filePath}:${vuln.lineNumber}:${vuln.category}`;
|
|
379
|
-
const existing = seen.get(key);
|
|
380
|
-
// Keep the higher severity finding
|
|
381
|
-
if (!existing || (0, parsed_file_1.severityRank)(vuln.severity) > (0, parsed_file_1.severityRank)(existing.severity)) {
|
|
382
|
-
seen.set(key, vuln);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
// Second pass: merge findings on adjacent lines (within 3 lines) with same category
|
|
386
|
-
const dedupedList = Array.from(seen.values());
|
|
387
|
-
const merged = mergeAdjacentFindings(dedupedList);
|
|
388
|
-
// Third pass: subsume related categories (e.g., specific finding subsumes generic)
|
|
389
|
-
return subsumeRelatedFindings(merged);
|
|
390
|
-
}
|
|
391
|
-
// Merge findings on adjacent lines with the same category
|
|
392
|
-
function mergeAdjacentFindings(vulnerabilities) {
|
|
393
|
-
if (vulnerabilities.length <= 1)
|
|
394
|
-
return vulnerabilities;
|
|
395
|
-
// Group by file and category
|
|
396
|
-
const groups = new Map();
|
|
397
|
-
for (const vuln of vulnerabilities) {
|
|
398
|
-
const key = `${vuln.filePath}:${vuln.category}`;
|
|
399
|
-
const group = groups.get(key) || [];
|
|
400
|
-
group.push(vuln);
|
|
401
|
-
groups.set(key, group);
|
|
402
|
-
}
|
|
403
|
-
const result = [];
|
|
404
|
-
for (const [, group] of groups) {
|
|
405
|
-
if (group.length === 1) {
|
|
406
|
-
result.push(group[0]);
|
|
407
|
-
continue;
|
|
408
|
-
}
|
|
409
|
-
// Sort by line number
|
|
410
|
-
group.sort((a, b) => a.lineNumber - b.lineNumber);
|
|
411
|
-
// Merge adjacent findings (within 3 lines)
|
|
412
|
-
let current = group[0];
|
|
413
|
-
let mergedCount = 1;
|
|
414
|
-
for (let i = 1; i < group.length; i++) {
|
|
415
|
-
const next = group[i];
|
|
416
|
-
if (next.lineNumber - current.lineNumber <= 3) {
|
|
417
|
-
// Merge: keep higher severity, note the merge
|
|
418
|
-
mergedCount++;
|
|
419
|
-
if ((0, parsed_file_1.severityRank)(next.severity) > (0, parsed_file_1.severityRank)(current.severity)) {
|
|
420
|
-
current = {
|
|
421
|
-
...next,
|
|
422
|
-
title: current.title,
|
|
423
|
-
description: current.description,
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
else {
|
|
428
|
-
// Not adjacent - emit current and start new
|
|
429
|
-
if (mergedCount > 1) {
|
|
430
|
-
current = {
|
|
431
|
-
...current,
|
|
432
|
-
title: `${current.title} (${mergedCount} occurrences)`,
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
result.push(current);
|
|
436
|
-
current = next;
|
|
437
|
-
mergedCount = 1;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
// Emit last
|
|
441
|
-
if (mergedCount > 1) {
|
|
442
|
-
current = {
|
|
443
|
-
...current,
|
|
444
|
-
title: `${current.title} (${mergedCount} occurrences)`,
|
|
445
|
-
};
|
|
446
|
-
}
|
|
447
|
-
result.push(current);
|
|
448
|
-
}
|
|
449
|
-
return result;
|
|
450
|
-
}
|
|
451
|
-
// Subsume related findings where a more specific finding covers a generic one
|
|
452
|
-
function subsumeRelatedFindings(vulnerabilities) {
|
|
453
|
-
// Define subsumption rules: specific category subsumes generic
|
|
454
|
-
const subsumptionRules = {
|
|
455
|
-
// SQL injection subsumes generic dangerous function
|
|
456
|
-
sql_injection: ['dangerous_function'],
|
|
457
|
-
// Command injection subsumes generic dangerous function
|
|
458
|
-
command_injection: ['dangerous_function'],
|
|
459
|
-
// XSS subsumes generic dangerous function
|
|
460
|
-
xss: ['dangerous_function'],
|
|
461
|
-
// Specific auth issues subsume generic missing auth
|
|
462
|
-
missing_auth: ['auth_antipattern'],
|
|
463
|
-
};
|
|
464
|
-
// Group by file and line
|
|
465
|
-
const byLocation = new Map();
|
|
466
|
-
for (const vuln of vulnerabilities) {
|
|
467
|
-
const key = `${vuln.filePath}:${vuln.lineNumber}`;
|
|
468
|
-
const group = byLocation.get(key) || [];
|
|
469
|
-
group.push(vuln);
|
|
470
|
-
byLocation.set(key, group);
|
|
471
|
-
}
|
|
472
|
-
const result = [];
|
|
473
|
-
for (const [, group] of byLocation) {
|
|
474
|
-
if (group.length === 1) {
|
|
475
|
-
result.push(group[0]);
|
|
476
|
-
continue;
|
|
477
|
-
}
|
|
478
|
-
// Check for subsumption
|
|
479
|
-
const toKeep = new Set(group);
|
|
480
|
-
for (const vuln of group) {
|
|
481
|
-
const subsumes = subsumptionRules[vuln.category];
|
|
482
|
-
if (subsumes) {
|
|
483
|
-
for (const other of group) {
|
|
484
|
-
if (subsumes.includes(other.category) && other !== vuln) {
|
|
485
|
-
toKeep.delete(other);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
result.push(...toKeep);
|
|
491
|
-
}
|
|
492
|
-
return result;
|
|
493
|
-
}
|
|
494
|
-
// severityRank imported from utils/parsed-file
|
|
495
|
-
var variables_2 = require("./variables");
|
|
496
|
-
Object.defineProperty(exports, "detectSensitiveVariables", { enumerable: true, get: function () { return variables_2.detectSensitiveVariables; } });
|
|
497
|
-
var logic_gates_2 = require("./logic-gates");
|
|
498
|
-
Object.defineProperty(exports, "detectLogicGates", { enumerable: true, get: function () { return logic_gates_2.detectLogicGates; } });
|
|
499
|
-
var dangerous_functions_2 = require("./dangerous-functions");
|
|
500
|
-
Object.defineProperty(exports, "detectDangerousFunctions", { enumerable: true, get: function () { return dangerous_functions_2.detectDangerousFunctions; } });
|
|
501
|
-
var risky_imports_2 = require("./risky-imports");
|
|
502
|
-
Object.defineProperty(exports, "detectRiskyImports", { enumerable: true, get: function () { return risky_imports_2.detectRiskyImports; } });
|
|
503
|
-
var auth_antipatterns_2 = require("./auth-antipatterns");
|
|
504
|
-
Object.defineProperty(exports, "detectAuthAntipatterns", { enumerable: true, get: function () { return auth_antipatterns_2.detectAuthAntipatterns; } });
|
|
505
|
-
var framework_checks_2 = require("./framework-checks");
|
|
506
|
-
Object.defineProperty(exports, "detectFrameworkIssues", { enumerable: true, get: function () { return framework_checks_2.detectFrameworkIssues; } });
|
|
507
|
-
var ai_fingerprinting_2 = require("./ai-fingerprinting");
|
|
508
|
-
Object.defineProperty(exports, "detectAIFingerprints", { enumerable: true, get: function () { return ai_fingerprinting_2.detectAIFingerprints; } });
|
|
509
|
-
var data_exposure_2 = require("./data-exposure");
|
|
510
|
-
Object.defineProperty(exports, "detectDataExposure", { enumerable: true, get: function () { return data_exposure_2.detectDataExposure; } });
|
|
511
|
-
var byok_patterns_2 = require("./byok-patterns");
|
|
512
|
-
Object.defineProperty(exports, "detectBYOKPatterns", { enumerable: true, get: function () { return byok_patterns_2.detectBYOKPatterns; } });
|
|
513
|
-
// Story B: AI-specific detectors
|
|
514
|
-
var ai_prompt_hygiene_2 = require("./ai-prompt-hygiene");
|
|
515
|
-
Object.defineProperty(exports, "detectAIPromptHygiene", { enumerable: true, get: function () { return ai_prompt_hygiene_2.detectAIPromptHygiene; } });
|
|
516
|
-
var ai_execution_sinks_2 = require("./ai-execution-sinks");
|
|
517
|
-
Object.defineProperty(exports, "detectAIExecutionSinks", { enumerable: true, get: function () { return ai_execution_sinks_2.detectAIExecutionSinks; } });
|
|
518
|
-
var ai_agent_tools_2 = require("./ai-agent-tools");
|
|
519
|
-
Object.defineProperty(exports, "detectAIAgentTools", { enumerable: true, get: function () { return ai_agent_tools_2.detectAIAgentTools; } });
|
|
520
|
-
// M5: New AI-era detectors
|
|
521
|
-
var ai_rag_safety_2 = require("./ai-rag-safety");
|
|
522
|
-
Object.defineProperty(exports, "detectRAGSafetyIssues", { enumerable: true, get: function () { return ai_rag_safety_2.detectRAGSafetyIssues; } });
|
|
523
|
-
var ai_endpoint_protection_2 = require("./ai-endpoint-protection");
|
|
524
|
-
Object.defineProperty(exports, "detectAIEndpointProtection", { enumerable: true, get: function () { return ai_endpoint_protection_2.detectAIEndpointProtection; } });
|
|
525
|
-
var ai_schema_validation_2 = require("./ai-schema-validation");
|
|
526
|
-
Object.defineProperty(exports, "detectAISchemaValidation", { enumerable: true, get: function () { return ai_schema_validation_2.detectAISchemaValidation; } });
|
|
527
|
-
// AI Detection Roadmap Phase 1
|
|
528
|
-
var ai_package_hallucination_2 = require("./ai-package-hallucination");
|
|
529
|
-
Object.defineProperty(exports, "detectAIPackageHallucination", { enumerable: true, get: function () { return ai_package_hallucination_2.detectAIPackageHallucination; } });
|
|
530
|
-
var ai_mcp_security_2 = require("./ai-mcp-security");
|
|
531
|
-
Object.defineProperty(exports, "detectMCPSecurity", { enumerable: true, get: function () { return ai_mcp_security_2.detectMCPSecurity; } });
|
|
532
|
-
// AI Detection Roadmap Phase 2
|
|
533
|
-
var model_supply_chain_2 = require("./model-supply-chain");
|
|
534
|
-
Object.defineProperty(exports, "detectModelSupplyChain", { enumerable: true, get: function () { return model_supply_chain_2.detectModelSupplyChain; } });
|
|
535
|
-
// OWASP Workstream 1
|
|
536
|
-
var security_headers_2 = require("./security-headers");
|
|
537
|
-
Object.defineProperty(exports, "detectSecurityHeaders", { enumerable: true, get: function () { return security_headers_2.detectSecurityHeaders; } });
|
|
538
|
-
var ssrf_detection_2 = require("./ssrf-detection");
|
|
539
|
-
Object.defineProperty(exports, "detectSSRFPatterns", { enumerable: true, get: function () { return ssrf_detection_2.detectSSRFPatterns; } });
|
|
540
|
-
var log_injection_2 = require("./log-injection");
|
|
541
|
-
Object.defineProperty(exports, "detectLogInjection", { enumerable: true, get: function () { return log_injection_2.detectLogInjection; } });
|
|
542
|
-
var xxe_detection_2 = require("./xxe-detection");
|
|
543
|
-
Object.defineProperty(exports, "detectXXEPatterns", { enumerable: true, get: function () { return xxe_detection_2.detectXXEPatterns; } });
|
|
544
|
-
//# sourceMappingURL=index.js.map
|
package/dist/layer2/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/layer2/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AA6RH,sCAuMC;AA/dD,wEAAyF;AAEzF,8DAGiC;AACjC,8DAA6E;AAC7E,2CAAsD;AACtD,+CAAgD;AAChD,+DAAgE;AAChE,mDAAoD;AACpD,2DAA4D;AAC5D,yDAA0D;AAC1D,2DAA0D;AAC1D,mDAAoD;AACpD,mDAAoD;AACpD,yCAAyC;AACzC,2DAA2D;AAC3D,6DAA6D;AAC7D,qDAAqD;AACrD,2BAA2B;AAC3B,mDAAuD;AACvD,qEAAqE;AACrE,iEAAiE;AACjE,+BAA+B;AAC/B,yEAAyE;AACzE,uDAAqD;AACrD,+BAA+B;AAC/B,6DAA6D;AAC7D,qBAAqB;AACrB,yDAA0D;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AAA;AACnC,+DAAiE;AAAxD,gIAAA,wBAAwB,OAAA;AACjC,+BAA+B;AAC/B,uEAAyE;AAAhE,wIAAA,4BAA4B,OAAA;AACrC,qDAAqD;AAA5C,oHAAA,iBAAiB,OAAA;AAC1B,+BAA+B;AAC/B,2DAA6D;AAApD,4HAAA,sBAAsB,OAAA;AAC/B,qBAAqB;AACrB,uDAA0D;AAAjD,yHAAA,qBAAqB,OAAA;AAC9B,mDAAqD;AAA5C,oHAAA,kBAAkB,OAAA;AAC3B,iDAAoD;AAA3C,mHAAA,kBAAkB,OAAA;AAC3B,iDAAmD;AAA1C,kHAAA,iBAAiB,OAAA"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Layer 2: Log Injection Detector
|
|
3
|
-
* Detects unsanitized user input flowing into log statements
|
|
4
|
-
*
|
|
5
|
-
* OWASP A09:2021 - Security Logging and Monitoring Failures
|
|
6
|
-
* CWE-117: Improper Output Neutralization for Logs
|
|
7
|
-
*/
|
|
8
|
-
import type { Vulnerability } from '../types';
|
|
9
|
-
import type { ParsedFile } from '../utils/parsed-file';
|
|
10
|
-
interface LogInjectionOptions {
|
|
11
|
-
parsed?: ParsedFile;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Detect log injection patterns
|
|
15
|
-
*/
|
|
16
|
-
export declare function detectLogInjection(content: string, filePath: string, options?: LogInjectionOptions): Vulnerability[];
|
|
17
|
-
export {};
|
|
18
|
-
//# sourceMappingURL=log-injection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log-injection.d.ts","sourceRoot":"","sources":["../../src/layer2/log-injection.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAyB,MAAM,UAAU,CAAA;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAOtD,UAAU,mBAAmB;IAC3B,MAAM,CAAC,EAAE,UAAU,CAAA;CACpB;AA2JD;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,aAAa,EAAE,CAqEjB"}
|