mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-15 20:05:13 +02:00
Dynamic (#77)
This commit is contained in:
parent
55247b7fcd
commit
991c84a1eb
1464 changed files with 225448 additions and 1985 deletions
|
|
@ -0,0 +1,26 @@
|
|||
"""End-to-end chain composer fixture.
|
||||
|
||||
A single-file Flask app where an unauthenticated POST handler reads
|
||||
`cmd` straight off the request body and passes it to `eval()`. The
|
||||
ingredients line up for the chain composer:
|
||||
|
||||
- SurfaceMap gains one `EntryPoint` (Flask `/run` POST, `auth_required: false`).
|
||||
- SurfaceMap gains one `DangerousLocal` (the route function itself
|
||||
consumes `Cap::CODE_EXEC` via the `eval` call site).
|
||||
- A `taint-unsanitised-flow` finding ties `flask.request.json` to `eval`.
|
||||
|
||||
`nyx scan --format json` against this directory should emit at least one
|
||||
entry in the top-level `chains` array. The chain's `implied_impact` is
|
||||
`rce` (CODE_EXEC lattice fall-through) and its `severity` reaches
|
||||
`critical` via the score path.
|
||||
"""
|
||||
|
||||
import flask
|
||||
|
||||
app = flask.Flask(__name__)
|
||||
|
||||
|
||||
@app.route("/run", methods=["POST"])
|
||||
def run():
|
||||
cmd = flask.request.json.get("cmd")
|
||||
return {"out": eval(cmd)}
|
||||
Loading…
Add table
Add a link
Reference in a new issue