[WIP] Implement botlockbox as a secure credential-injecting proxy#1
Merged
trodemaster merged 1 commit intomainfrom Feb 18, 2026
Merged
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Copilot stopped work on behalf of
trodemaster due to an error
February 18, 2026 16:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation Plan for botlockbox
Original prompt
Overview
Implement
botlockbox— a Go command-line tool that acts as a credential-injecting HTTPS/HTTP MITM proxy for AI agents, MCP servers, and CLI tools. The proxy injects API credentials into outbound requests transparently, so callers (including AI agents with root shell access) never see the credentials.Security Goals
filippo.io/ageat seal time and only decrypted in memory at runtimePR_SET_DUMPABLE=0, disables core dumps, callsmlockall, usesMADV_DONTDUMPon secret pages, and stores secrets inmemguardencrypted enclavesRepository Structure
Create the following files:
Detailed File Specifications
go.modModule:
github.com/trodemaster/botlockboxDependencies:
filippo.io/age v1.2.0— age encryptiongithub.com/elazarl/goproxylatest — HTTP/HTTPS proxygithub.com/spf13/cobra v1.8.1— CLIgopkg.in/yaml.v3 v3.0.1— YAML config and secretsgolang.org/x/term— passphrase promptgolang.org/x/sys— unix syscalls for memlockgithub.com/awnumar/memguard— encrypted in-memory secret storagemain.goSimple entrypoint calling
cmd.Execute().cmd/root.gobotlockbox--configdefaulting tobotlockbox.yamlloadConfig(path string) (*config.Config, error)helpercmd/seal.goSubcommand
seal:AllowedHostsFromRules()secrets.Seal()os.Chmod(cfgFile, 0444)to make config read-only--identity(path to age private key file),--passphrase(bool, use passphrase instead)cmd/serve.goSubcommand
serve:secrets.HardenProcess()FIRST before anything elsesecrets.Unseal()to decrypt envelope into memoryenvelope.Validate(configAllowedHosts)— hardos.Exit(1)on mismatch with clear security violation messageproxy.New(cfg, envelope)http.ListenAndServe--identity,--passphraseinternal/config/config.goAllowedHostsFromRules()method on*Config:{{secrets.NAME}}template syntax using regex\{\{secrets\.(\w+)\}\}map[string][]stringmapping secretName → deduplicated list of hosts from that rule's matchinternal/config/loader.goLoad(path string) (*Config, error)— reads YAML file, sets defaults (Listen="127.0.0.1:8080",SecretsFile="~/.botlockbox/secrets.age"), expands~in paths.internal/secrets/envelope.go