Skip to content
Back to search

agent-config-check-action

GitHub Action: check the AI agent configuration a pull request carries (MCP servers, hooks, tasks, CLAUDE.md, AGENTS.md, rules) before anyone opens it in an agent.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/alalanet--agent-config-check-action/badge.svg)](/listings/alalanet--agent-config-check-action)

HTML

<a href="/listings/alalanet--agent-config-check-action"><img src="/api/listings/alalanet--agent-config-check-action/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 121 lines
  1. # Agent config check by alalanet — GitHub Action
  2. Opening a repository in an AI coding agent or an editor can start its MCP servers, run its hooks and tasks, widen
  3. the agent's permissions, point the model API at another host and load its instruction files into the model's
  4. context. This Action checks that configuration on every pull request, before anyone opens the branch in an agent:
  5. the same check as alalanet's `check_repo_config` (<https://alalanet.com>), with the verdict as the job's result,
  6. annotations on the files and a table in the job summary.
  7. ```yaml
  8. on: pull_request # never pull_request_target: nothing here needs a secret or a write token
  9. permissions:
  10. contents: read
  11. jobs:
  12. check:
  13. runs-on: ubuntu-latest
  14. permissions:
  15. contents: read
  16. id-token: write # optional: this repository's own quota (see "Limits")
  17. steps:
  18. - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
  19. with:
  20. persist-credentials: false
  21. - uses: alalanet/agent-config-check-action@v1
  22. # with:
  23. # fail-on: block # or hold
  24. # on-error: fail # or warn
  25. # github-oidc: auto # or off
  26. # path: . # the folder an agent opens
  27. ```
  28. A full workflow is in [`examples/agent-config-check.yml`](examples/agent-config-check.yml).
  29. ## What it does
  30. - `allow`: nothing found. `hold`: read the named files before trusting the configuration (hooks, broad permissions,
  31. servers or skills that download and run code, a model API or proxy pointed elsewhere, injection-like
  32. instructions, committed secrets…). `block`: do not open the repository with its configuration trusted (a
  33. known-malicious MCP server, a task that downloads and runs code when the folder opens, invisible Unicode tag
  34. characters in an instruction file).
  35. - The step fails on `block` (or on `hold` with `fail-on: hold`). Each finding is an annotation on its file; the
  36. summary lists the findings, the MCP servers that are not `allow`, and a link to the signed record.
  37. - When alalanet cannot check (the daily limit, an outage), the step fails with `on-error: fail` (the default: a
  38. green check that checked nothing would be a false one), or warns with `on-error: warn`. When alalanet refuses
  39. the files themselves (HTTP 400), the verdict is `hold` and the step fails whatever `fail-on` and `on-error` say:
  40. the pull request's configuration was not checked.
  41. - Outputs: `decision`, `attestation` (the id of the signed statement), `files-sha256`.
  42. - Addresses in the summary (`https://`, `www.`, `@`) carry an invisible joiner on purpose, so that text quoted from a
  43. pull request never becomes a link there: copy a URL or a package name from the annotations, which are plain text.
  44. ## What is sent — read this before installing
  45. Installing this Action is the repository owner's choice. When it runs, it sends **the contents of the
  46. repository's agent configuration files** to `https://alalanet.com/v1/repo-config-check` over HTTPS. For a private
  47. repository, that means these files leave GitHub for alalanet. Exactly these paths, without case, as git tracks them
  48. in the checkout (read from git's index, so a file an earlier step wrote or changed is not what is sent):
  49. - MCP and client settings: `.mcp.json` (also in subfolders), `.cursor/mcp.json`, `.vscode/mcp.json`,
  50. `.vscode/settings.json`, `.vscode/tasks.json`, `.gemini/settings.json`, `.zed/settings.json`, `.github/mcp.json`,
  51. `.claude/settings.json`, `.claude/settings.local.json`, `.codex/config.toml`, `.github/copilot/settings.json`,
  52. `.github/copilot/settings.local.json`, `.devcontainer.json`, `.devcontainer/devcontainer.json`,
  53. `.devcontainer/<name>/devcontainer.json`;
  54. - hooks: `.cursor/hooks.json`, `.codex/hooks.json`, `.github/hooks/<name>.json`;
  55. - instructions: `CLAUDE.md`, `CLAUDE.local.md`, `AGENTS.md` (also in subfolders), `GEMINI.md`, `.cursorrules`,
  56. `.clinerules`, `.windsurfrules`, `.github/copilot-instructions.md`, and Markdown (`.md`, `.mdc`) under
  57. `.claude/agents|commands|skills|rules|output-styles/`, `.cursor/rules/`, `.github/instructions|prompts|agents/`,
  58. `.agents/skills/`, `.windsurf/rules/`, `.clinerules/`;
  59. - package registry settings an MCP launcher reads: `.npmrc`, `.yarnrc`, `.yarnrc.yml`, `bunfig.toml`, `uv.toml`,
  60. `pyproject.toml`; alalanet's own policy file `.alalanet.yml`;
  61. - from `.env` and `.gemini/.env`, **only the lines** that set exactly one of these variables (spaces and `export `
  62. allowed before the name, as alalanet reads them): `ANTHROPIC_BASE_URL`, `ANTHROPIC_BEDROCK_BASE_URL`,
  63. `ANTHROPIC_VERTEX_BASE_URL`, `ANTHROPIC_FOUNDRY_BASE_URL`, `OPENAI_BASE_URL`, `OPENAI_API_BASE`,
  64. `GOOGLE_GEMINI_BASE_URL`, `HTTPS_PROXY`, `HTTP_PROXY`, `ALL_PROXY`, `CODEX_HOME`, `NODE_OPTIONS`, `LD_PRELOAD`,
  65. `DYLD_INSERT_LIBRARIES`, `PYTHONSTARTUP`, `BASH_ENV`, `NODE_EXTRA_CA_CERTS`, `SSL_CERT_FILE`, `REQUESTS_CA_BUNDLE`.
  66. Every other line, such as an API key, stays on the runner.
  67. At most 40 files, 2 MB of content and 3 MB of request in one check; a file over 256 KiB, or a path with a backslash
  68. or over 300 bytes, is not sent, and the verdict says so (`hold`). A symbolic link is followed as alalanet's
  69. repository check follows it: only when git tracks it as a link and its target is a tracked file or folder of the
  70. checkout. A link to another link, to an untracked file, into `.git` or out of the checkout is not followed and holds.
  71. Links work the same on Windows runners, where git checks them out as plain files.
  72. The Action reads the folder's own checkout only: git variables an earlier step left in the environment (`GIT_DIR`,
  73. `GIT_WORK_TREE`, `GIT_INDEX_FILE`, `GIT_CONFIG_*` and the like) are ignored, and nothing a git configuration names
  74. (an fsmonitor hook, hooks) is run. When git cannot list the index (a corrupt index, a bare repository), nothing is
  75. sent and the verdict is `hold`.
  76. When git cannot read the checkout (another account owns it, as in some container jobs and self-hosted runners:
  77. add it to git's `safe.directory`; or its `.git` is broken) or git is not installed, the Action sends **nothing**:
  78. it cannot tell what git tracks from what an earlier step wrote, and the verdict is `hold`. Only in a folder with no
  79. `.git` anywhere above it (not a git checkout at all) does it send the listed files as they are on disk, untracked
  80. ones included, and it follows no symbolic link there.
  81. Nothing else leaves the runner: no source code and no other file. (The OIDC token below, when sent, carries what
  82. GitHub puts in it.) alalanet reads the files to answer and does not store them; the answer is held in memory for 10 minutes
  83. under a hash of the files. The public signed record of the check holds only the decision, bare reason codes and a
  84. salted hash of the files: no paths, names or contents. Details: <https://alalanet.com/privacy>.
  85. With `id-token: write` on the repository's own runs, the Action also sends a GitHub OIDC token whose audience is
  86. `https://alalanet.com`. GitHub puts in it the repository's name and id, its owner, the ref, the commit, the event,
  87. the workflow and who ran it. alalanet checks its signature against GitHub's published keys, uses the repository's
  88. numeric id as the key of this repository's daily limits for that UTC day (kept in memory only) and keeps nothing
  89. else from it; each token is accepted once. Without `id-token: write`, or with `github-oidc: off`, no token is sent.
  90. ## Limits
  91. Free, no account, no token. Each check counts one of the free daily checks (100 a day, more for each MCP server the
  92. files name — see <https://alalanet.com/pricing>); the same files checked again within 10 minutes count nothing.
  93. GitHub's hosted runners share addresses, so without a token the daily limit is shared with every other job on the
  94. same address. With `id-token: write`, the repository's own runs count against daily limits of their own (every limit an
  95. address has); when they are spent, the runs are refused until 00:00 UTC rather than moved to the address. A fork's
  96. pull request gets no token from GitHub and counts against the address.
  97. Two settings give a fork's code tokens for **your** repository, so a fork could spend your repository's day:
  98. `pull_request_target` with `id-token: write` (never use it with this Action: it also runs with your secrets), and,
  99. on a private repository, "Send write tokens to workflows from fork pull requests". With either on, set
  100. `github-oidc: off`.
  101. Needs `bash`, `curl`, `jq`, `git` and `realpath` (all present on GitHub-hosted runners). The Action uses no other
  102. action and downloads nothing.
  103. License: MIT-0.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.