agentleFS
ukorvlukorvl/web-of-flaws/.github/AGENTS.md

web-of-flaws

AGENTS.md8 starsChanged 3 months agoMITView on GitHub

This directory contains GitHub Actions workflows, workflow-local shell scripts and tests, repository labels, Dependabot policy, and Copilot integration instructions.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

36 rules. About 5 are common, 22 are distinctive, and 9 are very specific to this project.

  • ≈5

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈22

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not use mutable versions such as latest, main, master, next, or floating ranges.

    line 17
  2. Distinctive:

    If a dependency cannot be pinned, report it explicitly and add a TODO comment explaining why.

    line 18
  3. Distinctive:

    Use the minimum required permissions for each workflow and action.

    line 22
  4. Distinctive:

    Prefer contents: read or no explicit write permissions for validation jobs.

    line 23
  5. Distinctive:

    Do not grant repository-wide write permissions for convenience.

    line 24
  6. Distinctive:

    Keep privileged operations isolated from validation and test logic.

    line 25
  7. Common:

    Never pass secrets through command-line arguments when avoidable.

    line 32
  8. Common:

    Never write secrets to outputs, logs, caches, or artifacts.

    line 33
  9. Common:

    Avoid writing secrets to files.

    line 34
  10. Common:

    Never cache secrets or store them in a way that they can be retrieved by unauthorized workflows or jobs.

    line 37
  11. Distinctive:

    Avoid unnecessary network access in workflows and don't rely on network access for validation unless it is the explicit purpose of the …

    line 41
  12. Distinctive:

    If you rely on external data, verify its integrity and authenticity.

    line 42
  13. Distinctive:

    Add timeout-minutes to jobs that can hang or access external systems.

    line 43
  14. Distinctive:

    Keep retry counts small and explicit.

    line 44
  15. Distinctive:

    Treat caches only as performance optimizations.

    line 49
  16. Distinctive:

    Treat artifacts downloaded from untrusted workflow runs as untrusted input.

    line 51
  17. Common:

    Do not upload credentials, environment dumps, or sensitive runner state.

    line 53
  18. Very specific:

    Use actions/checkout only when repository contents are required.

    line 57
  19. Very specific:

    Use persist-credentials: false unless later authenticated Git operations are explicitly required.

    line 58
  20. Distinctive:

    Never check out attacker-controlled refs in a privileged workflow context.

    line 61
  21. Distinctive:

    Don't modify global runner state unless necessary.

    line 65
  22. Very specific:

    Put complex shell/Python logic in .github/scripts/.

    line 66
  23. Distinctive:

    Don't depend on commands that are not guaranteed to exist without installing them.

    line 67
  24. Distinctive:

    Avoid obscure third-party actions when a few shell lines or an official action suffice.

    line 68
  25. Distinctive:

    Prefer GitHub-authored or well-established actions and minimize the number of third-party actions.

    line 69
  26. Distinctive:

    Do not use deprecated ::set-output command.

    line 70
  27. Very specific:

    Do not manually overwrite GITHUB_* / RUNNER_* variables.

    line 71
  28. Distinctive:

    Treat artifacts and metadata originating from untrusted workflows as untrusted.

    line 72
  29. Very specific:

    Never execute untrusted PR-controlled code or artifacts inside a privileged workflow_run or pull_request_target context.

    line 73
  30. Very specific:

    Always start with a descriptive name and appropriate on triggers.

    line 78
  31. Very specific:

    Add concurrency when duplicate or stale runs can conflict, waste resources, or produce outdated results.

    line 80
  32. Very specific:

    Prefer cancel-in-progress: true for replaceable PR validation.

    line 81
  33. Distinctive:

    Do not cancel releases, publishing, deployments, migrations, or other stateful operations unless cancellation is explicitly safe.

    line 82
  34. Distinctive:

    All steps should have descriptive names.

    line 83
  35. Distinctive:

    Always try to make code self-explanatory and avoid unnecessary comments.

    line 84
  36. Very specific:

    If label generation changes, run python3 scripts/check.py --check labels.

    line 95

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

GitHub Automation Instructions

Scope

This directory contains GitHub Actions workflows, workflow-local shell scripts and tests, repository labels, Dependabot policy, and Copilot integration instructions.

Coding Rules

Pin Every External Dependency To An Exact Version Whenever Possible

  • For third-party GitHub Actions, pin to a full commit SHA.
  • Retain the human-readable release as a comment: uses: owner/action@<sha> # vX.Y.Z.
  • Pin language-specific dependencies to exact versions.
  • Pin runtime versions such as Node.js, Python, Go, etc. Never use latest when specifying runs-on or setup-<language> actions.
  • Pin system-level packages and external CLI tools when possible.
  • Do not use mutable versions such as latest, main, master, next, or floating ranges.
  • If a dependency cannot be pinned, report it explicitly and add a TODO comment explaining why.

Principle Of Least Privilege

  • Use the minimum required permissions for each workflow and action.
  • Prefer contents: read or no explicit write permissions for validation jobs.
  • Do not grant repository-wide write permissions for convenience.
  • Keep privileged operations isolated from validation and test logic.
  • Prefer contents: read or no explicit write permissions for validation jobs.
  • Never use write-all.

Secrets

  • Never print secrets.
  • Never pass secrets through command-line arguments when avoidable.
  • Never write secrets to outputs, logs, caches, or artifacts.
  • Avoid writing secrets to files. If a tool requires it, use a temporary permission-restricted file and remove it immediately after use.
  • Secrets must be accessed only by authorized workflows/jobs and the steps that require them.
  • For greater control, prefer environment-specific secrets, which can be protected by manual approvals or specific branch conditions.
  • Never cache secrets or store them in a way that they can be retrieved by unauthorized workflows or jobs.

Timeouts And Network Access

  • Avoid unnecessary network access in workflows and don't rely on network access for validation unless it is the explicit purpose of the workflow. Always use timeouts for network operations to avoid hangs.
  • If you rely on external data, verify its integrity and authenticity. Don't assume its shape and always check for missing or unexpected fields.
  • Add timeout-minutes to jobs that can hang or access external systems.
  • Keep retry counts small and explicit.
  • Retry transient external failures, not deterministic validation failures.

Cache And Artifact Rules

  • Treat caches only as performance optimizations; correctness must not depend on cache presence.
  • Include relevant lockfile/configuration hashes in dependency cache keys.
  • Treat artifacts downloaded from untrusted workflow runs as untrusted input.
  • Upload only artifacts that are intentionally needed.
  • Do not upload credentials, environment dumps, or sensitive runner state.

Checkout Rules

  • Use actions/checkout only when repository contents are required.
  • Use persist-credentials: false unless later authenticated Git operations are explicitly required.
  • Fetch only the history required by the workflow.
  • Set fetch-depth explicitly when Git history or diff computation depends on it.
  • Never check out attacker-controlled refs in a privileged workflow context.

Other General Rules

  • Don't modify global runner state unless necessary.
  • Put complex shell/Python logic in .github/scripts/; keep YAML declarative.
  • Don't depend on commands that are not guaranteed to exist without installing them.
  • Avoid obscure third-party actions when a few shell lines or an official action suffice.
  • Prefer GitHub-authored or well-established actions and minimize the number of third-party actions. Review what every third-party action can access if you use it.
  • Do not use deprecated ::set-output command.
  • Do not manually overwrite GITHUB_* / RUNNER_* variables.
  • Treat artifacts and metadata originating from untrusted workflows as untrusted.
  • Never execute untrusted PR-controlled code or artifacts inside a privileged workflow_run or pull_request_target context.

Workflow Structure Guidelines

  • Workflows should be clear, modular, and easy to understand, promoting reusability and maintainability.
  • Always start with a descriptive name and appropriate on triggers. Suggest granular triggers for specific use cases (e.g., on: push: branches: [main] vs. on: pull_request).
  • Define jobs with clear name and appropriate runs-on (e.g., ubuntu-24.04).
  • Add concurrency when duplicate or stale runs can conflict, waste resources, or produce outdated results.
  • Prefer cancel-in-progress: true for replaceable PR validation.
  • Do not cancel releases, publishing, deployments, migrations, or other stateful operations unless cancellation is explicitly safe.
  • All steps should have descriptive names.
  • Always try to make code self-explanatory and avoid unnecessary comments. If a comment is needed, explain the "why" rather than the "what."

Required Checks

yamllint .github
zizmor .github
actionlint
shellcheck .github/scripts/*.sh

If label generation changes, run python3 scripts/check.py --check labels.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.