mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-18 20:15:14 +02:00
[pitboss] phase 03: Track J.1 + Track L.1 — DESERIALIZE corpus + Java/Python/PHP/Ruby adapters
This commit is contained in:
parent
01fcaab310
commit
9dc60b51c0
33 changed files with 1625 additions and 53 deletions
30
src/dynamic/framework/adapters/mod.rs
Normal file
30
src/dynamic/framework/adapters/mod.rs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
//! Concrete [`super::FrameworkAdapter`] implementations.
|
||||
//!
|
||||
//! Phase 03 (Track J.1) lands the first four adapters — one per
|
||||
//! language carrying the new `Cap::DESERIALIZE` corpus. Each adapter
|
||||
//! detects the language's canonical deserialization sink inside a
|
||||
//! function body and stamps a [`super::FrameworkBinding`] with
|
||||
//! [`crate::evidence::EntryKind::Function`]. Track L.1+ will register
|
||||
//! the route / framework adapters; the per-cap sink adapters live here
|
||||
//! so the per-language verticals can ship independently.
|
||||
|
||||
pub mod java_deserialize;
|
||||
pub mod php_unserialize;
|
||||
pub mod python_pickle;
|
||||
pub mod ruby_marshal;
|
||||
|
||||
pub use java_deserialize::JavaDeserializeAdapter;
|
||||
pub use php_unserialize::PhpUnserializeAdapter;
|
||||
pub use python_pickle::PythonPickleAdapter;
|
||||
pub use ruby_marshal::RubyMarshalAdapter;
|
||||
|
||||
/// True when any callee in `summary.callees` matches `predicate`.
|
||||
fn any_callee_matches(
|
||||
summary: &crate::summary::FuncSummary,
|
||||
predicate: impl Fn(&str) -> bool,
|
||||
) -> bool {
|
||||
summary
|
||||
.callees
|
||||
.iter()
|
||||
.any(|c| predicate(c.name.as_str()))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue