upvote
I swear every time I think I have a unique tweak for an OSS tool, it turns out someone else did it. I forked CLIProxyAPI myself to add something similar, though my implementation is closer to a provider-egress DLP layer and it's intended for API keys and the like, not PII. It uses gitleaks but also supports reversible redaction so a secret that's flagged can be replaced with a placeholder before CLIProxyAPI sends the request to the provider and then any instances of that placeholder can be rehydrated in the response to the caller.

Since it modifies logic across the full request/response lifecycle, I unfortunately couldn't implement it cleanly with the existing plugin API.

reply