DC openclaw-bastion
Runtime prompt injection defense for agent workspaces. While other tools watch workspace identity files, Bastion protects the input/output boundary — the files being read by the agent, web content,...
Runtime prompt injection defense for agent workspaces.
As a process C 51/100 · Has gaps — weak spots: result and completion, when it triggers, inputs and preconditions
What is at stake
The skill contains fragments that, in the wrong hands, cost money or data. Below: what the installer risks and what the author should do.
The skill contains commands that delete files, rewrite disks or execute code fetched from the network. The agent may run them without asking if it believes the instructions require it.
Replace destructive commands with safe equivalents that ask for confirmation, scope them to one folder, and stop piping curl into a shell: pin a version and a checksum.
Below is the worst case for this category. The finding here is medium: the guard saw a sign, not a proof.
The text contains phrases like "ignore previous instructions" or "you are now…". That is an attempt to hijack the agent: it may break your rules, the system limits or company policy.
An honest skill does not need them: state the role and the rules directly without overriding other instructions. Otherwise catalog scanners and corporate filters will block the listing.
Below is the worst case for this category. The finding here is medium: the guard saw a sign, not a proof.
The skill tells the agent to hide things from you: not to show errors, not to mention actions, to report differently from what was done. You lose the ability to see what the agent really did.
Transparency beats a smooth answer. If the goal is to hide technical noise, ask the agent to "summarise briefly", not to "not mention".
How to improve
- Address the high-severity findings: each costs 18 safety points. If one is a false positive, add the rule id to guard.allow in spec.yaml.
- Say in the description WHEN to use the skill ("use when…", example requests): that is the agent's main cue.
- Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
- A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.
Guard findings · 13
-
high Dangerous commands
cmd-destructive-fsscripts/bastion.py:225Destructive filesystem command (wipes root/home/drive) (string literal in code, not executed)":(){ :|:& };:",code literal
Medium and low: 12
-
medium Instruction override
en-ignore-previousscripts/bastion.py:94Instruction-override phrase ("ignore previous instructions") (detector / deny-list definition)(r"(?i)ignore\s+(all\s+)?previous\s+instructions", "ignore previous instructions"),
detector -
medium Concealment
en-hide-from-userscripts/bastion.py:120Instruction to hide actions from the user (detector / deny-list definition)(r"(?i)do\s+not\s+(tell|inform|alert|warn)\s+(the\s+)?user", "stealth: do not tell the user"),
detector -
medium Concealment
en-hide-from-userscripts/bastion.py:121Instruction to hide actions from the user (detector / deny-list definition)(r"(?i)hide\s+this\s+(from|in)\s+(the\s+)?(user|output|response)", "stealth: hide this from user"),
detector -
medium Dangerous commands
cmd-destructive-fsscripts/bastion.py:191Destructive filesystem command (wipes root/home/drive) (detector / deny-list definition; string literal in code, not executed)(r"(?i)rm\s+-rf\s+/(?:\s|$)", "rm -rf / (destructive)"),
detectorcode literal -
medium Dangerous commands
cmd-destructive-fs-scopedscripts/bastion.py:227Destructive command on a partition / current directory (normal in admin docs; verify the target) (string literal in code, not executed)"dd if=/dev/zero of=/dev/*",
code literal -
medium Dangerous commands
cmd-destructive-fs-scopedscripts/bastion.py:228Destructive command on a partition / current directory (normal in admin docs; verify the target) (string literal in code, not executed)"dd if=/dev/random of=/dev/*",
code literal -
low Dangerous commands
cmd-privilegescripts/bastion.py:230Privilege escalation / world-writable permissions (string literal in code, not executed)"chmod 777 /",
code literal
A further 5 matches are quotations in this security skill's documentation and are not counted as findings.
Files scanned: 3. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
- warning
description-no-whendescription does not say WHEN to use the skill (no "use when")
Process rating: all ten parameters 51/100
- 0Result and completion. Does not say what the result is
- 0Inputs and preconditions. Does not say what the process needs to start
- 20When it triggers. No condition that starts the skill
- 30Running it twice. 1 mutating operations with no state check
- 55Failures and branches. 1 branches
- 60Tools and files. Uses tools (bash, web, python) that frontmatter does not declare
- 100Steps. 9 steps
- 100Consistency. Name and required fields are in place
- 100Execution cost. Instruction body is 1146 tokens
- 100Progress reporting. Reports progress
- low The response is described with custom markup (4 tags): a typed call is more reliable
Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.
Quality signals
- +5Description has no quoted example phrases that should trigger the skill
- +4Description does not say when NOT to use the skill (false activations)
- +3Output format is not stated: the model decides each time
- +1No license
- +2Single-language instructions
- +3Description length 200: enough signal without eating the budget
- +4Structure: 14 headings
- +3Step-by-step instructions: 9 items
- +4Has examples (6 code blocks)
- +3All 1 scripts are documented
Quality base 70; lint remarks subtract, signals add up to 100. Result: 75.