security-review
Skill16 starsChanged 5 months agoMITView on GitHub
Dev-time security audit of KarvyLoop's OWN source (twin of /code-review, but for security). Use when asked to "audit the security of these changes", "审这轮改动的安全", "security review this endpoint/diff", or before landing anything that touches the untrusted-input frontier (new API endpoints, URL/file fetch, tool authorization, sandbox, LLM output that reaches a persistent store or the shell). Runs a multi-agent adversarial audit — parallel discovery agents, then ≥3 refutation passes per finding (keep only if ≥2/3 say REAL) — and REPORTS ONLY; it never edits code. Not a KarvyLoop product feature.
187 other projects use a version of this.
Adopted by
Most recently taken up by
- rafaelob/pragmatic-agent-skillstheir own version, first seen Oct 5, 2026
- Lukk17/agent-standardstheir own version, first seen Oct 5, 2026
- CaseyLabs/kc-secure-repo-templatetheir own version, first seen Oct 4, 2026
- HMBSbige/skillstheir own version, first seen Oct 3, 2026
- aprameyak/coding-skillstheir own version, first seen Oct 2, 2026
- hahuyhungdev/ai-coding-configtheir own version, first seen Oct 2, 2026
Used with
Projects with it also use kotlin-testing, configure-ecc and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
tpavanipradeepSkillkotlin-testing
Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.
Also in 6 projects that use this
saxon-ySkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 12 projects that use this
InfopibeSkillcontent-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
Also in 12 projects that use this
InfopibeSkillralphinho-rfc-pipeline
RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.
Also in 10 projects that use this
mryeastcodeSkillpytorch-patterns
PyTorch deep learning patterns and best practices for building robust, efficient, and reproducible training pipelines, model architectures, and data loading.
Also in 9 projects that use this
berntpoppSkilldependency-cve-sweep
Use when handling Dependabot PRs, CodeQL/Trivy alerts, or doing a routine dependency/CVE sweep for this repo.
Also in 5 projects that use this
Other versions187 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 187
- github/awesome-copilot★ 40ksame name
- WorldFlowAI/everything-claude-code★ 4ksame name
- compozy/compozy★ 2.8ksame name
- getsentry/sentry-python★ 2.2ksame name
- xu-xiang/everything-claude-code-zh★ 2ksame name
- codeaholicguy/ai-devkit★ 1.6ksame name
- getsentry/skills★ 1ksame name
- microsoft/power-platform-skills★ 961same name
- thesongzhu/Friday★ 837same name
- ktnyt/cclsp★ 675same name
177 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 165 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
If a vector is already tested in tests/security/, it is not a finding — verify the coverage actually reaches the code path in question (the …
- Distinctive: line 110
Every claimed finding must survive adversarial verification.
- Distinctive: line 112
Never print secrets (keys / headers / Authorization) even to demonstrate a leak.
- Distinctive: line 115
No external project names in the report (write "业界做法" / OWASP references).
“Common” is measured: kept by at least 6 in 10 of the 165 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
security-review — adversarial security audit of KarvyLoop itself
A dev tool. It finds security seams in KarvyLoop's own code and reports them; the human decides and fixes. Modeled on the industry "多代理对抗审计" pattern (parallel finders → independent refuters → synthesis, recording false positives) — that pattern is worth using precisely because ~60% of naive findings are false positives that adversarial verification filters out.
0. Read ground-truth first (a tested vector is NOT a finding)
Before auditing, read:
tests/security/README.md— the catalog of already-tested attack vectors (SSRF / sandbox escape / credential leak / path traversal / …) and the honest OWASP-LLM-Top-10 coverage table (which rows arecoveredvsgap).CLAUDE.mdhard rules (安全是地基不是招牌 / 凭证只在 config.yaml 仓外 / 来源判定注入防御 / 沙箱三平台 / 宁空勿毒).
If a vector is already tested in tests/security/, it is not a finding — verify the
coverage actually reaches the code path in question (the SSRF floor, for example, is
tested for web_fetch but a different fetch path can still bypass it — that gap is a
real finding, the "covered" label is not a blanket).
1. Scope
- The pending diff (
git diff,git diff --stat) + the untrusted-input frontier it touches. Wire-trace where request/user/tool/web content enters and where it reaches a sink (shell, filesystem, network egress, SQL,innerHTML, a persistent store, the model). - Untrusted = anything crossing the access-token/same-origin gate, tool-returned content, fetched web pages, imported agents, pasted "material", stored memory read back. Legitimate instructions come only from the user's own message + the system framework.
2. Discovery — parallel finders, one dimension each
Fan out discovery agents (or, in a single pass, cover each dimension explicitly). Ten dimensions, each mapped to OWASP LLM Top 10:
| # | Dimension | OWASP LLM |
| 1 | Prompt injection (direct + indirect via tool/web/import/stored-memory) | LLM01 |
| 2 | Sensitive-info / credential leak (keys, headers, Authorization in logs/responses) | LLM02 |
| 3 | Excessive agency / authorization (tool can do more than the task; missing authz) | LLM06 |
| 4 | Sandbox escape / arbitrary exec (bwrap/seatbelt/win bypass, shell metachar) | LLM06 |
| 5 | SSRF (URL fetch → cloud metadata 169.254.169.254 / loopback / private nets; redirect→internal) | LLM05 |
| 6 | Path traversal / arbitrary read-write (../, symlink, skill-zip resolveKey) | LLM06 |
| 7 | Deserialization / injection (JSON/YAML/pickle, f-string SQL, schema poisoning) | LLM05 |
| 8 | DoS / unbounded consumption (ReDoS, no size cap, memory exhaustion, cost DoS) | LLM10 |
| 9 | Improper output handling (model output → innerHTML/shell/SQL without sanitize) | LLM05 |
| 10 | System-prompt / memory leakage; stale-memory false confidence | LLM07 |
For each candidate: file:line, the untrusted source, the sink, the reachability path.
3. Adversarial verification (the load-bearing step)
For every candidate finding, run ≥3 independent refutation passes — each prompted to
try to prove the finding is FALSE (default to FALSE_POSITIVE when uncertain). Keep the
finding only if ≥2 of 3 conclude REAL.
- Verdict = last-match. A refuter often restates the author's claim ("the code claims to sanitize…") before its own conclusion; a first-match parse gets fooled into a false PASS. Take the last REAL/FALSE_POSITIVE token as the verdict.
- Common valid refutations that kill a finding: the value is developer-supplied (a call param from our own code), not attacker-controlled; a genuine always-on control mitigates it (the access-token + same-origin gate; a deterministic hard gate); the sink is parameterized; the input is bounded/validated upstream; the vector is already tested.
- A present mitigation downgrades severity; it only kills the finding if it fully closes the path.
4. Severity — weighted by real-deployment reachability
Critical (remotely reachable, no auth, high impact) / High (reachable by any
token-holder or via untrusted content, real impact — e.g. SSRF to metadata, cred leak) /
Medium (needs specific conditions) / Low (defense-in-depth). KarvyLoop is local-first
single-user: "LAN is not a boundary, the token gate is" — factor that into reachability,
but do not use it to dismiss floors that are meant to hold regardless of who's inside.
5. Report format (report-only — never edit code)
# Security Review — <scope>
## FINDINGS (survived adversarial verification)
[SEVERITY] <one-line> — file:line
- Why it's real: <the path from untrusted source to sink>
- OWASP/catalog: <LLM id; is it a claimed-covered vector being bypassed?>
- Refutations attempted: <(a)… (b)…> → survives / downgraded
- Mitigations present: <what limits it> — closes it? no
- Fix direction (do NOT apply): <bounded, mirror an existing safe pattern>
## REJECTED (false positives — recorded, mandatory)
Rejected — <claim>. Why rejected (N/3): <the refutation that held>.
## Honest coverage statement
Examined: <dimensions>. Found: <N real>. What this pass does NOT cover: <…>.
This narrows where to look; it does not replace a human security review.6. Discipline
- Report only. Never edit code — the human reviews findings and decides the fix.
- Every claimed finding must survive adversarial verification; record the false positives you rejected and why (honesty guards against "automation replaces humans").
- Never print secrets (keys / headers / Authorization) even to demonstrate a leak.
- A tested vector (in
tests/security/) is not a finding unless coverage genuinely misses the path in question. - No external project names in the report (write "业界做法" / OWASP references).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

