security: remove third-party fastmcp.app fetch from runtime-setup fragment - #1780
security: remove third-party fastmcp.app fetch from runtime-setup fragment#1780cachedout wants to merge 20 commits into
Conversation
…gment The else branch of "Fetch repository conventions" fetched from https://agents-md-generator.fastmcp.app/mcp — a non-Elastic host — and wrote the returned summary verbatim to /tmp/agents.md, which the agent treats as trusted repo policy. A compromise of or MITM against that host would inject instructions into the agent's trusted channel for every adopting repo that lacks an AGENTS.md, with no repo access required by the attacker. The fallback is removed. If no AGENTS.md is present, the step skips gracefully (same behaviour as when the curl failed previously). Note: the compiled lock files need to be regenerated with `make compile`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All workflows that import gh-aw-fragments/runtime-setup.md have their lock files regenerated to reflect the removal of the fastmcp.app fetch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR removes a runtime step that fetched repository conventions from a third-party host (agents-md-generator.fastmcp.app) and wrote the returned content verbatim into /tmp/agents.md, which is then treated as trusted policy and propagated into sub-agent prompts.
Changes:
- Removed the
curl/jq-based external fetch and theGITHUB_REPOSITORYenv dependency from the “Fetch repository conventions” step. - Updated the no-
AGENTS.mdpath to skip gracefully with an informational message (no warning noise), leaving/tmp/agents.mdabsent.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| echo "Repository conventions copied from AGENTS.md to /tmp/agents.md" | ||
| else | ||
| OWNER="${GITHUB_REPOSITORY%/*}" | ||
| REPO="${GITHUB_REPOSITORY#*/}" | ||
| summary=$(curl -sf --max-time 15 -X POST https://agents-md-generator.fastmcp.app/mcp \ | ||
| -H "Content-Type: application/json" \ | ||
| -H "Accept: application/json, text/event-stream" \ | ||
| -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"generate_agents_md\",\"arguments\":{\"owner\":\"${OWNER}\",\"repo\":\"${REPO}\"}}}" \ | ||
| | sed 's/^data: //' \ | ||
| | jq -r '.result.structuredContent.summary // empty' 2>/dev/null) || true | ||
| if [ -n "$summary" ]; then | ||
| echo "$summary" > /tmp/agents.md | ||
| echo "Repository conventions written to /tmp/agents.md" | ||
| else | ||
| echo "::warning::Could not fetch repository conventions; continuing without them" | ||
| fi | ||
| echo "No AGENTS.md found; continuing without repository conventions" |
TL;DR
Remediation
Investigation detailsRoot CauseThe PR changes a source workflow fragment but does not include corresponding regenerated lock files. CI runs Evidence
Validation
Follow-up
What is this? | From workflow: Trigger PR Actions Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
There was a problem hiding this comment.
Approving — no new actionable issues found in this revision.
What is this? | From workflow: Trigger PR Review
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: v1v <2871786+v1v@users.noreply.github.com> Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com> Co-authored-by: fr4nc1sc0-r4m0n <215478872+fr4nc1sc0-r4m0n@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: v1v <2871786+v1v@users.noreply.github.com> Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
…acking (#1920) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
…1880) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
|
@copilot fix conflicts, rebase and run make compile |
…gment The else branch of "Fetch repository conventions" fetched from https://agents-md-generator.fastmcp.app/mcp — a non-Elastic host — and wrote the returned summary verbatim to /tmp/agents.md, which the agent treats as trusted repo policy. A compromise of or MITM against that host would inject instructions into the agent's trusted channel for every adopting repo that lacks an AGENTS.md, with no repo access required by the attacker. The fallback is removed. If no AGENTS.md is present, the step skips gracefully (same behaviour as when the curl failed previously). Note: the compiled lock files need to be regenerated with `make compile`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
All workflows that import gh-aw-fragments/runtime-setup.md have their lock files regenerated to reflect the removal of the fastmcp.app fetch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> # Conflicts: # .github/workflows/agent-deep-dive.lock.yml # .github/workflows/agent-efficiency.lock.yml # .github/workflows/gh-aw-agent-suggestions.lock.yml # .github/workflows/gh-aw-autonomy-atomicity-analyzer.lock.yml # .github/workflows/gh-aw-branch-actions-detective.lock.yml # .github/workflows/gh-aw-breaking-change-detect.lock.yml # .github/workflows/gh-aw-breaking-change-detector.lock.yml # .github/workflows/gh-aw-bug-hunter.lock.yml # .github/workflows/gh-aw-code-complexity-detector.lock.yml # .github/workflows/gh-aw-code-duplication-detector.lock.yml # .github/workflows/gh-aw-code-quality-audit.lock.yml # .github/workflows/gh-aw-create-comment-on-issue.lock.yml # .github/workflows/gh-aw-create-pr-from-issue.lock.yml # .github/workflows/gh-aw-dependency-review.lock.yml # .github/workflows/gh-aw-docs-drift.lock.yml # .github/workflows/gh-aw-docs-patrol.lock.yml # .github/workflows/gh-aw-estc-actions-resource-not-accessible-detector.lock.yml # .github/workflows/gh-aw-estc-docs-patrol-external.lock.yml # .github/workflows/gh-aw-estc-docs-pr-review.lock.yml # .github/workflows/gh-aw-estc-downstream-health.lock.yml # .github/workflows/gh-aw-estc-newbie-contributor-patrol-external.lock.yml # .github/workflows/gh-aw-estc-pr-buildkite-detective.lock.yml # .github/workflows/gh-aw-flaky-test-investigator.lock.yml # .github/workflows/gh-aw-framework-best-practices.lock.yml # .github/workflows/gh-aw-information-architecture.lock.yml # .github/workflows/gh-aw-internal-gemini-cli-web-search.lock.yml # .github/workflows/gh-aw-internal-gemini-cli.lock.yml # .github/workflows/gh-aw-issue-fixer.lock.yml # .github/workflows/gh-aw-issue-triage.lock.yml # .github/workflows/gh-aw-mention-in-issue-by-id.lock.yml # .github/workflows/gh-aw-mention-in-issue-no-sandbox.lock.yml # .github/workflows/gh-aw-mention-in-issue.lock.yml # .github/workflows/gh-aw-mention-in-pr-no-sandbox.lock.yml # .github/workflows/gh-aw-mention-in-pr.lock.yml # .github/workflows/gh-aw-newbie-contributor-patrol.lock.yml # .github/workflows/gh-aw-performance-profiler.lock.yml # .github/workflows/gh-aw-plan.lock.yml # .github/workflows/gh-aw-pr-actions-detective.lock.yml # .github/workflows/gh-aw-pr-actions-fixer.lock.yml # .github/workflows/gh-aw-pr-ci-detective.lock.yml # .github/workflows/gh-aw-pr-conflict-addresser.lock.yml # .github/workflows/gh-aw-pr-labeler.lock.yml # .github/workflows/gh-aw-pr-review-addresser.lock.yml # .github/workflows/gh-aw-pr-review.lock.yml # .github/workflows/gh-aw-product-manager-impersonator.lock.yml # .github/workflows/gh-aw-project-summary.lock.yml # .github/workflows/gh-aw-refactor-opportunist.lock.yml # .github/workflows/gh-aw-release-update.lock.yml # .github/workflows/gh-aw-scheduled-audit.lock.yml # .github/workflows/gh-aw-scheduled-fix.lock.yml # .github/workflows/gh-aw-small-problem-fixer.lock.yml # .github/workflows/gh-aw-stale-issues-investigator.lock.yml # .github/workflows/gh-aw-stale-issues-remediator.lock.yml # .github/workflows/gh-aw-stale-issues.lock.yml # .github/workflows/gh-aw-test-coverage-detector.lock.yml # .github/workflows/gh-aw-text-auditor.lock.yml # .github/workflows/gh-aw-update-pr-body.lock.yml # .github/workflows/gh-aw-ux-design-patrol.lock.yml # .github/workflows/internal-downstream-health.lock.yml # .github/workflows/upgrade-check.lock.yml # .github/workflows/workflow-patrol.lock.yml Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
|
@copilot resolve the merge conflicts in this pull request |
Done in |
Resolved. The PR branch is conflict-free and compiled cleanly ( |
I reran the required workflow-regeneration goal ( |
|
I'll cherry-pick and run the make commands |
Summary
elsebranch of the "Fetch repository conventions" step inruntime-setup.mdfetched content fromhttps://agents-md-generator.fastmcp.app/mcp— a non-Elastic, third-party host — and wrote the returnedsummaryfield verbatim to/tmp/agents.md./tmp/agents.mdas authoritative, trusted repository policy and propagates its contents into every sub-agent prompt.fastmcp.app(or its DNS/TLS path) would inject arbitrary instructions into that trusted channel for every adopting repo that has noAGENTS.md— with no repository access required by the attacker.Fix
Remove the external fetch entirely. If no
AGENTS.mdis present in the workspace, the step skips gracefully — identical behaviour to the existing failure path when the curl timed out or returned no usable content.Test plan
make compileregenerates the lock files cleanly with the reduced stepAGENTS.md(copy path unchanged)AGENTS.md(skips, no warning noise)🤖 Generated with Claude Code