mirror of
https://github.com/imjasonh/rustvulncheck
synced 2026-07-18 14:57:39 +00:00
Add syn-based type tracking and golden codebase integration tests
Type tracking (type_tracker.rs): - Uses syn AST parsing to resolve variable types from function parameters, let bindings with annotations, constructor calls (Type::new()), struct literals, builder patterns, and closure parameters - Integrated into scanner to promote method-call matches from Medium to High confidence when the receiver's type is known Golden integration tests: - vulnerable_project: 4 vulnerable deps, 3 with reachable calls across multiple files (qualified calls, typed method calls, constructor-inferred types). Verifies regex dep is listed but Compiler::compile is NOT reachable. - safe_project: patched deps (hyper, smallvec) excluded, vulnerable deps (tokio, regex) listed but no symbols reachable. Reports POSSIBLY SAFE. - clean_project: no vulnerable deps at all. Reports CLEAN. 37 tests total (33 unit + 4 integration), all passing. https://claude.ai/code/session_011sdj18ZvQYbDVwEKqrWDj1
This commit is contained in:
parent
b148c8d4b8
commit
a2db0d4d15
14 changed files with 1013 additions and 83 deletions
|
|
@ -14,6 +14,7 @@ git2 = "0.19"
|
|||
walkdir = "2"
|
||||
anyhow = "1"
|
||||
semver = "1"
|
||||
syn = { version = "2", features = ["full", "visit"] }
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue