Skip to content

Add security-sensitive change review checklist - #133

Open
mattpodwysocki wants to merge 1 commit into
mainfrom
docs/security-sensitive-change-review
Open

Add security-sensitive change review checklist#133
mattpodwysocki wants to merge 1 commit into
mainfrom
docs/security-sensitive-change-review

Conversation

@mattpodwysocki

Copy link
Copy Markdown
Contributor

Summary

  • Prompted by a Slack discussion (Valentin) about relying on reviewer intuition/good intentions to catch high-blast-radius issues (auth, credentials, session state) — proposed requiring 2+ peer reviews for such changes.
  • PR [security] Add MCP elicitation for secure preview token handling #57 in this repo is the worked example we used: a cross-session credential-hijack bug and several resource-exhaustion gaps got past the original implementation and a full round of human review, and were only caught by later, independently-run adversarial passes.
  • Adds a visible checklist to the PR template (fill in only when the change touches auth/credentials/tokens/session state and an external user is involved) plus matching guidance in docs/engineering_standards.md.
  • This is a visible prompt, not a CI gate — same approach being rolled out across mcp-server, mcp-devkit-server, mcp-docs-server, and hosted-mcp-server.

Test plan

  • Docs-only change; no code paths affected
  • Reviewer confirms the new PR template section renders correctly on a fresh PR

Prompted by a Slack discussion about relying on reviewer intuition to
catch high-blast-radius issues (auth, credentials, session state).
PR #57 in this repo is the worked example: a cross-session
credential-hijack bug and several resource-exhaustion gaps got past
the original implementation and a full round of human review, caught
only by later, independently-run adversarial passes.

Adds a visible PR template section plus engineering-standards guidance
covering: running /security-review (noting its explicit DoS/resource-
exhaustion exclusions), writing down adversarial scenarios, adding a
regression test proving the bug was real, and 2+ reviewer approval as
a backstop. This is a prompt, not a CI gate.
@mattpodwysocki
mattpodwysocki requested a review from a team as a code owner August 14, 2026 14:08

## Security-sensitive change checklist

<!-- Only fill this in if this PR touches authentication, credentials, tokens, or session/connection state, AND an external user is involved. Otherwise, delete this section. -->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the distinction on external user?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The risk this is guarding against is specifically multi-tenant: session/credential state leaking from one real external party to another. That only exists when the code path is actually reachable by more than one mutually-untrusted user at once — e.g. the hosted endpoint, where concurrent sessions from different customers can share server-side state. A single developer running this locally via stdio has no "other session" to leak into, so the same bug class isn't a security issue in that context — there's no second party to harm.

PR #57's bug is the concrete case: it mattered because the hosted deployment runs concurrent sessions from different customers on shared instances. The identical code running as one person's local process wouldn't have that blast radius.

Scoping it to "external user involved" is about keeping the overhead proportionate — apply the extra process where getting it wrong could expose one user's data to a different, unrelated user, not to every touch of session-shaped code regardless of whether anyone else is actually exposed to it.

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