Skip to content

Bruno-Cunha-Souza/ValarMindSkills / skills/code-security-review

code-security-review

Flagged

Web/API security lifecycle for Go, Next.js, Python, and Bun — design controls, active testing, supply-chain/CI-CD, and LLM/agentic/MCP coverage. Maps to OWASP Web Top 10 2025 + API 2023 + LLM 2025 + Agentic 2026. Triggers: 'security review', 'revisão de segurança', 'auditar segurança', 'pentest', '/code-security-review'.

FileKindSize
SKILL.mdskill md17.3 KB
references/AI_SECURITY.mdmarkdown9.5 KB
references/DESIGN_CONTROLS.mdmarkdown18.0 KB
references/REPORT_TEMPLATE.mdmarkdown2.6 KB
references/SUPPLY_CHAIN_CICD.mdmarkdown9.1 KB
references/TESTING_PHASES.mdmarkdown17.5 KB
references/WEB_VULNERABILITIES.mdmarkdown22.1 KB
references/golang/API.mdmarkdown27.6 KB
references/golang/MIDDLEWARE.mdmarkdown14.4 KB
references/golang/PATCHES.mdmarkdown15.0 KB
references/golang/TESTING_PAYLOADS.mdmarkdown10.9 KB
references/golang/VULNERABILITIES.mdmarkdown20.6 KB
references/nextjs/API.mdmarkdown38.5 KB
references/nextjs/CONFIGURATION.mdmarkdown15.7 KB
references/nextjs/PATCHES.mdmarkdown16.7 KB
references/nextjs/TESTING_PAYLOADS.mdmarkdown11.9 KB
references/nextjs/VULNERABILITIES.mdmarkdown35.7 KB
references/python/API.mdmarkdown36.0 KB
references/python/CONFIGURATION.mdmarkdown22.4 KB
references/python/PATCHES.mdmarkdown12.1 KB
references/python/TESTING_PAYLOADS.mdmarkdown12.8 KB
references/python/VULNERABILITIES.mdmarkdown28.1 KB
scripts/00-pre-checks.shexecutablescript3.7 KB
scripts/01-auth-probes.shexecutablescript5.4 KB
scripts/02-jwt-attacks.pyexecutablescript10.1 KB
scripts/03-bola-probes.shexecutablescript6.4 KB
scripts/04-injection-probes.shexecutablescript7.3 KB
scripts/05-burst.k6.jsscript1.9 KB
scripts/05-rate-limit.shexecutablescript5.0 KB
scripts/06-info-disclosure.shexecutablescript5.2 KB
scripts/07-supply-chain.shexecutablescript7.9 KB
scripts/08-cors-headers.shexecutablescript5.5 KB
scripts/09-cicd-workflows.shexecutablescript6.1 KB
scripts/10-secrets-scan.shexecutablescript5.2 KB
scripts/11-ai-llm-probes.shexecutablescript8.8 KB
scripts/README.mdmarkdown8.0 KB
scripts/lib/common.shscript4.8 KB
scripts/lib/report.pyscript5.4 KB
scripts/run-all.shexecutablescript4.8 KB

scripts/05-burst.k6.js

View on GitHub
// Phase 4.4 — k6 burst test (separate from run-all.sh — invoke manually).
// Run: k6 run 05-burst.k6.js -e TARGET=https://api.example.com -e RATE_PATH=/api/data
//
// Validates that the API rate-limits (returns 429) under sustained burst load.
// Outputs a k6 summary; pair findings with the bash burst probe (05-rate-limit.sh).

import http from "k6/http";
import { check, sleep } from "k6";

const TARGET     = __ENV.TARGET || "https://localhost";
const RATE_PATH  = __ENV.RATE_PATH || "/api/data";
const TOKEN      = __ENV.TOKEN || "";
const VUS        = parseInt(__ENV.VUS || "100", 10);
const DURATION   = __ENV.DURATION || "10s";

export const options = {
  vus: VUS,
  duration: DURATION,
  thresholds: {
    // We *want* 429s under burst load. If <5% of responses are 429, the API is not protecting itself.
    "http_req_failed{expected_response:true}": ["rate>0.0"],
    "checks{name:limited_or_authed}":          ["rate>0.95"],
  },
};

export default function () {
  const headers = { "Content-Type": "application/json" };
  if (TOKEN) headers["Authorization"] = `Bearer ${TOKEN}`;

  const res = http.get(`${TARGET}${RATE_PATH}`, { headers });

  check(res, {
    "limited_or_authed": (r) => r.status === 429 || r.status === 200 || r.status === 401,
  }, { name: "limited_or_authed" });

  // brief jitter so the burst is not perfectly synchronized
  sleep(Math.random() * 0.05);
}

export function handleSummary(data) {
  const codes = data.metrics.http_reqs?.values || {};
  const summary = {
    target:    `${TARGET}${RATE_PATH}`,
    vus:       VUS,
    duration:  DURATION,
    requests:  data.metrics.http_reqs?.values?.count || 0,
    failed:    data.metrics.http_req_failed?.values?.rate || 0,
    p95_ms:    data.metrics.http_req_duration?.values?.["p(95)"] || 0,
  };

  return {
    stdout: `\n=== k6 burst summary ===\n${JSON.stringify(summary, null, 2)}\n`,
  };
}
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall