secure-scan 1.2.2
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/README.md +564 -0
- package/dist/ai/aiAnalyzer.d.ts +99 -0
- package/dist/ai/aiAnalyzer.d.ts.map +1 -0
- package/dist/ai/aiAnalyzer.js +669 -0
- package/dist/ai/aiAnalyzer.js.map +1 -0
- package/dist/ai/index.d.ts +5 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +21 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/analyzers/base/baseAnalyzer.d.ts +44 -0
- package/dist/analyzers/base/baseAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/base/baseAnalyzer.js +53 -0
- package/dist/analyzers/base/baseAnalyzer.js.map +1 -0
- package/dist/analyzers/base/index.d.ts +5 -0
- package/dist/analyzers/base/index.d.ts.map +1 -0
- package/dist/analyzers/base/index.js +21 -0
- package/dist/analyzers/base/index.js.map +1 -0
- package/dist/analyzers/c-cpp/cppAnalyzer.d.ts +60 -0
- package/dist/analyzers/c-cpp/cppAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/c-cpp/cppAnalyzer.js +218 -0
- package/dist/analyzers/c-cpp/cppAnalyzer.js.map +1 -0
- package/dist/analyzers/c-cpp/index.d.ts +5 -0
- package/dist/analyzers/c-cpp/index.d.ts.map +1 -0
- package/dist/analyzers/c-cpp/index.js +21 -0
- package/dist/analyzers/c-cpp/index.js.map +1 -0
- package/dist/analyzers/core/engine/index.d.ts +5 -0
- package/dist/analyzers/core/engine/index.d.ts.map +1 -0
- package/dist/analyzers/core/engine/index.js +21 -0
- package/dist/analyzers/core/engine/index.js.map +1 -0
- package/dist/analyzers/core/engine/ruleEngine.d.ts +46 -0
- package/dist/analyzers/core/engine/ruleEngine.d.ts.map +1 -0
- package/dist/analyzers/core/engine/ruleEngine.js +173 -0
- package/dist/analyzers/core/engine/ruleEngine.js.map +1 -0
- package/dist/analyzers/core/index.d.ts +8 -0
- package/dist/analyzers/core/index.d.ts.map +1 -0
- package/dist/analyzers/core/index.js +24 -0
- package/dist/analyzers/core/index.js.map +1 -0
- package/dist/analyzers/core/scanner/fileScanner.d.ts +31 -0
- package/dist/analyzers/core/scanner/fileScanner.d.ts.map +1 -0
- package/dist/analyzers/core/scanner/fileScanner.js +199 -0
- package/dist/analyzers/core/scanner/fileScanner.js.map +1 -0
- package/dist/analyzers/core/scanner/index.d.ts +5 -0
- package/dist/analyzers/core/scanner/index.d.ts.map +1 -0
- package/dist/analyzers/core/scanner/index.js +21 -0
- package/dist/analyzers/core/scanner/index.js.map +1 -0
- package/dist/analyzers/core/scoring/index.d.ts +5 -0
- package/dist/analyzers/core/scoring/index.d.ts.map +1 -0
- package/dist/analyzers/core/scoring/index.js +21 -0
- package/dist/analyzers/core/scoring/index.js.map +1 -0
- package/dist/analyzers/core/scoring/riskScoring.d.ts +49 -0
- package/dist/analyzers/core/scoring/riskScoring.d.ts.map +1 -0
- package/dist/analyzers/core/scoring/riskScoring.js +180 -0
- package/dist/analyzers/core/scoring/riskScoring.js.map +1 -0
- package/dist/analyzers/core/securityScanner.d.ts +47 -0
- package/dist/analyzers/core/securityScanner.d.ts.map +1 -0
- package/dist/analyzers/core/securityScanner.js +298 -0
- package/dist/analyzers/core/securityScanner.js.map +1 -0
- package/dist/analyzers/csharp/csharpAnalyzer.d.ts +64 -0
- package/dist/analyzers/csharp/csharpAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/csharp/csharpAnalyzer.js +232 -0
- package/dist/analyzers/csharp/csharpAnalyzer.js.map +1 -0
- package/dist/analyzers/csharp/index.d.ts +5 -0
- package/dist/analyzers/csharp/index.d.ts.map +1 -0
- package/dist/analyzers/csharp/index.js +21 -0
- package/dist/analyzers/csharp/index.js.map +1 -0
- package/dist/analyzers/iac/iacAnalyzer.d.ts +36 -0
- package/dist/analyzers/iac/iacAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/iac/iacAnalyzer.js +182 -0
- package/dist/analyzers/iac/iacAnalyzer.js.map +1 -0
- package/dist/analyzers/iac/index.d.ts +5 -0
- package/dist/analyzers/iac/index.d.ts.map +1 -0
- package/dist/analyzers/iac/index.js +21 -0
- package/dist/analyzers/iac/index.js.map +1 -0
- package/dist/analyzers/index.d.ts +30 -0
- package/dist/analyzers/index.d.ts.map +1 -0
- package/dist/analyzers/index.js +80 -0
- package/dist/analyzers/index.js.map +1 -0
- package/dist/analyzers/java/index.d.ts +5 -0
- package/dist/analyzers/java/index.d.ts.map +1 -0
- package/dist/analyzers/java/index.js +21 -0
- package/dist/analyzers/java/index.js.map +1 -0
- package/dist/analyzers/java/javaAnalyzer.d.ts +64 -0
- package/dist/analyzers/java/javaAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/java/javaAnalyzer.js +224 -0
- package/dist/analyzers/java/javaAnalyzer.js.map +1 -0
- package/dist/analyzers/javascript/astUtils.d.ts +170 -0
- package/dist/analyzers/javascript/astUtils.d.ts.map +1 -0
- package/dist/analyzers/javascript/astUtils.js +700 -0
- package/dist/analyzers/javascript/astUtils.js.map +1 -0
- package/dist/analyzers/javascript/index.d.ts +18 -0
- package/dist/analyzers/javascript/index.d.ts.map +1 -0
- package/dist/analyzers/javascript/index.js +50 -0
- package/dist/analyzers/javascript/index.js.map +1 -0
- package/dist/analyzers/javascript/javascriptAnalyzer.d.ts +111 -0
- package/dist/analyzers/javascript/javascriptAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/javascript/javascriptAnalyzer.js +860 -0
- package/dist/analyzers/javascript/javascriptAnalyzer.js.map +1 -0
- package/dist/analyzers/javascript/malwareDetector.d.ts +102 -0
- package/dist/analyzers/javascript/malwareDetector.d.ts.map +1 -0
- package/dist/analyzers/javascript/malwareDetector.js +616 -0
- package/dist/analyzers/javascript/malwareDetector.js.map +1 -0
- package/dist/analyzers/javascript/packageJsonAnalyzer.d.ts +87 -0
- package/dist/analyzers/javascript/packageJsonAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/javascript/packageJsonAnalyzer.js +553 -0
- package/dist/analyzers/javascript/packageJsonAnalyzer.js.map +1 -0
- package/dist/analyzers/javascript/taintAnalyzer.d.ts +120 -0
- package/dist/analyzers/javascript/taintAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/javascript/taintAnalyzer.js +526 -0
- package/dist/analyzers/javascript/taintAnalyzer.js.map +1 -0
- package/dist/analyzers/php/index.d.ts +5 -0
- package/dist/analyzers/php/index.d.ts.map +1 -0
- package/dist/analyzers/php/index.js +21 -0
- package/dist/analyzers/php/index.js.map +1 -0
- package/dist/analyzers/php/phpAnalyzer.d.ts +56 -0
- package/dist/analyzers/php/phpAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/php/phpAnalyzer.js +202 -0
- package/dist/analyzers/php/phpAnalyzer.js.map +1 -0
- package/dist/analyzers/python/index.d.ts +5 -0
- package/dist/analyzers/python/index.d.ts.map +1 -0
- package/dist/analyzers/python/index.js +21 -0
- package/dist/analyzers/python/index.js.map +1 -0
- package/dist/analyzers/python/pythonAnalyzer.d.ts +64 -0
- package/dist/analyzers/python/pythonAnalyzer.d.ts.map +1 -0
- package/dist/analyzers/python/pythonAnalyzer.js +226 -0
- package/dist/analyzers/python/pythonAnalyzer.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +281 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/engine/index.d.ts +5 -0
- package/dist/core/engine/index.d.ts.map +1 -0
- package/dist/core/engine/index.js +21 -0
- package/dist/core/engine/index.js.map +1 -0
- package/dist/core/engine/ruleEngine.d.ts +46 -0
- package/dist/core/engine/ruleEngine.d.ts.map +1 -0
- package/dist/core/engine/ruleEngine.js +173 -0
- package/dist/core/engine/ruleEngine.js.map +1 -0
- package/dist/core/index.d.ts +8 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +24 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/scanner/fileScanner.d.ts +31 -0
- package/dist/core/scanner/fileScanner.d.ts.map +1 -0
- package/dist/core/scanner/fileScanner.js +199 -0
- package/dist/core/scanner/fileScanner.js.map +1 -0
- package/dist/core/scanner/index.d.ts +5 -0
- package/dist/core/scanner/index.d.ts.map +1 -0
- package/dist/core/scanner/index.js +21 -0
- package/dist/core/scanner/index.js.map +1 -0
- package/dist/core/scoring/index.d.ts +5 -0
- package/dist/core/scoring/index.d.ts.map +1 -0
- package/dist/core/scoring/index.js +21 -0
- package/dist/core/scoring/index.js.map +1 -0
- package/dist/core/scoring/riskScoring.d.ts +49 -0
- package/dist/core/scoring/riskScoring.d.ts.map +1 -0
- package/dist/core/scoring/riskScoring.js +180 -0
- package/dist/core/scoring/riskScoring.js.map +1 -0
- package/dist/core/securityScanner.d.ts +47 -0
- package/dist/core/securityScanner.d.ts.map +1 -0
- package/dist/core/securityScanner.js +298 -0
- package/dist/core/securityScanner.js.map +1 -0
- package/dist/dependencies/aiDependencyAnalyzer.d.ts +96 -0
- package/dist/dependencies/aiDependencyAnalyzer.d.ts.map +1 -0
- package/dist/dependencies/aiDependencyAnalyzer.js +435 -0
- package/dist/dependencies/aiDependencyAnalyzer.js.map +1 -0
- package/dist/dependencies/database/cveDatabase.d.ts +32 -0
- package/dist/dependencies/database/cveDatabase.d.ts.map +1 -0
- package/dist/dependencies/database/cveDatabase.js +393 -0
- package/dist/dependencies/database/cveDatabase.js.map +1 -0
- package/dist/dependencies/database/index.d.ts +6 -0
- package/dist/dependencies/database/index.d.ts.map +1 -0
- package/dist/dependencies/database/index.js +22 -0
- package/dist/dependencies/database/index.js.map +1 -0
- package/dist/dependencies/database/maliciousPackages.d.ts +43 -0
- package/dist/dependencies/database/maliciousPackages.d.ts.map +1 -0
- package/dist/dependencies/database/maliciousPackages.js +279 -0
- package/dist/dependencies/database/maliciousPackages.js.map +1 -0
- package/dist/dependencies/dependencyAnalyzer.d.ts +74 -0
- package/dist/dependencies/dependencyAnalyzer.d.ts.map +1 -0
- package/dist/dependencies/dependencyAnalyzer.js +349 -0
- package/dist/dependencies/dependencyAnalyzer.js.map +1 -0
- package/dist/dependencies/detectors/index.d.ts +7 -0
- package/dist/dependencies/detectors/index.d.ts.map +1 -0
- package/dist/dependencies/detectors/index.js +28 -0
- package/dist/dependencies/detectors/index.js.map +1 -0
- package/dist/dependencies/detectors/securityStandards.d.ts +15 -0
- package/dist/dependencies/detectors/securityStandards.d.ts.map +1 -0
- package/dist/dependencies/detectors/securityStandards.js +178 -0
- package/dist/dependencies/detectors/securityStandards.js.map +1 -0
- package/dist/dependencies/detectors/vulnerabilityDetector.d.ts +53 -0
- package/dist/dependencies/detectors/vulnerabilityDetector.d.ts.map +1 -0
- package/dist/dependencies/detectors/vulnerabilityDetector.js +289 -0
- package/dist/dependencies/detectors/vulnerabilityDetector.js.map +1 -0
- package/dist/dependencies/index.d.ts +14 -0
- package/dist/dependencies/index.d.ts.map +1 -0
- package/dist/dependencies/index.js +43 -0
- package/dist/dependencies/index.js.map +1 -0
- package/dist/dependencies/installed/index.d.ts +8 -0
- package/dist/dependencies/installed/index.d.ts.map +1 -0
- package/dist/dependencies/installed/index.js +24 -0
- package/dist/dependencies/installed/index.js.map +1 -0
- package/dist/dependencies/installed/installedScanner.d.ts +91 -0
- package/dist/dependencies/installed/installedScanner.d.ts.map +1 -0
- package/dist/dependencies/installed/installedScanner.js +766 -0
- package/dist/dependencies/installed/installedScanner.js.map +1 -0
- package/dist/dependencies/installed/malwarePatterns.d.ts +32 -0
- package/dist/dependencies/installed/malwarePatterns.d.ts.map +1 -0
- package/dist/dependencies/installed/malwarePatterns.js +480 -0
- package/dist/dependencies/installed/malwarePatterns.js.map +1 -0
- package/dist/dependencies/installed/types.d.ts +274 -0
- package/dist/dependencies/installed/types.d.ts.map +1 -0
- package/dist/dependencies/installed/types.js +7 -0
- package/dist/dependencies/installed/types.js.map +1 -0
- package/dist/dependencies/parsers/base/baseParser.d.ts +44 -0
- package/dist/dependencies/parsers/base/baseParser.d.ts.map +1 -0
- package/dist/dependencies/parsers/base/baseParser.js +80 -0
- package/dist/dependencies/parsers/base/baseParser.js.map +1 -0
- package/dist/dependencies/parsers/base/index.d.ts +6 -0
- package/dist/dependencies/parsers/base/index.d.ts.map +1 -0
- package/dist/dependencies/parsers/base/index.js +27 -0
- package/dist/dependencies/parsers/base/index.js.map +1 -0
- package/dist/dependencies/parsers/cpp/cppParser.d.ts +36 -0
- package/dist/dependencies/parsers/cpp/cppParser.d.ts.map +1 -0
- package/dist/dependencies/parsers/cpp/cppParser.js +196 -0
- package/dist/dependencies/parsers/cpp/cppParser.js.map +1 -0
- package/dist/dependencies/parsers/cpp/index.d.ts +6 -0
- package/dist/dependencies/parsers/cpp/index.d.ts.map +1 -0
- package/dist/dependencies/parsers/cpp/index.js +27 -0
- package/dist/dependencies/parsers/cpp/index.js.map +1 -0
- package/dist/dependencies/parsers/csharp/csharpParser.d.ts +32 -0
- package/dist/dependencies/parsers/csharp/csharpParser.d.ts.map +1 -0
- package/dist/dependencies/parsers/csharp/csharpParser.js +125 -0
- package/dist/dependencies/parsers/csharp/csharpParser.js.map +1 -0
- package/dist/dependencies/parsers/csharp/index.d.ts +6 -0
- package/dist/dependencies/parsers/csharp/index.d.ts.map +1 -0
- package/dist/dependencies/parsers/csharp/index.js +27 -0
- package/dist/dependencies/parsers/csharp/index.js.map +1 -0
- package/dist/dependencies/parsers/index.d.ts +24 -0
- package/dist/dependencies/parsers/index.d.ts.map +1 -0
- package/dist/dependencies/parsers/index.js +69 -0
- package/dist/dependencies/parsers/index.js.map +1 -0
- package/dist/dependencies/parsers/java/index.d.ts +6 -0
- package/dist/dependencies/parsers/java/index.d.ts.map +1 -0
- package/dist/dependencies/parsers/java/index.js +27 -0
- package/dist/dependencies/parsers/java/index.js.map +1 -0
- package/dist/dependencies/parsers/java/javaParser.d.ts +32 -0
- package/dist/dependencies/parsers/java/javaParser.d.ts.map +1 -0
- package/dist/dependencies/parsers/java/javaParser.js +168 -0
- package/dist/dependencies/parsers/java/javaParser.js.map +1 -0
- package/dist/dependencies/parsers/javascript/index.d.ts +6 -0
- package/dist/dependencies/parsers/javascript/index.d.ts.map +1 -0
- package/dist/dependencies/parsers/javascript/index.js +27 -0
- package/dist/dependencies/parsers/javascript/index.js.map +1 -0
- package/dist/dependencies/parsers/javascript/javascriptParser.d.ts +55 -0
- package/dist/dependencies/parsers/javascript/javascriptParser.d.ts.map +1 -0
- package/dist/dependencies/parsers/javascript/javascriptParser.js +266 -0
- package/dist/dependencies/parsers/javascript/javascriptParser.js.map +1 -0
- package/dist/dependencies/parsers/php/index.d.ts +6 -0
- package/dist/dependencies/parsers/php/index.d.ts.map +1 -0
- package/dist/dependencies/parsers/php/index.js +27 -0
- package/dist/dependencies/parsers/php/index.js.map +1 -0
- package/dist/dependencies/parsers/php/phpParser.d.ts +35 -0
- package/dist/dependencies/parsers/php/phpParser.d.ts.map +1 -0
- package/dist/dependencies/parsers/php/phpParser.js +162 -0
- package/dist/dependencies/parsers/php/phpParser.js.map +1 -0
- package/dist/dependencies/parsers/python/index.d.ts +6 -0
- package/dist/dependencies/parsers/python/index.d.ts.map +1 -0
- package/dist/dependencies/parsers/python/index.js +27 -0
- package/dist/dependencies/parsers/python/index.js.map +1 -0
- package/dist/dependencies/parsers/python/pythonParser.d.ts +60 -0
- package/dist/dependencies/parsers/python/pythonParser.d.ts.map +1 -0
- package/dist/dependencies/parsers/python/pythonParser.js +336 -0
- package/dist/dependencies/parsers/python/pythonParser.js.map +1 -0
- package/dist/dependencies/types.d.ts +280 -0
- package/dist/dependencies/types.d.ts.map +1 -0
- package/dist/dependencies/types.js +59 -0
- package/dist/dependencies/types.js.map +1 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +18 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/translations.d.ts +55 -0
- package/dist/i18n/translations.d.ts.map +1 -0
- package/dist/i18n/translations.js +119 -0
- package/dist/i18n/translations.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/reports/dependencyReportGenerator.d.ts +20 -0
- package/dist/reports/dependencyReportGenerator.d.ts.map +1 -0
- package/dist/reports/dependencyReportGenerator.js +690 -0
- package/dist/reports/dependencyReportGenerator.js.map +1 -0
- package/dist/reports/htmlReportGenerator.d.ts +43 -0
- package/dist/reports/htmlReportGenerator.d.ts.map +1 -0
- package/dist/reports/htmlReportGenerator.js +793 -0
- package/dist/reports/htmlReportGenerator.js.map +1 -0
- package/dist/reports/index.d.ts +7 -0
- package/dist/reports/index.d.ts.map +1 -0
- package/dist/reports/index.js +23 -0
- package/dist/reports/index.js.map +1 -0
- package/dist/reports/installedDepsReportGenerator.d.ts +14 -0
- package/dist/reports/installedDepsReportGenerator.d.ts.map +1 -0
- package/dist/reports/installedDepsReportGenerator.js +872 -0
- package/dist/reports/installedDepsReportGenerator.js.map +1 -0
- package/dist/rules/index.d.ts +31 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +95 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/rules/malware/categories/backdoors.d.ts +12 -0
- package/dist/rules/malware/categories/backdoors.d.ts.map +1 -0
- package/dist/rules/malware/categories/backdoors.js +163 -0
- package/dist/rules/malware/categories/backdoors.js.map +1 -0
- package/dist/rules/malware/categories/cryptominers.d.ts +13 -0
- package/dist/rules/malware/categories/cryptominers.d.ts.map +1 -0
- package/dist/rules/malware/categories/cryptominers.js +415 -0
- package/dist/rules/malware/categories/cryptominers.js.map +1 -0
- package/dist/rules/malware/categories/exfiltration.d.ts +20 -0
- package/dist/rules/malware/categories/exfiltration.d.ts.map +1 -0
- package/dist/rules/malware/categories/exfiltration.js +658 -0
- package/dist/rules/malware/categories/exfiltration.js.map +1 -0
- package/dist/rules/malware/categories/keyloggers.d.ts +19 -0
- package/dist/rules/malware/categories/keyloggers.d.ts.map +1 -0
- package/dist/rules/malware/categories/keyloggers.js +763 -0
- package/dist/rules/malware/categories/keyloggers.js.map +1 -0
- package/dist/rules/malware/categories/loaders.d.ts +20 -0
- package/dist/rules/malware/categories/loaders.d.ts.map +1 -0
- package/dist/rules/malware/categories/loaders.js +702 -0
- package/dist/rules/malware/categories/loaders.js.map +1 -0
- package/dist/rules/malware/categories/network.d.ts +19 -0
- package/dist/rules/malware/categories/network.d.ts.map +1 -0
- package/dist/rules/malware/categories/network.js +622 -0
- package/dist/rules/malware/categories/network.js.map +1 -0
- package/dist/rules/malware/categories/obfuscation.d.ts +22 -0
- package/dist/rules/malware/categories/obfuscation.d.ts.map +1 -0
- package/dist/rules/malware/categories/obfuscation.js +766 -0
- package/dist/rules/malware/categories/obfuscation.js.map +1 -0
- package/dist/rules/malware/constants/index.d.ts +281 -0
- package/dist/rules/malware/constants/index.d.ts.map +1 -0
- package/dist/rules/malware/constants/index.js +327 -0
- package/dist/rules/malware/constants/index.js.map +1 -0
- package/dist/rules/malware/engine/index.d.ts +178 -0
- package/dist/rules/malware/engine/index.d.ts.map +1 -0
- package/dist/rules/malware/engine/index.js +552 -0
- package/dist/rules/malware/engine/index.js.map +1 -0
- package/dist/rules/malware/index.d.ts +205 -0
- package/dist/rules/malware/index.d.ts.map +1 -0
- package/dist/rules/malware/index.js +837 -0
- package/dist/rules/malware/index.js.map +1 -0
- package/dist/rules/malware/scoring/index.d.ts +84 -0
- package/dist/rules/malware/scoring/index.d.ts.map +1 -0
- package/dist/rules/malware/scoring/index.js +441 -0
- package/dist/rules/malware/scoring/index.js.map +1 -0
- package/dist/rules/malware/types/index.d.ts +616 -0
- package/dist/rules/malware/types/index.d.ts.map +1 -0
- package/dist/rules/malware/types/index.js +155 -0
- package/dist/rules/malware/types/index.js.map +1 -0
- package/dist/rules/malware/utils/index.d.ts +117 -0
- package/dist/rules/malware/utils/index.d.ts.map +1 -0
- package/dist/rules/malware/utils/index.js +514 -0
- package/dist/rules/malware/utils/index.js.map +1 -0
- package/dist/rules/standards.d.ts +26 -0
- package/dist/rules/standards.d.ts.map +1 -0
- package/dist/rules/standards.js +352 -0
- package/dist/rules/standards.js.map +1 -0
- package/dist/rules/vulnerabilities/constants/index.d.ts +835 -0
- package/dist/rules/vulnerabilities/constants/index.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/constants/index.js +544 -0
- package/dist/rules/vulnerabilities/constants/index.js.map +1 -0
- package/dist/rules/vulnerabilities/engine/index.d.ts +145 -0
- package/dist/rules/vulnerabilities/engine/index.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/engine/index.js +581 -0
- package/dist/rules/vulnerabilities/engine/index.js.map +1 -0
- package/dist/rules/vulnerabilities/index.d.ts +148 -0
- package/dist/rules/vulnerabilities/index.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/index.js +252 -0
- package/dist/rules/vulnerabilities/index.js.map +1 -0
- package/dist/rules/vulnerabilities/rules/authentication.d.ts +8 -0
- package/dist/rules/vulnerabilities/rules/authentication.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/rules/authentication.js +419 -0
- package/dist/rules/vulnerabilities/rules/authentication.js.map +1 -0
- package/dist/rules/vulnerabilities/rules/commandInjection.d.ts +8 -0
- package/dist/rules/vulnerabilities/rules/commandInjection.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/rules/commandInjection.js +300 -0
- package/dist/rules/vulnerabilities/rules/commandInjection.js.map +1 -0
- package/dist/rules/vulnerabilities/rules/csrf.d.ts +8 -0
- package/dist/rules/vulnerabilities/rules/csrf.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/rules/csrf.js +261 -0
- package/dist/rules/vulnerabilities/rules/csrf.js.map +1 -0
- package/dist/rules/vulnerabilities/rules/deserialization.d.ts +8 -0
- package/dist/rules/vulnerabilities/rules/deserialization.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/rules/deserialization.js +336 -0
- package/dist/rules/vulnerabilities/rules/deserialization.js.map +1 -0
- package/dist/rules/vulnerabilities/rules/fileUpload.d.ts +8 -0
- package/dist/rules/vulnerabilities/rules/fileUpload.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/rules/fileUpload.js +325 -0
- package/dist/rules/vulnerabilities/rules/fileUpload.js.map +1 -0
- package/dist/rules/vulnerabilities/rules/hardcodedSecrets.d.ts +8 -0
- package/dist/rules/vulnerabilities/rules/hardcodedSecrets.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/rules/hardcodedSecrets.js +446 -0
- package/dist/rules/vulnerabilities/rules/hardcodedSecrets.js.map +1 -0
- package/dist/rules/vulnerabilities/rules/index.d.ts +17 -0
- package/dist/rules/vulnerabilities/rules/index.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/rules/index.js +47 -0
- package/dist/rules/vulnerabilities/rules/index.js.map +1 -0
- package/dist/rules/vulnerabilities/rules/pathTraversal.d.ts +8 -0
- package/dist/rules/vulnerabilities/rules/pathTraversal.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/rules/pathTraversal.js +351 -0
- package/dist/rules/vulnerabilities/rules/pathTraversal.js.map +1 -0
- package/dist/rules/vulnerabilities/rules/prototypePollution.d.ts +8 -0
- package/dist/rules/vulnerabilities/rules/prototypePollution.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/rules/prototypePollution.js +272 -0
- package/dist/rules/vulnerabilities/rules/prototypePollution.js.map +1 -0
- package/dist/rules/vulnerabilities/rules/securityMisconfiguration.d.ts +8 -0
- package/dist/rules/vulnerabilities/rules/securityMisconfiguration.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/rules/securityMisconfiguration.js +438 -0
- package/dist/rules/vulnerabilities/rules/securityMisconfiguration.js.map +1 -0
- package/dist/rules/vulnerabilities/rules/sqlInjection.d.ts +12 -0
- package/dist/rules/vulnerabilities/rules/sqlInjection.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/rules/sqlInjection.js +636 -0
- package/dist/rules/vulnerabilities/rules/sqlInjection.js.map +1 -0
- package/dist/rules/vulnerabilities/rules/ssrf.d.ts +8 -0
- package/dist/rules/vulnerabilities/rules/ssrf.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/rules/ssrf.js +401 -0
- package/dist/rules/vulnerabilities/rules/ssrf.js.map +1 -0
- package/dist/rules/vulnerabilities/rules/xss.d.ts +11 -0
- package/dist/rules/vulnerabilities/rules/xss.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/rules/xss.js +724 -0
- package/dist/rules/vulnerabilities/rules/xss.js.map +1 -0
- package/dist/rules/vulnerabilities/scoring/index.d.ts +80 -0
- package/dist/rules/vulnerabilities/scoring/index.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/scoring/index.js +414 -0
- package/dist/rules/vulnerabilities/scoring/index.js.map +1 -0
- package/dist/rules/vulnerabilities/types/index.d.ts +830 -0
- package/dist/rules/vulnerabilities/types/index.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/types/index.js +164 -0
- package/dist/rules/vulnerabilities/types/index.js.map +1 -0
- package/dist/rules/vulnerabilities/utils/index.d.ts +206 -0
- package/dist/rules/vulnerabilities/utils/index.d.ts.map +1 -0
- package/dist/rules/vulnerabilities/utils/index.js +615 -0
- package/dist/rules/vulnerabilities/utils/index.js.map +1 -0
- package/dist/types/index.d.ts +359 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +61 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/index.d.ts +82 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +326 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +40 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +139 -0
- package/dist/utils/logger.js.map +1 -0
- package/docs/ARCHITECTURE.md +320 -0
- package/docs/V1.2.1-IA_Performances.md +116 -0
- package/docs/images/WIN_Defender.png +0 -0
- package/package.json +68 -0
- package/secure-scan.config.json +134 -0
- package/secure-scan.sln +29 -0
- package/src/ai/aiAnalyzer.ts +714 -0
- package/src/ai/index.ts +5 -0
- package/src/analyzers/base/baseAnalyzer.ts +66 -0
- package/src/analyzers/base/index.ts +5 -0
- package/src/analyzers/c-cpp/cppAnalyzer.ts +308 -0
- package/src/analyzers/c-cpp/index.ts +5 -0
- package/src/analyzers/core/engine/index.ts +5 -0
- package/src/analyzers/core/engine/ruleEngine.ts +221 -0
- package/src/analyzers/core/index.ts +8 -0
- package/src/analyzers/core/scanner/fileScanner.ts +204 -0
- package/src/analyzers/core/scanner/index.ts +5 -0
- package/src/analyzers/core/scoring/index.ts +5 -0
- package/src/analyzers/core/scoring/riskScoring.ts +198 -0
- package/src/analyzers/core/securityScanner.ts +321 -0
- package/src/analyzers/csharp/csharpAnalyzer.ts +328 -0
- package/src/analyzers/csharp/index.ts +5 -0
- package/src/analyzers/iac/iacAnalyzer.ts +318 -0
- package/src/analyzers/iac/index.ts +5 -0
- package/src/analyzers/index.ts +67 -0
- package/src/analyzers/java/index.ts +5 -0
- package/src/analyzers/java/javaAnalyzer.ts +320 -0
- package/src/analyzers/javascript/PROMPT_JS_ANALYZER.md +267 -0
- package/src/analyzers/javascript/astUtils.ts +789 -0
- package/src/analyzers/javascript/index.ts +50 -0
- package/src/analyzers/javascript/javascriptAnalyzer.ts +984 -0
- package/src/analyzers/javascript/malwareDetector.ts +697 -0
- package/src/analyzers/javascript/packageJsonAnalyzer.ts +626 -0
- package/src/analyzers/javascript/taintAnalyzer.ts +630 -0
- package/src/analyzers/php/index.ts +5 -0
- package/src/analyzers/php/phpAnalyzer.ts +280 -0
- package/src/analyzers/python/index.ts +5 -0
- package/src/analyzers/python/pythonAnalyzer.ts +319 -0
- package/src/cli/index.ts +276 -0
- package/src/dependencies/aiDependencyAnalyzer.ts +496 -0
- package/src/dependencies/database/cveDatabase.ts +426 -0
- package/src/dependencies/database/index.ts +6 -0
- package/src/dependencies/database/maliciousPackages.ts +286 -0
- package/src/dependencies/dependencyAnalyzer.ts +394 -0
- package/src/dependencies/detectors/index.ts +7 -0
- package/src/dependencies/detectors/securityStandards.ts +200 -0
- package/src/dependencies/detectors/vulnerabilityDetector.ts +343 -0
- package/src/dependencies/index.ts +27 -0
- package/src/dependencies/installed/index.ts +8 -0
- package/src/dependencies/installed/installedScanner.ts +821 -0
- package/src/dependencies/installed/malwarePatterns.ts +492 -0
- package/src/dependencies/installed/types.ts +287 -0
- package/src/dependencies/parsers/base/baseParser.ts +108 -0
- package/src/dependencies/parsers/base/index.ts +6 -0
- package/src/dependencies/parsers/cpp/cppParser.ts +245 -0
- package/src/dependencies/parsers/cpp/index.ts +6 -0
- package/src/dependencies/parsers/csharp/csharpParser.ts +151 -0
- package/src/dependencies/parsers/csharp/index.ts +6 -0
- package/src/dependencies/parsers/index.ts +56 -0
- package/src/dependencies/parsers/java/index.ts +6 -0
- package/src/dependencies/parsers/java/javaParser.ts +203 -0
- package/src/dependencies/parsers/javascript/index.ts +6 -0
- package/src/dependencies/parsers/javascript/javascriptParser.ts +362 -0
- package/src/dependencies/parsers/php/index.ts +6 -0
- package/src/dependencies/parsers/php/phpParser.ts +208 -0
- package/src/dependencies/parsers/python/index.ts +6 -0
- package/src/dependencies/parsers/python/pythonParser.ts +437 -0
- package/src/dependencies/types.ts +330 -0
- package/src/i18n/index.ts +1 -0
- package/src/i18n/translations.ts +194 -0
- package/src/index.ts +16 -0
- package/src/reports/dependencyReportGenerator.ts +717 -0
- package/src/reports/htmlReportGenerator.ts +781 -0
- package/src/reports/index.ts +7 -0
- package/src/reports/installedDepsReportGenerator.ts +899 -0
- package/src/rules/index.ts +58 -0
- package/src/rules/malware/INFO.md +287 -0
- package/src/rules/malware/categories/backdoors.ts +174 -0
- package/src/rules/malware/categories/cryptominers.ts +434 -0
- package/src/rules/malware/categories/exfiltration.ts +677 -0
- package/src/rules/malware/categories/keyloggers.ts +780 -0
- package/src/rules/malware/categories/loaders.ts +721 -0
- package/src/rules/malware/categories/network.ts +639 -0
- package/src/rules/malware/categories/obfuscation.ts +788 -0
- package/src/rules/malware/constants/index.ts +358 -0
- package/src/rules/malware/engine/index.ts +758 -0
- package/src/rules/malware/index.ts +928 -0
- package/src/rules/malware/scoring/index.ts +549 -0
- package/src/rules/malware/types/index.ts +752 -0
- package/src/rules/malware/utils/index.ts +643 -0
- package/src/rules/standards.ts +372 -0
- package/src/rules/vulnerabilities/PROMPT_VULNERABILITIES.md +226 -0
- package/src/rules/vulnerabilities/constants/index.ts +625 -0
- package/src/rules/vulnerabilities/engine/index.ts +831 -0
- package/src/rules/vulnerabilities/index.ts +312 -0
- package/src/rules/vulnerabilities/rules/authentication.ts +426 -0
- package/src/rules/vulnerabilities/rules/commandInjection.ts +307 -0
- package/src/rules/vulnerabilities/rules/csrf.ts +268 -0
- package/src/rules/vulnerabilities/rules/deserialization.ts +343 -0
- package/src/rules/vulnerabilities/rules/fileUpload.ts +332 -0
- package/src/rules/vulnerabilities/rules/hardcodedSecrets.ts +453 -0
- package/src/rules/vulnerabilities/rules/index.ts +17 -0
- package/src/rules/vulnerabilities/rules/pathTraversal.ts +358 -0
- package/src/rules/vulnerabilities/rules/prototypePollution.ts +279 -0
- package/src/rules/vulnerabilities/rules/securityMisconfiguration.ts +445 -0
- package/src/rules/vulnerabilities/rules/sqlInjection.ts +669 -0
- package/src/rules/vulnerabilities/rules/ssrf.ts +408 -0
- package/src/rules/vulnerabilities/rules/xss.ts +753 -0
- package/src/rules/vulnerabilities/scoring/index.ts +543 -0
- package/src/rules/vulnerabilities/types/index.ts +1004 -0
- package/src/rules/vulnerabilities/utils/index.ts +709 -0
- package/src/types/index.ts +391 -0
- package/src/utils/index.ts +306 -0
- package/src/utils/logger.ts +150 -0
- package/test-installed-scanner.ts +136 -0
- package/tsconfig.json +30 -0
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Security Standards Database
|
|
3
|
+
* OWASP Top 10, CWE, MITRE ATT&CK, SANS Top 25
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { SecurityStandard, ThreatType } from '../types';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* OWASP Top 10 2021
|
|
10
|
+
*/
|
|
11
|
+
export const OWASP_TOP_10: Record<string, SecurityStandard> = {
|
|
12
|
+
'A01:2021': {
|
|
13
|
+
name: 'OWASP',
|
|
14
|
+
id: 'A01:2021',
|
|
15
|
+
title: 'Broken Access Control',
|
|
16
|
+
description: 'Access control enforces policy such that users cannot act outside of their intended permissions.',
|
|
17
|
+
url: 'https://owasp.org/Top10/A01_2021-Broken_Access_Control/'
|
|
18
|
+
},
|
|
19
|
+
'A02:2021': {
|
|
20
|
+
name: 'OWASP',
|
|
21
|
+
id: 'A02:2021',
|
|
22
|
+
title: 'Cryptographic Failures',
|
|
23
|
+
description: 'Failures related to cryptography which often lead to sensitive data exposure.',
|
|
24
|
+
url: 'https://owasp.org/Top10/A02_2021-Cryptographic_Failures/'
|
|
25
|
+
},
|
|
26
|
+
'A03:2021': {
|
|
27
|
+
name: 'OWASP',
|
|
28
|
+
id: 'A03:2021',
|
|
29
|
+
title: 'Injection',
|
|
30
|
+
description: 'User-supplied data is not validated, filtered, or sanitized by the application.',
|
|
31
|
+
url: 'https://owasp.org/Top10/A03_2021-Injection/'
|
|
32
|
+
},
|
|
33
|
+
'A04:2021': {
|
|
34
|
+
name: 'OWASP',
|
|
35
|
+
id: 'A04:2021',
|
|
36
|
+
title: 'Insecure Design',
|
|
37
|
+
description: 'Missing or ineffective control design.',
|
|
38
|
+
url: 'https://owasp.org/Top10/A04_2021-Insecure_Design/'
|
|
39
|
+
},
|
|
40
|
+
'A05:2021': {
|
|
41
|
+
name: 'OWASP',
|
|
42
|
+
id: 'A05:2021',
|
|
43
|
+
title: 'Security Misconfiguration',
|
|
44
|
+
description: 'Missing appropriate security hardening or improperly configured permissions.',
|
|
45
|
+
url: 'https://owasp.org/Top10/A05_2021-Security_Misconfiguration/'
|
|
46
|
+
},
|
|
47
|
+
'A06:2021': {
|
|
48
|
+
name: 'OWASP',
|
|
49
|
+
id: 'A06:2021',
|
|
50
|
+
title: 'Vulnerable and Outdated Components',
|
|
51
|
+
description: 'Using components with known vulnerabilities.',
|
|
52
|
+
url: 'https://owasp.org/Top10/A06_2021-Vulnerable_and_Outdated_Components/'
|
|
53
|
+
},
|
|
54
|
+
'A07:2021': {
|
|
55
|
+
name: 'OWASP',
|
|
56
|
+
id: 'A07:2021',
|
|
57
|
+
title: 'Identification and Authentication Failures',
|
|
58
|
+
description: 'Confirmation of user identity, authentication, and session management.',
|
|
59
|
+
url: 'https://owasp.org/Top10/A07_2021-Identification_and_Authentication_Failures/'
|
|
60
|
+
},
|
|
61
|
+
'A08:2021': {
|
|
62
|
+
name: 'OWASP',
|
|
63
|
+
id: 'A08:2021',
|
|
64
|
+
title: 'Software and Data Integrity Failures',
|
|
65
|
+
description: 'Code and infrastructure that does not protect against integrity violations.',
|
|
66
|
+
url: 'https://owasp.org/Top10/A08_2021-Software_and_Data_Integrity_Failures/'
|
|
67
|
+
},
|
|
68
|
+
'A09:2021': {
|
|
69
|
+
name: 'OWASP',
|
|
70
|
+
id: 'A09:2021',
|
|
71
|
+
title: 'Security Logging and Monitoring Failures',
|
|
72
|
+
description: 'Insufficient logging, detection, monitoring, and active response.',
|
|
73
|
+
url: 'https://owasp.org/Top10/A09_2021-Security_Logging_and_Monitoring_Failures/'
|
|
74
|
+
},
|
|
75
|
+
'A10:2021': {
|
|
76
|
+
name: 'OWASP',
|
|
77
|
+
id: 'A10:2021',
|
|
78
|
+
title: 'Server-Side Request Forgery (SSRF)',
|
|
79
|
+
description: 'SSRF flaws occur when a web application fetches a remote resource without validating the user-supplied URL.',
|
|
80
|
+
url: 'https://owasp.org/Top10/A10_2021-Server-Side_Request_Forgery_%28SSRF%29/'
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Common Weakness Enumeration (CWE)
|
|
86
|
+
*/
|
|
87
|
+
export const CWE_DATABASE: Record<string, SecurityStandard> = {
|
|
88
|
+
'CWE-79': {
|
|
89
|
+
name: 'CWE',
|
|
90
|
+
id: 'CWE-79',
|
|
91
|
+
title: 'Improper Neutralization of Input During Web Page Generation (XSS)',
|
|
92
|
+
description: 'The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page.',
|
|
93
|
+
url: 'https://cwe.mitre.org/data/definitions/79.html'
|
|
94
|
+
},
|
|
95
|
+
'CWE-89': {
|
|
96
|
+
name: 'CWE',
|
|
97
|
+
id: 'CWE-89',
|
|
98
|
+
title: 'SQL Injection',
|
|
99
|
+
description: 'The software constructs SQL commands using externally-influenced input from an upstream component.',
|
|
100
|
+
url: 'https://cwe.mitre.org/data/definitions/89.html'
|
|
101
|
+
},
|
|
102
|
+
'CWE-78': {
|
|
103
|
+
name: 'CWE',
|
|
104
|
+
id: 'CWE-78',
|
|
105
|
+
title: 'OS Command Injection',
|
|
106
|
+
description: 'The software constructs OS commands using externally-influenced input without proper neutralization.',
|
|
107
|
+
url: 'https://cwe.mitre.org/data/definitions/78.html'
|
|
108
|
+
},
|
|
109
|
+
'CWE-94': {
|
|
110
|
+
name: 'CWE',
|
|
111
|
+
id: 'CWE-94',
|
|
112
|
+
title: 'Improper Control of Generation of Code (Code Injection)',
|
|
113
|
+
description: 'The software constructs code segments using externally-influenced input without proper neutralization.',
|
|
114
|
+
url: 'https://cwe.mitre.org/data/definitions/94.html'
|
|
115
|
+
},
|
|
116
|
+
'CWE-502': {
|
|
117
|
+
name: 'CWE',
|
|
118
|
+
id: 'CWE-502',
|
|
119
|
+
title: 'Deserialization of Untrusted Data',
|
|
120
|
+
description: 'The application deserializes untrusted data without sufficiently verifying that the resulting data will be valid.',
|
|
121
|
+
url: 'https://cwe.mitre.org/data/definitions/502.html'
|
|
122
|
+
},
|
|
123
|
+
'CWE-798': {
|
|
124
|
+
name: 'CWE',
|
|
125
|
+
id: 'CWE-798',
|
|
126
|
+
title: 'Use of Hard-coded Credentials',
|
|
127
|
+
description: 'The software contains hard-coded credentials, such as passwords or cryptographic keys.',
|
|
128
|
+
url: 'https://cwe.mitre.org/data/definitions/798.html'
|
|
129
|
+
},
|
|
130
|
+
'CWE-22': {
|
|
131
|
+
name: 'CWE',
|
|
132
|
+
id: 'CWE-22',
|
|
133
|
+
title: 'Path Traversal',
|
|
134
|
+
description: 'The software uses external input to construct a pathname without proper neutralization.',
|
|
135
|
+
url: 'https://cwe.mitre.org/data/definitions/22.html'
|
|
136
|
+
},
|
|
137
|
+
'CWE-327': {
|
|
138
|
+
name: 'CWE',
|
|
139
|
+
id: 'CWE-327',
|
|
140
|
+
title: 'Use of a Broken or Risky Cryptographic Algorithm',
|
|
141
|
+
description: 'The use of a broken or risky cryptographic algorithm is an unnecessary risk.',
|
|
142
|
+
url: 'https://cwe.mitre.org/data/definitions/327.html'
|
|
143
|
+
},
|
|
144
|
+
'CWE-330': {
|
|
145
|
+
name: 'CWE',
|
|
146
|
+
id: 'CWE-330',
|
|
147
|
+
title: 'Use of Insufficiently Random Values',
|
|
148
|
+
description: 'The software uses insufficiently random numbers or values in a security context.',
|
|
149
|
+
url: 'https://cwe.mitre.org/data/definitions/330.html'
|
|
150
|
+
},
|
|
151
|
+
'CWE-352': {
|
|
152
|
+
name: 'CWE',
|
|
153
|
+
id: 'CWE-352',
|
|
154
|
+
title: 'Cross-Site Request Forgery (CSRF)',
|
|
155
|
+
description: 'The web application does not verify that the request was intentionally provided by the user.',
|
|
156
|
+
url: 'https://cwe.mitre.org/data/definitions/352.html'
|
|
157
|
+
},
|
|
158
|
+
'CWE-90': {
|
|
159
|
+
name: 'CWE',
|
|
160
|
+
id: 'CWE-90',
|
|
161
|
+
title: 'LDAP Injection',
|
|
162
|
+
description: 'The software constructs LDAP statements using externally-influenced input.',
|
|
163
|
+
url: 'https://cwe.mitre.org/data/definitions/90.html'
|
|
164
|
+
},
|
|
165
|
+
'CWE-200': {
|
|
166
|
+
name: 'CWE',
|
|
167
|
+
id: 'CWE-200',
|
|
168
|
+
title: 'Exposure of Sensitive Information',
|
|
169
|
+
description: 'The software exposes sensitive information to an actor not authorized to have access.',
|
|
170
|
+
url: 'https://cwe.mitre.org/data/definitions/200.html'
|
|
171
|
+
},
|
|
172
|
+
'CWE-506': {
|
|
173
|
+
name: 'CWE',
|
|
174
|
+
id: 'CWE-506',
|
|
175
|
+
title: 'Embedded Malicious Code',
|
|
176
|
+
description: 'The application contains code that appears to be malicious in nature.',
|
|
177
|
+
url: 'https://cwe.mitre.org/data/definitions/506.html'
|
|
178
|
+
},
|
|
179
|
+
'CWE-912': {
|
|
180
|
+
name: 'CWE',
|
|
181
|
+
id: 'CWE-912',
|
|
182
|
+
title: 'Hidden Functionality',
|
|
183
|
+
description: 'The software contains functionality that is not documented or accessible through the intended interface.',
|
|
184
|
+
url: 'https://cwe.mitre.org/data/definitions/912.html'
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* MITRE ATT&CK Techniques
|
|
190
|
+
*/
|
|
191
|
+
export const MITRE_ATTACK: Record<string, SecurityStandard> = {
|
|
192
|
+
'T1059': {
|
|
193
|
+
name: 'MITRE',
|
|
194
|
+
id: 'T1059',
|
|
195
|
+
title: 'Command and Scripting Interpreter',
|
|
196
|
+
description: 'Adversaries may abuse command and script interpreters to execute commands.',
|
|
197
|
+
url: 'https://attack.mitre.org/techniques/T1059/'
|
|
198
|
+
},
|
|
199
|
+
'T1071': {
|
|
200
|
+
name: 'MITRE',
|
|
201
|
+
id: 'T1071',
|
|
202
|
+
title: 'Application Layer Protocol',
|
|
203
|
+
description: 'Adversaries may communicate using application layer protocols to avoid detection.',
|
|
204
|
+
url: 'https://attack.mitre.org/techniques/T1071/'
|
|
205
|
+
},
|
|
206
|
+
'T1027': {
|
|
207
|
+
name: 'MITRE',
|
|
208
|
+
id: 'T1027',
|
|
209
|
+
title: 'Obfuscated Files or Information',
|
|
210
|
+
description: 'Adversaries may attempt to make files or information difficult to discover or analyze.',
|
|
211
|
+
url: 'https://attack.mitre.org/techniques/T1027/'
|
|
212
|
+
},
|
|
213
|
+
'T1132': {
|
|
214
|
+
name: 'MITRE',
|
|
215
|
+
id: 'T1132',
|
|
216
|
+
title: 'Data Encoding',
|
|
217
|
+
description: 'Adversaries may encode data to make the content of command and control traffic more difficult to detect.',
|
|
218
|
+
url: 'https://attack.mitre.org/techniques/T1132/'
|
|
219
|
+
},
|
|
220
|
+
'T1041': {
|
|
221
|
+
name: 'MITRE',
|
|
222
|
+
id: 'T1041',
|
|
223
|
+
title: 'Exfiltration Over C2 Channel',
|
|
224
|
+
description: 'Adversaries may steal data by exfiltrating it over an existing command and control channel.',
|
|
225
|
+
url: 'https://attack.mitre.org/techniques/T1041/'
|
|
226
|
+
},
|
|
227
|
+
'T1496': {
|
|
228
|
+
name: 'MITRE',
|
|
229
|
+
id: 'T1496',
|
|
230
|
+
title: 'Resource Hijacking',
|
|
231
|
+
description: 'Adversaries may leverage the resources of systems to mine cryptocurrency.',
|
|
232
|
+
url: 'https://attack.mitre.org/techniques/T1496/'
|
|
233
|
+
},
|
|
234
|
+
'T1056': {
|
|
235
|
+
name: 'MITRE',
|
|
236
|
+
id: 'T1056',
|
|
237
|
+
title: 'Input Capture',
|
|
238
|
+
description: 'Adversaries may use methods of capturing user input to obtain credentials or collect information.',
|
|
239
|
+
url: 'https://attack.mitre.org/techniques/T1056/'
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* SANS Top 25
|
|
245
|
+
*/
|
|
246
|
+
export const SANS_TOP_25: Record<string, SecurityStandard> = {
|
|
247
|
+
'SANS-1': {
|
|
248
|
+
name: 'SANS',
|
|
249
|
+
id: 'SANS-1',
|
|
250
|
+
title: 'Out-of-bounds Write',
|
|
251
|
+
description: 'Writing data past the end, or before the beginning, of the intended buffer.',
|
|
252
|
+
url: 'https://www.sans.org/top25-software-errors/'
|
|
253
|
+
},
|
|
254
|
+
'SANS-2': {
|
|
255
|
+
name: 'SANS',
|
|
256
|
+
id: 'SANS-2',
|
|
257
|
+
title: 'Improper Neutralization of Input During Web Page Generation',
|
|
258
|
+
description: 'Cross-site scripting (XSS) vulnerabilities.',
|
|
259
|
+
url: 'https://www.sans.org/top25-software-errors/'
|
|
260
|
+
},
|
|
261
|
+
'SANS-3': {
|
|
262
|
+
name: 'SANS',
|
|
263
|
+
id: 'SANS-3',
|
|
264
|
+
title: 'SQL Injection',
|
|
265
|
+
description: 'SQL injection vulnerabilities in database queries.',
|
|
266
|
+
url: 'https://www.sans.org/top25-software-errors/'
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Map threat types to relevant security standards
|
|
272
|
+
*/
|
|
273
|
+
export function getStandardsForThreat(threatType: ThreatType): SecurityStandard[] {
|
|
274
|
+
const standards: SecurityStandard[] = [];
|
|
275
|
+
|
|
276
|
+
switch (threatType) {
|
|
277
|
+
case ThreatType.SQL_INJECTION:
|
|
278
|
+
standards.push(OWASP_TOP_10['A03:2021']);
|
|
279
|
+
standards.push(CWE_DATABASE['CWE-89']);
|
|
280
|
+
standards.push(SANS_TOP_25['SANS-3']);
|
|
281
|
+
break;
|
|
282
|
+
|
|
283
|
+
case ThreatType.COMMAND_INJECTION:
|
|
284
|
+
standards.push(OWASP_TOP_10['A03:2021']);
|
|
285
|
+
standards.push(CWE_DATABASE['CWE-78']);
|
|
286
|
+
standards.push(MITRE_ATTACK['T1059']);
|
|
287
|
+
break;
|
|
288
|
+
|
|
289
|
+
case ThreatType.XSS:
|
|
290
|
+
standards.push(OWASP_TOP_10['A03:2021']);
|
|
291
|
+
standards.push(CWE_DATABASE['CWE-79']);
|
|
292
|
+
standards.push(SANS_TOP_25['SANS-2']);
|
|
293
|
+
break;
|
|
294
|
+
|
|
295
|
+
case ThreatType.CSRF:
|
|
296
|
+
standards.push(OWASP_TOP_10['A01:2021']);
|
|
297
|
+
standards.push(CWE_DATABASE['CWE-352']);
|
|
298
|
+
break;
|
|
299
|
+
|
|
300
|
+
case ThreatType.INSECURE_DESERIALIZATION:
|
|
301
|
+
standards.push(OWASP_TOP_10['A08:2021']);
|
|
302
|
+
standards.push(CWE_DATABASE['CWE-502']);
|
|
303
|
+
break;
|
|
304
|
+
|
|
305
|
+
case ThreatType.HARDCODED_CREDENTIALS:
|
|
306
|
+
standards.push(OWASP_TOP_10['A07:2021']);
|
|
307
|
+
standards.push(CWE_DATABASE['CWE-798']);
|
|
308
|
+
break;
|
|
309
|
+
|
|
310
|
+
case ThreatType.PATH_TRAVERSAL:
|
|
311
|
+
standards.push(OWASP_TOP_10['A01:2021']);
|
|
312
|
+
standards.push(CWE_DATABASE['CWE-22']);
|
|
313
|
+
break;
|
|
314
|
+
|
|
315
|
+
case ThreatType.LDAP_INJECTION:
|
|
316
|
+
standards.push(OWASP_TOP_10['A03:2021']);
|
|
317
|
+
standards.push(CWE_DATABASE['CWE-90']);
|
|
318
|
+
break;
|
|
319
|
+
|
|
320
|
+
case ThreatType.INSECURE_CRYPTO:
|
|
321
|
+
standards.push(OWASP_TOP_10['A02:2021']);
|
|
322
|
+
standards.push(CWE_DATABASE['CWE-327']);
|
|
323
|
+
break;
|
|
324
|
+
|
|
325
|
+
case ThreatType.WEAK_RANDOM:
|
|
326
|
+
standards.push(OWASP_TOP_10['A02:2021']);
|
|
327
|
+
standards.push(CWE_DATABASE['CWE-330']);
|
|
328
|
+
break;
|
|
329
|
+
|
|
330
|
+
case ThreatType.DANGEROUS_FUNCTION:
|
|
331
|
+
standards.push(OWASP_TOP_10['A03:2021']);
|
|
332
|
+
standards.push(CWE_DATABASE['CWE-94']);
|
|
333
|
+
break;
|
|
334
|
+
|
|
335
|
+
case ThreatType.BACKDOOR:
|
|
336
|
+
case ThreatType.REVERSE_SHELL:
|
|
337
|
+
standards.push(CWE_DATABASE['CWE-506']);
|
|
338
|
+
standards.push(CWE_DATABASE['CWE-912']);
|
|
339
|
+
standards.push(MITRE_ATTACK['T1059']);
|
|
340
|
+
break;
|
|
341
|
+
|
|
342
|
+
case ThreatType.OBFUSCATED_CODE:
|
|
343
|
+
standards.push(CWE_DATABASE['CWE-506']);
|
|
344
|
+
standards.push(MITRE_ATTACK['T1027']);
|
|
345
|
+
break;
|
|
346
|
+
|
|
347
|
+
case ThreatType.CRYPTOMINER:
|
|
348
|
+
standards.push(CWE_DATABASE['CWE-506']);
|
|
349
|
+
standards.push(MITRE_ATTACK['T1496']);
|
|
350
|
+
break;
|
|
351
|
+
|
|
352
|
+
case ThreatType.KEYLOGGER:
|
|
353
|
+
standards.push(CWE_DATABASE['CWE-506']);
|
|
354
|
+
standards.push(MITRE_ATTACK['T1056']);
|
|
355
|
+
break;
|
|
356
|
+
|
|
357
|
+
case ThreatType.DATA_EXFILTRATION:
|
|
358
|
+
standards.push(CWE_DATABASE['CWE-200']);
|
|
359
|
+
standards.push(MITRE_ATTACK['T1041']);
|
|
360
|
+
break;
|
|
361
|
+
|
|
362
|
+
case ThreatType.INFORMATION_DISCLOSURE:
|
|
363
|
+
standards.push(OWASP_TOP_10['A01:2021']);
|
|
364
|
+
standards.push(CWE_DATABASE['CWE-200']);
|
|
365
|
+
break;
|
|
366
|
+
|
|
367
|
+
default:
|
|
368
|
+
standards.push(OWASP_TOP_10['A05:2021']);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
return standards.filter(s => s !== undefined);
|
|
372
|
+
}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# PROMPT – Diseño y Mejora del Módulo de Reglas de Vulnerabilidades
|
|
2
|
+
## Secure-Scan – src/rules/vulnerabilities
|
|
3
|
+
|
|
4
|
+
Asume el rol combinado de:
|
|
5
|
+
|
|
6
|
+
- AppSec Engineer
|
|
7
|
+
- Security Architect
|
|
8
|
+
- SAST Engine Designer
|
|
9
|
+
- Auditor de Seguridad
|
|
10
|
+
|
|
11
|
+
con experiencia en herramientas SAST empresariales, OWASP, CWE, MITRE ATT&CK y análisis estático avanzado.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 🎯 Objetivo General
|
|
16
|
+
|
|
17
|
+
Diseñar e implementar el módulo `src/rules/vulnerabilities`, encargado de la **detección avanzada de vulnerabilidades de seguridad** en proyectos de software, sin ejecutar el código.
|
|
18
|
+
|
|
19
|
+
El módulo debe priorizar:
|
|
20
|
+
|
|
21
|
+
- Alta cobertura de reglas
|
|
22
|
+
- Alta precisión (mínimos falsos positivos)
|
|
23
|
+
- Detección temprana
|
|
24
|
+
- Explicaciones claras (auditoría + developer-friendly)
|
|
25
|
+
- Soporte multi-lenguaje
|
|
26
|
+
- Escalabilidad y arquitectura modular
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 🧩 Alcance del Módulo
|
|
31
|
+
|
|
32
|
+
El módulo debe detectar:
|
|
33
|
+
|
|
34
|
+
### 🔹 Vulnerabilidades de código
|
|
35
|
+
- Errores de validación de entrada
|
|
36
|
+
- Flujos peligrosos de datos
|
|
37
|
+
- Uso inseguro de APIs
|
|
38
|
+
|
|
39
|
+
### 🔹 Configuración insegura
|
|
40
|
+
- Archivos YAML / JSON / ENV
|
|
41
|
+
- Configuraciones débiles o peligrosas
|
|
42
|
+
|
|
43
|
+
### 🔹 Infraestructura
|
|
44
|
+
- Dockerfiles
|
|
45
|
+
- CI/CD pipelines
|
|
46
|
+
- Archivos de automatización
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 📚 Estándares Obligatorios
|
|
51
|
+
|
|
52
|
+
Cada regla de vulnerabilidad DEBE mapearse cuando aplique a:
|
|
53
|
+
|
|
54
|
+
- OWASP Top 10
|
|
55
|
+
- CWE
|
|
56
|
+
- SANS Top 25
|
|
57
|
+
- MITRE ATT&CK
|
|
58
|
+
- CVEs reales (si existen)
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 🗂️ Clasificación de Vulnerabilidades
|
|
63
|
+
|
|
64
|
+
Las vulnerabilidades deben organizarse por:
|
|
65
|
+
|
|
66
|
+
- Tipo:
|
|
67
|
+
- Injection
|
|
68
|
+
- XSS
|
|
69
|
+
- Auth / Session
|
|
70
|
+
- Configuración
|
|
71
|
+
- Deserialización
|
|
72
|
+
- Path / File
|
|
73
|
+
- Lenguaje:
|
|
74
|
+
- JavaScript / TypeScript
|
|
75
|
+
- Python
|
|
76
|
+
- PHP
|
|
77
|
+
- Java
|
|
78
|
+
- C / C++
|
|
79
|
+
- C#
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 🧪 Vulnerabilidades a Implementar Inicialmente
|
|
84
|
+
|
|
85
|
+
Crear reglas dedicadas para:
|
|
86
|
+
|
|
87
|
+
- SQL Injection
|
|
88
|
+
- Command Injection
|
|
89
|
+
- XSS (DOM, Reflected, Stored)
|
|
90
|
+
- CSRF
|
|
91
|
+
- SSRF
|
|
92
|
+
- Insecure Deserialization
|
|
93
|
+
- Path Traversal
|
|
94
|
+
- Prototype Pollution
|
|
95
|
+
- Insecure Authentication / Session
|
|
96
|
+
- Hardcoded Secrets
|
|
97
|
+
- Unsafe File Upload
|
|
98
|
+
- Security Misconfigurations
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## 🔍 Nivel de Análisis Técnico
|
|
103
|
+
|
|
104
|
+
El análisis debe ser **híbrido**, combinando:
|
|
105
|
+
|
|
106
|
+
- Regex (fallback)
|
|
107
|
+
- AST
|
|
108
|
+
- CFG / Call Graph
|
|
109
|
+
- Taint Analysis (fuentes → sinks)
|
|
110
|
+
|
|
111
|
+
Ejemplos de flujos reales a detectar:
|
|
112
|
+
- `req.body → exec`
|
|
113
|
+
- `userInput → innerHTML`
|
|
114
|
+
- `env → system()`
|
|
115
|
+
|
|
116
|
+
Se permite introducir **nuevos analizadores** además de reutilizar los existentes.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 🧱 Arquitectura del Módulo (Requisito Crítico)
|
|
121
|
+
|
|
122
|
+
### Principios
|
|
123
|
+
|
|
124
|
+
- Arquitectura modular
|
|
125
|
+
- Separación clara entre:
|
|
126
|
+
- Definición de reglas
|
|
127
|
+
- Lógica de detección
|
|
128
|
+
- Engine de ejecución
|
|
129
|
+
|
|
130
|
+
### Modelo de Regla
|
|
131
|
+
|
|
132
|
+
Cada vulnerabilidad debe tener:
|
|
133
|
+
- Un archivo de **regla**
|
|
134
|
+
- Un archivo de **detector**
|
|
135
|
+
|
|
136
|
+
Las reglas deben poder:
|
|
137
|
+
- Tener múltiples patrones
|
|
138
|
+
- Ajustar severidad según contexto
|
|
139
|
+
- Correlacionarse con reglas de malware
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## 📁 Estructura de Carpetas Esperada
|
|
144
|
+
|
|
145
|
+
Usar estructura **flat** dentro de `/vulnerabilities`, con un punto central:
|
|
146
|
+
|
|
147
|
+
src/rules/vulnerabilities/
|
|
148
|
+
├── index.ts # Registro central de reglas
|
|
149
|
+
├── vulnerabilityRule.ts # Interfaces base
|
|
150
|
+
├── engine.ts # Rule engine reutilizable
|
|
151
|
+
├── sqlInjection.ts
|
|
152
|
+
├── xss.ts
|
|
153
|
+
├── csrf.ts
|
|
154
|
+
├── ssrf.ts
|
|
155
|
+
├── misconfig.ts
|
|
156
|
+
└── tests/
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## ⚖️ Severidad y Scoring
|
|
162
|
+
|
|
163
|
+
La severidad será **mixta**:
|
|
164
|
+
|
|
165
|
+
- Base definida en la regla
|
|
166
|
+
- Ajustada dinámicamente por contexto
|
|
167
|
+
|
|
168
|
+
Implementar `vulnerabilityScore` considerando:
|
|
169
|
+
- Explotabilidad
|
|
170
|
+
- Impacto técnico
|
|
171
|
+
- Impacto al negocio
|
|
172
|
+
- Contexto (prod vs dev)
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## 📊 Hallazgos y Reportes
|
|
177
|
+
|
|
178
|
+
Cada hallazgo DEBE incluir:
|
|
179
|
+
|
|
180
|
+
- Fragmento exacto del código vulnerable
|
|
181
|
+
- Flujo de datos detectado
|
|
182
|
+
- Severidad final
|
|
183
|
+
- Vulnerability score
|
|
184
|
+
- Referencias OWASP / CWE
|
|
185
|
+
- Explicación nivel auditoría
|
|
186
|
+
- Contexto entendible para desarrolladores
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## 🧪 Calidad del Código y Testing
|
|
191
|
+
|
|
192
|
+
El código generado debe:
|
|
193
|
+
|
|
194
|
+
- Seguir principios SOLID
|
|
195
|
+
- Ser extensible y mantenible
|
|
196
|
+
- Permitir testing aislado por regla
|
|
197
|
+
|
|
198
|
+
Tests requeridos:
|
|
199
|
+
- Golden tests con código vulnerable real
|
|
200
|
+
- Casos límite para falsos positivos
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## ⚡ Performance y Seguridad
|
|
205
|
+
|
|
206
|
+
El motor de vulnerabilidades debe incluir:
|
|
207
|
+
|
|
208
|
+
- Timeouts por regla
|
|
209
|
+
- Límite de nodos AST analizados
|
|
210
|
+
- Protección contra ReDoS
|
|
211
|
+
- Ejecución paralela segura
|
|
212
|
+
|
|
213
|
+
No degradar precisión aunque el archivo sea grande o minificado.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## ✅ Resultado Esperado
|
|
218
|
+
|
|
219
|
+
Un módulo de vulnerabilidades:
|
|
220
|
+
|
|
221
|
+
- De nivel enterprise
|
|
222
|
+
- Comparable a SAST comerciales
|
|
223
|
+
- Modular, extensible y auditable
|
|
224
|
+
- Preparado para escalar a SaaS
|
|
225
|
+
|
|
226
|
+
⚠️ El análisis debe ser estrictamente estático. Nunca ejecutar código analizado.
|