What is Weir?
Weir is a credential-exposure testing and monitoring tool for teams building AI agents and developers using Claude Code. For agent tests, it plants fake credentials in configured locations, runs the agent’s own flows and checks whether exact values reach telemetry, model prompts or other destinations. For Claude Code, it tracks inventoried real credentials without storing their values, and can redact matching tool output before it reaches the model. It also includes tools for scanning traces, inventorying credentials and auditing saved sessions.
Weir Features:
Canary Leak Checks: Weir-run plants unique fake credentials where real ones would live, exercises configured agent flows and checks the captured output for those exact values.
Exposure Verdicts: Results identify whether a planted credential leaked, stayed clean or could not be fully assessed, and name the destination where a leak appeared.
Claude Code Status: A status-line segment shows whether inventoried credentials entered a Claude Code session or left in a tool call, without displaying their values.
Tool Output Redaction: An optional Claude Code hook replaces matching whole credentials in supported tool results before the model reads them.
Trace And Session Audits: Weir scan follows sensitive data through existing traces, while weir audit checks real credentials against saved agent sessions offline.
Deployment Verification: Weir-run can send a planted key through a credential swap or sandbox target and create a record to sign and check before deployment.
Weir Benefits:
Catch Real Exposure: Exact-value checks help distinguish an actual credential leak from a string that merely resembles a secret.
Clearer Test Results: An incomplete verdict avoids treating an untested path as safe and helps teams see what the run did and did not cover.
Safer Credential Handling: Using fake values for agent tests and fingerprints for monitored real keys reduces the need to expose live credentials during checking.
Local Data Control: Offline scanning and a local fake model let teams inspect agent behavior without sending test data to an external service.
Earlier Review: Running checks from a pull request can bring credential exposure findings into development review before deployment.
Use Cases:
Agent CI Testing: Add a canary run to a pull request to check whether an agent sends configured fake credentials into spans, logs, console output or model requests.
Local Flow Checks: Run an agent’s own flows on a laptop to investigate where a test credential travels during execution.
Claude Code Monitoring: Use the status line while coding to see whether inventoried credentials entered the session or were sent in a tool call.
Tool Result Protection: Enable the redaction hook when Claude Code tools may return whole credential values that should not reach the model.
Predeployment Checks: Verify a credential swap or sandbox by sending a planted key through the target and checking its signed record before deployment.

