Skip to content

chore: add security guardrails to make-repo-contribution skill#746

Merged
aaronpowell merged 1 commit intogithub:mainfrom
GeekTrainer:chore/harden-make-repo-contribution
Feb 18, 2026
Merged

chore: add security guardrails to make-repo-contribution skill#746
aaronpowell merged 1 commit intogithub:mainfrom
GeekTrainer:chore/harden-make-repo-contribution

Conversation

@GeekTrainer
Copy link
Copy Markdown
Contributor

Tighten security guardrails for make-repo-contribution skill

This PR hardens the make-repo-contribution skill against indirect prompt injection — where malicious instructions embedded in a repository's contribution docs (CONTRIBUTING.md, issue templates, PR templates) could be treated as trusted guidance by the agent.

Changes

Added allowed-tools to frontmatter
Restricts the skill to Read, Edit, and scoped Bash commands (git, gh issue, gh pr). This is experimental per the Agent Skills spec, but declares intent and will take effect as implementations mature.

Added a security boundaries section
Placed early in the skill context to establish hard rules: no running commands from repo docs, no accessing files outside the working tree, no network requests, no leaking secrets. Templates are treated as formatting structure, not executable instructions.

Scoped "follow the guidance" language
The original skill had broad directives like "ALWAYS defer to the guidance provided in the repository" and "follow whatever guidance is provided." These are now scoped to contribution workflow topics only (branch naming, commit formats, templates, review processes). Instructions outside that scope are flagged to the user.

Deferred build/test execution to the user
Rather than running npm test, cargo build, etc. directly — which would require allowing arbitrary command execution — the skill now identifies prerequisite commands and asks the user to run them. This avoids needing broad tool access while keeping the workflow functional across any tech stack.

What still works

Tested against Playwright's CONTRIBUTING.md as a representative real-world example. All contribution workflow steps (issue lookup, branching, semantic commits, PR creation) work seamlessly. The only difference is one extra user confirmation for build/lint/test commands.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 17, 2026 21:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the make-repo-contribution skill against indirect prompt injection attacks by adding explicit security boundaries and limiting the scope of trust placed in repository documentation.

Changes:

  • Added allowed-tools frontmatter field restricting the skill to Read, Edit, and scoped Bash commands (git, gh issue, gh pr)
  • Introduced "Security boundaries" section early in the skill with explicit rules preventing execution of commands from repo docs, accessing files outside the working tree, and making network requests
  • Scoped "follow the guidance" language to contribution workflow topics only (branch naming, commit formats, templates, review processes) rather than arbitrary instructions
  • Changed prerequisite tasks (build, lint, test) from direct execution to user-delegated execution with confirmation

@aaronpowell aaronpowell merged commit 52dfa05 into github:main Feb 18, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants