/viperclaw:viper-semgrep-rule-authorfrom viperclaw
Converts verified CWE findings into deterministic Semgrep rules with unit tests. Guides creation of low-noise CI guardrails from root-cause analysis.
Ships in viperclaw. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
viper-semgrep-rule-author)viper_taint_scan, viper_verify_and_reportviperclaw taint ./src --db .viperclaw/graph.dbflowchart LR
Bug["Verified Code Finding"] --> Pattern["Minimal AST / Taint Rule"] --> Tests["ruleid + ok Test Fixtures"] --> CI["Blocking Pre-Merge Gate"]
Fixing a vulnerability in one controller does not prevent the same insecure API pattern from reappearing in another service. Encoding every verified root cause into a deterministic AST or taint rule stops whole vulnerability classes permanently in CI.
# 1. Identify recurring sink patterns across the repository
viperclaw taint ./src --db .viperclaw/graph.db
# 2. Locate existing Semgrep / custom lint rule directories
rg --files -g "*semgrep*" -g "*.rules.yml"
| Control ID | Audit Verification Target | Pass Criteria | Fail / Vulnerability Indicator |
|---|---|---|---|
RULE-01 | Prefer mode: taint for Dataflow Bugs | Injection rules model pattern-sources, pattern-sanitizers, and pattern-sinks instead of fragile regexes. | Regex-only rule flags hardcoded constant strings as SQLi. |
RULE-02 | Explicit Sanitizer Modeling | Safe casts (int(), UUID(), parameterized bindings) are declared in pattern-sanitizers. | High false-positive rate causes engineers to disable the CI rule. |
RULE-03 | Paired ruleid: and ok: Tests | Every custom rule ships with test fixtures containing both vulnerable (ruleid:) and hardened (ok:) cases. | Untested rule shipped directly to CI. |
RULE-04 | Actionable Fix Guidance | Rule message explains the exact safe internal wrapper or API to use instead. | Generic message ("Unsafe call detected") with no migration guidance. |
RULE-05 | Complete Metadata (CWE/OWASP/Confidence) | Every rule specifies cwe, owasp, category: security, confidence, and impact. | Unclassified findings break SARIF triage dashboards. |
RULE-06 | Scoped Language & Path Filters | Rules exclude generated vendored files and test mocks where appropriate (paths.exclude). | Alerts fire on unit-test fixtures instead of production routes. |
RULE-07 | Low-Noise Blocking Threshold | Only HIGH confidence rules block PR merges; experimental rules run in audit mode first. | Noisy rules block unrelated pull requests. |
RULE-08 | Periodic Precision Measurement | Track true-positive vs. false-positive rate on PR comments quarterly. | Stale rules silently ignored via inline nosemgrep comments. |
semgrep --test on positive and negative fixtures before enabling any rule in CI.nosemgrep suppressions during PR review to ensure real issues are not silenced.| Severity Tier | Baseline CVSS v3.1 Vector | Qualifying Security Impact |
|---|---|---|
| HIGH (7.5) | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N | Unenforced guardrail allowing recurring injection or auth-boundary regressions across services. |
| MEDIUM (5.3) | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N | Missing sanitizer definitions or untested CI rules permitting drift. |
| LOW (3.1) | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N | Incomplete CWE/OWASP metadata in SARIF rule exports. |
# ✅ HARDENED: Precision taint rule with explicit sanitizer and CWE metadata
rules:
- id: python-raw-sql-taint
mode: taint
languages: [python]
severity: ERROR
message: "User-controlled data reaches cursor.execute() without parameterization. Use bound parameters."
metadata:
cwe: "CWE-89"
owasp: "A03:2021"
confidence: HIGH
pattern-sources:
- pattern: request.args.get(...)
- pattern: request.form.get(...)
pattern-sanitizers:
- pattern: int(...)
pattern-sinks:
- pattern: $CURSOR.execute($QUERY)
ruleid: and ok: unit test cases.viperclaw taint . alongside custom Semgrep rules in CI.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub zahidoverflow/viperclaw --plugin viperclaw72 skills in this plugin
/viper-agent-skill-supplychainAI Agent Skill, Plugin & MCP Config Supply-Chain Auditor (modeled on NVIDIA SkillSpector & OWASP Agentic Skills Top 10). Audits SKILL.md bundles and MCP JSON configs./viper-ai-llm-guardrailsAI, LLM & MCP Application Security & Guardrails Auditor (OWASP LLM Top 10). Reviews prompt boundaries, RAG data isolation, tool-call authorization, and output sanitization./viper-api-gateway-apigee-kongAPI Gateway, BFF & Rate-Tier Policy Auditor (Kong, AWS API Gateway, Apigee, Envoy Gateway). Reviews JWT authorizers, backend origin lockdown, and route-level quotas./viper-auth-oauth-jwtAuthentication, OAuth 2.0 / OIDC & JWT Security Auditor. Reviews token verification, algorithm allowlisting, claim validation, and OAuth redirect_uri configurations./viper-aws-iam-cloud-auditAWS IAM, STS, S3, KMS & Lambda Security Auditor (modeled on Prowler, Parliament & CloudSplaining). Reviews iam:PassRole escalation, STS ExternalId, S3 policies, and IMDSv2./viper-bola-idorObject & Function-Level Authorization (BOLA / BFLA) Audit Skill. Reviews resource access controls, tenant scoping, and ownership checks across API endpoints and controllers.Other plugins' skills for the same job