[pitboss] phase 21: Track M.3 — ScheduledJob + GraphQLResolver + WebSocket + Middleware + Migration

This commit is contained in:
pitboss 2026-05-20 18:05:31 -05:00
parent 00b0fbaea9
commit f9bd51c024
84 changed files with 5898 additions and 40 deletions

View file

@ -0,0 +1,11 @@
"""Phase 21 — Django migration benign control."""
_NYX_ADAPTER_MARKER = "from django.db import migrations"
def upgrade(table_name="users"):
safe = "".join(c for c in str(table_name) if c.isalnum() or c == "_")
return "CREATE INDEX idx_" + safe + " ON users(name)"
class Migration:
operations = []

View file

@ -0,0 +1,23 @@
"""Phase 21 (Track M.3) — Django migration vuln fixture.
The migration declares `operations = [...]` with a
`migrations.RunSQL` op whose statement is built from an external
table name via raw string concatenation.
"""
_NYX_ADAPTER_MARKER = "from django.db import migrations"
class _RunSQL:
def __init__(self, sql):
self.sql = sql
def upgrade(table_name="users"):
# SINK: tainted table name spliced into raw DDL.
sql = "CREATE INDEX idx_" + str(table_name) + " ON users(name)"
op = _RunSQL(sql)
return op
class Migration:
operations = []