Skip to content

Commit db21904

Browse files
Alex HolmbergAlex Holmberg
authored andcommitted
feat: improved framework_detector with further Tanstack Start discovery
We've also improved drastically detection for secrets / variables with regex patterns - this will be improved further along the timeline.
1 parent f4ae9c2 commit db21904

15 files changed

Lines changed: 2205 additions & 2411 deletions

.cursor/rules/encoreagentrules.mdc

Lines changed: 0 additions & 1833 deletions
This file was deleted.

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ walkdir = "2"
2626
tera = "1"
2727
indicatif = "0.17"
2828
regex = "1"
29+
glob = "0.3"
2930
once_cell = "1"
3031
rayon = "1.7"
3132
termcolor = "1"
@@ -53,3 +54,7 @@ panic = "abort"
5354
[[example]]
5455
name = "check_vulnerabilities"
5556
path = "examples/check_vulnerabilities.rs"
57+
58+
[[example]]
59+
name = "security_analysis"
60+
path = "examples/security_analysis.rs"

README.md

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- ✅ Framework and library detection with confidence scoring
2020
- ✅ Comprehensive dependency parsing
2121
- ✅ Security vulnerability checking
22+
-**Multi-layered security analysis**
2223
- ✅ Project context analysis (ports, env vars, build scripts)
2324
- ✅ Project type classification
2425

@@ -70,10 +71,32 @@ sync-ctl analyze --json > analysis.json
7071

7172
```bash
7273
# Run vulnerability scan
73-
sync-ctl vuln-check /path/to/project
74+
sync-ctl vulnerabilities /path/to/project
7475

7576
# Check only high severity and above
76-
sync-ctl vuln-check --severity high
77+
sync-ctl vulnerabilities --severity high
78+
79+
# Export vulnerability report
80+
sync-ctl vulnerabilities --format json --output vuln-report.json
81+
```
82+
83+
### Security Analysis
84+
85+
```bash
86+
# Comprehensive security analysis
87+
sync-ctl security /path/to/project
88+
89+
# Include low severity findings
90+
sync-ctl security --include-low
91+
92+
# Skip specific analysis types
93+
sync-ctl security --no-secrets --no-code-patterns
94+
95+
# Generate security report
96+
sync-ctl security --format json --output security-report.json
97+
98+
# Fail CI/CD pipeline on security findings
99+
sync-ctl security --fail-on-findings
77100
```
78101

79102
## 📖 Usage Examples
@@ -137,6 +160,35 @@ $ sync-ctl analyze ./fastapi-service --json
137160
}
138161
```
139162

163+
### Example: Security Analysis
164+
165+
```bash
166+
$ sync-ctl security ./my-project
167+
168+
🛡️ Security Analysis Results
169+
============================================================
170+
171+
📊 SECURITY SUMMARY
172+
✅ Security Score: 85.0/100
173+
174+
🔍 ANALYSIS SCOPE
175+
✅ Configuration Security (2 files analyzed)
176+
✅ Code Security Patterns (15 files analyzed)
177+
✅ Infrastructure Security (1 files analyzed)
178+
✅ Compliance Check (SOC 2, GDPR ready)
179+
180+
🎯 FINDINGS BY CATEGORY
181+
🔐 Secret Detection: 0 findings
182+
🔒 Code Security: 1 finding
183+
🏗️ Infrastructure: 0 findings
184+
📋 Compliance: 1 finding
185+
186+
💡 RECOMMENDATIONS
187+
• Enable dependency vulnerability scanning in CI/CD
188+
• Consider implementing rate limiting for API endpoints
189+
• Review environment variable security practices
190+
```
191+
140192
## 🛠️ Advanced Configuration
141193

142194
Create a `.syncable.toml` in your project:
@@ -207,6 +259,7 @@ cargo clippy
207259
- [x] Framework Detection
208260
- [x] Dependency Parsing
209261
- [x] Vulnerability Checking
262+
- [x] **Security Analysis**
210263
- [x] Project Context Analysis
211264

212265
### Phase 2: AI Integration 🚧

ROADMAP.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Build an AI-powered CLI that analyzes codebases and generates production-ready I
3131
- [x] Go: 10 frameworks (Gin, Echo, Fiber, etc.)
3232
- [x] Java/Kotlin: 8 frameworks (Spring Boot, Micronaut, etc.)
3333

34-
#### Week 3-4: Dependency/Vulnerbility Analysis & Context Extraction ✅
34+
#### Week 3-4: Dependency/Vulnerability Analysis & Context Extraction ✅
3535
- [x] **Dependency Parser**
3636
- [x] Parse package manifests (package.json, Cargo.toml, requirements.txt, go.mod, pom.xml)
3737
- [x] Extract version constraints and dependency trees
@@ -41,14 +41,26 @@ Build an AI-powered CLI that analyzes codebases and generates production-ready I
4141

4242
- [x] **Vulnerability Checking**
4343
- [x] Integrate with vulnerability databases:
44-
- [x] Rust: rustsec (simplified implementation - use cargo-audit CLI)
44+
- [x] Rust: rustsec (cargo-audit CLI integration)
4545
- [x] JavaScript: npm audit (CLI integration)
4646
- [x] Python: pip-audit (CLI integration)
4747
- [x] Go: govulncheck (CLI integration)
48-
- [x] Java: OWASP dependency check (placeholder for CLI integration)
48+
- [x] Java: OWASP dependency check & grype integration
4949
- [x] Severity classification (Critical, High, Medium, Low)
5050
- [x] Vulnerability report generation
5151
- [x] CLI commands for vulnerability scanning
52+
- [x] Automatic vulnerability checking in dependency analysis
53+
54+
- [x] **Security Analysis**
55+
- [x] Comprehensive security analyzer module
56+
- [x] Multi-layered security assessment:
57+
- [x] Configuration security analysis (secrets, insecure settings)
58+
- [ ] Code security patterns (language/framework-specific issues)
59+
- [ ] Infrastructure security analysis framework
60+
- [ ] Security policy recommendations
61+
- [x] Context-aware secret detection with false positive filtering
62+
- [x] Risk-based severity classification and scoring
63+
- [x] CLI command for security analysis with configurable options
5264

5365
- [x] **Project Context Analyzer**
5466
- [x] Detect entry points and main files
@@ -145,10 +157,13 @@ Build an AI-powered CLI that analyzes codebases and generates production-ready I
145157
- [ ] Scaling recommendations
146158
- [ ] Bottleneck identification
147159
- [ ] Load testing configuration generation
148-
- [ ] **Security Analysis**
149-
- [ ] Vulnerability assessment integration
160+
- [x] **Security Analysis**
161+
- [x] Vulnerability assessment integration
162+
- [x] Multi-layered security analysis (secrets, code patterns, infrastructure)
163+
- [x] Context-aware secret detection with false positive filtering
164+
- [x] Risk-based severity classification and security scoring
165+
- [x] Security policy recommendations and compliance frameworks
150166
- [ ] Security header configuration
151-
- [ ] Secret management recommendations
152167
- [ ] Network security policies
153168

154169
### 🔄 Continuous Improvement

0 commit comments

Comments
 (0)