v3.18.0 - Semantic Code Analysis Layer
π― Semantic Code Analysis Layer
This release introduces a groundbreaking Semantic Code Analysis Layer that detects logic-level vulnerabilities beyond what traditional AST/regex scanners can find.
β¨ What's New
Semantic Analysis Engine
- Control Flow Graph (CFG) - Tracks execution paths, detects unreachable code
- Data Flow Graph (DFG) - Follows data dependencies and taint propagation
- Code Property Graph (CPG) - Combines CFG + DFG + AST for deep semantic understanding
- 52 New Rules - Logic-level vulnerability detection:
- Missing authentication/authorization checks
- Race conditions and TOCTOU vulnerabilities
- Use-after-free patterns
- Logic contradictions
- Unreachable security checks
- Improper error handling
Impact
π― 15-20% more vulnerabilities caught compared to pure AST/regex approaches
π Zero ML/LLM dependencies - pure graph-based analysis
β‘ Fast performance - integrated with existing daemon architecture
π Technical Details
New Files:
- `src/semantic-analyzer.js` (1,284 lines) - Core semantic analysis engine
- `src/semantic-integration.js` (283 lines) - Integration with scan pipeline
- `rules/semantic-security.yaml` (52 rules) - Semantic vulnerability patterns
- `tests/semantic-analysis.test.js` - Complete test coverage
Architecture:
```
AST Parser β CFG Builder β DFG Builder β CPG Analyzer β Pattern Matcher β Findings
```
π Bug Fixes
- Path Validation: Improved error handling in scan-skill tool:
- ENOENT errors now return "Path not found"
- ELOOP errors return "Symlink loop detected"
- EACCES errors return "Permission denied"
π Documentation Improvements
- Reorganized documentation structure (moved docs to `docs/` folder)
- Removed 9 obsolete planning documents
- Added comprehensive semantic analysis guide
- Cleaned up unused logo files
π§ͺ Testing
- 32 test files (up from 28)
- 420+ tests passing
- Complete semantic analysis test coverage
π¦ Installation
```bash
npm install agent-security-scanner-mcp@3.18.0
```
Or update your MCP config:
```json
{
"mcpServers": {
"security-scanner": {
"command": "npx",
"args": ["agent-security-scanner-mcp@3.18.0"]
}
}
}
```
π Links
π Contributors
Built with π§ by @sinewaveai
Full Changelog: v3.17.2...v3.18.0