[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,10 @@
//! Phase 21 — Juniper resolver benign control.
// use juniper::graphql_object;
pub fn resolve_user(id: &str) -> String {
let safe: String = id
.chars()
.filter(|c| c.is_ascii_alphanumeric() || *c == '_' || *c == '-')
.collect();
format!("user-{}", safe)
}

View file

@ -0,0 +1,15 @@
//! Phase 21 (Track M.3) — Juniper GraphQL resolver vuln fixture.
//!
//! `resolve_user(id)` is a Juniper resolver (substring marker only —
//! the real `juniper` crate is not on the workdir's Cargo.toml). The
//! resolver builds a SQL query via raw string concat — classic
//! GraphQL → SQLi shape.
// use juniper::graphql_object;
pub fn resolve_user(id: &str) -> String {
// SINK: tainted id concatenated into SQL.
let query = format!("SELECT * FROM users WHERE id = '{}'", id);
let _ = query;
format!("user-{}", id)
}