Skip to content
Advanced A4 · GovernanceVerified 2 Nov 2026

Govern agents, MCP and secrets

Make the safe path the easy path: approved servers, pinned versions, masked secrets and the right control at the right layer.

Four layers of control
Product behaviour you can't switch off, org or enterprise policy, repository settings, and workspace config on each developer's machine. Knowing which layer owns a control tells you who can change it.
MCP intake
Publisher, pinned version, transport, tools exposed, data in and out, credentials and an owner. @latest means you're running code nobody reviewed.
Secrets in config
Use ${input:id} with password: true, or ${env:NAME}. A literal key in .vscode/mcp.json gets committed sooner or later.
Honest metrics
Usage metrics show adoption, not correctness or time saved. Pair each number with the decision it informs and what it can't tell you.

Worked example: Fixing the team's mcp.json

One server runs @latest; another is unapproved and has a literal API key.

Before

before
"issue-tracker": {
  "command": "npx",
  "args": ["-y", "acme-tracker-mcp"],
  "env": { "TRACKER_API_KEY": "lab-fixture-fake-…" }
}

After

after
"inputs": [{ "type": "promptString", "id": "tracker-api-key",
              "description": "Acme Tracker API key (read-only)", "password": true }],
"issue-tracker": {
  "type": "stdio",
  "command": "npx",
  "args": ["-y", "acme-tracker-mcp@2.3.1"],
  "env": { "TRACKER_API_KEY": "${input:tracker-api-key}" }
}

Why it works: The version matches the intake review, the key is masked and stored by VS Code instead of committed, and the server has a named owner in approved-servers.json.

One click, two incidents

A developer allows `curl … | sh` suggested after the agent read a dependency's README, and their mcp.json holds a literal key. The tabletop walks through containment, rotation and which control would have stopped each part.

Lab setup

Folder: governance/ in the labs download.

  • Node.js 22+ only. The lab never starts an MCP server or calls the network.
Terminal
cd governance && git init -q && git add -A && git commit -qm baseline
npm run verify   # expect 4 FAIL

When you're done, npm run verify prints:

Expected result
PASS  1. MCP servers approved, pinned, no inline credentials
PASS  2. No secret-looking values in the repository
PASS  3. Every control mapped to the right layer
PASS  4. Playbook, threat model, intake, tabletop, metrics complete

Review rubric

Score each line 0 (missing), 1 (partly there) or 2 (as described). Passing verify is necessary, not sufficient.

Rubric for governance
Criterion2 points means
IntakeEvery question answered with a specific, checkable fact
ConfigurationPinned versions, masked inputs, no literals
LayersCan explain who owns each control and how to change it
Threat modelEach threat has a concrete mitigation and a named owner
ResponseTabletop answers ordered, time-bound and include rotation
MeasurementMetrics tied to decisions, with stated limits

Safety note

The fake credential in the starter is deliberately obvious. Never paste a real key into a lab. In real repositories, turn on GitHub secret scanning and push protection.

Pro

Lab repository and walkthrough

The governance/ practice repository with npm run verify, a reference solution, and a step-by-step walkthrough.

  • Checkers for MCP config, secrets, policy layers and docs
  • Intake form, threat model, playbook and tabletop exercise
  • Reference answers with reasoning

One payment, lifetime access. $29 $19 launch price.

Try it yourself· about 90 min

Bring the team's MCP config under control, then write the governance documents.

  1. Complete docs/mcp-intake.md and approve or remove the tracker server.
  2. Pin versions and move the key to a masked input; run check:mcp and check:secrets.
  3. Map each control in policy-map.json to its layer and run check:policy.
  4. Fill in the playbook, threat model, tabletop and metrics plan.

You should see: npm run verify prints four PASS lines.

Knowledge check

Get every answer right to complete this module. Progress is saved in this browser only.

1. Who controls whether members can use MCP servers in Copilot at all?
2. Your acceptance rate went up 10%. What does that prove?