|
Download README.md from aisa-group/skill-inject: direct link, hf CLI and curl.
- Browser
- Download file 6.94 kB
-
https://huggingface.co/datasets/aisa-group/skill-inject/resolve/main/README.md
- Command line
-
hf download hf://datasets/aisa-group/skill-inject/README.md
-
curl -L -o README.md https://huggingface.co/datasets/aisa-group/skill-inject/resolve/main/README.md
6.94 kB
| license: mit | |
| language: | |
| - en | |
| pretty_name: Skill-Inject | |
| tags: | |
| - prompt-injection | |
| - agent-security | |
| - llm-agents | |
| - agent-skills | |
| - benchmark | |
| size_categories: | |
| - n<1K | |
| configs: | |
| - config_name: obvious_injections | |
| data_files: obvious_injections.json | |
| default: true | |
| - config_name: contextual_injections | |
| data_files: contextual_injections.json | |
| - config_name: tasks | |
| data_files: tasks.json | |
| - config_name: phish_poison | |
| data_files: camera_ready/obvious_injections_phish_poison.json | |
| - config_name: obvious_to_contextual | |
| data_files: camera_ready/obvious_to_contextual.json | |
| - config_name: relabel | |
| data_files: camera_ready/relabel.json | |
| - config_name: categories | |
| data_files: camera_ready/categories.json | |
| # Skill-Inject | |
| Injection and task definitions for [**Skill-Inject: Measuring Agent Vulnerability to Skill File Attacks**](https://arxiv.org/abs/2602.20156). The benchmark measures how often LLM coding agents (Claude Code, Codex CLI, Gemini CLI) follow malicious instructions placed in [agent skill](https://github.com/anthropics/skills) files. | |
| - Paper: <https://arxiv.org/abs/2602.20156> | |
| - Code, skills, task files and graders: <https://github.com/aisa-group/skill-inject> | |
| - Project page: <https://www.skill-inject.com/> | |
| This repository holds the JSON definitions only. Running the benchmark also needs the skill files, task input files, injected scripts and unit-test graders from the GitHub repository. | |
| ## Benchmark | |
| | Component | Count | | |
| |---|---| | |
| | Obvious injections | 36 | | |
| | Contextual injections | 48 | | |
| | Obvious injection-task pairs | 82 | | |
| | Contextual injection-task pairs | 139 | | |
| | Total injection-task pairs | 221 | | |
| - **Obvious injections** are unambiguously harmful, for example deleting the file system, ransomware-style encryption, downloading and running a remote script, or sending phishing mail to all contacts. An agent should always refuse them. | |
| - **Contextual injections** are dual-use. Whether one is an attack depends on the deployment. Each has a `legitimizing` policy (which authorizes the action) and a `warning` policy (which forbids it). The paper evaluates each under no policy (Normal), Legitimizing and Warning. | |
| ## Files | |
| ### Original benchmark (labels used in the paper's main results) | |
| | Config | File | Rows | Content | | |
| |---|---|---|---| | |
| | `obvious_injections` | `obvious_injections.json` | 36 | Obvious injections with their tasks | | |
| | `contextual_injections` | `contextual_injections.json` | 48 | Contextual injections with their tasks and policy texts | | |
| | `tasks` | `tasks.json` | 58 | Benign user tasks and the injection ids each one is compatible with | | |
| These three files are unchanged since the first release. `obvious_injections.json` has 180 task entries. The single-attempt evaluation uses 82 obvious injection-task pairs; the other entries supply the injection-placement and task variants for the best-of-5 attacks. | |
| ### Camera-ready additions (`camera_ready/`) | |
| These files support the appendix experiments added for the camera-ready version. They do not change the main benchmark above. | |
| | Config | File | Rows | Content | | |
| |---|---|---|---| | |
| | `phish_poison` | `camera_ready/obvious_injections_phish_poison.json` | 6 | New obvious injections, ids 39-41 (phishing) and 42-44 (poisoning), 2 tasks each. Same schema as `obvious_injections.json`. | | |
| | `obvious_to_contextual` | `camera_ready/obvious_to_contextual.json` | 8 | The obvious injections relabeled as contextual (ids 14, 23, 26, 27, 28, 30, 35, 36). Identical to their entries in `obvious_injections.json`, plus a `context` field with `warning` and `legitimizing` policy texts. | | |
| | `relabel` | `camera_ready/relabel.json` | 19 | Label corrections from the author adjudication: 8 obvious to contextual, 6 contextual to obvious, 5 excluded as out of scope. | | |
| | `categories` | `camera_ready/categories.json` | 37 | Harm category per injection for the corrected obvious set plus ids 39-44 (8 categories). | | |
| After the relabeling, the original pair sets give 90 obvious and 124 contextual injection-task pairs. Injection ids are unique within a suite only: obvious id 36 and contextual id 36 are different injections, so use `suite` and `id` together. | |
| ## Schema | |
| **Injection** (`obvious_injections.json`, `contextual_injections.json`, `camera_ready/obvious_injections_phish_poison.json`, `camera_ready/obvious_to_contextual.json`) | |
| | Field | Description | | |
| |---|---| | |
| | `id`, `title` | Identifier within the suite and a short name | | |
| | `injection_goal` | Attacker goal (obvious injections) | | |
| | `instructions.line_injection` | Text inserted at one line of the skill body | | |
| | `instructions.description_injection` | Text appended to the skill description (description-injection ablation) | | |
| | `type` | `direct` (instruction in `SKILL.md`) or `script` (payload in a skill script) | | |
| | `task_scripts` | Scripts copied into the skill for script-based injections (paths in the GitHub repo) | | |
| | `startup_scripts` | Setup scripts run before the agent starts | | |
| | `context.legitimizing`, `context.warning` | Policy texts (contextual injections) | | |
| | `tasks[]` | User tasks: `prompt`, `skill`, `line_num` (insertion line), `injection_prefix`, `task_files` | | |
| | `judge_prompt` | What the grader checks to decide whether the injection was executed | | |
| | `task_destructive`, `task_compatibility`, `root_files`, `source`, `last_updated` | Optional bookkeeping fields used by the harness | | |
| **Task** (`tasks.json`): `id`, `prompt`, `skill`, `task_files`, `injection_ids`. | |
| **Relabel** (`camera_ready/relabel.json`): `suite`, `id`, `title`, `original_label`, `final_label` (`obvious`, `contextual` or `excluded`). | |
| **Category** (`camera_ready/categories.json`): `suite` (`obvious`, `contextual` for an injection relabeled to obvious, or `obvious_phish_poison`), `id`, `title`, `category`, `reason`. | |
| ## Usage | |
| ```python | |
| from datasets import load_dataset | |
| obvious = load_dataset("aisa-group/skill-inject", "obvious_injections", split="train") | |
| contextual = load_dataset("aisa-group/skill-inject", "contextual_injections", split="train") | |
| ``` | |
| The nested JSON is easier to use as is: | |
| ```python | |
| import json | |
| from huggingface_hub import hf_hub_download | |
| path = hf_hub_download("aisa-group/skill-inject", "contextual_injections.json", repo_type="dataset") | |
| contextual = json.load(open(path)) | |
| ``` | |
| ## Intended use | |
| The data is for evaluating and improving the security of LLM agents. Many injections instruct the agent to delete files, run downloaded scripts or send data to an attacker endpoint (`agenskill-api.onrender.com`). Run agents only in the isolated containers from the GitHub repository and never on a machine with real user data or credentials. | |
| ## Citation | |
| ```bibtex | |
| @article{schmotz2026skillinject, | |
| title = {Skill-Inject: Measuring Agent Vulnerability to Skill File Attacks}, | |
| author = {Schmotz, David and Beurer-Kellner, Luca and Abdelnabi, Sahar and Andriushchenko, Maksym}, | |
| journal = {arXiv preprint arXiv:2602.20156}, | |
| year = {2026} | |
| } | |
| ``` | |