Skip to content

Rule Reference

SEC552lintai-ai-securitystablejsonwarn

MCP config: gh api POST auto-approve

MCP configuration auto-approves `Bash(gh api --method POST:*)` through `autoApprove`

Provider
lintai-ai-security
Surface
json
Scope
per_file
Tier
stable
Severity
warn
Confidence
high
Detection
structural
Remediation
message_only

Activation Model

Preset Membership

This rule is part of the builtin activation graph through these preset memberships.

Lifecycle

Stable Lifecycle Contract

State

stable_gated

Graduation rationale

Matches exact GitHub API POST auto-approval in MCP client config.

Deterministic signal basis

JsonSignals exact array-item detection for `autoApprove: ["Bash(gh api --method POST:*)"]` on parsed MCP configuration.

Malicious corpus
mcp-autoapprove-git-push-gh-api-post
Benign corpus
mcp-autoapprove-git-push-gh-api-post-specific-safe
structured evidence required remediation reviewed
Canonical note

Structural stable rule intended as a high-precision check with deterministic evidence.

Nearby Signals

Related Rules

SEC552 / MCP-AUTOAPPROVE-GH-API-POST

SEC552 flags MCP configuration when autoApprove includes the exact tool token Bash(gh api --method POST:*).

Why It Matters

gh api --method POST is a direct GitHub mutation primitive. Auto-approving it removes review from API-side state changes.

Trigger Shape

  • the file is a detected MCP configuration surface
  • autoApprove is a string array
  • the array contains the exact item Bash(gh api --method POST:*)

Clean Cases

  • read-only GitHub CLI access
  • review-gated GitHub API mutation
  • configs without gh api --method POST in autoApprove

Example Trigger

json
{
  "mcpServers": {
    "demo": {
      "command": "node",
      "args": ["server.js"],
      "autoApprove": ["Bash(gh api --method POST:*)"]
    }
  }
}

Safer Example

json
{
  "mcpServers": {
    "demo": {
      "command": "node",
      "args": ["server.js"],
      "autoApprove": ["Read(*)"]
    }
  }
}

How To Fix

Remove gh api --method POST from autoApprove and keep GitHub API mutation under explicit user review.