/viperclaw:viper-wasm-c-cpp-memoryfrom viperclaw
Audits C, C++, JNI, and WebAssembly code for memory safety issues including buffer overflows, integer overflows, use-after-free, format string bugs, and compiler hardening gaps. Modeled on Trail of Bits and Flawfinder methodologies.
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-wasm-c-cpp-memory)flowchart LR
Buf["Untrusted Length / Pointer"] --> Bounds["Unsigned Check + Overflow-Safe calloc"] --> Format["snprintf + Fixed Format String"] --> Flags["PIE + Full RELRO + Stack-Protector + ASan"]
viperclaw taint . --db .viperclaw/graph.db
strcpy, strcat, sprintf, vsprintf, gets, scanf("%s", alloca(, memcpy(, realloc(.CMakeLists.txt / Makefile for -fstack-protector-strong, -D_FORTIFY_SOURCE=3, -fPIE, -Wl,-z,relro,-z,now.strcpy, strcat, sprintf, and gets with bounded alternatives (snprintf, strlcpy, std::string, std::span), and verify that memcpy(dst, src, n) checks n <= dst_capacity before copying.count * sizeof(T)): Computing malloc(count * sizeof(Item)) when count is untrusted can overflow 32/64-bit integers, allocating a tiny buffer followed by a heap buffer overflow! Use calloc(count, sizeof(Item)) or __builtin_mul_overflow(count, sizeof(Item), &total).printf(user_msg) / syslog(LOG_INFO, user_msg) -> use "%s", user_msg); never use signed int for buffer lengths where a negative value passes if (len < MAX_SIZE) and wraps to a huge size_t.realloc Pitfalls: Never write ptr = realloc(ptr, new_size) directly (leaks or corrupts ptr on failure); use a temporary pointer, null out pointers after free(), and prefer C++ smart pointers (std::unique_ptr).-O2 -D_FORTIFY_SOURCE=3 -fstack-protector-strong -fstack-clash-protection -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack in production builds and run AddressSanitizer + UndefinedBehaviorSanitizer (-fsanitize=address,undefined) in CI.// ❌ VULNERABLE: Signed length check error & integer overflow in malloc size
Item *alloc_items(int count) {
if (count > 1024) return NULL; // Negative count passes upper-bound check!
return (Item *)malloc(count * sizeof(Item));
}
// ✅ HARDENED: Unsigned bounds check & overflow-safe calloc
Item *alloc_items(size_t count) {
if (count == 0 || count > 1024) return NULL;
return (Item *)calloc(count, sizeof(Item));
}
CERT C/C++, OpenSSF Compiler Flags, CWE-122, CWE-190, CWE-416| Severity Tier | Baseline CVSS v3.1 Vector | Qualifying Security Impact |
|---|---|---|
| CRITICAL (9.0–10.0) | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H | Unauthenticated remote code execution, cross-tenant authentication or isolation gap, or direct theft of funds/keys. |
| HIGH (7.0–8.9) | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N | Authenticated privilege escalation, unauthorized sensitive data exposure, or single-request service outage. |
| MEDIUM (4.0–6.9) | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N | Scoped information disclosure, non-admin state mutation, or configuration weakness requiring user interaction. |
| LOW (0.1–3.9) | CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:L/I:N/A:N | Defense-in-depth hardening gap requiring high precondition complexity and minimal direct impact. |
viperclaw taint . --db .viperclaw/graph.db and viperclaw verify to record the verified state in .viperclaw/graph.db.What SKILL.md sets; muted values are Claude Code's defaults
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