MoonshotAI / MoonshotAI/kimi-code
Feature request: list Correctover Security Hook as a curated plugin (PreToolUse secret/SSRF gate)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
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 Codehooks/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 withbash selftest/run-hook-selftest.shREADME.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.jsonafter a maintainer/approves this issue, or adjust any review feedback first.
Thanks for Kimi Code — happy to move fast on any requested changes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect plugins/marketplace.json, CONTRIBUTING.md, and existing curated entries first, then compare the proposed object with the current marketplace schema. Review the referenced plugin manifest and run bash selftest/run-hook-selftest.sh; done means the entry matches repository conventions and is accepted by a maintainer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100