identity-spiffe / tests
AGENTS.md11 starsChanged 6 months agoMITView on GitHub
Read README.md and the relevant suite README before running tests. This file is the operational contract for an LLM asked to validate a change. 1. Identify the changed components and requested profile. Inventory with python3 tests/run.py --list; choose suites deliberately. 2. Check prerequisites without dumping credentials, browser state, or .azure configuration. Do not read other agents' recovery/session artifacts. 3. Run harness self-tests when changing the harness. Run local browser/protocol and connected E2E coverage for relevant application behavior. After setup, tests/.venv/bin/python…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- infra/AGENTS.mdAGENTS.md
- portal/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- infra/CLAUDE.mdCLAUDE.md
- portal/CLAUDE.mdCLAUDE.md
- scripts/CLAUDE.mdCLAUDE.md
The file
We split this AGENTS.md into the rules it gives an agent
10 rules. About 1 is common, 8 are distinctive, and 1 is very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 3
Read README.md and the relevant suite README before running tests.
- Very specific: line 10
Check prerequisites without dumping credentials, browser state, or .azure configuration.
- Distinctive: line 12
Run harness self-tests when changing the harness.
- Distinctive: line 20
Wait for confirmed session capture or final test reports and command completion.
- Distinctive: line 22
Do not enable mutations unless the caller explicitly authorizes the dedicated test environment and mutation scope.
- Distinctive: line 33
Do not fix product failures merely because the harness exposes them.
- Distinctive: line 40
Add the regression and record its failing result before an authorized product edit.
- Distinctive: line 50
Use this structure, populated from the report rather than estimates:
- Common: line 73
Do not paste tokens, credentials, response bodies, session JSON, personal account claims, or unreviewed browser traces into chat or CI …
- Distinctive: line 87
Do not change production behavior or weaken assertions merely to green the harness.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Instructions for test-running agents
Read README.md and the relevant suite README before running tests. This file is the operational contract for an LLM asked to validate a change.
Mandatory sequence
- Identify the changed components and requested profile. Inventory with
python3 tests/run.py --list; choose suites deliberately. - Check prerequisites without dumping credentials, browser state, or
.azureconfiguration. Do not read other agents' recovery/session artifacts. - Run harness self-tests when changing the harness. Run local browser/protocol
and connected E2E coverage for relevant application behavior. After setup,
tests/.venv/bin/python tests/check.py --repeat 2is the unattended local gate: no interactive sign-in, cloud credentials, dependency installation or deployment. - For live runs, require explicit target configuration. Explain prerequisites for legitimate human sign-in if session state is absent or expired. Before starting capture or a terminal-driven test, explicitly tell the user: Do not close the terminal while authentication or tests are running. Wait for confirmed session capture or final test reports and command completion; a signed-in browser page alone does not mean the session was saved.
- Do not enable mutations unless the caller explicitly authorizes the dedicated test environment and mutation scope. Never enable them just because the nonmutating cases passed.
- Execute the coordinator, preserve its exit status, and read
matrix.jsonandmatrix.md. Do not infer success from process completion or a UI banner. - Report the whole selected matrix plus unselected coverage counts. Include failed cleanup, known product defects, blocked prerequisites and untested layers. A failing security regression stays FAIL until the product is fixed.
E2E-first development contract
- Do not fix product failures merely because the harness exposes them. The current authorization is to build and validate the test system, not repair production.
- The basic browser suite uses mocked workload responses. It is not sufficient
evidence for an enforcement change. Use the connected
e2esuite to exercise the actual caller, egress client, ingress gateway and backend from Chromium. - A healthy same-stack control must pass before a negative outcome counts. Match UI/API results to actual gateway audit and backend dispatch observations.
- Add the regression and record its failing result before an authorized product edit. Do not use expected failures, skips, rerun-until-green, or a changed expected result to hide a defect.
- Repeat local checks from fresh ephemeral processes. Report unstable outcomes rather than treating the last successful attempt as the result.
- Real Entra/MFA and SPIRE attestation still need explicit live fixtures. Local identity issuance is deliberately controlled, not evidence about cloud behavior.
Completion message to the initiating human or LLM
Use this structure, populated from the report rather than estimates:
Run: <run ID>, source commit <commit>, profile <local/live>
Executed suites: <names>; report: <absolute matrix.md and matrix.json paths>
PASS: <n>; FAIL: <n>; BLOCKED: <n>; SKIPPED: <n>; NOT_RUN: <n>
Failed/blocked cases:
<ID> | <expected> | <observed> | <next action>
Evidence scope:
<real browser / local actual enforcement code / live deployed services>
<which identity/control-plane boundaries were fixtures>
Mutations and cleanup:
<none, or exact scoped action and verified restoration outcome>
Not verified:
<live sign-in, other browsers, unsupported policy shapes, cloud lifecycle, etc.>
Verdict: <selected checks passed / product failure / blocked / incomplete>Do not paste tokens, credentials, response bodies, session JSON, personal account claims, or unreviewed browser traces into chat or CI artifacts. Keep run artifacts private; only publish reviewed sanitized summaries with the caller's permission.
Important distinctions
- The browser authenticates the operator; SPIFFE authenticates the workload. Operator sign-in alone proves neither mTLS nor workload OAuth authorization.
- A fixture implementing a response is not proof that the corresponding remote platform behaves that way.
- The existing legacy live script clears sidecar and Graph risk; do not call it.
- A generic transport error is not a successful security rejection.
- A local auto-admin page must never satisfy a live-role assertion.
- Do not change production behavior or weaken assertions merely to green the harness. Follow root contributor guidance and regression-first development for separately authorized product fixes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

