Repository navigation
Backlog
Labels
Description
Describe the feature or problem you'd like to solve
Hooks, skills, custom agents, plugins and MCP server configs make up the agent's control plane and its supply chain. The OTel export names some of them, but never says where they came from or what their content was:
github.copilot.hook.*events carryhook.type,invocation_id,tool_names,decisionandduration. There is no command, script path or source (managed / user / repo / plugin).github.copilot.context.skillsandcustom_agent_namesare lists of names only.github.copilot.skill.invokedhasskill.source, but no path or hash.github.copilot.mcp.server.lifecyclehasname_hashandsource, but nothing about the server definition.
So security teams can't detect a managed hook that was edited to a no-op, a repo-supplied skill that shadows a trusted skill's name, or a config that changed between sessions. Names can collide and can be spoofed; content hashes can't.
Proposed solution
A per-session configuration inventory span event on invoke_agent (for example github.copilot.config.artifact), emitted once per loaded artifact, with these metadata-only attributes (no content needed):
| Attribute | Example |
|---|---|
github.copilot.artifact.kind |
hook, skill, agent, plugin, mcp_config, instructions |
github.copilot.artifact.name |
pre-tool-policy |
github.copilot.artifact.source |
managed, user, repo, plugin:<name>, builtin |
github.copilot.artifact.path |
~/.copilot/hooks/policy.json |
github.copilot.artifact.sha256 |
hash of the file (for hooks, also hash the referenced script) |
github.copilot.artifact.managed_expected_sha256 |
for managed plugins, the hash the server delivered |
At minimum, add source and sha256 to the existing hook, skill and MCP lifecycle events.
Example prompts or workflows
- Alert when a managed hook's hash differs from the managed baseline, or when the
managed_expected_sha256comparison fails. - Alert when an agent-invoked skill came from a
reposource the organisation hasn't seen before. - Build an inventory of every skill, agent and plugin in use across the fleet, by source and version (hash).
- Detect a repo hook that started running after a folder was trusted.
Additional context
- Related: Managed plugins are never re-synced from the server after install — local edits/deletions to plugin content are neither detected nor corrected (enforcement silently defeatable) #4933. Managed plugin hook content is user-writable and never re-synced, so tampering goes unnoticed. This request is the detection side of that problem.
- Related: Add skill-level spans to OpenTelemetry traces #3725 (skill-level spans) and Feature: Emit a dedicated event when user switches to a custom agent via /agent #2838 (active custom agent). Provenance on these artifacts complements attribution of what they did.
- Related: OTel: include MCP server transport, command and remote host on mcp.server.lifecycle events #5659 (MCP server transport, command and remote host).
Activity