refactor(dynamic): add recursive dependency resolution for SSA receivers, expand tests for Python and PHP

This commit is contained in:
elipeter 2026-05-24 17:09:24 -05:00
parent f49211d788
commit baa9a36bc6
13 changed files with 329 additions and 76 deletions

View file

@ -162,6 +162,8 @@ fn class_method_python_dispatch_reads_payload_and_invokes_method() {
assert!(h.source.contains("UserRepository"));
assert!(h.source.contains("find_by_name"));
assert!(h.source.contains("_nyx_build_receiver"));
assert!(h.source.contains("depth=3"));
assert!(h.source.contains("_nyx_resolve_annotation"));
}
#[test]
@ -250,6 +252,17 @@ mod e2e_phase_19 {
cap: Cap::SQL_QUERY,
bins: &["python3"],
},
Case {
lang: Lang::Python,
fixture_dir: "python_recursive_deps",
vuln_file: "vuln.py",
benign_file: "benign.py",
vuln_class: "UserController",
benign_class: "UserController",
method: "run",
cap: Cap::CODE_EXEC,
bins: &["python3"],
},
Case {
lang: Lang::Ruby,
fixture_dir: "ruby",
@ -294,6 +307,17 @@ mod e2e_phase_19 {
cap: Cap::CODE_EXEC,
bins: &["php"],
},
Case {
lang: Lang::Php,
fixture_dir: "php_recursive_deps",
vuln_file: "vuln.php",
benign_file: "benign.php",
vuln_class: "UserController",
benign_class: "UserController",
method: "run",
cap: Cap::CODE_EXEC,
bins: &["php"],
},
Case {
lang: Lang::Java,
fixture_dir: "java",