bianhaifeng789-hue/openclaw-config/bare-git-repo-security-scrub
Claude Code and agent skill by bianhaifeng789-hue/openclaw-config
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install bianhaifeng789-hue/openclaw-config/bare-git-repo-security-scrubSKILL.md
The same SKILL.md was published earlier as bianhaifeng789-hue/openclaw-config/bare-git-repo-security-scrub.
Bare Git Repo Security Scrub Pattern
Source
Claude Code: utils/sandbox/sandbox-adapter.ts (bareGitRepoScrubPaths, scrubBareGitRepoFiles)
Pattern
Scrub planted bare-repo files after sandboxed command - prevent git config escape.
Code Example
Key Concepts
- Bare Repo Attack: HEAD + objects/ + refs/ at cwd → git treats as bare repo
- fsmonitor Escape: Attacker plants config with core.fsmonitor → sandbox escape
- Two-Phase Defense: denyWrite existing files, scrub non-existent after command
- Cleanup After Command: Called before unsandboxed git runs
- ENOENT Expected: Common case - nothing was planted
Benefits
- Prevents git config sandbox escape attack
- Handles both existing and planted files
- Minimal overhead (ENOENT on most calls)
When to Use
- Sandboxed environments with git operations
- Security-critical file protection
- Cleanup after potentially malicious commands
Related Patterns
- Git Worktree Main Repo Detection (sandbox-adapter.ts)
- Sandbox Settings Adapter (sandbox-adapter.ts)
- Cleanup Registry Pattern (cleanupRegistry.ts)
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills-experimental/bare-git-repo-security-scrub/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/bianhaifeng789-hue/openclaw-config/bare-git-repo-security-scrub)