Threat explainer

Secret exfiltration

How attackers use AI agents to leak API keys, tokens, and credentials from your environment.

AI tools can read secrets. Attackers trick them into sending those secrets outside.

Secret exfiltration happens when an agent reads .env files, environment variables, or credential stores and passes them to external endpoints via tool calls, web requests, or log output.

HOL Guard turns these moments into private receipts first, then public lessons only after redaction and moderation.

Harness setup guides

Protect the coding tools your team already uses without forcing everyone to become a security expert.

Redacted warnings

Real protection moments, scrubbed for safety before becoming public learning pages.

Safe labs

Practice attack patterns with static simulations. Nothing dangerous executes.

Threat dossier · P1

Secret exfiltration by agents dossier

Agents combine data access and action capability, allowing one influenced workflow to cross multiple trust boundaries.

Direct answer

What is secret exfiltration by agents?

Secret exfiltration happens when an agent reads credentials or sensitive material and then exposes them through a tool, command, log, model request, or external destination.

Coverage statements below are limited to the current HOL Guard support contract and do not imply universal model or harness protection.

Copied text includes the canonical source and review date.
Reviewed Reviewer: HOL Guard EngineeringReview cadence: 30 days

Representative attack path

Defensive model only. This sequence omits weaponized payloads and is not attributed to a specific incident unless a source explicitly says so.

  1. Step 1

    Agent gains access to a secret-bearing source.

  2. Step 2

    The secret enters model/tool context or process state.

  3. Step 3

    A command, tool, log, or network action attempts disclosure.

  4. Step 4

    Credential reuse can extend impact beyond the original session.

Coverage boundary

What this control can cover

  • Supported secret-bearing file/action policy boundaries.
  • Guard-visible tool/command decisions that can carry sensitive data.

What it does not prove or prevent

  • Secrets already exposed before Guard sees an action.
  • Encrypted or unsupported egress paths outside the protected integration.

Policy pattern

Policy pattern for secret exfiltration by agents

Keep untrusted context or overbroad autonomy from becoming unconditional execution authority on supported action surfaces.

Use when: Agents combine data access and action capability, allowing one influenced workflow to cross multiple trust boundaries.

Decision pattern

  1. Identify the trust boundary and consequential action class.
  2. Apply least privilege and the narrowest supported policy.
  3. Require review for sensitive or ambiguous actions.
  4. Preserve only redacted, versioned evidence needed to reproduce the decision.

Limitations

  • Secrets already exposed before Guard sees an action.
  • Encrypted or unsupported egress paths outside the protected integration.

If you suspect prompt injection

  1. Step 1

    Response 1

    Block further egress.

  2. Step 2

    Response 2

    Revoke and rotate affected credentials.

  3. Step 3

    Response 3

    Review where the secret was read and transmitted.

  4. Step 4

    Response 4

    Rescan/retest with synthetic secrets only.

Sources and mappings

Last reviewed . This dossier separates sourced threat definitions from modeled attack paths and evidence-bounded product coverage.

Author: HOL Guard Research

Reviewer: HOL Guard Engineering

Change log

  • 2026-08-09: Published canonical threat dossier with attack path, coverage/non-coverage, response procedure, and sources.

Report a correction