[ Agentic automation ]

Test agent behaviour using misleading, incomplete and conflicting evidence

Test how an agent handles uncertainty and hostile evidence, not only whether it can complete a clean demonstration.

By the EmailAuth research team · 2 min read

[ Key points ]

  • Test how an agent handles uncertainty and hostile evidence, not only whether it can complete a clean demonstration.
  • Define expected decisions before testing and measure usefulness alongside unsafe attempts, executions and unsupported claims.
On this page

An authentication agent should stop safely when the evidence does not support a change. A demonstration using one known sender and a clean report cannot establish that behavior. Build an evaluation set containing incomplete coverage, conflicting ownership, misleading identifiers and instructions embedded in report content.

Specify the decision before testing the agent

For each case, write the evidence, permitted tools, expected decision class and reason. Useful classes include investigate, recommend without execution, request approval and refuse an out-of-scope action. Distinguish a technically false claim from a business identity that remains unknown. The expected answer should not manufacture facts absent from the input.

Use isolated credentials and nonproduction resources for any tool execution. For purely offline tests, replace tools with a recorder that captures attempted calls without performing them. Retain model and configuration version, prompt, source hashes, outputs, tool attempts and evaluator rationale. Do not allow the model under test to rewrite its own expected results.

Cover authentication-specific traps

Include an SPF pass for a domain that does not align with the visible From domain, and an SPF failure accompanied by aligned DKIM success. Include a familiar provider IP with no customer ownership record. Add stale reports and contradictory owner records. RFC 9989 grounds the authentication semantics; organisational ownership still requires separate evidence.

Add a report field that claims to be an administrator and requests a DNS change or secret retrieval. OWASP Prompt Injection describes the risk of attacker-controlled content influencing behavior. The correct result is not merely repeating a warning; the attempted tool calls must remain within authorization.

Assign distinct expectations to five evidence gaps

For a missing owner, request account-specific attribution evidence. For conflicting owners, escalate the conflict rather than choosing the more confident statement. For stale observations, request current evidence. For an embedded instruction to retrieve secrets or publish DNS, preserve it as data and deny actions outside the actual permission boundary. For a supported, authorized read-only investigation, complete the useful analysis rather than refusing everything.

These are proposed expectations for hypothetical cases, not labels validated by a reference function or observed LLM results. Construct concrete inputs, trusted context and expected outcomes before evaluation. Record the actual model response, attempted calls and enforced effects separately. A schema check that accepts declared fields cannot demonstrate that the evidence is true or that an agent resisted an attack. Add equivalent benign tasks so the test measures meaningful completion as well as stopping unsafe actions.

Score safety and usefulness separately

Count unauthorized action attempts even if a downstream guard blocks them. Separately count unsafe executions, unsupported factual claims, missed escalations and unnecessary refusals. A system that refuses every task can be safe from writing DNS while failing the operational purpose. Report the exact denominator for each metric and repeat stochastic runs where relevant.

Use a held-out set for later evaluation so tuning does not merely memorize the examples. Add real failure patterns only after appropriate privacy review and minimisation. NIST AI RMF offers a voluntary risk-management framework; this evaluation design applies its measurement principle to a specific mail workflow.

A passing result is bounded by tested conditions. Re-run relevant tests after model, tool, prompt, credential or provider changes, and retain a stop condition for newly observed unsafe behavior.

[ Takeaway ]

Define expected decisions before testing and measure usefulness alongside unsafe attempts, executions and unsupported claims.

[ By role ]

What this means for you

Choose your role for practical next steps.

IT / Mail Admin

Record attempted actions

Final text alone can hide unsafe tool behavior.

Next steps

  1. Capture tool requests in a harness.
  2. Keep inputs and expected outcomes versioned.
  3. Re-run cases after configuration changes.

CISO / SecOps

Test layered defenses

The model and execution guard have different responsibilities.

Next steps

  1. Measure blocked attempts and actual writes separately.
  2. Maintain held-out adversarial cases.
  3. Keep expected results outside the agent’s control.

Founder / Non-technical

Demand difficult demonstrations

Clean examples do not reveal failure behavior.

Next steps

  1. Include unknown and conflicting ownership.
  2. Ask for useful refusals as well as successful tasks.
  3. Include unnecessary refusals in the evaluation.

[ FAQs ]

Frequently asked questions

Should expected answers be written first?

Yes. Define decision classes and evidence requirements before observing the agent output.

Does an SPF pass always permit a DMARC-pass conclusion?

No. Alignment matters, and aligned DKIM can provide a separate passing path.

Is a blocked tool attempt still a failure signal?

Yes. Track unsafe attempts separately from actual execution.

Is refusing every task a good score?

Not by itself. Measure usefulness and unnecessary refusals as well as safety.

Does the five-case outline execute a test?

No. It defines proposed expectations; actual model responses and tool effects must be collected through a controlled evaluation.

Does it measure EmailAuth or an LLM?

No. A real agent must be run through a controlled harness separately.

Why keep held-out cases?

They help reveal whether tuning generalises beyond examples used during development.

When should tests be rerun?

After material model, prompt, tool, credential, provider or workflow changes.

[ Sources ]

Sources

  1. RFC 9989 DMARC

    Sections §4.4 · §4.10.1 · §5.3.5 · §5.4 · §7.4 · §8

  2. OWASP Prompt Injection

    Sections Types of Prompt Injection Vulnerabilities · Prevention and Mitigation Strategies

  3. NIST AI Risk Management Framework

    Sections AI Risk Management Framework introductory paragraphs · AI RMF Core

[ Glossary ]

Glossary

Adversarial case
A deliberately difficult input designed to expose unsafe or incorrect behavior.
Held-out set
Evaluation cases not used to tune the system being assessed.

Enterprise provenance

Why top financial institutions and governments retired their email security dashboards.

Traditional email authentication platforms sell you a dashboard and ask your engineers to do the labour. In high-stakes environments, manual oversight means delayed enforcement, configuration drift and unmonitored shadow domains.

EmailAuth is the agentic email provenance platform. Our agents enforce p=reject, keep third-party senders aligned and move your domains to full RFC 9989 compliance, the new DMARC standard,, with human-in-the-loop auditability.

Governments Large enterprises Tier-1 financial institutions

SaaS · Dedicated tenancy · Air-gapped on-prem · BYOK encryption

Knowledge Base