agenticstack-guard-secrets
Secrets detection and redaction guard plugin for AgenticStack.
Scans agent input and output for credentials and replaces each with a
[REDACTED:<kind>] placeholder (or blocks the content entirely).
Detected secret kinds:
| Kind | Pattern |
|---|---|
openai-key |
sk-... API keys |
github-token |
ghp_ / gho_ / ghu_ / ghs_ / ghr_ tokens |
aws-access-key-id |
AKIA... access key ids |
slack-token |
xoxb- / xoxa- / xoxp- / xoxr- / xoxs- tokens |
bearer-token |
Bearer <token> authorization headers |
hex-secret |
32+ hex chars preceded by key/token/secret context words |
Install
pip install agenticstack-guard-secrets
Use
from agenticstack import Agent
from agenticstack_guard_secrets import SecretsGuard
# Redact mode (default): secrets are replaced before they reach the
# model or the conversation history.
agent = Agent(name="Helper", guards=[SecretsGuard()])
# Block mode: refuse content containing secrets outright.
agent = Agent(name="Strict", guards=[SecretsGuard(block_instead_of_redact=True)])
Or resolve it by name once the plugin is activated:
from agenticstack import get_runtime
# Auto-discovered via the `agenticstack.plugins` entry point:
await get_runtime().activate("agenticstack.guard-secrets")
agent = Agent(name="Helper", guards=["secrets"])
SecretsGuard subclasses the plain Guard ABC, so it runs on both agent
input and output.
Permissions
None — pure-Python regex scanning with no network, filesystem, shell, or environment access.
Metadata
Release files for agenticstack-guard-secrets 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agenticstack_guard_secrets-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agenticstack_guard_secrets-0.1.0-py3-none-any.whl |
Release files / agenticstack_guard_secrets-0.1.0-py3-none-any.whl
| Download URL | agenticstack_guard_secrets-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2de2e0e5702a1cf9b93ae4614c0e36d71ec9260d1a087c9e581607c45143b082
|
|
BLAKE2b-256 checksum How to use checksums |
5ab5ed832ba6ac5df9bceb94c400bc901a98d179bb71ced2f415bd66708375e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.7
|
Security for agenticstack-guard-secrets 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.