My Hermes agent used a GitHub token it never saw
Hermes Agent already protects you from the obvious mistake. Ask it to read a .env file and the read is refused. Point it at an ordinary config file holding a token and the token comes back cut down to ghp_ng...39e5 , thanks to security.redact_secrets , which is on by default. That is a one-way door. The model never sees the token, which is the point, but it can't use it either. Ask the agent to…
Hermes Agents prevent users from accidentally reading secret values such as .env files or ordinary configuration files containing tokens. When the security.redact_secrets feature is enabled by default, the agent never sees the token nor can it utilize it. However, this also prevents the agent from executing API calls with the token.
Users sometimes disable redaction to allow the agent to function, resulting in every secret read by the agent being transmitted to the model provider and logged by the provider. To address this issue, Hermes now incorporates a WARDEN firewall to safeguard the model while still allowing it to access values it does not see. On a live Hermes 0.19.0 running on November 22, an agent was given a random GitHub-format token stored in a file.
While WARDEN's plugin was enabled and the agent's redaction was disabled, the agent read the file and hashed the token in the shell using printf %s WARDEN_SECRET_CG4G9F0HM4 | sha256sum. The model only possessed the token in the variable GITHUB_TOKEN=WARDEN_SECRET_CG4G9F0HM4, and the hash printed in the shell equaled the hash of the actual token computed afterward.
The placeholder was transmitted to the model, while the actual token remained confined to the tool. Hermes' middleware API consists of two key components: llm_request, which captures the complete provider request including user messages, tool results, and the system prompt, and tool_execution, which surrounds the actual tool call after approval and safeguard measures.
WARDEN replaces placeholders for values within tool execution, ensuring the agent's approval prompt and dangerous-command patterns remain masked. The placeholder table resides in memory and is discarded when Hermes ceases operation. Placeholders are random 50-bit values that differ between sessions. When a placeholder is accessed, it reverts to its original value only within the context of the origin from which it originated.
Hermes' tools are grouped into origins, with placeholders reverting to their values within the origin they came from by default. WARDEN's flow guard examines each call before execution, refusing calls that carry recognizable secrets, even to their origin. In the conducted test, the hash command was denied with the message "this call carries a secret (GitHub token)" until the flow guard was disabled for the test.
Masking determines where a value can be directed, while the flow guard dictates whether a call should execute. Personal data can be masked by specifying the WARDEN_MASK_PERSONAL variable in ~/.hermes/.env for organizations adhering to GDPR, CCPA, 152-FZ, or PCI DSS standards.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to