gitwtfhub

wtf is pi-leakguard?

calionauta/pi-leakguard — explained in plain English

Analysis updated 2026-05-18

2TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

TL;DR

A safety extension for the pi.dev coding agent that blocks, redacts, or warns about credential leaks during agent sessions.

Mindmap

mindmap
  root((repo))
    What it does
      Blocks secret file access
      Redacts secrets from output
      Blocks risky egress
    Tech stack
      TypeScript
      pi.dev extension
    Use cases
      Prevent credential leaks
      Safer agent automation
      Audit secret access
    Audience
      Developers
      AI agent users
    Modes
      Max mode
      Auto mode
      Basic mode
      Off mode
    Philosophy
      Limits damage not injection

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Block a coding agent from reading sensitive files like .env or SSH keys.

REASON 2

Redact API keys, tokens, and database URLs from tool output before the model sees them.

REASON 3

Block network requests that would exfiltrate credentials the agent read earlier.

REASON 4

Scan git commits and file writes for secret material before they happen.

What's in the stack?

TypeScriptpi.dev

How it stacks up

calionauta/pi-leakguard4ssh1/mine-sweeperachawla19/intuitcode-extension
Stars222
LanguageTypeScriptTypeScriptTypeScript
Last pushed2026-01-31
MaintenanceMaintained
Setup difficultymoderatemoderatemoderate
Complexity3/52/54/5
Audiencedevelopervibe coderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Acts as a defense-in-depth layer, not a full sandbox, untrusted or unattended automation should still use Docker or a micro-VM.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

Wtf does this do

pi-leakguard is a safety extension for pi.dev, a coding agent, that tries to stop it from accidentally reading, writing, or leaking secrets like passwords and API keys. The author describes it as an independent continuation of a similar project's ideas, not an official fork, and it keeps the same MIT license. The README is careful to describe it as a defense in depth seatbelt rather than an airtight sandbox: it catches accidental leaks and common tricks used to extract secrets, but for untrusted code or automation running without supervision, it recommends using a real isolation tool like Docker instead of relying on this alone. When one of its protective layers is triggered, it can do one of three things. It can block the action entirely unless you confirm it should proceed, it can redact a secret from the output before the model ever sees it while still letting the agent know a secret existed, or it can simply warn you without stopping anything. The tool covers many angles: blocking reads and writes to sensitive paths like environment files and SSH keys, scrubbing known secret patterns like API keys and database URLs from command output, detecting attempts to bypass protection through symlinks or hidden characters, catching shell commands designed to dump or smuggle out secrets, and scanning file writes and git commits for secret material before they happen. Notably, the README explains that it deliberately does not try to detect prompt injection attacks by pattern matching, arguing that attackers can phrase an injection in endless different ways, so a fixed pattern list would miss most real attempts while frequently flagging normal, harmless text. Instead of trying to catch the injection itself, it focuses on limiting the damage an injection could cause, by redacting secrets and blocking the network calls that would carry them out. Four modes are available, ranging from full blocking with confirmation prompts down to fully disabled, and settings persist to a local configuration file.

Yoink these prompts

Prompt 1
Help me install pi-leakguard and set it to max mode for my pi.dev agent.
Prompt 2
Explain the difference between pi-leakguard's block, redact, and warn actions.
Prompt 3
Walk me through configuring pi-leakguard's allow-list for a trusted secret pattern.
Prompt 4
Show me why pi-leakguard doesn't try to detect prompt injection directly.

Frequently asked questions

wtf is pi-leakguard?

A safety extension for the pi.dev coding agent that blocks, redacts, or warns about credential leaks during agent sessions.

What language is pi-leakguard written in?

Mainly TypeScript. The stack also includes TypeScript, pi.dev.

What license does pi-leakguard use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is pi-leakguard to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is pi-leakguard for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.