/viperclaw:viper-remediation-patch-verifierfrom viperclaw
Generates minimal root-cause security patches for CWE findings and writes automated pytest/jest regression tests to verify fixes. Useful for remediating vulnerabilities with structural controls instead of blacklists.
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-remediation-patch-verifier)viper_taint_scan, viper_verify_and_reportviperclaw taint ./src && pytest -vflowchart LR
Finding["Verified CWE Finding"] --> Patch["Minimal Root-Cause Code Fix"] --> Tests["Positive + Negative Unit Tests"] --> Gate["viperclaw taint (0 Flows) + CI Pass"]
Many security patches fail verification testing because developers patch the symptom (adding a naive blacklist like .replace("'", "") or .replace("../", "")) instead of fixing the structural root cause (using parameterized SQL statements, canonical path resolution with .is_relative_to(), or query-level tenant scoping).
Run the following discovery commands across the target repository before manual code review:
# 1. Automated ViperClaw analysis
viperclaw taint ./src && pytest -v
# 2. Rapid static pattern discovery (ripgrep)
viperclaw taint ./src
pytest -v
| Control ID | Audit Verification Target | Pass Criteria | Fail / Vulnerability Indicator |
|---|---|---|---|
FIX-01 | Eliminate Blacklists in Favor of Structural Controls | Fixes use parameterization, strict type/enum allowlists, or canonicalization—never substring blacklists. | Patch adds input.replace('../', '') (trivially circumvented by ....//). |
FIX-02 | Minimal Diff & Backward Compatibility | Patch modifies only the necessary security boundary without breaking existing API contracts or valid inputs. | Overly broad patch breaks legitimate unicode names, special characters in passwords, or API response schemas. |
FIX-03 | Variant Analysis Across Entire Codebase | When fixing a bug in one controller, all sibling controllers/services are scanned for the same pattern. | BOLA or SQLi fixed on GET /invoices/{id} while DELETE /invoices/{id} and GET /quotes/{id} remain vulnerable. |
FIX-04 | Positive Functional Regression Test | Automated test confirms authorized users with valid inputs still receive the expected 200 OK result. | Security patch accidentally blocks all users (403 for everyone) and goes unnoticed without a positive test. |
FIX-05 | Negative Security Regression Test | Automated test sends the previously problematic input (cross-tenant ID, unparameterized metacharacters, expired token) and asserts rejection (400/403/404). | No regression test added; a future refactor re-introduces the exact same vulnerability. |
FIX-06 | Zero Remaining Taint Flows (viperclaw taint) | Re-running viperclaw taint on the patched file confirms total_flows == 0 for the remediated sink. | Taint flow still reaches a secondary sink in the same function. |
FIX-07 | Fail-Closed Exception Handling | Any validation or authorization error raises an explicit exception / 403 rather than logging a warning and continuing. | except Exception: pass swallows the security check failure and proceeds to execute the sink. |
FIX-08 | Update Graph Node Status to verified / remediated | The corresponding finding node in .viperclaw/graph.db is updated and documented. | Audit ledger left out of sync with remediated codebase. |
| Severity Tier | Baseline CVSS v3.1 Vector | Qualifying Security Impact |
|---|---|---|
| CRITICAL -> 0.0 | Remediated (CVSS 0.0) | Root-cause parameterization / isolation applied + verified by automated negative regression test. |
| INCOMPLETE FIX | CVSS Unchanged | Blacklist or client-side-only fix that remains avoidable via encoding or direct API calls. |
# ❌ INCOMPLETE SYMPTOM PATCH: Non-recursive string replace('..', '') is circumvented by '....//'
def get_template_file(name: str) -> str:
clean_name = name.replace("../", "")
return Path(f"/app/templates/{clean_name}").read_text()
# ✅ ROOT-CAUSE PATCH + REGRESSION TEST: Canonical path confinement + negative unit test
TEMPLATE_ROOT = Path("/app/templates").resolve()
def get_template_file(name: str) -> str:
target = (TEMPLATE_ROOT / name).resolve()
if not target.is_relative_to(TEMPLATE_ROOT) or not target.is_file():
raise PermissionError("Unauthorized template path")
return target.read_text(encoding="utf-8")
def test_get_template_file_blocks_traversal():
with pytest.raises(PermissionError):
get_template_file("....//....//etc/passwd")
viperclaw taint and viperclaw verify to confirm zero remaining unmitigated flows in .viperclaw/graph.db.What SKILL.md sets; muted values are Claude Code's defaults
72 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.npx claudepluginhub zahidoverflow/viperclaw --plugin viperclawOther plugins' skills for the same job