Dockerfile
- Replaces hard-coded uvicorn CMD with /bin/sh /app/start.sh
- Sets ownership correctly before switching to non-root user
start.sh (new)
- Reads BACKEND_URL env var → writes it into dashboard/js/config.js
- Reads SERVE_DASHBOARD_ONLY env var:
0 / unset → full stack via dashboard_server.py (Trainer Space)
1 → static-only via serve_demo.py (Demo Space)
serve_demo.py (new)
- Minimal FastAPI + StaticFiles server for the Demo space
- Serves dashboard/ on port 7860 with CORS enabled
dashboard/js/config.js (new)
- Sets window.CYBERSOC_BACKEND_URL = '' by default
- Overwritten at container startup by start.sh when BACKEND_URL is set
dashboard/js/api.js
- Reads window.CYBERSOC_BACKEND_URL set by config.js
- _wsUrl() and _httpBase() use the override URL when set,
fall back to same-origin auto-detection when empty
dashboard/index.html
- Loads js/config.js before api.js so the override is available
HF Space setup:
CyberSOC-trainer → no extra env vars …
Add self-contained GRPO training notebook for HF Jupyter
Ajayyy00+1: Claude Sonnet 4.6
1080341
Notebook covers all 11 cells:
1. Install all deps (unsloth + TRL 0.12-0.14 + openenv-core)
2. Clone/locate repo and add to sys.path
3. Auto-selects model by GPU VRAM (3B/7B/14B)
4. Start env server on port 8001 (avoids HF Space conflicts)
5. Smoke-test all three task difficulties
6. Load model with Unsloth 4-bit + LoRA
7. Build dataset from env resets with chat-template prompts
8. Self-contained reward functions (10 dims + weighted composite)
with JSON extraction, task-aware episode replay, and sanity check
9. GRPOConfig + GRPOTrainer with dual API fallback
(processing_class for TRL 0.15+, tokenizer for TRL 0.12)
10. Save LoRA adapters / optional merged 16-bit; push to Hub
11. Server shutdown + GPU cache clear
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Update README/Space card for hotseat multiplayer and 4 architectural upgrades
Ajayyy00+1: Claude Sonnet 4.6
4217376
- Adds prominent callout boxes for hotseat Red Team mode and the 4 backend fixes
- Documents new behavioral mechanism #7 (Stall Punishment + autonomous pivot)
- Extends Innovations table with Hotseat Multiplayer, Stall Punishment,
Emergency Gate, External Intel Feed, and Doomsday Clock entries
- Panel 6 description now mentions the Red Team Toolkit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add hotseat multiplayer Red Team controls and 4 architectural fixes
Ajayyy00+1: Claude Sonnet 4.6
a144947
Frontend (hotseat mode):
- FSP mode: dashboard_server now creates CyberSOCEnvironment(fsp_mode=True) so
the backend pauses after every Blue step waiting for a manual Red action
- Red Team Toolkit panel: action dropdown (lateral_pivot, deploy_payload,
evade_detection, pass_turn) with context-sensitive input fields and Execute button
- RedTeamController class wires the toolkit to API.step() and resumes Blue
auto-play after each Red action completes
- Turn indicator in header: shows BLUE/RED TEAM TURN badge, disables the
opposite team's controls, and halts Blue auto-scheduling on Red's turn
Backend grader & environment fixes:
- Lazy Adversary: _deterministic_red_policy rewritten with 3-priority logic
(stall punishment > reactive pivot > 15% autonomous pivot); else-branch now
dispatches deploy_payload in addition to lateral_pivot
- Rigid Bureaucracy: ActionMiddleware allows isolate_segment in triage phase
only when a critical alert justifies it; new UNJUSTIFIED_EMERGENCY err…
Gracefully handle invalid LLM actions with -0.2 penalty instead of 500 crash
Ajayyy00
f7f5220
Fix attack_chain KeyError and other validation errors
Ajayyy00
533611a
Initialize _step_reward_total in __init__ to fix AttributeError
Ajayyy00
583fea5
Restore internal dashboard integration
Ajayyy00
1de5011
Add root health check route to fix HF 404
Ajayyy00
14a2669
Add FSP multi-agent architecture: Red Team LLM action space + alternating turns
Ajayyy00+1: Claude Sonnet 4.6
5719ec3
Step 1 — models.py
• New Red action classes: LateralPivot, DeployPayload, EvadeDetection, PassTurn
• RedActionWrapper (mirrors SOCActionWrapper for WS/HTTP routing)
• RED_ACTION_TYPES frozenset for payload routing
• SOCObservation: active_turn + red_observation fields
• SOCState: active_turn field
Step 2 — play_environment.py
• fsp_mode=False constructor flag; True enables strict Blue/Red alternation
• step() dispatches to _step_blue() or _step_red() based on action type
• _step_blue(): executes Blue action; in fsp_mode auto-flips to red without
incrementing step_count; in legacy mode auto-PassTurns + increments (backward compat)
• _step_red(): executes Red action, increments step_count, flips to blue
• Red handlers: _handle_lateral_pivot, _handle_deploy_payload,
_handle_evade_detection, _handle_pass_turn
• _generate_red_observation(): compromised_hosts + blue_actions_detected
• Removed deterministic _execute_lateral_pivot and _maybe_reinfect;
_adve…
Replace the blunt >20% flat penalty with a per-host check: any host
isolated that is not in the attack chain's compromised_hosts (or currently
marked compromised in the graph) incurs a -0.20 penalty per wrong
isolation, capped at -0.80. Also restores triggered_playbooks extraction
and step_efficiency playbook-bonus logic that was lost in a prior edit.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add alternating self-play training scaffolding.
Ajayyy00
292f6a5
Wire configurable frozen-opponent server startup and add training utilities for archive, eval harness, data collection, and freeze-alternate orchestration.
Made-with: Cursor
Replace SOAR playbooks with agentic micro-tools.
Ajayyy00
7211e63
Introduce terminate_pid, create_firewall_rule, and quarantine_file actions while removing playbook-based remediation and updating validation and grading to reward efficient containment sequencing.
Made-with: Cursor
Add GRPO training pipeline + remove shield emoji
Ajayyy00+1: Claude Sonnet 4.6
4ed0f64
- training/config.py: TrainingConfig dataclass with all hyperparams
- training/train_grpo.py: Full Unsloth+GRPO training script for HF compute
- EnvServer: starts/monitors FastAPI env as subprocess
- Prompt formatting: observation → chat-template LLM prompt
- Dataset builder: calls /reset per task, builds HF Dataset
- 11 reward fns: 10 per-dimension + 1 weighted composite
- Task-aware: uses task_id from dataset kwargs per completion
- JSON extraction: strips markdown fences from model output
- requirements-training.txt: pinned deps for HF A10G/A100
- dashboard/index.html: remove shield emoji from header + overlay
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix radar chart size: switch scores panel to row layout
Ajayyy00+1: Claude Sonnet 4.6
7c343f6
Radar was tiny because stacking vertically constrained its height.
Side-by-side layout gives radar the full panel height as its square dimension.
Point and tick label fonts bumped for legibility at larger size.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>