Skip to content

v3.18.0 - Semantic Code Analysis Layer

Choose a tag to compare

@sinewaveai sinewaveai released this 06 Mar 16:06

🎯 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