chore: add security guardrails to make-repo-contribution skill#746
Merged
aaronpowell merged 1 commit intogithub:mainfrom Feb 18, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
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-toolsfrontmatter 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
approved these changes
Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tighten security guardrails for make-repo-contribution skill
This PR hardens the
make-repo-contributionskill 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-toolsto frontmatterRestricts 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.