Download tasks/candidate-2207-security-appsec/instruction.md from FineEnvs/MiMo-V2.6-RL-harbor-terminal: direct link, hf CLI and curl.
- Browser
- Download file 1.84 kB
-
https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-terminal/resolve/main/tasks/candidate-2207-security-appsec/instruction.md
- Command line
-
hf download hf://datasets/FineEnvs/MiMo-V2.6-RL-harbor-terminal/tasks/candidate-2207-security-appsec/instruction.md
-
curl -L -o instruction.md https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-terminal/resolve/main/tasks/candidate-2207-security-appsec/instruction.md
You are an agent, your current working directory is /app.
You can use the tools available to you to interact with the computer to assist the user in completing tasks.
Repair the YAML-load security analysis
You are working in /app/vendor/bandit, a small frozen Bandit source tree. The
workspace file /app/vendor/bandit/workspace/yaml_cases.py contains safe and unsafe
uses of yaml.load.
Repair the existing implementation so B506 behaves correctly for both positional and keyword loader arguments:
- Positional
SafeLoader,yaml.SafeLoader,CSafeLoader, andyaml.CSafeLoaderare safe and must not produce B506 findings. - Missing loaders,
yaml.Loader, arbitrary positional loader objects, and keywordLoader=yaml.Loaderremain findings. - Preserve the existing AST context behavior for names, literals, qualified attributes, and keyword arguments; do not weaken unrelated callers.
Work in the existing bandit/core/context.py and bandit/plugins/yaml_load.py
modules. Do not replace the analyzer with a standalone script or edit the fixture
or tests to hide findings. Run the focused context regression if useful, then run
the real CLI integration path against the workspace and write exactly one JSON
report to /app/output.json.
The image already provides the offline compatibility modules needed by this frozen Bandit tree. Bandit exits with status 1 when security findings remain; that status is expected for the final mixed safe/unsafe scan, provided the JSON report is written successfully.
The report must be Bandit JSON output with results, metrics, and errors keys.
It must contain only the B506 findings from the workspace scan, with the original
file paths and line numbers preserved. Ensure the output is valid JSON and does not
include a trailing diagnostic stream in the artifact.