mirror of
https://github.com/elicpeter/nyx.git
synced 2026-07-21 21:31:03 +02:00
[pitboss] phase 21: Track M.3 — ScheduledJob + GraphQLResolver + WebSocket + Middleware + Migration
This commit is contained in:
parent
00b0fbaea9
commit
f9bd51c024
84 changed files with 5898 additions and 40 deletions
9
tests/dynamic_fixtures/scheduled_job/celery/benign.py
Normal file
9
tests/dynamic_fixtures/scheduled_job/celery/benign.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
"""Phase 21 — Celery scheduled-task benign control."""
|
||||
import os
|
||||
import shlex
|
||||
|
||||
_NYX_ADAPTER_MARKER = "from celery import shared_task"
|
||||
|
||||
|
||||
def tick(payload):
|
||||
os.system("echo " + shlex.quote(str(payload)))
|
||||
15
tests/dynamic_fixtures/scheduled_job/celery/vuln.py
Normal file
15
tests/dynamic_fixtures/scheduled_job/celery/vuln.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
"""Phase 21 (Track M.3) — Celery scheduled-task vuln fixture.
|
||||
|
||||
`tick(payload)` is a Celery task that splices the payload bytes into a
|
||||
shell command via `os.system`. An attacker who can enqueue a task with
|
||||
arbitrary bytes can inject shell metacharacters.
|
||||
"""
|
||||
import os
|
||||
|
||||
_NYX_ADAPTER_MARKER = "from celery import shared_task"
|
||||
_NYX_DECORATOR_MARKER = "@shared_task"
|
||||
|
||||
|
||||
def tick(payload):
|
||||
# SINK: tainted payload concatenated into shell command.
|
||||
os.system("echo " + str(payload))
|
||||
Loading…
Add table
Add a link
Reference in a new issue