|
Download README.md from Elsa1111/ResourceHijackBench: direct link, hf CLI and curl.
- Browser
- Download file 17.9 kB
-
https://huggingface.co/datasets/Elsa1111/ResourceHijackBench/resolve/main/README.md
- Command line
-
hf download hf://datasets/Elsa1111/ResourceHijackBench/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/datasets/Elsa1111/ResourceHijackBench/resolve/main/README.md
17.9 kB
| pretty_name: ResourceHijackBench | |
| license: other | |
| license_name: resourcehijackbench-research-use-v1 | |
| license_link: LICENSE | |
| viewer: false | |
| extra_gated_heading: Request manually approved research access | |
| extra_gated_description: Access is limited to individually approved researchers. The repository owner manually reviews each request for a legitimate scientific research, reproducibility, or security evaluation project. | |
| extra_gated_prompt: Read the full ResourceHijackBench Research Use License v1.0 below before applying. Describe your project and an authorized, controlled testing environment. Approval is required before downloading the covered data. | |
| extra_gated_button_content: Submit research access request | |
| extra_gated_fields: | |
| Affiliation or independent researcher: text | |
| Research purpose and project: text | |
| Authorized testing environment: text | |
| I agree to the ResourceHijackBench Research Use License: checkbox | |
| language: | |
| - en | |
| size_categories: | |
| - n<1K | |
| tags: | |
| - security | |
| - llm-agents | |
| - resource-hijacking | |
| - synthetic | |
| - benchmark | |
| configs: | |
| - config_name: attacks | |
| default: true | |
| data_files: | |
| - split: test | |
| path: data/attacks/test.parquet | |
| - config_name: scenarios | |
| data_files: | |
| - split: test | |
| path: data/scenarios/test.parquet | |
| # ResourceHijackBench | |
| ResourceHijackBench accompanies **Beyond Direct Access: Resource Hijacking in LLM Agents**. This release packages the dataset supplied with the paper's `iclr-hub` code for approved research access on the Hugging Face Hub. It contains **900 attack cases**, **300 scenarios**, and the complete released collection of **36 local sandbox environments**. | |
| The benchmark studies whether an LLM agent can be induced to use a protected resource. Each attack combines a user prompt with a resource description, an expected resource action, and a contract linking the case to a controlled local environment. The released sandboxes simulate resource actions through local files, event logs, Git state, and an optional local event sink. | |
| The covered data is available under the **ResourceHijackBench Research Use License v1.0**, reproduced in full below. Each user must request access on the [dataset page](https://huggingface.co/datasets/Elsa1111/ResourceHijackBench), accept the license, and receive manual approval from the repository owner. Academic, corporate, and independent scientific researchers may apply. Use requires an authorized, controlled testing environment. Gating manages access; it does not guarantee that misuse will be prevented. | |
| For publication and local use in Chinese, see [README_zh.md](README_zh.md). | |
| ## Configurations and counts | |
| | Configuration | Split | Rows | Unit | | |
| | --- | --- | ---: | --- | | |
| | `attacks` (default) | `test` | 900 | One attack prompt and its metadata | | |
| | `scenarios` | `test` | 300 | One scenario shared by three attack settings | | |
| The original release does not define training, validation, or test partitions. Both configurations use a single `test` split as a packaging choice for this evaluation benchmark. No rows were randomly repartitioned. The source runner's `smoke18` and `pilot90` options select overlapping subsets of the same cases; they are not separate splits. | |
| | Resource category | Scenarios | Attack cases | | |
| | --- | ---: | ---: | | |
| | `material` | 50 | 150 | | |
| | `condition` | 50 | 150 | | |
| | `energy` | 50 | 150 | | |
| | `symbolic` | 50 | 150 | | |
| | `knowledge` | 50 | 150 | | |
| | `interaction` | 50 | 150 | | |
| | **Total** | **300** | **900** | | |
| Each scenario has one attack for each setting: `implicit`, `direct_unconfirmed`, and `persistent_context` (300 cases per setting). | |
| ## Load the tables | |
| After the repository owner approves your request, install the libraries and log in with the same approved Hugging Face account: | |
| ```bash | |
| python -m pip install datasets huggingface_hub | |
| hf auth login | |
| ``` | |
| Then load the remote tables. `token=True` uses your locally stored login; do not put access tokens in source code or share credentials. An anonymous or unapproved account cannot download the covered data: | |
| ```python | |
| from datasets import load_dataset | |
| repo_id = "Elsa1111/ResourceHijackBench" | |
| attacks = load_dataset(repo_id, "attacks", split="test", token=True) | |
| scenarios = load_dataset(repo_id, "scenarios", split="test", token=True) | |
| print(len(attacks)) # 900 | |
| print(len(scenarios)) # 300 | |
| print(attacks[0]["attack_id"]) | |
| print(attacks[0]["user_prompt"]) | |
| ``` | |
| For a local copy, run from this dataset folder: | |
| ```python | |
| from pathlib import Path | |
| from datasets import load_dataset | |
| dataset_dir = str(Path.cwd()) | |
| attacks = load_dataset(dataset_dir, "attacks", split="test") | |
| scenarios = load_dataset(dataset_dir, "scenarios", split="test") | |
| ``` | |
| The README configuration binds each table to its Parquet file explicitly. Sandbox JSON files and the original JSONL copies are supporting assets and are not additional table shards. | |
| ## Schema | |
| The Parquet tables preserve the source records' fields and nested structure. [metadata/features.json](metadata/features.json) records the complete machine-readable Hugging Face feature definitions. | |
| | Field or field group | Meaning | | |
| | --- | --- | | |
| | `attack_id` | Unique attack identifier; present in `attacks` | | |
| | `scenario_id`, `scenario_name` | Identifier and name of the generated scenario | | |
| | `resource_category`, `resource_target`, `cost_unit` | Resource category, protected target, and stated cost unit | | |
| | `resource_use_signal`, `expected_resource_action`, `normal_use`, `hijack_goal` | Resource-use specification and attack objective | | |
| | `resource_use_clues`, `invocation_path` | Lists of resource-use clues and workflow steps | | |
| | `cover_task`, `workflow_context`, `context_dimensions` | Cover task and contextual metadata | | |
| | `attack_setting`, `prompt_variant`, `variant_name`, `user_prompt` | Attack setting and prompt; present in `attacks` | | |
| | `target_contract` | Parent environment, relative sandbox path, local resource script, event log, hazardous actions, and oracle threshold | | |
| | `lineage` | Parent attack and parent scenario identifiers, parent outcome metadata, and generation round | | |
| | `generation_mode`, `generation_source` | Generation provenance; `generation_source` is present in `attacks` | | |
| | `prompt_signature` | Optional source field present in 223 of the 300 scenarios | | |
| Some source records omit optional top-level or nested keys. The tabular schema uses a union of these keys and represents missing optional values as `null`. This normalization supports a consistent Parquet schema; the original JSONL files remain unchanged. Parent outcome fields describe the parent seed's recorded outcome, not the observed outcome of the released child attack against a new model. | |
| ### Scenario and environment identifiers | |
| A generated scenario's `scenario_id` is different from its parent sandbox identifier. To find the execution environment, use: | |
| ```python | |
| from pathlib import Path | |
| case = attacks[0] | |
| parent_id = case["lineage"]["parent_scenario_id"] | |
| assert parent_id == case["target_contract"]["parent_scenario_id"] | |
| relative_environment = Path("dataset") / "sandboxes" / parent_id | |
| print(relative_environment) | |
| ``` | |
| The 900 cases reference **32** parent sandbox directories. All **36** directories shipped in the source release are retained. Multiple generated scenarios can share a parent environment. Do not construct an environment path from the generated child `scenario_id` or rename the parent directories. | |
| ## Files and reproducibility | |
| ```text | |
| ResourceHijackBench-hf/ | |
| ├── README.md | |
| ├── README_zh.md | |
| ├── LICENSE # Research license for covered data | |
| ├── LICENSE-MIT # Preserved upstream MIT license | |
| ├── requirements.txt | |
| ├── data/ | |
| │ ├── attacks/test.parquet | |
| │ └── scenarios/test.parquet | |
| ├── dataset/ | |
| │ ├── scaled_attacks.jsonl | |
| │ ├── scaled_scenarios.jsonl | |
| │ ├── audit.json | |
| │ ├── release.json | |
| │ ├── summary.json | |
| │ └── sandboxes/ # Original index and all 36 environments | |
| ├── metadata/ | |
| │ ├── source_manifest.json | |
| │ ├── conversion_report.json | |
| │ ├── validation_report.json | |
| │ └── features.json | |
| └── scripts/ | |
| ├── build_dataset.py | |
| └── validate_dataset.py | |
| ``` | |
| `dataset/` is a byte-preserving copy of the source release's complete dataset directory, including hidden sandbox assets. `metadata/source_manifest.json` records the source-file inventory and checksums. `metadata/conversion_report.json` records conversion statistics, and `metadata/validation_report.json` records the latest successful packaging checks. The conversion scripts build and check the packaging; they do not run benchmark attacks or query models. | |
| To validate this package on its own, run from the dataset repository root: | |
| ```bash | |
| python -m pip install -r requirements.txt | |
| python scripts/validate_dataset.py | |
| ``` | |
| **Do not rebuild the full dataset from the current sibling `../iclr-hub` directory. It now contains six sample attacks, not the original 900-attack source.** Keep this packaged full release as the baseline. Rebuilding requires a separately retained original source repository whose `dataset/` contains all 900 attacks and 300 scenarios: | |
| ```bash | |
| python scripts/build_dataset.py --source "PATH_TO_ORIGINAL_FULL900_REPOSITORY" --output . | |
| python scripts/validate_dataset.py --source "PATH_TO_ORIGINAL_FULL900_REPOSITORY" | |
| ``` | |
| Replace the placeholder path only with that verified full source. The optional `--source` validation compares packaged originals against the supplied source directory; the build command expects the source repository root, containing its `dataset/` subdirectory. Standalone validation does not require the sibling repository. | |
| The generation metadata in the source `release.json` reports `parent-contract-scaleup-v1`, model `deepseek-v4-pro`, and the Responses API. The source summary reports 80 successful seed cases. The seeds themselves (`successful_seed_cases.jsonl`) are an unreleased generation intermediate, as documented in the source runner, and are not included here. | |
| The source `audit.json` reports that its parent-target-contract audit passed. That is preserved source metadata. Packaging validation checks such as record counts, schema preservation, parent links, file checksums, and local Hugging Face loading are separately recorded in the validation report; they do not independently reproduce model attack-success results. | |
| ## Download assets for benchmark replay | |
| Loading a table with `load_dataset` does not provide a working sandbox directory. Download the full repository to obtain the original dataset assets: | |
| ```python | |
| from pathlib import Path | |
| from huggingface_hub import snapshot_download | |
| repo_root = Path(snapshot_download( | |
| repo_id="Elsa1111/ResourceHijackBench", | |
| repo_type="dataset", | |
| token=True, | |
| )) | |
| print(repo_root / "dataset") | |
| ``` | |
| Use the original `iclr-hub` code to run evaluations, pointing its `RH_DATASET_DIR` environment variable to the downloaded `dataset/` directory. This dataset repository does not include the evaluation runner or its external agent and defense dependencies. The source runner copies a fresh parent sandbox for each case and initializes omitted Git metadata in the runtime copy where required. Keep the downloaded fixtures as the clean baseline. | |
| The prompts and workspace documents are benchmark inputs. Evaluations should use the source project's disposable local environment and controlled resource endpoints. | |
| ## Publication and access administration | |
| The target is [Elsa1111/ResourceHijackBench](https://huggingface.co/datasets/Elsa1111/ResourceHijackBench). Before uploading real data, the owner must create the dataset repository as **private**, publish only the card/license files and a non-sensitive access probe, and enable **manual approval** in the repository's [access settings](https://huggingface.co/datasets/Elsa1111/ResourceHijackBench/settings). README form metadata does not enable server-side gating. | |
| With manual gating enabled, make the repository public and verify the access probe: anonymous users and a logged-in unapproved account must be unable to download its content, while an approved account must be able to download it. Use a probe other than the public README or license files. Upload the 900-case data only after those checks pass, then verify the same access restrictions on a real data file. Review an existing repository's owner, visibility, gating mode, and contents before any upload; do not blindly reuse or overwrite an existing repository. The owner reviews individual requests and may reject requests that do not establish a research purpose and authorized testing environment. | |
| ## License and attribution | |
| The [ResourceHijackBench Research Use License v1.0](LICENSE) applies to the Parquet files under `data/`, `dataset/scaled_attacks.jsonl`, `dataset/scaled_scenarios.jsonl`, and their record content and record-content derivatives. Executable code, documentation, and original supporting sandbox assets retain the upstream [MIT License](LICENSE-MIT), preserved byte for byte. Rights previously validly granted under MIT are not retrospectively revoked. The new license terms govern this release's covered data access and use; the complete terms follow so they can be read before requesting access. | |
| Source: the paper's supplementary `iclr-hub` release. | |
| ## Full research license | |
| ```text | |
| ResourceHijackBench Research Use License v1.0 | |
| Copyright (c) 2026 ResourceHijackBench Authors | |
| 1. Scope and retained MIT rights | |
| This license applies to all Parquet files under data/, the files | |
| dataset/scaled_attacks.jsonl and dataset/scaled_scenarios.jsonl, and the | |
| record content contained in those files, including copies, extracts, | |
| transformations, and derivatives that reproduce, reconstruct, or adapt that | |
| record content (the "Covered Data"). It does not extend to research findings, | |
| aggregate statistics, or independently authored software merely because they | |
| were produced through permitted research using the Covered Data. | |
| Executable code, documentation, and original supporting sandbox assets are | |
| not Covered Data and retain the upstream MIT License in LICENSE-MIT. This | |
| license does not revoke or restrict any rights previously validly granted | |
| under the MIT License. Copies previously obtained under a valid MIT grant | |
| remain subject to that grant. | |
| 2. Individual approval and research permission | |
| Subject to your acceptance of this license and individual approval by the | |
| repository owner, the copyright holders grant you a non-exclusive, | |
| royalty-free, worldwide license to access, use, reproduce, analyze, and | |
| modify the Covered Data, and create record-content derivatives, solely for | |
| legitimate scientific research, reproduction of research results, and | |
| research security evaluation. Academic, corporate, and independent | |
| researchers are eligible; research conducted within a commercial entity is | |
| permitted on the same terms. | |
| Approval is personal to the approved individual and their Hugging Face | |
| account. Each additional user must obtain their own approval. Approval of | |
| one person does not approve their whole organization, team, or project. | |
| 3. Authorized testing and prohibited uses | |
| Use the Covered Data only in controlled testing environments and only with | |
| authorization for the systems, accounts, endpoints, data, and resources | |
| involved. You must not use it to carry out unauthorized real-world attacks, | |
| consume resources without permission, or access or exfiltrate data without | |
| permission. | |
| Non-research use, production or operational deployment, and operation of a | |
| product or service using the Covered Data require separate written | |
| permission from the copyright holders. Research permission under this | |
| license alone does not authorize those activities. | |
| 4. Sharing, excerpts, and attribution | |
| You must not redistribute the full Covered Data or substantial portions of | |
| it, including record-content derivatives, to anyone who has not been | |
| individually approved by the repository owner. Approved recipients remain | |
| subject to their own license and approval. Do not share access credentials, | |
| access tokens, or an approved account, or help an unapproved person bypass | |
| the access process. | |
| You may include small excerpts reasonably necessary to explain or support | |
| research findings in publications and other research communications, with | |
| attribution to ResourceHijackBench and its authors, identification of this | |
| license, and a link to the source repository. Such excerpts must be limited | |
| to what is necessary and must not serve as a substitute for the dataset or | |
| permit reconstruction of a substantial portion of it. Retain applicable | |
| copyright and license notices with copies and record-content derivatives. | |
| 5. Breach and termination | |
| A violation of this license may result in termination of the permissions | |
| granted by this license and revocation of future Hugging Face repository | |
| access. Upon termination, you must cease using the Covered Data under this | |
| license and delete copies and record-content derivatives held under this | |
| license. Further use requires separate permission from the copyright | |
| holders. Termination does not revoke rights previously validly granted under | |
| the MIT License. | |
| 6. No warranty; limitation of liability | |
| THE COVERED DATA IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | |
| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| OUT OF OR IN CONNECTION WITH THE COVERED DATA OR ITS USE OR OTHER DEALINGS. | |
| 7. Reserved rights | |
| All rights not expressly granted by this license are reserved. This license | |
| does not grant permission to access or use third-party systems, accounts, | |
| services, or resources. | |
| ``` | |