Commit 68665a3
feat: add integration tests using AgentClient/AgentServer
Refactored codebase into library + binary structure for testability:
- Extract core WAF logic into src/lib.rs as sentinel_agent_waf crate
- Simplify src/main.rs to CLI handling only
Added 26 integration tests covering:
- SQL injection detection (query strings, UNION SELECT, detect-only mode)
- XSS detection (script tags, event handlers, JavaScript URIs)
- Path traversal (plain and URL-encoded)
- Command injection (backticks, pipes)
- Request/response body inspection
- Path exclusions, scanner detection, paranoia levels
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 4861316 commit 68665a3
5 files changed
Lines changed: 1568 additions & 1018 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| 56 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 54 | + | |
57 | 55 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
63 | 70 | | |
64 | 71 | | |
65 | 72 | | |
| |||
0 commit comments