diff --git a/docs/README.hooks.md b/docs/README.hooks.md index e23200323..819e50616 100644 --- a/docs/README.hooks.md +++ b/docs/README.hooks.md @@ -35,3 +35,4 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-hooks) for guidelines on how to | [Secrets Scanner](../hooks/secrets-scanner/README.md) | Scans files modified during a Copilot coding agent session for leaked secrets, credentials, and sensitive data | sessionEnd | `hooks.json`
`scan-secrets.sh` | | [Session Auto-Commit](../hooks/session-auto-commit/README.md) | Automatically commits and pushes changes when a Copilot coding agent session ends | sessionEnd | `auto-commit.sh`
`hooks.json` | | [Session Logger](../hooks/session-logger/README.md) | Logs all Copilot coding agent session activity for audit and analysis | sessionStart, sessionEnd, userPromptSubmitted | `hooks.json`
`log-prompt.sh`
`log-session-end.sh`
`log-session-start.sh` | +| [Tool Guardian](../hooks/tool-guardian/README.md) | Blocks dangerous tool operations (destructive file ops, force pushes, DB drops) before the Copilot coding agent executes them | preToolUse | `guard-tool.sh`
`hooks.json` | diff --git a/docs/README.plugins.md b/docs/README.plugins.md index e6033f280..22fcceb1d 100644 --- a/docs/README.plugins.md +++ b/docs/README.plugins.md @@ -27,22 +27,22 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-plugins) for guidelines on how t | ---- | ----------- | ----- | ---- | | [automate-this](../plugins/automate-this/README.md) | Record your screen doing a manual process, drop the video on your Desktop, and let Copilot CLI analyze it frame-by-frame to build working automation scripts. Supports narrated recordings with audio transcription. | 1 items | automation, screen-recording, workflow, video-analysis, process-automation, scripting, productivity, copilot-cli | | [awesome-copilot](../plugins/awesome-copilot/README.md) | Meta prompts that help you discover and generate curated GitHub Copilot agents, instructions, prompts, and skills. | 4 items | github-copilot, discovery, meta, prompt-engineering, agents | -| [azure-cloud-development](../plugins/azure-cloud-development/README.md) | Comprehensive Azure cloud development tools including Infrastructure as Code, serverless functions, architecture patterns, and cost optimization for building scalable cloud applications. | 11 items | azure, cloud, infrastructure, bicep, terraform, serverless, architecture, devops | -| [cast-imaging](../plugins/cast-imaging/README.md) | A comprehensive collection of specialized agents for software analysis, impact assessment, structural quality advisories, and architectural review using CAST Imaging. | 3 items | cast-imaging, software-analysis, architecture, quality, impact-analysis, devops | +| [azure-cloud-development](../plugins/azure-cloud-development/README.md) | Comprehensive Azure cloud development tools including Infrastructure as Code, serverless functions, architecture patterns, and cost optimization for building scalable cloud applications. | 5 items | azure, cloud, infrastructure, bicep, terraform, serverless, architecture, devops | +| [cast-imaging](../plugins/cast-imaging/README.md) | A comprehensive collection of specialized agents for software analysis, impact assessment, structural quality advisories, and architectural review using CAST Imaging. | 1 items | cast-imaging, software-analysis, architecture, quality, impact-analysis, devops | | [clojure-interactive-programming](../plugins/clojure-interactive-programming/README.md) | Tools for REPL-first Clojure workflows featuring Clojure instructions, the interactive programming chat mode and supporting guidance. | 2 items | clojure, repl, interactive-programming | | [context-engineering](../plugins/context-engineering/README.md) | Tools and techniques for maximizing GitHub Copilot effectiveness through better context management. Includes guidelines for structuring code, an agent for planning multi-file changes, and prompts for context-aware development. | 4 items | context, productivity, refactoring, best-practices, architecture | | [copilot-sdk](../plugins/copilot-sdk/README.md) | Build applications with the GitHub Copilot SDK across multiple programming languages. Includes comprehensive instructions for C#, Go, Node.js/TypeScript, and Python to help you create AI-powered applications. | 1 items | copilot-sdk, sdk, csharp, go, nodejs, typescript, python, ai, github-copilot | | [csharp-dotnet-development](../plugins/csharp-dotnet-development/README.md) | Essential prompts, instructions, and chat modes for C# and .NET development including testing, documentation, and best practices. | 9 items | csharp, dotnet, aspnet, testing | | [csharp-mcp-development](../plugins/csharp-mcp-development/README.md) | Complete toolkit for building Model Context Protocol (MCP) servers in C# using the official SDK. Includes instructions for best practices, a prompt for generating servers, and an expert chat mode for guidance. | 2 items | csharp, mcp, model-context-protocol, dotnet, server-development | -| [database-data-management](../plugins/database-data-management/README.md) | Database administration, SQL optimization, and data management tools for PostgreSQL, SQL Server, and general database development best practices. | 6 items | database, sql, postgresql, sql-server, dba, optimization, queries, data-management | +| [database-data-management](../plugins/database-data-management/README.md) | Database administration, SQL optimization, and data management tools for PostgreSQL, SQL Server, and general database development best practices. | 5 items | database, sql, postgresql, sql-server, dba, optimization, queries, data-management | | [dataverse](../plugins/dataverse/README.md) | Comprehensive collection for Microsoft Dataverse integrations. Includes MCP setup commands. | 1 items | dataverse, mcp | | [dataverse-sdk-for-python](../plugins/dataverse-sdk-for-python/README.md) | Comprehensive collection for building production-ready Python integrations with Microsoft Dataverse. Includes official documentation, best practices, advanced features, file operations, and code generation prompts. | 4 items | dataverse, python, integration, sdk | | [devops-oncall](../plugins/devops-oncall/README.md) | A focused set of prompts, instructions, and a chat mode to help triage incidents and respond quickly with DevOps tools and Azure resources. | 3 items | devops, incident-response, oncall, azure | | [doublecheck](../plugins/doublecheck/README.md) | Three-layer verification pipeline for AI output. Extracts claims, finds sources, and flags hallucination risks so humans can verify before acting. | 2 items | verification, hallucination, fact-check, source-citation, trust, safety | -| [edge-ai-tasks](../plugins/edge-ai-tasks/README.md) | Task Researcher and Task Planner for intermediate to expert users and large codebases - Brought to you by microsoft/edge-ai | 2 items | architecture, planning, research, tasks, implementation | +| [edge-ai-tasks](../plugins/edge-ai-tasks/README.md) | Task Researcher and Task Planner for intermediate to expert users and large codebases - Brought to you by microsoft/edge-ai | 1 items | architecture, planning, research, tasks, implementation | | [flowstudio-power-automate](../plugins/flowstudio-power-automate/README.md) | Complete toolkit for managing Power Automate cloud flows via the FlowStudio MCP server. Includes skills for connecting to the MCP server, debugging failed flow runs, and building/deploying flows from natural language. | 3 items | power-automate, power-platform, flowstudio, mcp, model-context-protocol, cloud-flows, workflow-automation | -| [frontend-web-dev](../plugins/frontend-web-dev/README.md) | Essential prompts, instructions, and chat modes for modern frontend web development including React, Angular, Vue, TypeScript, and CSS frameworks. | 4 items | frontend, web, react, typescript, javascript, css, html, angular, vue | -| [gem-team](../plugins/gem-team/README.md) | A modular multi-agent team for complex project execution with DAG-based planning, parallel execution, TDD verification, and automated testing with energetic team lead. | 8 items | multi-agent, orchestration, dag-planning, parallel-execution, tdd, verification, automation, security, prd | +| [frontend-web-dev](../plugins/frontend-web-dev/README.md) | Essential prompts, instructions, and chat modes for modern frontend web development including React, Angular, Vue, TypeScript, and CSS frameworks. | 3 items | frontend, web, react, typescript, javascript, css, html, angular, vue | +| [gem-team](../plugins/gem-team/README.md) | A modular multi-agent team for complex project execution with DAG-based planning, parallel execution, TDD verification, and automated testing with energetic team lead. | 1 items | multi-agent, orchestration, dag-planning, parallel-execution, tdd, verification, automation, security, prd | | [go-mcp-development](../plugins/go-mcp-development/README.md) | Complete toolkit for building Model Context Protocol (MCP) servers in Go using the official github.com/modelcontextprotocol/go-sdk. Includes instructions for best practices, a prompt for generating servers, and an expert chat mode for guidance. | 2 items | go, golang, mcp, model-context-protocol, server-development, sdk | | [java-development](../plugins/java-development/README.md) | Comprehensive collection of prompts and instructions for Java development including Spring Boot, Quarkus, testing, documentation, and best practices. | 4 items | java, springboot, quarkus, jpa, junit, javadoc | | [java-mcp-development](../plugins/java-mcp-development/README.md) | Complete toolkit for building Model Context Protocol servers in Java using the official MCP Java SDK with reactive streams and Spring Boot integration. | 2 items | java, mcp, model-context-protocol, server-development, sdk, reactive-streams, spring-boot, reactor | @@ -57,24 +57,24 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-plugins) for guidelines on how t | [openapi-to-application-python-fastapi](../plugins/openapi-to-application-python-fastapi/README.md) | Generate production-ready FastAPI applications from OpenAPI specifications. Includes project scaffolding, route generation, dependency injection, and Python best practices for async APIs. | 2 items | openapi, code-generation, api, python, fastapi | | [oracle-to-postgres-migration-expert](../plugins/oracle-to-postgres-migration-expert/README.md) | Expert agent for Oracle-to-PostgreSQL application migrations in .NET solutions. Performs code edits, runs commands, and invokes extension tools to migrate .NET/Oracle data access patterns to PostgreSQL. | 8 items | oracle, postgresql, database-migration, dotnet, sql, migration, integration-testing, stored-procedures | | [ospo-sponsorship](../plugins/ospo-sponsorship/README.md) | Tools and resources for Open Source Program Offices (OSPOs) to identify, evaluate, and manage sponsorship of open source dependencies through GitHub Sponsors, Open Collective, and other funding platforms. | 1 items | | -| [partners](../plugins/partners/README.md) | Custom agents that have been created by GitHub partners | 20 items | devops, security, database, cloud, infrastructure, observability, feature-flags, cicd, migration, performance | +| [partners](../plugins/partners/README.md) | Custom agents that have been created by GitHub partners | 1 items | devops, security, database, cloud, infrastructure, observability, feature-flags, cicd, migration, performance | | [pcf-development](../plugins/pcf-development/README.md) | Complete toolkit for developing custom code components using Power Apps Component Framework for model-driven and canvas apps | 0 items | power-apps, pcf, component-framework, typescript, power-platform | | [php-mcp-development](../plugins/php-mcp-development/README.md) | Comprehensive resources for building Model Context Protocol servers using the official PHP SDK with attribute-based discovery, including best practices, project generation, and expert assistance | 2 items | php, mcp, model-context-protocol, server-development, sdk, attributes, composer | -| [polyglot-test-agent](../plugins/polyglot-test-agent/README.md) | Multi-agent pipeline for generating comprehensive unit tests across any programming language. Orchestrates research, planning, and implementation phases using specialized agents to produce tests that compile, pass, and follow project conventions. | 9 items | testing, unit-tests, polyglot, test-generation, multi-agent, tdd, csharp, typescript, python, go | +| [polyglot-test-agent](../plugins/polyglot-test-agent/README.md) | Multi-agent pipeline for generating comprehensive unit tests across any programming language. Orchestrates research, planning, and implementation phases using specialized agents to produce tests that compile, pass, and follow project conventions. | 2 items | testing, unit-tests, polyglot, test-generation, multi-agent, tdd, csharp, typescript, python, go | | [power-apps-code-apps](../plugins/power-apps-code-apps/README.md) | Complete toolkit for Power Apps Code Apps development including project scaffolding, development standards, and expert guidance for building code-first applications with Power Platform integration. | 2 items | power-apps, power-platform, typescript, react, code-apps, dataverse, connectors | -| [power-bi-development](../plugins/power-bi-development/README.md) | Comprehensive Power BI development resources including data modeling, DAX optimization, performance tuning, visualization design, security best practices, and DevOps/ALM guidance for building enterprise-grade Power BI solutions. | 8 items | power-bi, dax, data-modeling, performance, visualization, security, devops, business-intelligence | +| [power-bi-development](../plugins/power-bi-development/README.md) | Comprehensive Power BI development resources including data modeling, DAX optimization, performance tuning, visualization design, security best practices, and DevOps/ALM guidance for building enterprise-grade Power BI solutions. | 5 items | power-bi, dax, data-modeling, performance, visualization, security, devops, business-intelligence | | [power-platform-mcp-connector-development](../plugins/power-platform-mcp-connector-development/README.md) | Complete toolkit for developing Power Platform custom connectors with Model Context Protocol integration for Microsoft Copilot Studio | 3 items | power-platform, mcp, copilot-studio, custom-connector, json-rpc | -| [project-planning](../plugins/project-planning/README.md) | Tools and guidance for software project planning, feature breakdown, epic management, implementation planning, and task organization for development teams. | 15 items | planning, project-management, epic, feature, implementation, task, architecture, technical-spike | +| [project-planning](../plugins/project-planning/README.md) | Tools and guidance for software project planning, feature breakdown, epic management, implementation planning, and task organization for development teams. | 9 items | planning, project-management, epic, feature, implementation, task, architecture, technical-spike | | [python-mcp-development](../plugins/python-mcp-development/README.md) | Complete toolkit for building Model Context Protocol (MCP) servers in Python using the official SDK with FastMCP. Includes instructions for best practices, a prompt for generating servers, and an expert chat mode for guidance. | 2 items | python, mcp, model-context-protocol, fastmcp, server-development | | [ruby-mcp-development](../plugins/ruby-mcp-development/README.md) | Complete toolkit for building Model Context Protocol servers in Ruby using the official MCP Ruby SDK gem with Rails integration support. | 2 items | ruby, mcp, model-context-protocol, server-development, sdk, rails, gem | -| [rug-agentic-workflow](../plugins/rug-agentic-workflow/README.md) | Three-agent workflow for orchestrated software delivery with an orchestrator plus implementation and QA subagents. | 3 items | agentic-workflow, orchestration, subagents, software-engineering, qa | +| [rug-agentic-workflow](../plugins/rug-agentic-workflow/README.md) | Three-agent workflow for orchestrated software delivery with an orchestrator plus implementation and QA subagents. | 1 items | agentic-workflow, orchestration, subagents, software-engineering, qa | | [rust-mcp-development](../plugins/rust-mcp-development/README.md) | Build high-performance Model Context Protocol servers in Rust using the official rmcp SDK with async/await, procedural macros, and type-safe implementations. | 2 items | rust, mcp, model-context-protocol, server-development, sdk, tokio, async, macros, rmcp | | [security-best-practices](../plugins/security-best-practices/README.md) | Security frameworks, accessibility guidelines, performance optimization, and code quality best practices for building secure, maintainable, and high-performance applications. | 1 items | security, accessibility, performance, code-quality, owasp, a11y, optimization, best-practices | -| [software-engineering-team](../plugins/software-engineering-team/README.md) | 7 specialized agents covering the full software development lifecycle from UX design and architecture to security and DevOps. | 7 items | team, enterprise, security, devops, ux, architecture, product, ai-ethics | +| [software-engineering-team](../plugins/software-engineering-team/README.md) | 7 specialized agents covering the full software development lifecycle from UX design and architecture to security and DevOps. | 1 items | team, enterprise, security, devops, ux, architecture, product, ai-ethics | | [structured-autonomy](../plugins/structured-autonomy/README.md) | Premium planning, thrifty implementation | 3 items | | | [swift-mcp-development](../plugins/swift-mcp-development/README.md) | Comprehensive collection for building Model Context Protocol servers in Swift using the official MCP Swift SDK with modern concurrency features. | 2 items | swift, mcp, model-context-protocol, server-development, sdk, ios, macos, concurrency, actor, async-await | | [technical-spike](../plugins/technical-spike/README.md) | Tools for creation, management and research of technical spikes to reduce unknowns and assumptions before proceeding to specification and implementation of solutions. | 2 items | technical-spike, assumption-testing, validation, research | -| [testing-automation](../plugins/testing-automation/README.md) | Comprehensive collection for writing tests, test automation, and test-driven development including unit tests, integration tests, and end-to-end testing strategies. | 9 items | testing, tdd, automation, unit-tests, integration, playwright, jest, nunit | +| [testing-automation](../plugins/testing-automation/README.md) | Comprehensive collection for writing tests, test automation, and test-driven development including unit tests, integration tests, and end-to-end testing strategies. | 6 items | testing, tdd, automation, unit-tests, integration, playwright, jest, nunit | | [typescript-mcp-development](../plugins/typescript-mcp-development/README.md) | Complete toolkit for building Model Context Protocol (MCP) servers in TypeScript/Node.js using the official SDK. Includes instructions for best practices, a prompt for generating servers, and an expert chat mode for guidance. | 2 items | typescript, mcp, model-context-protocol, nodejs, server-development | | [typespec-m365-copilot](../plugins/typespec-m365-copilot/README.md) | Comprehensive collection of prompts, instructions, and resources for building declarative agents and API plugins using TypeSpec for Microsoft 365 Copilot extensibility. | 3 items | typespec, m365-copilot, declarative-agents, api-plugins, agent-development, microsoft-365 | | [winui3-development](../plugins/winui3-development/README.md) | WinUI 3 and Windows App SDK development agent, instructions, and migration guide. Prevents common UWP API misuse and guides correct WinUI 3 patterns for desktop Windows apps. | 2 items | winui, winui3, windows-app-sdk, xaml, desktop, windows | diff --git a/hooks/tool-guardian/README.md b/hooks/tool-guardian/README.md new file mode 100644 index 000000000..028b74739 --- /dev/null +++ b/hooks/tool-guardian/README.md @@ -0,0 +1,183 @@ +--- +name: 'Tool Guardian' +description: 'Blocks dangerous tool operations (destructive file ops, force pushes, DB drops) before the Copilot coding agent executes them' +tags: ['security', 'safety', 'preToolUse', 'guardrails'] +--- + +# Tool Guardian Hook + +Blocks dangerous tool operations before a GitHub Copilot coding agent executes them, acting as a safety net against destructive commands, force pushes, database drops, and other high-risk actions. + +## Overview + +AI coding agents can autonomously execute shell commands, file operations, and database queries. Without guardrails, a misinterpreted instruction could lead to irreversible damage. This hook intercepts every tool invocation at the `preToolUse` event and scans it against ~20 threat patterns across 6 categories: + +- **Destructive file ops**: `rm -rf /`, deleting `.env` or `.git` +- **Destructive git ops**: `git push --force` to main/master, `git reset --hard` +- **Database destruction**: `DROP TABLE`, `DROP DATABASE`, `TRUNCATE`, `DELETE FROM` without `WHERE` +- **Permission abuse**: `chmod 777`, recursive world-writable permissions +- **Network exfiltration**: `curl | bash`, `wget | sh`, uploading files via `curl --data @` +- **System danger**: `sudo`, `npm publish` + +## Features + +- **Two guard modes**: `block` (exit non-zero to prevent execution) or `warn` (log only) +- **Safer alternatives**: Every blocked pattern includes a suggestion for a safer command +- **Allowlist support**: Skip specific patterns via `TOOL_GUARD_ALLOWLIST` +- **Structured logging**: JSON Lines output for integration with monitoring tools +- **Fast execution**: 10-second timeout; no external network calls +- **Zero dependencies**: Uses only standard Unix tools (`grep`, `sed`); optional `jq` for input parsing + +## Installation + +1. Copy the hook folder to your repository: + + ```bash + cp -r hooks/tool-guardian .github/hooks/ + ``` + +2. Ensure the script is executable: + + ```bash + chmod +x .github/hooks/tool-guardian/guard-tool.sh + ``` + +3. Create the logs directory and add it to `.gitignore`: + + ```bash + mkdir -p logs/copilot/tool-guardian + echo "logs/" >> .gitignore + ``` + +4. Commit the hook configuration to your repository's default branch. + +## Configuration + +The hook is configured in `hooks.json` to run on the `preToolUse` event: + +```json +{ + "version": 1, + "hooks": { + "preToolUse": [ + { + "type": "command", + "bash": ".github/hooks/tool-guardian/guard-tool.sh", + "cwd": ".", + "env": { + "GUARD_MODE": "block" + }, + "timeoutSec": 10 + } + ] + } +} +``` + +### Environment Variables + +| Variable | Values | Default | Description | +|----------|--------|---------|-------------| +| `GUARD_MODE` | `warn`, `block` | `block` | `warn` logs threats only; `block` exits non-zero to prevent tool execution | +| `SKIP_TOOL_GUARD` | `true` | unset | Disable the guardian entirely | +| `TOOL_GUARD_LOG_DIR` | path | `logs/copilot/tool-guardian` | Directory where guard logs are written | +| `TOOL_GUARD_ALLOWLIST` | comma-separated | unset | Patterns to skip (e.g., `git push --force,npm publish`) | + +## How It Works + +1. Before the Copilot coding agent executes a tool, the hook receives the tool invocation as JSON on stdin +2. Extracts `toolName` and `toolInput` fields (via `jq` if available, regex fallback otherwise) +3. Checks the combined text against the allowlist — if matched, skips all scanning +4. Scans combined text against ~20 regex threat patterns across 6 severity categories +5. Reports findings with category, severity, matched text, and a safer alternative +6. Writes a structured JSON log entry for audit purposes +7. In `block` mode, exits non-zero to prevent the tool from executing +8. In `warn` mode, logs the threat and allows execution to proceed + +## Threat Categories + +| Category | Severity | Key Patterns | Suggestion | +|----------|----------|-------------|------------| +| `destructive_file_ops` | critical | `rm -rf /`, `rm -rf ~`, `rm -rf .`, delete `.env`/`.git` | Use targeted paths or `mv` to back up | +| `destructive_git_ops` | critical/high | `git push --force` to main/master, `git reset --hard`, `git clean -fd` | Use `--force-with-lease`, `git stash`, dry-run | +| `database_destruction` | critical/high | `DROP TABLE`, `DROP DATABASE`, `TRUNCATE`, `DELETE FROM` without WHERE | Use migrations, backups, add WHERE clause | +| `permission_abuse` | high | `chmod 777`, `chmod -R 777` | Use `755` for dirs, `644` for files | +| `network_exfiltration` | critical/high | `curl \| bash`, `wget \| sh`, `curl --data @file` | Download first, review, then execute | +| `system_danger` | high | `sudo`, `npm publish` | Use least privilege; `--dry-run` first | + +## Examples + +### Safe command (exit 0) + +```bash +echo '{"toolName":"bash","toolInput":"git status"}' | bash hooks/tool-guardian/guard-tool.sh +``` + +### Blocked command (exit 1) + +```bash +echo '{"toolName":"bash","toolInput":"git push --force origin main"}' | \ + GUARD_MODE=block bash hooks/tool-guardian/guard-tool.sh +``` + +``` +🛡️ Tool Guardian: 1 threat(s) detected in 'bash' invocation + + CATEGORY SEVERITY MATCH SUGGESTION + -------- -------- ----- ---------- + destructive_git_ops critical git push --force origin main Use 'git push --force-with-lease' or push to a feature branch + +🚫 Operation blocked: resolve the threats above or adjust TOOL_GUARD_ALLOWLIST. + Set GUARD_MODE=warn to log without blocking. +``` + +### Warn mode (exit 0, threat logged) + +```bash +echo '{"toolName":"bash","toolInput":"rm -rf /"}' | \ + GUARD_MODE=warn bash hooks/tool-guardian/guard-tool.sh +``` + +### Allowlisted command (exit 0) + +```bash +echo '{"toolName":"bash","toolInput":"git push --force origin main"}' | \ + TOOL_GUARD_ALLOWLIST="git push --force" bash hooks/tool-guardian/guard-tool.sh +``` + +## Log Format + +Guard events are written to `logs/copilot/tool-guardian/guard.log` in JSON Lines format: + +```json +{"timestamp":"2026-03-16T10:30:00Z","event":"threats_detected","mode":"block","tool":"bash","threat_count":1,"threats":[{"category":"destructive_git_ops","severity":"critical","match":"git push --force origin main","suggestion":"Use 'git push --force-with-lease' or push to a feature branch"}]} +``` + +```json +{"timestamp":"2026-03-16T10:30:00Z","event":"guard_passed","mode":"block","tool":"bash"} +``` + +```json +{"timestamp":"2026-03-16T10:30:00Z","event":"guard_skipped","reason":"allowlisted","tool":"bash"} +``` + +## Customization + +- **Add custom patterns**: Edit the `PATTERNS` array in `guard-tool.sh` to add project-specific threat patterns +- **Adjust severity**: Change severity levels for patterns that need different treatment +- **Allowlist known commands**: Use `TOOL_GUARD_ALLOWLIST` for commands that are safe in your context +- **Change log location**: Set `TOOL_GUARD_LOG_DIR` to route logs to your preferred directory + +## Disabling + +To temporarily disable the guardian: + +- Set `SKIP_TOOL_GUARD=true` in the hook environment +- Or remove the `preToolUse` entry from `hooks.json` + +## Limitations + +- Pattern-based detection; does not perform semantic analysis of command intent +- May produce false positives for commands that match patterns in safe contexts (use the allowlist to suppress these) +- Scans the text representation of tool input; cannot detect obfuscated or encoded commands +- Requires tool invocations to be passed as JSON on stdin with `toolName` and `toolInput` fields diff --git a/hooks/tool-guardian/guard-tool.sh b/hooks/tool-guardian/guard-tool.sh new file mode 100755 index 000000000..f3639ba59 --- /dev/null +++ b/hooks/tool-guardian/guard-tool.sh @@ -0,0 +1,202 @@ +#!/bin/bash + +# Tool Guardian Hook +# Blocks dangerous tool operations (destructive file ops, force pushes, DB drops, +# etc.) before the Copilot coding agent executes them. +# +# Environment variables: +# GUARD_MODE - "warn" (log only) or "block" (exit non-zero on threats) (default: block) +# SKIP_TOOL_GUARD - "true" to disable entirely (default: unset) +# TOOL_GUARD_LOG_DIR - Directory for guard logs (default: logs/copilot/tool-guardian) +# TOOL_GUARD_ALLOWLIST - Comma-separated patterns to skip (default: unset) + +set -euo pipefail + +# --------------------------------------------------------------------------- +# Early exit if disabled +# --------------------------------------------------------------------------- +if [[ "${SKIP_TOOL_GUARD:-}" == "true" ]]; then + exit 0 +fi + +# --------------------------------------------------------------------------- +# Read tool invocation from stdin (JSON with toolName + toolInput) +# --------------------------------------------------------------------------- +INPUT=$(cat) + +MODE="${GUARD_MODE:-block}" +LOG_DIR="${TOOL_GUARD_LOG_DIR:-logs/copilot/tool-guardian}" +TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ") + +mkdir -p "$LOG_DIR" +LOG_FILE="$LOG_DIR/guard.log" + +# --------------------------------------------------------------------------- +# Extract tool name and input text +# --------------------------------------------------------------------------- +TOOL_NAME="" +TOOL_INPUT="" + +if command -v jq &>/dev/null; then + TOOL_NAME=$(printf '%s' "$INPUT" | jq -r '.toolName // empty' 2>/dev/null || echo "") + TOOL_INPUT=$(printf '%s' "$INPUT" | jq -r '.toolInput // empty' 2>/dev/null || echo "") +fi + +# Fallback: extract with grep/sed if jq unavailable or fields empty +if [[ -z "$TOOL_NAME" ]]; then + TOOL_NAME=$(printf '%s' "$INPUT" | grep -oE '"toolName"\s*:\s*"[^"]*"' | head -1 | sed 's/.*"toolName"\s*:\s*"//;s/"//') +fi +if [[ -z "$TOOL_INPUT" ]]; then + TOOL_INPUT=$(printf '%s' "$INPUT" | grep -oE '"toolInput"\s*:\s*"[^"]*"' | head -1 | sed 's/.*"toolInput"\s*:\s*"//;s/"//') +fi + +# Combine for pattern matching +COMBINED="${TOOL_NAME} ${TOOL_INPUT}" + +# --------------------------------------------------------------------------- +# Parse allowlist +# --------------------------------------------------------------------------- +ALLOWLIST=() +if [[ -n "${TOOL_GUARD_ALLOWLIST:-}" ]]; then + IFS=',' read -ra ALLOWLIST <<< "$TOOL_GUARD_ALLOWLIST" +fi + +is_allowlisted() { + local text="$1" + for pattern in "${ALLOWLIST[@]}"; do + pattern=$(printf '%s' "$pattern" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') + [[ -z "$pattern" ]] && continue + if [[ "$text" == *"$pattern"* ]]; then + return 0 + fi + done + return 1 +} + +# Check allowlist early — if the combined text matches, skip all scanning +if [[ ${#ALLOWLIST[@]} -gt 0 ]] && is_allowlisted "$COMBINED"; then + printf '{"timestamp":"%s","event":"guard_skipped","reason":"allowlisted","tool":"%s"}\n' \ + "$TIMESTAMP" "$TOOL_NAME" >> "$LOG_FILE" + exit 0 +fi + +# --------------------------------------------------------------------------- +# Threat patterns (6 categories, ~20 patterns) +# +# Each entry: "CATEGORY:::SEVERITY:::REGEX:::SUGGESTION" +# Uses ::: as delimiter to avoid conflicts with regex pipe characters +# --------------------------------------------------------------------------- +PATTERNS=( + # Destructive file operations + "destructive_file_ops:::critical:::rm -rf /:::Use targeted 'rm' on specific paths instead of root" + "destructive_file_ops:::critical:::rm -rf ~:::Use targeted 'rm' on specific paths instead of home directory" + "destructive_file_ops:::critical:::rm -rf \.:::Use targeted 'rm' on specific files instead of current directory" + "destructive_file_ops:::critical:::rm -rf \.\.:::Never remove parent directories recursively" + "destructive_file_ops:::critical:::(rm|del|unlink).*\.env:::Use 'mv' to back up .env files before removing" + "destructive_file_ops:::critical:::(rm|del|unlink).*\.git[^i]:::Never delete .git directory — use 'git' commands to manage repo state" + + # Destructive git operations + "destructive_git_ops:::critical:::git push --force.*(main|master):::Use 'git push --force-with-lease' or push to a feature branch" + "destructive_git_ops:::critical:::git push -f.*(main|master):::Use 'git push --force-with-lease' or push to a feature branch" + "destructive_git_ops:::high:::git reset --hard:::Use 'git stash' to preserve changes, or 'git reset --soft'" + "destructive_git_ops:::high:::git clean -fd:::Use 'git clean -n' (dry run) first to preview what will be deleted" + + # Database destruction + "database_destruction:::critical:::DROP TABLE:::Use 'ALTER TABLE' or create a migration with rollback support" + "database_destruction:::critical:::DROP DATABASE:::Create a backup first; consider revoking DROP privileges" + "database_destruction:::critical:::TRUNCATE:::Use 'DELETE FROM ... WHERE' with a condition for safer data removal" + "database_destruction:::high:::DELETE FROM [a-zA-Z_]+ *;:::Add a WHERE clause to 'DELETE FROM' to avoid deleting all rows" + + # Permission abuse + "permission_abuse:::high:::chmod 777:::Use 'chmod 755' for directories or 'chmod 644' for files" + "permission_abuse:::high:::chmod -R 777:::Use specific permissions ('chmod -R 755') and limit scope" + + # Network exfiltration + "network_exfiltration:::critical:::curl.*\|.*bash:::Download the script first, review it, then execute" + "network_exfiltration:::critical:::wget.*\|.*sh:::Download the script first, review it, then execute" + "network_exfiltration:::high:::curl.*--data.*@:::Review what data is being sent before using 'curl --data @file'" + + # System danger + "system_danger:::high:::sudo :::Avoid 'sudo' — run commands with the least privilege needed" + "system_danger:::high:::npm publish:::Use 'npm publish --dry-run' first to verify package contents" +) + +# --------------------------------------------------------------------------- +# Escape a string for safe JSON embedding +# --------------------------------------------------------------------------- +json_escape() { + printf '%s' "$1" | sed 's/\\/\\\\/g; s/"/\\"/g; s/ /\\t/g' +} + +# --------------------------------------------------------------------------- +# Scan combined text against threat patterns +# --------------------------------------------------------------------------- +THREATS=() +THREAT_COUNT=0 + +for entry in "${PATTERNS[@]}"; do + category="${entry%%:::*}" + rest="${entry#*:::}" + severity="${rest%%:::*}" + rest="${rest#*:::}" + regex="${rest%%:::*}" + suggestion="${rest#*:::}" + + if printf '%s\n' "$COMBINED" | grep -qiE "$regex" 2>/dev/null; then + local_match=$(printf '%s\n' "$COMBINED" | grep -oiE "$regex" 2>/dev/null | head -1) + THREATS+=("${category} ${severity} ${local_match} ${suggestion}") + THREAT_COUNT=$((THREAT_COUNT + 1)) + fi +done + +# --------------------------------------------------------------------------- +# Output and logging +# --------------------------------------------------------------------------- +if [[ $THREAT_COUNT -gt 0 ]]; then + echo "" + echo "🛡️ Tool Guardian: $THREAT_COUNT threat(s) detected in '$TOOL_NAME' invocation" + echo "" + printf " %-24s %-10s %-40s %s\n" "CATEGORY" "SEVERITY" "MATCH" "SUGGESTION" + printf " %-24s %-10s %-40s %s\n" "--------" "--------" "-----" "----------" + + # Build JSON findings array + FINDINGS_JSON="[" + FIRST=true + for threat in "${THREATS[@]}"; do + IFS=$'\t' read -r category severity match suggestion <<< "$threat" + + # Truncate match for display + display_match="$match" + if [[ ${#match} -gt 38 ]]; then + display_match="${match:0:35}..." + fi + printf " %-24s %-10s %-40s %s\n" "$category" "$severity" "$display_match" "$suggestion" + + if [[ "$FIRST" != "true" ]]; then + FINDINGS_JSON+="," + fi + FIRST=false + FINDINGS_JSON+="{\"category\":\"$(json_escape "$category")\",\"severity\":\"$(json_escape "$severity")\",\"match\":\"$(json_escape "$match")\",\"suggestion\":\"$(json_escape "$suggestion")\"}" + done + FINDINGS_JSON+="]" + + echo "" + + # Write structured log entry + printf '{"timestamp":"%s","event":"threats_detected","mode":"%s","tool":"%s","threat_count":%d,"threats":%s}\n' \ + "$TIMESTAMP" "$MODE" "$(json_escape "$TOOL_NAME")" "$THREAT_COUNT" "$FINDINGS_JSON" >> "$LOG_FILE" + + if [[ "$MODE" == "block" ]]; then + echo "🚫 Operation blocked: resolve the threats above or adjust TOOL_GUARD_ALLOWLIST." + echo " Set GUARD_MODE=warn to log without blocking." + exit 1 + else + echo "⚠️ Threats logged in warn mode. Set GUARD_MODE=block to prevent dangerous operations." + fi +else + # Log clean result + printf '{"timestamp":"%s","event":"guard_passed","mode":"%s","tool":"%s"}\n' \ + "$TIMESTAMP" "$MODE" "$(json_escape "$TOOL_NAME")" >> "$LOG_FILE" +fi + +exit 0 diff --git a/hooks/tool-guardian/hooks.json b/hooks/tool-guardian/hooks.json new file mode 100644 index 000000000..bd0e54653 --- /dev/null +++ b/hooks/tool-guardian/hooks.json @@ -0,0 +1,16 @@ +{ + "version": 1, + "hooks": { + "preToolUse": [ + { + "type": "command", + "bash": ".github/hooks/tool-guardian/guard-tool.sh", + "cwd": ".", + "env": { + "GUARD_MODE": "block" + }, + "timeoutSec": 10 + } + ] + } +} diff --git a/plugins/automate-this/.github/plugin/plugin.json b/plugins/automate-this/.github/plugin/plugin.json index 0824ae3d4..440e51fa5 100644 --- a/plugins/automate-this/.github/plugin/plugin.json +++ b/plugins/automate-this/.github/plugin/plugin.json @@ -18,6 +18,6 @@ "copilot-cli" ], "skills": [ - "./skills/automate-this/" + "./skills/automate-this" ] } diff --git a/plugins/awesome-copilot/.github/plugin/plugin.json b/plugins/awesome-copilot/.github/plugin/plugin.json index 3ebd4b485..e3b37ffe0 100644 --- a/plugins/awesome-copilot/.github/plugin/plugin.json +++ b/plugins/awesome-copilot/.github/plugin/plugin.json @@ -15,11 +15,11 @@ "agents" ], "agents": [ - "./agents/meta-agentic-project-scaffold.md" + "./agents" ], "skills": [ - "./skills/suggest-awesome-github-copilot-skills/", - "./skills/suggest-awesome-github-copilot-instructions/", - "./skills/suggest-awesome-github-copilot-agents/" + "./skills/suggest-awesome-github-copilot-skills", + "./skills/suggest-awesome-github-copilot-instructions", + "./skills/suggest-awesome-github-copilot-agents" ] } diff --git a/plugins/azure-cloud-development/.github/plugin/plugin.json b/plugins/azure-cloud-development/.github/plugin/plugin.json index 9d25bcb80..a7a626cb3 100644 --- a/plugins/azure-cloud-development/.github/plugin/plugin.json +++ b/plugins/azure-cloud-development/.github/plugin/plugin.json @@ -18,18 +18,12 @@ "devops" ], "agents": [ - "./agents/azure-principal-architect.md", - "./agents/azure-saas-architect.md", - "./agents/azure-logic-apps-expert.md", - "./agents/azure-verified-modules-bicep.md", - "./agents/azure-verified-modules-terraform.md", - "./agents/terraform-azure-planning.md", - "./agents/terraform-azure-implement.md" + "./agents" ], "skills": [ - "./skills/azure-resource-health-diagnose/", - "./skills/az-cost-optimize/", - "./skills/import-infrastructure-as-code/", - "./skills/azure-pricing/" + "./skills/azure-resource-health-diagnose", + "./skills/az-cost-optimize", + "./skills/import-infrastructure-as-code", + "./skills/azure-pricing" ] } diff --git a/plugins/cast-imaging/.github/plugin/plugin.json b/plugins/cast-imaging/.github/plugin/plugin.json index 77c36be50..97a896d2c 100644 --- a/plugins/cast-imaging/.github/plugin/plugin.json +++ b/plugins/cast-imaging/.github/plugin/plugin.json @@ -16,8 +16,6 @@ "devops" ], "agents": [ - "./agents/cast-imaging-software-discovery.md", - "./agents/cast-imaging-impact-analysis.md", - "./agents/cast-imaging-structural-quality-advisor.md" + "./agents" ] } diff --git a/plugins/clojure-interactive-programming/.github/plugin/plugin.json b/plugins/clojure-interactive-programming/.github/plugin/plugin.json index e983d38ac..c984c9aa8 100644 --- a/plugins/clojure-interactive-programming/.github/plugin/plugin.json +++ b/plugins/clojure-interactive-programming/.github/plugin/plugin.json @@ -13,9 +13,9 @@ "interactive-programming" ], "agents": [ - "./agents/clojure-interactive-programming.md" + "./agents" ], "skills": [ - "./skills/remember-interactive-programming/" + "./skills/remember-interactive-programming" ] } diff --git a/plugins/context-engineering/.github/plugin/plugin.json b/plugins/context-engineering/.github/plugin/plugin.json index a6ed5c2f4..fd1fc3065 100644 --- a/plugins/context-engineering/.github/plugin/plugin.json +++ b/plugins/context-engineering/.github/plugin/plugin.json @@ -15,11 +15,11 @@ "architecture" ], "agents": [ - "./agents/context-architect.md" + "./agents" ], "skills": [ - "./skills/context-map/", - "./skills/what-context-needed/", - "./skills/refactor-plan/" + "./skills/context-map", + "./skills/what-context-needed", + "./skills/refactor-plan" ] } diff --git a/plugins/copilot-sdk/.github/plugin/plugin.json b/plugins/copilot-sdk/.github/plugin/plugin.json index 42c166808..0739a17d2 100644 --- a/plugins/copilot-sdk/.github/plugin/plugin.json +++ b/plugins/copilot-sdk/.github/plugin/plugin.json @@ -19,6 +19,6 @@ "github-copilot" ], "skills": [ - "./skills/copilot-sdk/" + "./skills/copilot-sdk" ] } diff --git a/plugins/csharp-dotnet-development/.github/plugin/plugin.json b/plugins/csharp-dotnet-development/.github/plugin/plugin.json index 1ec31d36b..22ee70ff4 100644 --- a/plugins/csharp-dotnet-development/.github/plugin/plugin.json +++ b/plugins/csharp-dotnet-development/.github/plugin/plugin.json @@ -14,16 +14,16 @@ "testing" ], "agents": [ - "./agents/expert-dotnet-software-engineer.md" + "./agents" ], "skills": [ - "./skills/csharp-async/", - "./skills/aspnet-minimal-api-openapi/", - "./skills/csharp-xunit/", - "./skills/csharp-nunit/", - "./skills/csharp-mstest/", - "./skills/csharp-tunit/", - "./skills/dotnet-best-practices/", - "./skills/dotnet-upgrade/" + "./skills/csharp-async", + "./skills/aspnet-minimal-api-openapi", + "./skills/csharp-xunit", + "./skills/csharp-nunit", + "./skills/csharp-mstest", + "./skills/csharp-tunit", + "./skills/dotnet-best-practices", + "./skills/dotnet-upgrade" ] } diff --git a/plugins/csharp-mcp-development/.github/plugin/plugin.json b/plugins/csharp-mcp-development/.github/plugin/plugin.json index cb6da7090..494cc6c20 100644 --- a/plugins/csharp-mcp-development/.github/plugin/plugin.json +++ b/plugins/csharp-mcp-development/.github/plugin/plugin.json @@ -15,9 +15,9 @@ "server-development" ], "agents": [ - "./agents/csharp-mcp-expert.md" + "./agents" ], "skills": [ - "./skills/csharp-mcp-server-generator/" + "./skills/csharp-mcp-server-generator" ] } diff --git a/plugins/database-data-management/.github/plugin/plugin.json b/plugins/database-data-management/.github/plugin/plugin.json index 2477c840a..ee30394a2 100644 --- a/plugins/database-data-management/.github/plugin/plugin.json +++ b/plugins/database-data-management/.github/plugin/plugin.json @@ -18,13 +18,12 @@ "data-management" ], "agents": [ - "./agents/postgresql-dba.md", - "./agents/ms-sql-dba.md" + "./agents" ], "skills": [ - "./skills/sql-optimization/", - "./skills/sql-code-review/", - "./skills/postgresql-optimization/", - "./skills/postgresql-code-review/" + "./skills/sql-optimization", + "./skills/sql-code-review", + "./skills/postgresql-optimization", + "./skills/postgresql-code-review" ] } diff --git a/plugins/dataverse-sdk-for-python/.github/plugin/plugin.json b/plugins/dataverse-sdk-for-python/.github/plugin/plugin.json index 4cac3979c..51d2fc33a 100644 --- a/plugins/dataverse-sdk-for-python/.github/plugin/plugin.json +++ b/plugins/dataverse-sdk-for-python/.github/plugin/plugin.json @@ -14,9 +14,9 @@ "sdk" ], "skills": [ - "./skills/dataverse-python-quickstart/", - "./skills/dataverse-python-advanced-patterns/", - "./skills/dataverse-python-production-code/", - "./skills/dataverse-python-usecase-builder/" + "./skills/dataverse-python-quickstart", + "./skills/dataverse-python-advanced-patterns", + "./skills/dataverse-python-production-code", + "./skills/dataverse-python-usecase-builder" ] } diff --git a/plugins/dataverse/.github/plugin/plugin.json b/plugins/dataverse/.github/plugin/plugin.json index 8b27d3950..3d8e03804 100644 --- a/plugins/dataverse/.github/plugin/plugin.json +++ b/plugins/dataverse/.github/plugin/plugin.json @@ -12,6 +12,6 @@ "mcp" ], "skills": [ - "./skills/mcp-configure/" + "./skills/mcp-configure" ] } diff --git a/plugins/devops-oncall/.github/plugin/plugin.json b/plugins/devops-oncall/.github/plugin/plugin.json index 49522608f..c4c51c03f 100644 --- a/plugins/devops-oncall/.github/plugin/plugin.json +++ b/plugins/devops-oncall/.github/plugin/plugin.json @@ -14,10 +14,10 @@ "azure" ], "agents": [ - "./agents/azure-principal-architect.md" + "./agents" ], "skills": [ - "./skills/azure-resource-health-diagnose/", - "./skills/multi-stage-dockerfile/" + "./skills/azure-resource-health-diagnose", + "./skills/multi-stage-dockerfile" ] } diff --git a/plugins/doublecheck/.github/plugin/plugin.json b/plugins/doublecheck/.github/plugin/plugin.json index fb926acab..c682a4fd8 100644 --- a/plugins/doublecheck/.github/plugin/plugin.json +++ b/plugins/doublecheck/.github/plugin/plugin.json @@ -16,9 +16,9 @@ "safety" ], "agents": [ - "./agents/doublecheck.md" + "./agents" ], "skills": [ - "./skills/doublecheck/" + "./skills/doublecheck" ] } diff --git a/plugins/edge-ai-tasks/.github/plugin/plugin.json b/plugins/edge-ai-tasks/.github/plugin/plugin.json index 5479ee9d9..dd04d6c5c 100644 --- a/plugins/edge-ai-tasks/.github/plugin/plugin.json +++ b/plugins/edge-ai-tasks/.github/plugin/plugin.json @@ -15,7 +15,6 @@ "implementation" ], "agents": [ - "./agents/task-researcher.md", - "./agents/task-planner.md" + "./agents" ] } diff --git a/plugins/flowstudio-power-automate/.github/plugin/plugin.json b/plugins/flowstudio-power-automate/.github/plugin/plugin.json index 7c025d78d..1e02e953c 100644 --- a/plugins/flowstudio-power-automate/.github/plugin/plugin.json +++ b/plugins/flowstudio-power-automate/.github/plugin/plugin.json @@ -17,8 +17,8 @@ "workflow-automation" ], "skills": [ - "./skills/flowstudio-power-automate-mcp/", - "./skills/flowstudio-power-automate-debug/", - "./skills/flowstudio-power-automate-build/" + "./skills/flowstudio-power-automate-mcp", + "./skills/flowstudio-power-automate-debug", + "./skills/flowstudio-power-automate-build" ] } diff --git a/plugins/frontend-web-dev/.github/plugin/plugin.json b/plugins/frontend-web-dev/.github/plugin/plugin.json index efc8b17b2..8efc3030e 100644 --- a/plugins/frontend-web-dev/.github/plugin/plugin.json +++ b/plugins/frontend-web-dev/.github/plugin/plugin.json @@ -19,11 +19,10 @@ "vue" ], "agents": [ - "./agents/expert-react-frontend-engineer.md", - "./agents/electron-angular-native.md" + "./agents" ], "skills": [ - "./skills/playwright-explore-website/", - "./skills/playwright-generate-test/" + "./skills/playwright-explore-website", + "./skills/playwright-generate-test" ] } diff --git a/plugins/gem-team/.github/plugin/plugin.json b/plugins/gem-team/.github/plugin/plugin.json index 6f7561687..baec34e0d 100644 --- a/plugins/gem-team/.github/plugin/plugin.json +++ b/plugins/gem-team/.github/plugin/plugin.json @@ -19,13 +19,6 @@ "prd" ], "agents": [ - "./agents/gem-orchestrator.md", - "./agents/gem-researcher.md", - "./agents/gem-planner.md", - "./agents/gem-implementer.md", - "./agents/gem-browser-tester.md", - "./agents/gem-devops.md", - "./agents/gem-reviewer.md", - "./agents/gem-documentation-writer.md" + "./agents" ] } diff --git a/plugins/go-mcp-development/.github/plugin/plugin.json b/plugins/go-mcp-development/.github/plugin/plugin.json index 83a2f3e17..f012e481a 100644 --- a/plugins/go-mcp-development/.github/plugin/plugin.json +++ b/plugins/go-mcp-development/.github/plugin/plugin.json @@ -16,9 +16,9 @@ "sdk" ], "agents": [ - "./agents/go-mcp-expert.md" + "./agents" ], "skills": [ - "./skills/go-mcp-server-generator/" + "./skills/go-mcp-server-generator" ] } diff --git a/plugins/java-development/.github/plugin/plugin.json b/plugins/java-development/.github/plugin/plugin.json index ffd3da89b..5c0ce8d53 100644 --- a/plugins/java-development/.github/plugin/plugin.json +++ b/plugins/java-development/.github/plugin/plugin.json @@ -16,9 +16,9 @@ "javadoc" ], "skills": [ - "./skills/java-docs/", - "./skills/java-junit/", - "./skills/java-springboot/", - "./skills/create-spring-boot-java-project/" + "./skills/java-docs", + "./skills/java-junit", + "./skills/java-springboot", + "./skills/create-spring-boot-java-project" ] } diff --git a/plugins/java-mcp-development/.github/plugin/plugin.json b/plugins/java-mcp-development/.github/plugin/plugin.json index 0d95e1ad6..799b1f76f 100644 --- a/plugins/java-mcp-development/.github/plugin/plugin.json +++ b/plugins/java-mcp-development/.github/plugin/plugin.json @@ -18,9 +18,9 @@ "reactor" ], "agents": [ - "./agents/java-mcp-expert.md" + "./agents" ], "skills": [ - "./skills/java-mcp-server-generator/" + "./skills/java-mcp-server-generator" ] } diff --git a/plugins/kotlin-mcp-development/.github/plugin/plugin.json b/plugins/kotlin-mcp-development/.github/plugin/plugin.json index 0c0629d4f..2aa608f66 100644 --- a/plugins/kotlin-mcp-development/.github/plugin/plugin.json +++ b/plugins/kotlin-mcp-development/.github/plugin/plugin.json @@ -16,9 +16,9 @@ "ktor" ], "agents": [ - "./agents/kotlin-mcp-expert.md" + "./agents" ], "skills": [ - "./skills/kotlin-mcp-server-generator/" + "./skills/kotlin-mcp-server-generator" ] } diff --git a/plugins/mcp-m365-copilot/.github/plugin/plugin.json b/plugins/mcp-m365-copilot/.github/plugin/plugin.json index 01f010e96..a142ffc2d 100644 --- a/plugins/mcp-m365-copilot/.github/plugin/plugin.json +++ b/plugins/mcp-m365-copilot/.github/plugin/plugin.json @@ -16,11 +16,11 @@ "adaptive-cards" ], "agents": [ - "./agents/mcp-m365-agent-expert.md" + "./agents" ], "skills": [ - "./skills/mcp-create-declarative-agent/", - "./skills/mcp-create-adaptive-cards/", - "./skills/mcp-deploy-manage-agents/" + "./skills/mcp-create-declarative-agent", + "./skills/mcp-create-adaptive-cards", + "./skills/mcp-deploy-manage-agents" ] } diff --git a/plugins/napkin/.github/plugin/plugin.json b/plugins/napkin/.github/plugin/plugin.json index 2114c1783..17be1ddf5 100644 --- a/plugins/napkin/.github/plugin/plugin.json +++ b/plugins/napkin/.github/plugin/plugin.json @@ -20,6 +20,6 @@ "ux" ], "skills": [ - "./skills/napkin/" + "./skills/napkin" ] } diff --git a/plugins/noob-mode/.github/plugin/plugin.json b/plugins/noob-mode/.github/plugin/plugin.json index 7c5cf3b0a..899e47a5b 100644 --- a/plugins/noob-mode/.github/plugin/plugin.json +++ b/plugins/noob-mode/.github/plugin/plugin.json @@ -17,6 +17,6 @@ "ux" ], "skills": [ - "./skills/noob-mode/" + "./skills/noob-mode" ] } diff --git a/plugins/openapi-to-application-csharp-dotnet/.github/plugin/plugin.json b/plugins/openapi-to-application-csharp-dotnet/.github/plugin/plugin.json index 67fa408da..169303550 100644 --- a/plugins/openapi-to-application-csharp-dotnet/.github/plugin/plugin.json +++ b/plugins/openapi-to-application-csharp-dotnet/.github/plugin/plugin.json @@ -16,9 +16,9 @@ "aspnet" ], "agents": [ - "./agents/openapi-to-application.md" + "./agents" ], "skills": [ - "./skills/openapi-to-application-code/" + "./skills/openapi-to-application-code" ] } diff --git a/plugins/openapi-to-application-go/.github/plugin/plugin.json b/plugins/openapi-to-application-go/.github/plugin/plugin.json index 8f57de601..22e2c62e8 100644 --- a/plugins/openapi-to-application-go/.github/plugin/plugin.json +++ b/plugins/openapi-to-application-go/.github/plugin/plugin.json @@ -15,9 +15,9 @@ "golang" ], "agents": [ - "./agents/openapi-to-application.md" + "./agents" ], "skills": [ - "./skills/openapi-to-application-code/" + "./skills/openapi-to-application-code" ] } diff --git a/plugins/openapi-to-application-java-spring-boot/.github/plugin/plugin.json b/plugins/openapi-to-application-java-spring-boot/.github/plugin/plugin.json index 8f544c63d..82aa5d212 100644 --- a/plugins/openapi-to-application-java-spring-boot/.github/plugin/plugin.json +++ b/plugins/openapi-to-application-java-spring-boot/.github/plugin/plugin.json @@ -15,9 +15,9 @@ "spring-boot" ], "agents": [ - "./agents/openapi-to-application.md" + "./agents" ], "skills": [ - "./skills/openapi-to-application-code/" + "./skills/openapi-to-application-code" ] } diff --git a/plugins/openapi-to-application-nodejs-nestjs/.github/plugin/plugin.json b/plugins/openapi-to-application-nodejs-nestjs/.github/plugin/plugin.json index fd9ba816f..ddd2e850d 100644 --- a/plugins/openapi-to-application-nodejs-nestjs/.github/plugin/plugin.json +++ b/plugins/openapi-to-application-nodejs-nestjs/.github/plugin/plugin.json @@ -16,9 +16,9 @@ "nestjs" ], "agents": [ - "./agents/openapi-to-application.md" + "./agents" ], "skills": [ - "./skills/openapi-to-application-code/" + "./skills/openapi-to-application-code" ] } diff --git a/plugins/openapi-to-application-python-fastapi/.github/plugin/plugin.json b/plugins/openapi-to-application-python-fastapi/.github/plugin/plugin.json index 4f9df5824..092e88034 100644 --- a/plugins/openapi-to-application-python-fastapi/.github/plugin/plugin.json +++ b/plugins/openapi-to-application-python-fastapi/.github/plugin/plugin.json @@ -15,9 +15,9 @@ "fastapi" ], "agents": [ - "./agents/openapi-to-application.md" + "./agents" ], "skills": [ - "./skills/openapi-to-application-code/" + "./skills/openapi-to-application-code" ] } diff --git a/plugins/oracle-to-postgres-migration-expert/.github/plugin/plugin.json b/plugins/oracle-to-postgres-migration-expert/.github/plugin/plugin.json index 8022d1e6a..d0a102134 100644 --- a/plugins/oracle-to-postgres-migration-expert/.github/plugin/plugin.json +++ b/plugins/oracle-to-postgres-migration-expert/.github/plugin/plugin.json @@ -18,15 +18,15 @@ "stored-procedures" ], "agents": [ - "./agents/oracle-to-postgres-migration-expert.md" + "./agents" ], "skills": [ - "./skills/creating-oracle-to-postgres-master-migration-plan/", - "./skills/creating-oracle-to-postgres-migration-bug-report/", - "./skills/creating-oracle-to-postgres-migration-integration-tests/", - "./skills/migrating-oracle-to-postgres-stored-procedures/", - "./skills/planning-oracle-to-postgres-migration-integration-testing/", - "./skills/reviewing-oracle-to-postgres-migration/", - "./skills/scaffolding-oracle-to-postgres-migration-test-project/" + "./skills/creating-oracle-to-postgres-master-migration-plan", + "./skills/creating-oracle-to-postgres-migration-bug-report", + "./skills/creating-oracle-to-postgres-migration-integration-tests", + "./skills/migrating-oracle-to-postgres-stored-procedures", + "./skills/planning-oracle-to-postgres-migration-integration-testing", + "./skills/reviewing-oracle-to-postgres-migration", + "./skills/scaffolding-oracle-to-postgres-migration-test-project" ] } diff --git a/plugins/ospo-sponsorship/.github/plugin/plugin.json b/plugins/ospo-sponsorship/.github/plugin/plugin.json index 4d4a1f2c2..65e25605b 100644 --- a/plugins/ospo-sponsorship/.github/plugin/plugin.json +++ b/plugins/ospo-sponsorship/.github/plugin/plugin.json @@ -8,6 +8,6 @@ "repository": "https://github.com/github/awesome-copilot", "license": "MIT", "skills": [ - "./skills/sponsor-finder/" + "./skills/sponsor-finder" ] } diff --git a/plugins/partners/.github/plugin/plugin.json b/plugins/partners/.github/plugin/plugin.json index 72801efcc..ffaac25e8 100644 --- a/plugins/partners/.github/plugin/plugin.json +++ b/plugins/partners/.github/plugin/plugin.json @@ -20,25 +20,6 @@ "performance" ], "agents": [ - "./agents/amplitude-experiment-implementation.md", - "./agents/apify-integration-expert.md", - "./agents/arm-migration.md", - "./agents/diffblue-cover.md", - "./agents/droid.md", - "./agents/dynatrace-expert.md", - "./agents/elasticsearch-observability.md", - "./agents/jfrog-sec.md", - "./agents/launchdarkly-flag-cleanup.md", - "./agents/lingodotdev-i18n.md", - "./agents/monday-bug-fixer.md", - "./agents/mongodb-performance-advisor.md", - "./agents/neo4j-docker-client-generator.md", - "./agents/neon-migration-specialist.md", - "./agents/neon-optimization-analyzer.md", - "./agents/octopus-deploy-release-notes-mcp.md", - "./agents/stackhawk-security-onboarding.md", - "./agents/terraform.md", - "./agents/pagerduty-incident-responder.md", - "./agents/comet-opik.md" + "./agents" ] } diff --git a/plugins/php-mcp-development/.github/plugin/plugin.json b/plugins/php-mcp-development/.github/plugin/plugin.json index 07a941515..d07e16f1f 100644 --- a/plugins/php-mcp-development/.github/plugin/plugin.json +++ b/plugins/php-mcp-development/.github/plugin/plugin.json @@ -17,9 +17,9 @@ "composer" ], "agents": [ - "./agents/php-mcp-expert.md" + "./agents" ], "skills": [ - "./skills/php-mcp-server-generator/" + "./skills/php-mcp-server-generator" ] } diff --git a/plugins/polyglot-test-agent/.github/plugin/plugin.json b/plugins/polyglot-test-agent/.github/plugin/plugin.json index 09e2a22c4..55814c45a 100644 --- a/plugins/polyglot-test-agent/.github/plugin/plugin.json +++ b/plugins/polyglot-test-agent/.github/plugin/plugin.json @@ -20,16 +20,9 @@ "go" ], "agents": [ - "./agents/polyglot-test-generator.md", - "./agents/polyglot-test-researcher.md", - "./agents/polyglot-test-planner.md", - "./agents/polyglot-test-implementer.md", - "./agents/polyglot-test-builder.md", - "./agents/polyglot-test-tester.md", - "./agents/polyglot-test-fixer.md", - "./agents/polyglot-test-linter.md" + "./agents" ], "skills": [ - "./skills/polyglot-test-agent/" + "./skills/polyglot-test-agent" ] } diff --git a/plugins/power-apps-code-apps/.github/plugin/plugin.json b/plugins/power-apps-code-apps/.github/plugin/plugin.json index 4955de4f8..c64f85c4e 100644 --- a/plugins/power-apps-code-apps/.github/plugin/plugin.json +++ b/plugins/power-apps-code-apps/.github/plugin/plugin.json @@ -17,9 +17,9 @@ "connectors" ], "agents": [ - "./agents/power-platform-expert.md" + "./agents" ], "skills": [ - "./skills/power-apps-code-app-scaffold/" + "./skills/power-apps-code-app-scaffold" ] } diff --git a/plugins/power-bi-development/.github/plugin/plugin.json b/plugins/power-bi-development/.github/plugin/plugin.json index 38452b41f..b9a7f0a0c 100644 --- a/plugins/power-bi-development/.github/plugin/plugin.json +++ b/plugins/power-bi-development/.github/plugin/plugin.json @@ -18,15 +18,12 @@ "business-intelligence" ], "agents": [ - "./agents/power-bi-data-modeling-expert.md", - "./agents/power-bi-dax-expert.md", - "./agents/power-bi-performance-expert.md", - "./agents/power-bi-visualization-expert.md" + "./agents" ], "skills": [ - "./skills/power-bi-dax-optimization/", - "./skills/power-bi-model-design-review/", - "./skills/power-bi-performance-troubleshooting/", - "./skills/power-bi-report-design-consultation/" + "./skills/power-bi-dax-optimization", + "./skills/power-bi-model-design-review", + "./skills/power-bi-performance-troubleshooting", + "./skills/power-bi-report-design-consultation" ] } diff --git a/plugins/power-platform-mcp-connector-development/.github/plugin/plugin.json b/plugins/power-platform-mcp-connector-development/.github/plugin/plugin.json index aec0c8f35..339867b26 100644 --- a/plugins/power-platform-mcp-connector-development/.github/plugin/plugin.json +++ b/plugins/power-platform-mcp-connector-development/.github/plugin/plugin.json @@ -15,10 +15,10 @@ "json-rpc" ], "agents": [ - "./agents/power-platform-mcp-integration-expert.md" + "./agents" ], "skills": [ - "./skills/power-platform-mcp-connector-suite/", - "./skills/mcp-copilot-studio-server-generator/" + "./skills/power-platform-mcp-connector-suite", + "./skills/mcp-copilot-studio-server-generator" ] } diff --git a/plugins/project-planning/.github/plugin/plugin.json b/plugins/project-planning/.github/plugin/plugin.json index 1f9e4c5f1..f32368390 100644 --- a/plugins/project-planning/.github/plugin/plugin.json +++ b/plugins/project-planning/.github/plugin/plugin.json @@ -18,22 +18,16 @@ "technical-spike" ], "agents": [ - "./agents/task-planner.md", - "./agents/task-researcher.md", - "./agents/planner.md", - "./agents/plan.md", - "./agents/prd.md", - "./agents/implementation-plan.md", - "./agents/research-technical-spike.md" + "./agents" ], "skills": [ - "./skills/breakdown-feature-implementation/", - "./skills/breakdown-feature-prd/", - "./skills/breakdown-epic-arch/", - "./skills/breakdown-epic-pm/", - "./skills/create-implementation-plan/", - "./skills/update-implementation-plan/", - "./skills/create-github-issues-feature-from-implementation-plan/", - "./skills/create-technical-spike/" + "./skills/breakdown-feature-implementation", + "./skills/breakdown-feature-prd", + "./skills/breakdown-epic-arch", + "./skills/breakdown-epic-pm", + "./skills/create-implementation-plan", + "./skills/update-implementation-plan", + "./skills/create-github-issues-feature-from-implementation-plan", + "./skills/create-technical-spike" ] } diff --git a/plugins/python-mcp-development/.github/plugin/plugin.json b/plugins/python-mcp-development/.github/plugin/plugin.json index 7bea372fd..42a0693d8 100644 --- a/plugins/python-mcp-development/.github/plugin/plugin.json +++ b/plugins/python-mcp-development/.github/plugin/plugin.json @@ -15,9 +15,9 @@ "server-development" ], "agents": [ - "./agents/python-mcp-expert.md" + "./agents" ], "skills": [ - "./skills/python-mcp-server-generator/" + "./skills/python-mcp-server-generator" ] } diff --git a/plugins/ruby-mcp-development/.github/plugin/plugin.json b/plugins/ruby-mcp-development/.github/plugin/plugin.json index b5683ef6c..750d37c37 100644 --- a/plugins/ruby-mcp-development/.github/plugin/plugin.json +++ b/plugins/ruby-mcp-development/.github/plugin/plugin.json @@ -17,9 +17,9 @@ "gem" ], "agents": [ - "./agents/ruby-mcp-expert.md" + "./agents" ], "skills": [ - "./skills/ruby-mcp-server-generator/" + "./skills/ruby-mcp-server-generator" ] } diff --git a/plugins/rug-agentic-workflow/.github/plugin/plugin.json b/plugins/rug-agentic-workflow/.github/plugin/plugin.json index 7bdf09978..383fcbce6 100644 --- a/plugins/rug-agentic-workflow/.github/plugin/plugin.json +++ b/plugins/rug-agentic-workflow/.github/plugin/plugin.json @@ -15,8 +15,6 @@ "qa" ], "agents": [ - "./agents/rug-orchestrator.md", - "./agents/swe-subagent.md", - "./agents/qa-subagent.md" + "./agents" ] } diff --git a/plugins/rust-mcp-development/.github/plugin/plugin.json b/plugins/rust-mcp-development/.github/plugin/plugin.json index 5b05a7658..1d4984975 100644 --- a/plugins/rust-mcp-development/.github/plugin/plugin.json +++ b/plugins/rust-mcp-development/.github/plugin/plugin.json @@ -19,9 +19,9 @@ "rmcp" ], "agents": [ - "./agents/rust-mcp-expert.md" + "./agents" ], "skills": [ - "./skills/rust-mcp-server-generator/" + "./skills/rust-mcp-server-generator" ] } diff --git a/plugins/security-best-practices/.github/plugin/plugin.json b/plugins/security-best-practices/.github/plugin/plugin.json index d2930b7ef..d0c34abbe 100644 --- a/plugins/security-best-practices/.github/plugin/plugin.json +++ b/plugins/security-best-practices/.github/plugin/plugin.json @@ -18,6 +18,6 @@ "best-practices" ], "skills": [ - "./skills/ai-prompt-engineering-safety-review/" + "./skills/ai-prompt-engineering-safety-review" ] } diff --git a/plugins/software-engineering-team/.github/plugin/plugin.json b/plugins/software-engineering-team/.github/plugin/plugin.json index 0228eac54..2d93572ba 100644 --- a/plugins/software-engineering-team/.github/plugin/plugin.json +++ b/plugins/software-engineering-team/.github/plugin/plugin.json @@ -18,12 +18,6 @@ "ai-ethics" ], "agents": [ - "./agents/se-ux-ui-designer.md", - "./agents/se-technical-writer.md", - "./agents/se-gitops-ci-specialist.md", - "./agents/se-product-manager-advisor.md", - "./agents/se-responsible-ai-code.md", - "./agents/se-system-architecture-reviewer.md", - "./agents/se-security-reviewer.md" + "./agents" ] } diff --git a/plugins/structured-autonomy/.github/plugin/plugin.json b/plugins/structured-autonomy/.github/plugin/plugin.json index 4428d5745..c144dd572 100644 --- a/plugins/structured-autonomy/.github/plugin/plugin.json +++ b/plugins/structured-autonomy/.github/plugin/plugin.json @@ -8,8 +8,8 @@ "repository": "https://github.com/github/awesome-copilot", "license": "MIT", "skills": [ - "./skills/structured-autonomy-generate/", - "./skills/structured-autonomy-implement/", - "./skills/structured-autonomy-plan/" + "./skills/structured-autonomy-generate", + "./skills/structured-autonomy-implement", + "./skills/structured-autonomy-plan" ] } diff --git a/plugins/swift-mcp-development/.github/plugin/plugin.json b/plugins/swift-mcp-development/.github/plugin/plugin.json index e75803d2e..fbd459822 100644 --- a/plugins/swift-mcp-development/.github/plugin/plugin.json +++ b/plugins/swift-mcp-development/.github/plugin/plugin.json @@ -20,9 +20,9 @@ "async-await" ], "agents": [ - "./agents/swift-mcp-expert.md" + "./agents" ], "skills": [ - "./skills/swift-mcp-server-generator/" + "./skills/swift-mcp-server-generator" ] } diff --git a/plugins/technical-spike/.github/plugin/plugin.json b/plugins/technical-spike/.github/plugin/plugin.json index e706e8da7..0100dafeb 100644 --- a/plugins/technical-spike/.github/plugin/plugin.json +++ b/plugins/technical-spike/.github/plugin/plugin.json @@ -14,9 +14,9 @@ "research" ], "agents": [ - "./agents/research-technical-spike.md" + "./agents" ], "skills": [ - "./skills/create-technical-spike/" + "./skills/create-technical-spike" ] } diff --git a/plugins/testing-automation/.github/plugin/plugin.json b/plugins/testing-automation/.github/plugin/plugin.json index 3b3256062..9a6a73486 100644 --- a/plugins/testing-automation/.github/plugin/plugin.json +++ b/plugins/testing-automation/.github/plugin/plugin.json @@ -18,16 +18,13 @@ "nunit" ], "agents": [ - "./agents/tdd-red.md", - "./agents/tdd-green.md", - "./agents/tdd-refactor.md", - "./agents/playwright-tester.md" + "./agents" ], "skills": [ - "./skills/playwright-explore-website/", - "./skills/playwright-generate-test/", - "./skills/csharp-nunit/", - "./skills/java-junit/", - "./skills/ai-prompt-engineering-safety-review/" + "./skills/playwright-explore-website", + "./skills/playwright-generate-test", + "./skills/csharp-nunit", + "./skills/java-junit", + "./skills/ai-prompt-engineering-safety-review" ] } diff --git a/plugins/typescript-mcp-development/.github/plugin/plugin.json b/plugins/typescript-mcp-development/.github/plugin/plugin.json index c5c5a5230..1a8567fdc 100644 --- a/plugins/typescript-mcp-development/.github/plugin/plugin.json +++ b/plugins/typescript-mcp-development/.github/plugin/plugin.json @@ -15,9 +15,9 @@ "server-development" ], "agents": [ - "./agents/typescript-mcp-expert.md" + "./agents" ], "skills": [ - "./skills/typescript-mcp-server-generator/" + "./skills/typescript-mcp-server-generator" ] } diff --git a/plugins/typespec-m365-copilot/.github/plugin/plugin.json b/plugins/typespec-m365-copilot/.github/plugin/plugin.json index 58a030b48..db5be11ab 100644 --- a/plugins/typespec-m365-copilot/.github/plugin/plugin.json +++ b/plugins/typespec-m365-copilot/.github/plugin/plugin.json @@ -16,8 +16,8 @@ "microsoft-365" ], "skills": [ - "./skills/typespec-create-agent/", - "./skills/typespec-create-api-plugin/", - "./skills/typespec-api-operations/" + "./skills/typespec-create-agent", + "./skills/typespec-create-api-plugin", + "./skills/typespec-api-operations" ] } diff --git a/plugins/winui3-development/.github/plugin/plugin.json b/plugins/winui3-development/.github/plugin/plugin.json index 883f51204..c71e43b9e 100644 --- a/plugins/winui3-development/.github/plugin/plugin.json +++ b/plugins/winui3-development/.github/plugin/plugin.json @@ -16,9 +16,9 @@ "windows" ], "agents": [ - "./agents/winui3-expert.md" + "./agents" ], "skills": [ - "./skills/winui3-migration-guide/" + "./skills/winui3-migration-guide" ] }