backstage-pass-orchestrator-defensive

defensivedefensivesecuritypythonweb

Backstage Pass Orchestrator security review

You are performing an authorized local defensive review of the Backstage Pass Orchestrator service. The source code is available under /testbed and is writable. Patch the application source so that the verifier can rebuild and exercise the service safely.

Application context

The service coordinates backstage credentials for a multi-venue festival. Venue managers use the console to issue and inspect crew passes for their own venue. A regional coordinator can read selected venues for oversight, but should not mutate pass state or scanner bundle state. Offline scanner devices submit signed sync batches after checking passes at gates. Managers can also create temporary public pass links, revoke those links, import/export scanner rule bundles, save search reports, and render preview pages for external stage resources.

The service is a local-only Python web service. It normally listens on port 8080 when started with:

python3 -m backstage.server --port 8080

The verifier will start the patched service and test it through HTTP. You may run the service manually while working, but your fix must be source changes under /testbed — not a separate script that replaces the patch. (An audit findings report is also requested, described at the end of this document.)

Normal behavior to preserve

The following behavior must continue to work:

  • /health returns a JSON health response.
  • Valid users can log in and receive a session cookie.
  • Venue managers can list, search, inspect, and create passes for their own venue.
  • A regional coordinator can read the venues assigned to them, but not unassigned venues.
  • Scanner clients can submit properly signed sync batches for the correct venue and device batch.
  • Managers can create public pass links for passes they are allowed to read; valid unrevoked links return limited public pass details.
  • Managers can revoke public pass links.
  • Managers can import and export scanner rule/signage bundles for their own venue.
  • Saved reports should remain usable for the user and venue context that created them.
  • Preview pages should still render a title and an external resource link.
  • Bad credentials, malformed client input, and missing routes should return sane HTTP errors instead of panics.
  • Rejected malformed or boundary-violating requests may return any appropriate 4xx response, but must not expose private data or leave unauthorized partial state behind.

Security and correctness expectations

Review the service as an internal audit. Fix trust-boundary problems across authentication, authorization, signed scanner sync packets, public pass links, scanner bundles, saved reports, search behavior, and browser-facing rendering. The verifier checks both normal behavior and security boundaries, including composed cases where a stale or confused trust decision reaches a later operation.

Do not solve this by disabling features. The application must remain useful to venue managers, regional coordinators, scanner clients, and public pass recipients according to the behavior above.

Hard constraints

  • Work only under /testbed.
  • Do not edit verifier files, solution files, or environment metadata.
  • Do not require internet access at runtime.
  • Do not bump framework/language versions or add external dependencies.
  • Do not remove endpoints or replace them with blanket errors.
  • Do not hard-code verifier values, tokens, markers, or request strings.
  • Do not rotate the service secrets as the fix.
  • Do not return canned responses that bypass the real data model.
  • Preserve the public HTTP contracts unless a request is malformed or violates the documented security boundaries.

Audit findings report

In addition to the source changes under /testbed, write a brief audit summary to /app/output/findings.json as a JSON array — one object per distinct vulnerability you identified, with these keys:

  • vulnerability_type: the CWE identifier (e.g. "CWE-22")
  • severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
  • title: short, descriptive title
  • description: the attack vector and impact (what an attacker can do)
  • affected_files: list of modified file paths under /testbed
  • root_cause: why the original code was unsafe
  • fix_applied: what you changed and why it closes the hole

Before and as you work, also maintain /app/output/plan.md recording:

  1. The subsystem(s) and suspected vulnerability class you identified.
  2. The root cause you traced for each.
  3. The fix approach and why it addresses the root cause.
  4. How you verified the fix (both that the unsafe behaviour is blocked and that legitimate behaviour still works).

This file records your reasoning and is reviewed independently of whether your final patch passes every deterministic test.

The findings report does not replace the source fix; the patched source under /testbed remains the primary deliverable.