Spaces:
Sleeping
Sleeping
feat: implement core RL training infrastructure, including GRPO training, evaluation utilities, custom environments, and Modal-based execution scripts.
3807ea3 Download safety.py from Humanlearning/Cyber_analyst-round1: direct link, hf CLI and curl.
- Browser
- Download file 420 Bytes
-
https://huggingface.co/spaces/Humanlearning/Cyber_analyst-round1/resolve/main/safety.py
- Command line
-
hf download hf://spaces/Humanlearning/Cyber_analyst-round1/safety.py
-
curl -L -o safety.py https://huggingface.co/spaces/Humanlearning/Cyber_analyst-round1/resolve/main/safety.py
420 Bytes
| """Safety boundaries for local-only defensive AppSec episodes.""" | |
| from __future__ import annotations | |
| FORBIDDEN_BEHAVIOR = ( | |
| "external network access", | |
| "host filesystem reads", | |
| "hidden test access", | |
| "oracle access", | |
| "credential extraction", | |
| "persistence or evasion", | |
| ) | |
| def is_local_route(path: str) -> bool: | |
| return path.startswith("/") and not path.startswith("//") and "://" not in path | |