ferret-scan 1.0.8 → 2.0.0

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.
Files changed (88) hide show
  1. package/CHANGELOG.md +139 -39
  2. package/README.md +612 -35
  3. package/bin/ferret.js +641 -10
  4. package/dist/ai-rules/RuleGenerator.d.ts +26 -0
  5. package/dist/ai-rules/RuleGenerator.js +101 -0
  6. package/dist/analyzers/AstAnalyzer.js +46 -7
  7. package/dist/analyzers/CorrelationAnalyzer.js +55 -3
  8. package/dist/compliance/ComplianceMapper.d.ts +37 -0
  9. package/dist/compliance/ComplianceMapper.js +171 -0
  10. package/dist/features/capabilityMapping.d.ts +72 -0
  11. package/dist/features/capabilityMapping.js +506 -0
  12. package/dist/features/customRules.d.ts +196 -0
  13. package/dist/features/customRules.js +501 -0
  14. package/dist/features/dependencyRisk.d.ts +94 -0
  15. package/dist/features/dependencyRisk.js +387 -0
  16. package/dist/features/entropyAnalysis.d.ts +54 -0
  17. package/dist/features/entropyAnalysis.js +283 -0
  18. package/dist/features/exitCodes.d.ts +102 -0
  19. package/dist/features/exitCodes.js +175 -0
  20. package/dist/features/gitHooks.d.ts +55 -0
  21. package/dist/features/gitHooks.js +260 -0
  22. package/dist/features/ignoreComments.d.ts +83 -0
  23. package/dist/features/ignoreComments.js +301 -0
  24. package/dist/features/interactiveTui.d.ts +44 -0
  25. package/dist/features/interactiveTui.js +436 -0
  26. package/dist/features/llmAnalysis.d.ts +34 -0
  27. package/dist/features/llmAnalysis.js +680 -0
  28. package/dist/features/mcpValidator.d.ts +60 -0
  29. package/dist/features/mcpValidator.js +400 -0
  30. package/dist/features/policyEnforcement.d.ts +330 -0
  31. package/dist/features/policyEnforcement.js +486 -0
  32. package/dist/features/scanDiff.d.ts +65 -0
  33. package/dist/features/scanDiff.js +258 -0
  34. package/dist/features/webhooks.d.ts +42 -0
  35. package/dist/features/webhooks.js +280 -0
  36. package/dist/index.d.ts +1 -0
  37. package/dist/index.js +1 -0
  38. package/dist/intelligence/ThreatFeed.d.ts +1 -1
  39. package/dist/intelligence/ThreatFeed.js +9 -2
  40. package/dist/marketplace/MarketplaceScanner.d.ts +50 -0
  41. package/dist/marketplace/MarketplaceScanner.js +248 -0
  42. package/dist/mitre/atlas.d.ts +28 -0
  43. package/dist/mitre/atlas.js +341 -0
  44. package/dist/mitre/atlasCatalog.d.ts +17 -0
  45. package/dist/mitre/atlasCatalog.js +140 -0
  46. package/dist/monitoring/AgentMonitor.d.ts +76 -0
  47. package/dist/monitoring/AgentMonitor.js +173 -0
  48. package/dist/remediation/Fixer.d.ts +4 -0
  49. package/dist/remediation/Fixer.js +39 -4
  50. package/dist/remediation/Quarantine.d.ts +1 -1
  51. package/dist/remediation/Quarantine.js +11 -1
  52. package/dist/reporters/AtlasNavigatorReporter.d.ts +38 -0
  53. package/dist/reporters/AtlasNavigatorReporter.js +74 -0
  54. package/dist/reporters/ConsoleReporter.js +2 -1
  55. package/dist/reporters/CsvReporter.d.ts +10 -0
  56. package/dist/reporters/CsvReporter.js +49 -0
  57. package/dist/reporters/HtmlReporter.js +6 -4
  58. package/dist/reporters/SarifReporter.d.ts +2 -0
  59. package/dist/reporters/SarifReporter.js +45 -3
  60. package/dist/rules/ai-specific.js +23 -0
  61. package/dist/rules/backdoors.js +4 -1
  62. package/dist/rules/correlationRules.js +2 -2
  63. package/dist/rules/credentials.js +11 -14
  64. package/dist/rules/exfiltration.js +0 -1
  65. package/dist/rules/injection.js +2 -2
  66. package/dist/rules/obfuscation.js +3 -2
  67. package/dist/rules/semanticRules.js +18 -3
  68. package/dist/rules/supply-chain.js +6 -3
  69. package/dist/sandbox/SandboxValidator.d.ts +58 -0
  70. package/dist/sandbox/SandboxValidator.js +125 -0
  71. package/dist/scanner/FileDiscovery.d.ts +2 -0
  72. package/dist/scanner/FileDiscovery.js +171 -3
  73. package/dist/scanner/PatternMatcher.js +15 -3
  74. package/dist/scanner/Scanner.js +330 -12
  75. package/dist/scanner/WatchMode.js +0 -2
  76. package/dist/types.d.ts +119 -16
  77. package/dist/types.js +46 -2
  78. package/dist/utils/baseline.d.ts +2 -1
  79. package/dist/utils/baseline.js +18 -12
  80. package/dist/utils/config.js +207 -14
  81. package/dist/utils/ignore.js +2 -3
  82. package/dist/utils/pathSecurity.d.ts +30 -0
  83. package/dist/utils/pathSecurity.js +59 -0
  84. package/dist/utils/redaction.d.ts +18 -0
  85. package/dist/utils/redaction.js +99 -0
  86. package/dist/utils/schemas.d.ts +2111 -0
  87. package/dist/utils/schemas.js +250 -0
  88. package/package.json +11 -10
package/CHANGELOG.md CHANGED
@@ -5,50 +5,117 @@ All notable changes to ferret-scan will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [1.0.0] - 2026-01-31
8
+ ## [Unreleased]
9
+
10
+ ### Planned Features
11
+ - Complete LSP server implementation
12
+ - Complete IntelliJ plugin implementation
13
+ - Community rule sharing backend
14
+ - Real-time monitoring dashboard
15
+ - CI/CD plugins for Jenkins, Azure DevOps
16
+ - REST API for third-party integrations
17
+ - SIEM/SOAR integrations
18
+
19
+ ## [2.0.0] - 2026-02-15
9
20
 
10
21
  ### Added
11
- - Initial release of Ferret Security Scanner
12
- - Core security scanning engine with 65+ rules across 9 threat categories
13
- - Support for Claude Code configuration files (.claude/, CLAUDE.md, skills/, hooks/)
14
- - AI-specific threat detection (prompt injection, jailbreaks, social engineering)
15
- - Multiple output formats (Console, JSON, SARIF, HTML)
16
- - Watch mode for real-time monitoring
17
- - Baseline management for accepted findings
18
- - Enhanced CLI with comprehensive commands
19
- - Semantic analysis engine with TypeScript AST parsing
20
- - Cross-file correlation analysis for multi-file attack patterns
21
- - Threat intelligence integration with IoC matching
22
- - Auto-remediation engine with safe fixes and quarantine system
23
- - GitHub Actions workflow for CI/CD integration
24
- - Docker containerization with security hardening
25
- - Comprehensive test suite with 99.2% false positive reduction
22
+ - **IDE Integrations**
23
+ - VS Code extension with real-time security scanning
24
+ - Inline diagnostics with severity-based warnings
25
+ - Quick fix code actions for common issues
26
+ - Security findings tree view in sidebar
27
+ - LSP server infrastructure for universal IDE support
28
+ - IntelliJ plugin infrastructure
29
+
30
+ - **Advanced Behavior Analysis**
31
+ - Runtime agent execution monitoring
32
+ - Anomaly detection based on behavioral baselines
33
+ - Resource usage tracking (CPU, memory, disk)
34
+ - Network activity monitoring
35
+ - Sensitive file access detection
36
+ - Event-based real-time alerting system
37
+
38
+ - **Marketplace Security**
39
+ - Claude Skills marketplace scanner
40
+ - Cursor extensions security analysis
41
+ - Plugin permission risk detection
42
+ - Dangerous capability combination analysis
43
+ - Automated risk scoring and recommendations
44
+ - Source code scanning integration
45
+
46
+ - **AI-Powered Features**
47
+ - LLM-based rule generation from threat intelligence
48
+ - Automated rule validation and testing
49
+ - Community rule sharing infrastructure
50
+ - Confidence scoring for generated rules
51
+ - MITRE ATLAS technique mapping
52
+
53
+ - **Sandboxing Integration**
54
+ - Pre-execution security validation
55
+ - Runtime constraint enforcement
56
+ - Policy violation detection
57
+ - Dangerous command pattern blocking
58
+ - Resource limit generation
59
+ - Network and file system access controls
60
+
61
+ - **Compliance Frameworks**
62
+ - SOC2 compliance assessment and reporting
63
+ - ISO 27001 control mapping
64
+ - GDPR privacy impact assessment
65
+ - Automated evidence collection
66
+ - Compliance scoring system
67
+ - Remediation recommendations
68
+
69
+ ### Changed
70
+ - Version bumped from 1.0.10 to 2.0.0
71
+ - Package description updated to reflect platform capabilities
72
+ - README enhanced with v2.0 features and IDE integration docs
73
+ - Repository structure reorganized for better maintainability
74
+ - Documentation moved to docs/ folder
26
75
 
27
- ### Security
28
- - Non-root container execution
29
- - Read-only filesystem in production containers
30
- - Dropped Linux capabilities for minimal attack surface
31
- - Secure handling of sensitive pattern matching
32
- - Safe auto-remediation with backup and rollback capabilities
76
+ ### Fixed
77
+ - All TypeScript compilation errors in new modules
78
+ - Unused import and variable warnings
79
+ - Build system optimizations
33
80
 
34
- ### Performance
35
- - Optimized pattern matching with caching
36
- - Resource monitoring and memory limits
37
- - Lazy loading of AI models and threat feeds
38
- - Parallel processing for large codebases
39
- - Efficient file discovery with ignore patterns
81
+ ## [1.0.10] - 2026-02-12
40
82
 
41
- ## [Unreleased]
83
+ ### Changed
84
+ - Release tag update to align with latest main branch
42
85
 
43
- ### Planned Features
44
- - VS Code extension for IDE integration
45
- - CI/CD plugins for Jenkins, GitLab, Azure DevOps
46
- - REST API for third-party integrations
47
- - Machine learning model for advanced anomaly detection
48
- - Compliance framework integration (SOC2, ISO27001)
49
- - Community rule marketplace
50
- - Advanced threat hunting capabilities
51
- - SIEM/SOAR integrations
86
+ ## [1.0.9] - 2026-02-12
87
+
88
+ ### Added
89
+ - Integration scan test over `test/fixtures`
90
+
91
+ ### Fixed
92
+ - Removed unimplemented config/CLI options (AI detection, behavioral analysis, custom rules)
93
+ - SARIF version resolution now works outside npm scripts
94
+ - Docker Compose watch command aligned to `scan --watch`
95
+
96
+ ### Docs
97
+ - Clarified threat intel as local-only and moved future items to Planned
98
+ - Added docs index and removed historical planning/phase docs
99
+ - Aligned deployment docs with supported Compose profiles
100
+
101
+
102
+ ## [1.0.8] - 2026-02-12
103
+
104
+ ### Added
105
+ - CSV output format for scan results
106
+ - TypeScript/JavaScript file discovery for semantic analysis
107
+
108
+ ### Fixed
109
+ - Baseline hashing uses SHA-256 to avoid collisions
110
+ - Baseline stats track actual severity
111
+ - SARIF metadata uses package version and correct repo URL
112
+ - Guard against zero-length regex matches in pattern scanning
113
+ - Config loader no longer accepts unimplemented options
114
+
115
+ ### Docs
116
+ - Consolidated deployment docs under `docs/deployment.md`
117
+ - Removed historical planning and phase documents
118
+ - Updated README/CONTRIBUTING examples and docs links
52
119
 
53
120
  ## [1.0.7] - 2026-02-01
54
121
 
@@ -88,4 +155,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
155
 
89
156
  ### Fixed
90
157
  - Repository URLs corrected from `ferret-security/ferret-scan` to `fubak/ferret-scan`
91
- - Added `typescript` as production dependency (required at runtime for AST analysis)
158
+ - Added `typescript` as production dependency (required at runtime for AST analysis)
159
+
160
+ ## [1.0.0] - 2026-01-31
161
+
162
+ ### Added
163
+ - Initial release of Ferret Security Scanner
164
+ - Core security scanning engine with 65+ rules across 9 threat categories
165
+ - Support for Claude Code configuration files (.claude/, CLAUDE.md, skills/, hooks/)
166
+ - AI-specific threat detection (prompt injection, jailbreaks, social engineering)
167
+ - Multiple output formats (Console, JSON, SARIF, HTML)
168
+ - Watch mode for real-time monitoring
169
+ - Baseline management for accepted findings
170
+ - Enhanced CLI with comprehensive commands
171
+ - Semantic analysis engine with TypeScript AST parsing
172
+ - Cross-file correlation analysis for multi-file attack patterns
173
+ - Threat intelligence integration with IoC matching
174
+ - Auto-remediation engine with safe fixes and quarantine system
175
+ - GitHub Actions workflow for CI/CD integration
176
+ - Docker containerization with security hardening
177
+ - Comprehensive test suite with 99.2% false positive reduction
178
+
179
+ ### Security
180
+ - Non-root container execution
181
+ - Read-only filesystem in production containers
182
+ - Dropped Linux capabilities for minimal attack surface
183
+ - Secure handling of sensitive pattern matching
184
+ - Safe auto-remediation with backup and rollback capabilities
185
+
186
+ ### Performance
187
+ - Optimized pattern matching with caching
188
+ - Resource monitoring and memory limits
189
+ - Lazy loading of AI models and threat feeds
190
+ - Parallel processing for large codebases
191
+ - Efficient file discovery with ignore patterns