All plugins

redaction-pack

Teaches Hermes's built-in secret redactor 71 more vendor credential formats (HashiCorp Vault, Doppler, Amazon Bedrock, Atlassian, Cloudflare, Supabase, Tailscale, Docker Hub, JFrog Artifactory, CircleCI, HubSpot, PostHog, Grafana, Sentry, Shopify and others) through register_redaction_patterns, so those tokens are masked in logs, tool output and model-bound text like the built-in ones. Disclosure — register() makes one call, ctx.register_redaction_patterns; no tools, hooks, network access, subprocesses, files or environment variables; the patterns can only add masks, and security.redact_secrets: false still turns redaction off.

pierrenodeToolsv1.4.0Updated 1 month ago

About

Teaches Hermes's built-in secret redactor 71 more vendor credential formats (HashiCorp Vault, Doppler, Amazon Bedrock, Atlassian, Cloudflare, Supabase, Tailscale, Docker Hub, JFrog Artifactory, CircleCI, HubSpot, PostHog, Grafana, Sentry, Shopify and others) through register_redaction_patterns, so those tokens are masked in logs, tool output and model-bound text like the built-in ones. Disclosure — register() makes one call, ctx.register_redaction_patterns; no tools, hooks, network access, subprocesses, files or environment variables; the patterns can only add masks, and security.redact_secrets: false still turns redaction off.

redaction-pack

A Hermes plugin that teaches the built-in secret redactor 71 more vendor
credential formats: HashiCorp Vault, Doppler, Amazon Bedrock, Atlassian,
Cloudflare, Supabase, Tailscale, Docker Hub, JFrog Artifactory, CircleCI,
HubSpot, PostHog, LangSmith, Pinecone, Grafana, Sentry, Shopify and others. It registers regexes and nothing else.

Why

Hermes masks credentials it recognises by their vendor prefix (sk-, ghp_,
AIza, glpat-, AKIA, ...) in logs, tool output and model-bound text. A
token from a vendor that is not on that list goes through unchanged: a deploy
script that prints its Doppler token, or a failing curl that echoes a Vault
token, lands in the transcript in clear text.

Hermes has a seam for exactly this: ctx.register_redaction_patterns() adds
prefix patterns to the same matcher the built-in rules run in. The seam is
additive-only. A plugin can widen what gets masked, never weaken a built-in
rule. This pack uses it for formats Hermes does not ship.

Install

hermes plugins install redaction-pack
hermes plugins enable redaction-pack

Restart Hermes (CLI, gateway or desktop backend) afterwards, since patterns are
registered when plugins load. Nothing to configure.

What changes

With the pack enabled, a token in one of the formats below is masked like a
built-in one. Normal output keeps the first 6 and last 4 characters so you can
still tell which credential it was:

deploy failed: 401 Unauthorized for PMAK-6...e3b9 (retrying)

File content returned to the agent gets Hermes's non-reusable sentinel
(«redacted:...») instead, so the agent cannot copy a truncated value back into
a config file. Setting security.redact_secrets: false turns redaction off for
these formats as well as the built-in ones.

Formats

VendorTokenPatternSource
1Passwordaccount Secret KeyA3-[A-Z0-9]{6}-(?:[A-Z0-9]{11}|[A-Z0-9]{6}-[A-Z0-9]{5})-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}gitleaks
HashiCorp Vaultservice tokenhvs\.[A-Za-z0-9_-]{90,120}gitleaks
HashiCorp Vaultbatch tokenhvb\.[A-Za-z0-9_-]{138,300}gitleaks
DopplerCLI, personal, service account, SCIM and audit tokensdp\.(?:ct|pt|sa|said|scim|audit)\.[A-Za-z0-9]{40,44}vendor docs
Dopplerservice tokendp\.st\.(?:[a-z0-9_-]{2,35}\.)?[A-Za-z0-9]{40,44}vendor docs
Amazon Bedrocklong-term API keyABSK[A-Za-z0-9+/]{109,269}={0,2}gitleaks
Amazon Bedrockshort-term API keybedrock-api-key-YmVkcm9jay5hbWF6b25hd3MuY29t[A-Za-z0-9+/]{20,}={0,2}gitleaks
Alibaba CloudAccessKey IDLTAI[A-Za-z0-9]{20}gitleaks
DigitalOceanOAuth refresh tokendor_v1_[a-f0-9]{64}gitleaks
Fly.ioaccess tokenfo1_[A-Za-z0-9_-]{43}gitleaks
Fly.iomacaroon tokenfm1[ar]_[A-Za-z0-9+/]{100,}={0,3}gitleaks
Fly.iomacaroon token (v2)fm2_[A-Za-z0-9+/]{100,}={0,3}gitleaks
HerokuAPI keyHRKU-AA[A-Za-z0-9_-]{58}gitleaks
OpenShiftuser tokensha256~[A-Za-z0-9_-]{43}gitleaks
ScalingoAPI tokentk-us-[A-Za-z0-9_-]{48}gitleaks
Cloudflareglobal API key (cfk_ format)cfk_[A-Za-z0-9]{40}[a-f0-9]{8}trufflehog
Pulumiaccess tokenpul-[a-f0-9]{40}gitleaks
InfracostAPI keyico-[A-Za-z0-9]{32}gitleaks
Databrickspersonal access tokendapi[a-f0-9]{32}(?:-[0-9])?gitleaks
PlanetScaleservice token, OAuth token and passwordpscale_(?:tkn|oauth|pw)_[A-Za-z0-9_.=-]{32,64}gitleaks
Supabasepersonal and OAuth access tokensbp_(?:oauth_|v0_)?[a-f0-9]{40}vendor source
TailscaleAPI, auth, OAuth client, SCIM and webhook keystskey-(?:api|auth|client|scim|webhook)-[A-Za-z0-9_]+-[A-Za-z0-9_]{16,}vendor docs
Hugging Faceorganization API tokenapi_org_[A-Za-z]{34}gitleaks
LangSmithpersonal access token and service keylsv2_(?:pt|sk)_[a-f0-9]{32}_[a-f0-9]{10}trufflehog
PineconeAPI keypcsk_[A-Za-z0-9]{5,6}_[A-Za-z0-9]{63}trufflehog
Weights & BiasesAPI key (v1 format)wandb_v1_[A-Za-z0-9]{27}_[A-Za-z0-9]{49}trufflehog
GrafanaCloud API tokenglc_[A-Za-z0-9+/]{32,400}={0,3}gitleaks
Grafanaservice account tokenglsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8}gitleaks
Sentryuser auth tokensntryu_[a-f0-9]{64}gitleaks
Sentryorganization auth tokensntrys_eyJ[A-Za-z0-9+/]{30,400}={0,2}_[A-Za-z0-9+/]{43}gitleaks
DynatraceAPI tokendt0c01\.[A-Za-z0-9]{24}\.[A-Za-z0-9]{64}gitleaks
New Relicuser API keyNRAK-[A-Za-z0-9]{27}gitleaks
New Relicinsert keyNRII-[A-Za-z0-9_-]{32}gitleaks
New RelicInsights query keyNRIQ-[A-Za-z0-9_-]{25}trufflehog
PostHogpersonal API keyphx_[A-Za-z0-9_]{43,48}trufflehog
RootlyAPI keyrootly_[a-f0-9]{64}trufflehog
PostmanAPI keyPMAK-[a-fA-F0-9]{24}-[a-fA-F0-9]{34}gitleaks
Sourcegraphaccess tokensgp_(?:[a-fA-F0-9]{16}_|local_)?[a-fA-F0-9]{40}gitleaks
PrefectAPI keypnu_[A-Za-z0-9]{36}gitleaks
ReadMeAPI keyrdme_[a-z0-9]{70}gitleaks
RubyGemsAPI keyrubygems_[a-f0-9]{48}gitleaks
Clojarsdeploy tokenCLOJARS_[A-Za-z0-9]{60}gitleaks
JFrog ArtifactoryAPI keyAKCp[A-Za-z0-9]{69}gitleaks
JFrog Artifactoryreference tokencmVmdGtu[A-Za-z0-9]{56}trufflehog
Typeformpersonal access tokentfp_[A-Za-z0-9_.=-]{59}gitleaks
Frame.iodeveloper tokenfio-u-[A-Za-z0-9_=-]{64}gitleaks
Docker Hubpersonal access tokendckr_pat_[A-Za-z0-9_-]{27}trufflehog
Docker Huborganization access tokendckr_oat_[A-Za-z0-9_-]{32}trufflehog
Figmapersonal access tokenfigd_[A-Za-z0-9_-]{40}trufflehog
Figmapersonal access token (figp_ format)figp_[A-Za-z0-9_=-]{40,54}trufflehog
Slackapp configuration refresh tokenxoxe-[0-9]-[A-Za-z0-9]{146}gitleaks
AtlassianAPI token (Jira, Confluence)ATATT[A-Za-z0-9+/=_-]+=[A-Za-z0-9]{8}trufflehog
Atlassianorganization admin API keyATCTT3xFfG[A-Za-z0-9+/=_-]+=[A-Za-z0-9]{8}trufflehog
Bitbucket Data CenterHTTP access tokenBBDC-[A-Za-z0-9+/@_-]{40,50}trufflehog
CircleCIpersonal API tokenCCIPAT_[A-Za-z0-9]{22}_[a-fA-F0-9]{40}trufflehog
Buildkiteuser API access tokenbkua_[a-z0-9]{40}trufflehog
SonarCloudtokensqco_[A-Za-z0-9]{59}trufflehog
SourcegraphCody gateway access tokenslk_[a-f0-9]{64}trufflehog
Contentfulpersonal access tokenCFPAT-[A-Za-z0-9_-]{43}trufflehog
ApifyAPI tokenapify_api_[A-Za-z0-9]{36}trufflehog
Adobeclient secretp8e-[A-Za-z0-9]{32}gitleaks
Shopifyaccess tokens and shared secretshp(?:at|ca|pa|ss)_[a-fA-F0-9]{32}gitleaks
Squareaccess tokensq0atp-[A-Za-z0-9_-]{22,60}gitleaks
ShippoAPI tokenshippo_(?:live|test)_[a-fA-F0-9]{40}gitleaks
DuffelAPI tokenduffel_(?:test|live)_[A-Za-z0-9_=-]{43}gitleaks
EasyPostproduction and test API keysEZ[AT]K[A-Za-z0-9]{54}gitleaks
BrevoAPI keyxkeysib-[a-f0-9]{64}-[A-Za-z0-9]{16}gitleaks
HubSpotprivate app access tokenpat-(?:na|eu)1-[A-Za-z0-9]{8}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{12}trufflehog
Flutterwavelive secret keyFLWSECK-[0-9a-z]{32}-Xtrufflehog
Flutterwavetest secret keyFLWSECK_TEST-[A-Ha-h0-9]{32}-Xgitleaks
RampAPI client secretramp_sec_[A-Za-z0-9]{48}trufflehog

"gitleaks" means the format follows the rule of that name in
gitleaks (MIT); patterns.py gives the
rule id for each entry. Doppler's formats are the ones Doppler publishes in
Auth Token Formats.
Supabase's is the AccessTokenPattern the
Supabase CLI validates tokens against, and
Tailscale's prefixes are the ones listed in
Key prefixes.
"trufflehog" means the format follows that
TruffleHog detector
(pkg/detectors/<name>). Patterns are rewritten for Hermes's matcher: explicit
character classes instead of (?i), no capturing groups, no top-level |.

Left out on purpose

  • Formats Hermes already masks. The test suite checks every format above
    against plain Hermes. Slack's xoxe.xoxb- / xoxe.xoxp- configuration
    tokens are not listed because the built-in xox[baprs]- rule already masks
    their body.
  • Formats with an open Hermes pull request, for example age keys (#95440),
    NVIDIA API keys (#28332), Google OAuth tokens (#55467, #117441), 1Password
    service-account tokens (#67438) and chat webhook URLs (#118018). Those belong
    in core.
  • Formats whose shape no source pins down. Supabase's newer sb_secret_
    API keys have a documented prefix but no published length or alphabet, so a
    pattern would be a guess.
  • Formats without a distinctive literal prefix (Terraform Cloud, Mailgun
    key-, Airtable pat, Resend re_). Hermes needs a literal prefix to gate each pattern
    cheaply, and a short common one would run the full matcher on most lines.
    ClickHouse Cloud's 4b1d prefix is left out for the same reason: it reads as hex
    and would gate on hashes. Salesforce refresh tokens are out because the only
    source matches their 5AEP861 prefix case-insensitively and none pins down the one
    spelling a literal prefix gate needs.

Security and footprint

  • register() makes a single call, ctx.register_redaction_patterns(...). No
    tools, hooks, middleware, commands or slash commands.
  • No network access, no subprocesses, no files read or written, no environment
    variables or credentials read.
  • The patterns join the matcher Hermes already runs over logs and tool output,
    behind its literal-prefix substring gate. Every pattern has a literal vendor
    prefix and no nested repeat (Hermes refuses ReDoS-shaped patterns at
    registration).
  • The pack can only mask more text. A false positive shows up as a masked
    string, never as a leaked one.

Compatibility

Hermes 0.21.0 (v2026.8.31) or newer. CI runs the full test suite against
that release and against Hermes main every day.

Development

git clone https://github.com/NousResearch/hermes-agent ../hermes-agent
# Hermes-free checks (pattern table, samples, README sync):
python -m pytest tests/test_formats.py
# Against a Hermes checkout:
PYTHONPATH=../hermes-agent python -m pytest tests

The tests build every sample token at run time from a prefix and a generated
body, so the repository holds no credential-shaped literals. For each format
they check that:

  • plain Hermes leaks the token;
  • the pack masks it;
  • Hermes accepts every pattern;
  • built-in rules still work;
  • Hermes's own source tree (thousands of .py and .md files) gets no new
    masks;
  • a copy installed under a fresh HERMES_HOME, enabled with the CLI, loads and
    masks in a separate process.

To add a format: add a TokenFormat to redaction-pack/patterns.py with its
source, add a sample in tests/conftest.py and a row to this table (the tests
fail until all three agree).

License

MIT

README from the reviewed commit febd8bf; it updates when the author re-pins.

More by pierrenode

3 plugins by pierrenode in the catalog.

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section