frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

SafeRun Guard- Runtime safety firewall for AI coding agents (bash+jq, zero deps)

https://github.com/Cocabadger/saferun-guard
1•cocabadger•1h ago

Comments

cocabadger•1h ago
I built SafeRun Guard — a Claude Code plugin that intercepts dangerous commands and file operations before they execute. Pure bash + jq, zero dependencies, ~20ms latency.

The problem: AI coding agents run shell commands autonomously. One `rm -rf /`, one `git push --force`, one leaked AWS key in a config file — and you're recovering for hours. The agent doesn't know what's dangerous. You can't watch every command.

How it works: SafeRun Guard hooks into Claude Code's PreToolUse event. Every Bash command and every file write passes through a 4-tier decision engine:

- REDIRECT — suggests a safer alternative (`--force` → `--force-with-lease`) - BLOCK — denies the command, agent sees the reason and adapts - ASK — prompts the user for confirmation - ALLOW — silent passthrough (~95% of actions)

Key features that I haven't seen elsewhere:

1. Compound command splitting. `echo ok && rm -rf /` is split on `&&`, `||`, `;` — each segment checked independently. Pipes are NOT split (they're part of a single pipeline).

2. Content scanning. File writes are scanned for 9 secret patterns (AWS keys, PEM private keys, GitHub tokens, OpenAI/Stripe keys, Slack tokens, DB connection strings) before they hit disk.

3. Redirect tier. Instead of just blocking `git push --force`, it tells the agent "use `--force-with-lease` instead" — the agent rewrites the command automatically. No human needed.

Numbers: 112 safety rules, 9 secret detection patterns, 243 tests, ~20ms per check. Fail-open design — if jq crashes or rules are corrupt, the command passes through. Safety tool should never block your work due to its own bug.

Stack: Bash + jq (Oniguruma regex engine). No Python, no Node, no API calls, no telemetry. Everything runs locally. MIT license.

Install: ``` claude plugin marketplace add Cocabadger/saferun-guard claude plugin install saferun-guard@saferun-guard ```

I'd love feedback on the rule coverage — what dangerous patterns am I missing?

Also thinking about the next step: right now the agent just gets blocked or redirected. But what if it could learn from those decisions — an "agent-in-the-loop" that negotiates with the guardrail instead of just retrying?

Would that be useful in your workflow, or is a dumb firewall exactly what you want between an AI agent and your filesystem?

Show HN: Codex HUD – Claude-HUD Style Status Line for Codex CLI

https://github.com/anhannin/codex-hud
2•anhm720•1m ago•0 comments

A Deep Dive into Apple's .car File Format

https://dbg.re/posts/car-file-format/
1•todsacerdoti•2m ago•0 comments

Helion achieves new fusion energy milestones

https://www.helionenergy.com/articles/helion-achieves-new-fusion-energy-milestones/
1•bottombutton•3m ago•0 comments

Why is Bezos trolling Musk on X with turtle pics? Because he has a new Moon plan

https://arstechnica.com/space/2026/02/why-is-bezos-trolling-musk-on-x-with-turtle-pics-because-he...
1•themgt•3m ago•0 comments

Before the Super Bowl, Seahawks kicker Jason Myers was so calm he felt nervous

https://www.nytimes.com/athletic/7041544/2026/02/13/seahawks-jason-myers-super-bowl-routine/
1•Mernit•4m ago•0 comments

Researchers: The insights drones can provide by monitoring corn on small farms

https://phys.org/news/2026-01-insights-drones-corn-small-farms.html
1•PaulHoule•4m ago•0 comments

Relationship Wrapped with Claude Code and iMessage

https://claudentines.ai/
1•ajspencer•5m ago•0 comments

URLs with Trailing Punctuation

https://www.redblobgames.com/blog/2026-02-12-urls-with-trailing-punctuation/
1•ibobev•5m ago•0 comments

GitButler CLI Is Good

https://matduggan.com/gitbutler-cli-is-really-good/
1•birdculture•5m ago•0 comments

Toolspotting: Earn cash for speaking about AI tools

https://www.toolspotting.com/
3•p2pai•5m ago•0 comments

Amazon cosplayed the villain from my sci-fi novel on launch day

https://elidorascodex.com/product/the-elidoras-codex-books-1-2-bundle/
1•Elidorascodex•6m ago•1 comments

Show HN: Toil, a go library for simple parallelism

https://github.com/indrora/toil
1•indrora•6m ago•0 comments

Common Lisp Screenshots: Today's CL Applications in Action

https://www.lisp-screenshots.org/
1•djha-skin•6m ago•0 comments

Internet shutdown chokes off one of the last lifelines for young Iranians

https://www.iranintl.com/en/202602121494
1•ukblewis•6m ago•0 comments

Show HN: PolyMCP – Orchestrate AI agents across Python tools and MCP servers

1•justvugg•10m ago•0 comments

Bio-Theory Lab Notes

https://chillphysicsenjoyer.substack.com/p/bio-theory-lab-notes
1•surprisetalk•10m ago•0 comments

Survival Analysis of the Supreme Court

https://entropicthoughts.com/survival-analysis-of-the-supreme-court
1•surprisetalk•10m ago•0 comments

How to Win Titular Metagames

https://taylor.town/how-to-title
1•surprisetalk•10m ago•0 comments

Mapping Ignorance

https://mappingignorance.org/
1•surprisetalk•10m ago•0 comments

Maximum Agreement Linear Predictor (MALP)

https://arxiv.org/abs/2304.04221
1•tesserato•11m ago•1 comments

Solving Mastermind with Maximum Entropy

https://sbondaryev.dev/articles/mastermind-entropy
1•sbondaryev•12m ago•1 comments

I Just Returned from China. We Are Not Winning

https://www.nytimes.com/2026/02/10/opinion/china-ai-ev-trump.html
3•SilverElfin•12m ago•2 comments

Roman Marching Camps: An Essential Element in Rome's Empire-Building (2004)

https://warfarehistorynetwork.com/article/roman-marching-camps-an-essential-element-in-romes-empi...
1•andsoitis•12m ago•0 comments

OpenAI retired its most seductive chatbot – leaving users angry and grieving

https://www.theguardian.com/lifeandstyle/ng-interactive/2026/feb/13/openai-chatbot-gpt4o-valentin...
2•speckx•13m ago•1 comments

Quantum-secure cryptography in Apple operating systems

https://support.apple.com/nl-nl/guide/security/secc7c82e533/web
1•janandonly•13m ago•0 comments

Are the Mysteries of Quantum Mechanics Beginning to Dissolve?

https://www.quantamagazine.org/are-the-mysteries-of-quantum-mechanics-beginning-to-dissolve-20260...
2•jandrewrogers•13m ago•0 comments

CCI Imposes Penalty on Intel Corp. For Its India Specific Warranty Policy

https://www.pib.gov.in/PressReleasePage.aspx?PRID=2227079
1•shscs911•14m ago•0 comments

Colorado River

https://www.americanrivers.org/river/colorado-river-2/
1•andsoitis•15m ago•0 comments

Craftsmanship coding and the five stages of grief

https://thomasvilhena.com/2026/02/craftsmanship-coding-five-stages-of-grief
1•speckx•15m ago•0 comments

Shedding

https://winnielim.org/journal/shedding/
2•herbertl•16m ago•0 comments