trust-boundary-analysis
하는 일
이 스킬은 현재 폴더에서 설정을 읽는 명령줄 도구, IDE 확장, 플러그인 시스템을 위한 감사 안내서입니다. 도구가 시작되는 방식을 점검하는 개발자와 보안 검토자를 위한 스킬입니다.
사용하는 경우
- ✓개발자가 CLI나 IDE 도구가 열린 폴더의 설정 파일을 신뢰하는지 확인해 달라고 요청할 때.
- ✓에이전트가 도구의 시작 순서를 추적해 프로젝트 파일과 사용자 파일 중 어떤 설정이 우선하는지 확인할 때.
- ✓팀이 프로젝트 디렉터리에서 코드나 MCP 서버를 불러오는 플러그인 시스템을 검토하는 경우.
스킬 링크
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/analyst/trust-boundary/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“우리 개발자 도구가 사용자가 방금 연 프로젝트 폴더의 설정 파일에서 명령을 실행할 수 있는지 확인해 주시겠어요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 도구가 설정 파일을 찾는 방식을 추적하고, 어떤 파일이 먼저 불러와지는지 매핑하며, 명령을 실행하기 전에 프로젝트 파일이 신뢰되는지 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
현재 폴더가 왜 중요한가요?
스킬은 프로젝트 폴더에 도구가 자동으로 불러오는 설정이 있을 수 있어, 악성 저장소가 사용자에게 영향을 줄 수 있다고 설명합니다.
작업 공간 신뢰란 무엇인가요?
폴더의 설정이나 플러그인을 쓰기 전에, 그 폴더를 신뢰하는지 묻는 검사라고 스킬은 설명합니다.
이 내용은 어떤 도구에 적용되나요?
스킬은 개발자 도구, CLI, IDE 확장, 언어 서버, 프로젝트 설정을 읽는 빌드 도구를 나열합니다.
상세 정보
작성자의 원본 설명
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.
인기도
- GitHub 스타
- 6.5k
- 순위
- #13979
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
detector-overview
6.5k에이전트가 스캐너가 표시한 코드를 읽고, 표시된 곳 중 어디가 실제 보안 버그이고 어디가 오탐인지 판단하도록 돕습니다.
exploiter-overview
6.5k에이전트가 확인된 여러 보안 약점을 하나의 테스트 체인으로 묶고, 그 체인이 어디까지 닿을 수 있는지 확인하도록 돕습니다.
llm-redteam-overview
6.5k에이전트가 프롬프트 인젝션부터 모델 악용까지 15개 전술 그룹 중 테스트에 맞는 AI 레드팀 가이드를 찾도록 돕습니다.
aatmf-t01-prompt-injection
6.5k숨겨진 지시가 AI 시스템을 덮어쓰려 하는 프롬프트 인젝션을 설명해, 보안 테스터가 이를 점검할 수 있게 합니다.