Spaces:
Sleeping
Sleeping
|
Download README.md from dakshdoesdev/websec-repair-env: direct link, hf CLI and curl.
- Browser
- Download file 1.96 kB
-
https://huggingface.co/spaces/dakshdoesdev/websec-repair-env/resolve/main/README.md
- Command line
-
hf download hf://spaces/dakshdoesdev/websec-repair-env/README.md
-
curl -L -o README.md https://huggingface.co/spaces/dakshdoesdev/websec-repair-env/resolve/main/README.md
1.96 kB
metadata
title: WebSec Repair Env
emoji: 🛡️
colorFrom: red
colorTo: gray
sdk: docker
pinned: false
app_port: 8000
base_path: /web
tags:
- openenv
- security
- web
- training
WebSec Repair Env
websec_repair_env is a lean OpenEnv environment for AI vulnerability review and remediation.
Each episode presents one deterministic vulnerability scenario and asks the agent to:
- inspect the task
- classify the vulnerability
- apply one discrete patch template
- verify exploit blocking and functionality preservation
- submit
The environment ships with exactly three tasks:
sqli_loginxss_commentsbroken_auth_admin
Actions
inspectclassifyapply_patchverifysubmit
Reward
The score is absolute in [0.0, 1.0]:
0.25correct classification0.35correct patch0.20exploit blocked0.15functionality preserved0.05successful submit
step() returns reward as score delta from the previous state.
Extra Routes
GET /tasksGET /graderGET /baseline
/grader accepts optional task_id.
/baseline accepts optional task_id and returns a filtered catalog.
Local Usage
Install and lock dependencies:
uv sync
Run the server:
uv run server
Run the baseline agent against a running server:
uv run python inference.py --task sqli_login
Run tests:
uv run pytest
Validate structure:
/home/dux/.openclaw/workspace/OpenEnv/venv/bin/openenv validate . --verbose
Validate a running server:
/home/dux/.openclaw/workspace/OpenEnv/venv/bin/openenv validate --url http://127.0.0.1:8000
Docker
Build:
docker build -t websec-repair-env:latest -f server/Dockerfile .
Run:
docker run --rm -p 8000:8000 websec-repair-env:latest
Hugging Face Spaces
From this environment directory:
/home/dux/.openclaw/workspace/OpenEnv/venv/bin/openenv push