mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-30 20:39:39 +02:00
[pitboss] phase 01: Track A.1 — Spec derivation strategy enum + flow-steps-optional fallback
This commit is contained in:
parent
5909fa8c5d
commit
31d9ef725a
21 changed files with 1106 additions and 62 deletions
|
|
@ -0,0 +1,9 @@
|
|||
# Fixture: spec derived via FromCallgraphEntry (rule id matches `*.http.*`,
|
||||
# entry point classified as HttpRoute).
|
||||
from flask import Flask, request
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route("/echo")
|
||||
def echo():
|
||||
return request.args.get("q", "")
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Fixture: spec derived via FromFlowSteps (taint flow with explicit source/sink).
|
||||
import os
|
||||
|
||||
def handle_request(payload):
|
||||
cmd = payload
|
||||
os.system(cmd)
|
||||
11
tests/dynamic_fixtures/spec_strategies/func_summary_walk.rs
Normal file
11
tests/dynamic_fixtures/spec_strategies/func_summary_walk.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// Fixture: spec derived via FromFuncSummaryWalk (FuncSummary records
|
||||
// `tainted_sink_params` for a param that flows to a sink, without an
|
||||
// in-evidence flow_steps trace).
|
||||
|
||||
fn read_path(_root: &str, name: &str) -> std::io::Result<Vec<u8>> {
|
||||
std::fs::read(name)
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let _ = read_path("/", "/etc/passwd");
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Fixture: spec derived via FromRuleNamespace (AST pattern `py.cmdi.os_system`
|
||||
# without a taint flow).
|
||||
import os
|
||||
|
||||
def run_user_command(user_arg):
|
||||
os.system(user_arg)
|
||||
Loading…
Add table
Add a link
Reference in a new issue