/viperclaw:viper-postgres-redis-mongofrom viperclaw
Audits PostgreSQL SECURITY DEFINER search_path and RLS policies, Redis ACLs and dangerous commands, and MongoDB operator sanitization. Useful for hardening database security in production.
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-postgres-redis-mongo)flowchart LR
App["Least-Privilege App DB Connection"] --> PG["SECURITY DEFINER (Pinned search_path) + RLS"] --> Redis["TLS + ACL User (DisabledEVAL/CONFIG)"] --> Mongo["Stripped $ Operators + --noscripting"]
viperclaw taint . --db .viperclaw/graph.db
SECURITY DEFINER, ENABLE ROW LEVEL SECURITY, EXECUTE format(, GRANT ALL.bind 0.0.0.0, protected-mode no, KEYS *, EVAL .$where, $regex, express-mongo-sanitize.SECURITY DEFINER search_path Hardening: Every SECURITY DEFINER function in PostgreSQL must explicitly set SET search_path = pg_catalog, public in its definition to prevent schema-shadowing privilege escalation (CWE-426).EXECUTE) & RLS Completeness: Inside PL/pgSQL functions, use EXECUTE format('SELECT ... FROM %I WHERE id = $1', tbl) USING val (%I for identifiers, $1 for values, never %s for values); verify tables with ENABLE ROW LEVEL SECURITY also define policies for INSERT/UPDATE/DELETE (WITH CHECK).bind 127.0.0.1), enforces TLS + requirepass / Redis 6+ ACL users, and disables/renames FLUSHALL, FLUSHDB, CONFIG, MODULE, and EVAL for standard application roles.$where Sanitization: Disable server-side JavaScript execution (--noscripting), forbid $where and mapReduce, and strip keys starting with $ or containing . from user inputs (mongo-sanitize) before passing to .find() / .updateOne().SELECT, INSERT, UPDATE, DELETE on application tables only—never SUPERUSER, rds_superuser, or DDL (DROP/ALTER) privileges.-- ❌ VULNERABLE: SECURITY DEFINER without search_path & unsafe %s value interpolation
CREATE FUNCTION get_user_email(uid int) RETURNS text AS $$
DECLARE res text;
BEGIN
EXECUTE format('SELECT email FROM users WHERE id = %s', uid) INTO res;
RETURN res;
END;
$$ LANGUAGE plpgsql SECURITY DEFINER;
-- ✅ HARDENED: Pinned search_path & parameterized USING clause
CREATE FUNCTION get_user_email(uid int) RETURNS text AS $$
DECLARE res text;
BEGIN
EXECUTE 'SELECT email FROM public.users WHERE id = $1' INTO res USING uid;
RETURN res;
END;
$$ LANGUAGE plpgsql SECURITY DEFINER SET search_path = pg_catalog, public;
CIS PostgreSQL/Redis/Mongo Benchmarks, CWE-89, CWE-426| 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