Skip to content

Feature request: list Correctover Security Hook as a curated plugin (PreToolUse secret/SSRF gate) #3534

Description

@DSHCorrectover

Context

Kimi Code loads plugins from plugins/marketplace.json (official + curated tiers). Curated precedents already include community security/tooling plugins (e.g. obra/superpowers, GoogleChrome/modern-web-guidance). This is a request to list a community security plugin.

What the plugin does

A PreToolUse security gate for Kimi Code sessions:

  • Hook 1 (WriteFile|StrReplaceFile): scans file content the agent is about to write for exposed cloud credentials, API keys, tokens, and secret-like material — blocks the write if a critical finding is returned.
  • Hook 2 (Shell): scans shell commands for SSRF/credential-exfiltration patterns (e.g. piping env vars/credentials to network endpoints) — blocks dangerous commands before execution.

The hook itself is a thin, self-contained Node.js wrapper (hooks/correctover-hook.mjs, zero external dependencies). It delegates scanning to npx correctover-scan, an existing MCP config/code security scanner CLI. Findings are returned to the agent via hook stderr as structured block reasons.

Plugin structure (already in official manifest format)

  • kimi.plugin.json — manifest with two [[hooks]] PreToolUse entries (event, matcher, command, timeout), aligned with the existing hook config shape used by Kimi Code
  • hooks/correctover-hook.mjs — the gate (MIT-licensed)
  • selftest/ — 8 local test scenarios (clean write passes; credential leak in a written file is blocked; leaky shell command is blocked; malicious MCP config detected), runnable with bash selftest/run-hook-selftest.sh
  • README.md — install, environment variables (CORRECTOVER_SCAN_BIN, CORRECTOVER_HOOK_BLOCK_LEVEL), limits (free tier 50 scans/day), honest coverage statement

Proposed marketplace.json entry

{
  "id": "correctover-security-hook",
  "tier": "curated",
  "displayName": "Correctover Security Hook",
  "description": "PreToolUse gate: blocks secret exposure in written files and SSRF/credential-exfil shell commands before they execute, via correctover-scan.",
  "homepage": "https://github.com/DSHCorrectover/kimi-code-security-hook",
  "keywords": ["security", "hooks", "pretooluse", "secret-scanning", "ssrf", "mcp"],
  "source": "https://github.com/DSHCorrectover/kimi-code-security-hook"
}

Verification / next steps

  • The plugin repo is public, MIT-licensed, and self-test passes locally (clean code → exit 0 allow; seeded credential leak → exit 2 block with Chinese-language block reason fed back to the agent).
  • The manifest targets the documented plugin hook schema; if any field differs from the current kimi.plugin.schema.json, happy to adjust — I couldn't fetch the schema URL directly (JS-rendered).
  • Per CONTRIBUTING.md: happy to open a PR against plugins/marketplace.json after a maintainer /approves this issue, or adjust any review feedback first.

Thanks for Kimi Code — happy to move fast on any requested changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions