Skip to content

Add tool guardian hook#1044

Open
ajithraghavan wants to merge 1 commit intogithub:stagedfrom
ajithraghavan:add-tool-guardian-hook
Open

Add tool guardian hook#1044
ajithraghavan wants to merge 1 commit intogithub:stagedfrom
ajithraghavan:add-tool-guardian-hook

Conversation

@ajithraghavan
Copy link

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, or workflow file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, or workflow with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.

Description


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • Update to existing instruction, prompt, agent, plugin, skill, or workflow.
  • Other (please specify):

Additional Notes


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

@aaronpowell
Copy link
Contributor

It looks like you've incorrectly branched from the main branch not staged, and as a result all the materialised plugins are included in this PR.

You can attempt to fix this with a rebase:

git fetch origin staged
git rebase --onto origin/staged origin/main <branch name>
git push --force-with-lease

If that does not resolve it, you can run npm run plugin:clean which will delete the materialised plugins and you can commit that change.

Add Tool Guardian hook for blocking dangerous tool operations

   Introduces a preToolUse hook that scans Copilot agent tool invocations
   against ~20 threat patterns (destructive file ops, force pushes, DB drops,
   permission abuse, network exfiltration) and blocks or warns before execution.
@ajithraghavan ajithraghavan force-pushed the add-tool-guardian-hook branch from 61f1af3 to 1192ffc Compare March 18, 2026 06:01
@ajithraghavan
Copy link
Author

Thank you for the feedback!

I have rebased the branch onto staged and force pushed. The materialized plugins should no longer be included in the diff.

Apologies for the oversight, please let me know if anything else needs to be fixed.

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.

2 participants