DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to redact pasted secrets before the model sees them with Preflight

Route agent traffic through Preflight so detected keys become placeholders and the request still runs.

Who it is forA developer whose coding agent reads .env files and shell output, and who worries a pasted API key will reach the model.

The problemSecrets can arrive inside source files, shell output, and documents, and a single leaked key can end up in a model provider's logs.

The outcomeDetected credentials are replaced with tokens such as [REDACTED:github-pat] and the agent keeps working on the sanitized request.

What you need first

  • A running underclass instance on 127.0.0.1:8080
  • Nix (for `nix run`) or devenv and Cargo for a local checkout
  • A coding harness or client that can change its base URL to http://127.0.0.1:8081/v1
  • Bubblewrap available for the default sandboxed attachment workers

Steps

  1. Start Preflight alongside underclass with nix run github:ghuntley/preflight -- serve
  2. Set the harness base URL to http://127.0.0.1:8081/v1
  3. Keep the existing underclass API key; Preflight passes authorization through by default
  4. Run a prompt that includes a fake key in a test file and confirm the request completes
  5. Check the JSON logs for an inspection.finding event with a rule_id and no matched secret

Prompt for your agent

Using the preflight repo at github.com/ghuntley/preflight, start the proxy in default redact mode, point the client at http://127.0.0.1:8081/v1, and send a test request containing a fake GitHub token from <test-file>. Report the HTTP status and the finding event from the JSON logs, and verify that the upstream request body contains [REDACTED:github-pat] rather than the token.

Caveat. Redaction only covers credential shapes that Preflight's default rules recognize, so other sensitive data may pass through unchanged.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page