dehackangel's picture
Add PatchGuard-Inkling dataset card documenting splits, CWEs, and trajectories
f84786c verified
|
Raw History Blame Contribute Delete
3.27 kB
---
language:
- en
tags:
- halo
- security
- grpo
- code-patching
- white-circle
---
# PatchGuard-Inkling Dataset & Trajectories (`dehackangel/patchguard-inkling-data`)
Training, evaluation, grounding, Offline GRPO preference/reward rollouts, and redacted agent build trajectories for [**PatchGuard-Inkling**](https://huggingface.co/dehackangel/patchguard-inkling-2-mini) (`thinkingmachines/Inkling-2-Mini` post-trained for the White Circle Halo Competition).
- **Team Lead:** `@HackAngeldon` (`@dehackangel`)
- **Model Weights:** https://huggingface.co/dehackangel/patchguard-inkling-2-mini
- **Interactive Writeup & 8-CWE Diff Explorer:** https://patchguard-research-atlas.lovable.app
- **Public Code Repository (`work` branch):** https://github.com/HackAngeldon/halo/tree/work
- **Public X Announcement:** https://x.com/dehackangel/status/2128134874376679787
---
## Repository Contents
| File | Size (bytes) | Description |
|---|---:|---|
| `sft_train.jsonl` | `448,550` | Stage 1 SFT dataset synthesized with `openai/gpt-4.1-mini` (OpenRouter) and grounded against Firecrawl security docs (`184,743` unmasked training tokens). |
| `val.jsonl` | `214,148` | Validation split with strict vocabulary & prompt decontamination against `train`, `test`, and `fresh`. |
| `test.jsonl` | `428,568` | Held-out test evaluation split across 8 Python CWE families. |
| `fresh.jsonl` | `429,241` | Unseen domain evaluation split (`fresh`) testing generalization without prompt/identifier overlap. |
| `firecrawl_grounding.jsonl` | `236,720` | `48` security best-practice grounding documents retrieved via Firecrawl. |
| `rl_prompts.jsonl` | `316,395` | `48` decontaminated `val` RL prompts (`unsafe_deser_eval`: `10`, `ssrf`: `8`, `5` each across the other 6 CWEs; `0` exact or near hits). |
| `offline_grpo_whitecircle.jsonl` | `357,186` | `242` scored candidates (`192` Stage 1 SFT rollouts + `48` Nebius `Qwen/Qwen3-30B-A3B-Instruct-2507` shortcut contrasts + clean anchors) scored jointly by the isolated exploit verifier and 12 live White Circle policies (`75` flagged, `32` test-passing shortcuts caught; clean vs. shortcut reward `1.0000` vs. `0.2487`). |
| `offline_grpo_tests_only.jsonl` | `356,922` | Paired ablation dataset scored without White Circle anti-shortcut rewards (clean vs. shortcut reward `1.0000` vs. `0.4182`). |
| `decontamination_report.json` | `162` | Automated decontamination verification (`0` exact hits, `0` near hits at `max_jaccard_threshold=0.85`). |
| `trajectories.tar.gz` | `380,110` | Secret-redacted agent build trajectory logs for the full end-to-end PatchGuard-Inkling run. |
---
## Covered Vulnerability Families (8 CWEs)
1. `sqli` — SQL injection (parameterized queries)
2. `path_traversal` — Path traversal (canonical `Path.resolve()` containment checks)
3. `cmd_injection` — Command injection (`shell=False` argument lists)
4. `ssrf` — Server-side request forgery (scheme, private-IP/loopback & metadata blocks)
5. `idor_auth` — Broken object-level authorization / ownership checks
6. `unsafe_deser_eval` — Unsafe `pickle` / `yaml.load` / `eval` replacement
7. `xss` — Cross-site scripting (contextual `html.escape`)
8. `crypto_secrets` — Weak hashes / hardcoded secrets / CSPRNG (`secrets`, PBKDF2/HMAC)