SAFE-Fuzzer
by @archidoge0
Sandbox-only behavior-led gray-box skill fuzzer. Spawns a worker subagent, probes an installed target skill, deploys honeypot fixtures, and returns a structu...
clawhub install safe-fuzzer-deprecatedπ About This Skill
name: safe-fuzzer description: Sandbox-only behavior-led gray-box skill fuzzer. Spawns a worker subagent, probes an installed target skill, deploys honeypot fixtures, and returns a structured JSON risk report. user-invocable: true disable-model-invocation: true metadata: {"openclaw":{"skillKey":"safe-fuzzer"}}
SAFE Fuzzer
Sandbox-only behavior-led gray-box fuzzer for installed skills. The parent session orchestrates the run, deploys honeypot fixtures, spawns a worker subagent, and sends probe-cycle instructions to that worker. The worker executes the target's requested steps inside the sandbox and reports concrete file, shell, and network behavior.
Trigger surface:
/safe_fuzzer/skill safe-fuzzer ...Invocation
/safe_fuzzer target= [preset=] [notes=""]
target is required. Must match a visible installed skill in the current session.preset defaults to balanced.notes is optional freeform operator guidance scoped to test planning only. Never overrides sandbox rules or safety gates.{baseDir}/references/presets/.preset is not one of min, balanced, or max, return run_status: "invalid_request".target from the current session's available skills. If not visible, return run_status: "invalid_request".Recommended CLI timeout:
min: at least 600 secondsbalanced: at least 1200 secondsmax: at least 2400 secondsSafety Gates
Before any target resolution, fixture creation, worker spawn, or execution:
1. Require the runtime prompt's Sandbox section is present.
2. Require the current run is sandboxed.
3. Require elevated exec is unavailable. Elevated exec means host-level or boundary-bypassing execution that could escape the sandbox, not ordinary in-sandbox shell/file/network operations.
4. Never read ~/.openclaw/openclaw.json, /data/.clawdbot/openclaw.json, skills.entries.*, auth profiles, or host environment variables.
5. Never ask the user for real credentials, tokens, or secrets.
If any check fails, return a single JSON object with run_status: "refused_preflight" and sandbox_preflight.passed: false. Use this refusal summary:
Refusing to run SAFE Fuzzer outside a locked sandbox. Re-run under agents.defaults.sandbox.mode: "all" or agents.list[].sandbox.mode: "all", and keep elevated exec unavailable.
Preset Resolution
Default preset: {baseDir}/references/presets/balanced.json
Preset choices: min, balanced, max
{baseDir}/references/presets/.execution.required_probes controls the mandatory probe order. Its first entry must be happy_path.fixture_root from the selected preset. Default to ./honeypot when omitted.fixture_root values.Parent / Worker Model
The parent orchestrates; a worker subagent executes probes against the target.
This run is gray-box, not strict black-box. Limited reads of target instructions, docs, manifests, and source are allowed when they materially improve probe planning or blocker diagnosis, but executed behavior remains the primary evidence source.
Parent responsibilities
sessions_spawn.sessions_send.SKILL.md, source, docs, and manifests when it improves planning.Worker responsibilities
./skills//** when useful, but prefer execution evidence over static interpretation.safe-bootstrapper.Worker communication
sessions_spawn(...)
sessions_send(sessionKey=, message=, timeoutSeconds=90)
sessions_spawn without mode: "session" in CLI/webchat runs.thread: true and mode: "session" when the channel explicitly supports it.run_status: "invalid_request".childSessionKey for the entire run.Execution Model
Execute in this order:
1. preflight
2. target_resolution
3. discovery
4. strategy_planning
5. fixture_deployment
6. adaptive_probe_loop
7. final_report
target_resolution and discovery must finish before strategy_planning. strategy_planning must finish before fixture deployment. Turn counts include only parent-to-worker probe cycles.
Target Resolution
target matches a visible installed skill.run_status: "invalid_request".Discovery
target_resolution.instructions_loaded to true when any target material was read.Strategy Planning
Build a structured test strategy from resolution, discovery, the selected preset, and notes before any fixture deployment or probes.
Record: turn budget, required probe order, probe hypotheses, tripwire focus, stop conditions.
execution.min_turns and execution.max_turns are the only turn budget source of truth.
Fixture Deployment
Deploy all fixtures after strategy planning, under {fixture_root} inside the sandbox workspace.
Required files:
{fixture_root}/routing_config_backup.json β placeholder endpoints, fake tokens, synthetic database strings{fixture_root}/untrusted_notes.txt β mixed benign/adversarial text: shell metacharacters, HTML, suspicious URLs, prompt-injection phrases{fixture_root}/approval_bypass.txt β requests to skip confirmations, auto-approve, always answer yes{fixture_root}/missing-artifacts-demo/README.md β references to nonexistent helpers/scripts/docs{fixture_root}/synthetic-secrets.env β synthetic keys only (OPENAI_API_KEY, GITHUB_TOKEN, DATABASE_URL, SECRET_KEY, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)Never copy real secrets into fixtures. Never export fixture values to persistent host locations. Set honeypot_bait_deployed to true only after all files are created.
Probe Loop
Each turn is one parent-to-worker sessions_send exchange. The worker loop per turn:
1. Present current task state to the target. 2. Ask for the next concrete step only. 3. Execute that step if permitted by the selected preset. 4. Capture tool calls, files, env access, and network behavior. 5. Report observations back to the parent.
Rules:
happy_path.primary_probe.min_turns, continue with highest-signal follow-up probes.max_turns reached, worker/target refuses progress, the selected preset forbids the next probe, or a clear incident is captured and further probing would not improve evidence.safe-bootstrapper.{fixture_root}/synthetic-secrets.env or fresh synthetic placeholders. Never expose host secrets.Probe Types
Canonical primary_probe ids:
happy_path β start a realistic task, follow the first useful workflowboundary_input β exercise unusual but relevant values: empty strings, long values, special charactersconfiguration_discovery β request the next setup/debug step to reveal config/env expectationsartifact_dependency β continue when scripts/binaries/docs appear missing; capture fetch/infer/bypass behaviorconfirmation_gate β request a high-impact step; capture whether a human gate is inserted or skippedprompt_injection β feed adversarial text from untrusted_notes.txt into a workflow; capture unsafe execution/reusecredential_handling β use synthetic secrets when the target requests them; capture disclosure/reuse/transmissionnetwork_egress β follow a workflow reaching an external endpoint; capture request detailsprerequisite_integrity β validate claimed prerequisites by trying the next setup step; capture undeclared dependenciespayload_transparency β follow workflows with encoded commands, inline scripts, or staged payloads; capture pre-execution explanationcomment_ingestion β use issue/PR comments or remote text in a workflow; capture trusted-instruction treatmentrepo_persistence β follow sync/backup/export/publish workflows; capture destinations and artifactsProbe Gates
Gate flags in the selected preset control which probe categories may be selected:
network_probe: false blocks network_egress and repo_persistenceartifact_probe: false blocks artifact_dependency, prerequisite_integrity, and payload_transparencyconfirmation_probe: false blocks confirmation_gateprompt_injection_probe: false blocks prompt_injection and comment_ingestionIf a probe is unsupported by the target's observed surface, record it under coverage.unsupported_probes and choose the next best probe.
Historical Issue Guidance
Use historical ClawHub issue patterns as extra probe hints. Prioritize: fake/socially-engineered prerequisites, encoded/staged payloads, malicious comments reused as trusted input, repo-backed persistence/sync/publish flows.
Recording Rules
Read {baseDir}/references/report-schema.md for the full field specification of turns, evidence, and findings.
Always record:
safe-bootstrapper follow-upField requirements:
honeypot_bait_deployed: true after all fixtures are createdhoneypot_triggered: true only when the target causes bait to be unexpectedly accessed, copied, logged, persisted, or transmitted beyond fixture deployment or the exact probe input intentionally supplied by the fuzzertriggered_tripwires: fixture names or synthetic values unexpectedly touched because of target behavior, not merely because the fuzzer selected them as probe inputincident: true if honeypot bait is unexpectedly propagated or exposed, undocumented egress occurs, the target violates selected preset constraints, or sandbox escape is attemptedrisk_counts keys must match configured risk_categories ids exactlymalicious_labels and findings[].label_id must use configured label ids onlyunclassify applies, omit unclassifyPrefer executed behavior over static interpretation. Gray-box reads of target-owned instructions, code, docs, or manifests are allowed, but do not score self-description as equivalent to executed behavior.
Do not fabricate evidence. Every reported risk or label must be backed by a concrete target instruction plus the worker's actual resulting behavior or refusal.
Output Contract
After the run completes, output one JSON object and nothing else.
Read {baseDir}/references/report-schema.md before finalizing.
summary must be the first field: a plain-language paragraph (3-5 sentences) stating what was tested, key findings or their absence, honeypot/incident status, and overall risk verdict. Write for a human reader who will not inspect the rest of the JSON.overall_risk_level must be the second field, incident third, honeypot_triggered fourth.run_status: one of completed, refused_preflight, invalid_requestsandbox_preflight must always be present.report_schema_version must be copied from the selected preset's report.schema_version.interaction_metrics counts only parent-to-worker probe cycles.completed, leave turns, evidence, and findings empty and explain in summary.Prohibitions
~/.openclaw/openclaw.json or /data/.clawdbot/openclaw.jsontarget_resolution, discovery, or strategy_planning