Skip to content
cccskills
FreePublished on GitHub

security-review

Review security-sensitive code for serious flaws such as broken access control, tenant isolation errors, injection, exposed secrets, SSRF, and unsafe file handling. Confirm high-severity findings, fix them, and report remaining issues with their impact.

OriginalShow the original description

Check code for the most common, high-risk security vulnerabilities (broken access control, tenant isolation, injection, secrets, SSRF, auth/session, unsafe file handling, mass assignment) before it ships. Use after editing any API controller, guard, or auth code (apps/api/src/auth/**), a Prisma schema/query, a file-upload/webhook handler, or before committing/pushing security-sensitive changes.

trycompai/comp2,058 stars(GitHub 2,058 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Reviewing an API or authentication change
  • Checking database queries for access control flaws
  • Reviewing upload or webhook handlers
  • Checking security-sensitive changes before committing

Files included (1)

  • SKILL.md3.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Review code for high-risk security vulnerabilities and fix confirmed high-severity issues immediately. Complements CI (CodeQL/Dependabot/SBOM) by catching logic/design flaws those miss — do not re-flag dependency CVEs or generic lint.

1. Scope

  • If $ARGUMENTS names files/dirs, review those.
  • Otherwise review the current change set: git diff --name-only origin/main...HEAD (fall back to git diff --name-only for uncommitted work). Skip generated files, lockfiles, and *.spec.ts (unless the change is in a spec).

Review whenever the change touches a trust boundary or a resource — judge by behavior, not path. That includes: any controller or service (services are where IDOR, tenant-scoping, and mass-assignment bugs actually live), Next.js route handlers (app/api/**, route.ts), Trigger.dev jobs (apps/api/src/trigger/** — SSRF, elevated context), guards/auth (apps/api/src/auth/**, packages/auth/**), any Prisma query (especially lookups/updates/deletes by a client-supplied id → IDOR), middleware, file upload/storage, webhooks, outbound requests to a dynamic URL, crypto/token handling, and any frontend that renders user-supplied HTML or builds redirects from input.

Only if the change is genuinely non-security (pure presentation, types, copy, config with no secrets) — say so and stop, don't invent findings.

2. Review

Dispatch the security-reviewer agent on the scoped files. For a broad review (a full PR / many files), fan out parallel security-reviewer agents by dimension group so coverage is thorough:

  • Access control & tenancy — guards, @RequirePermission, API-key/service-token scope enforcement, authz-vs-attribution, IDOR, organizationId scoping.
  • Injection, XSS & mass assignment — raw Prisma/SQL, command/path injection, dangerouslySetInnerHTML/unsanitized HTML, ...dto spread into create/update.
  • Secrets, SSRF, auth/session & file handling — hardcoded/logged secrets, outbound fetch to user URLs, session/cookie/attribution boundaries, S3/upload safety, DoS, info disclosure.

The agent's full checklist lives in .claude/agents/security-reviewer.md.

3. Verify (no false positives)

For each P1/P2 finding, adversarially verify before acting: dispatch one security-reviewer (or read the code yourself) prompted to refute it — trace the guard→controller→service→DB path. Drop anything that can't be confirmed. Attribution-only use of a resolved actor, org-scoped queries, and parameterized Prisma are NOT findings.

4. Fix & report

  • Fix confirmed P1/P2 issues immediately (mirror the surrounding code; add a regression test for auth/attribution changes).
  • Report P3s and anything needing a product decision, with severity · file:line · exploit/impact · fix.
  • Run bunx turbo run typecheck --filter=@trycompai/api --filter=@trycompai/app after fixes.
  • End with a one-line verdict: clean, or the highest-priority action remaining.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Guide API endpoint changes so request DTOs, runtime validation, OpenAPI documentation, and MCP tool metadata stay aligned. It covers discoverability, authentication, uploads, long-running tasks, and response types that MCP tools cannot handle.

  • Adding an API endpoint with a request body
  • Updating DTO validation and OpenAPI metadata
  • Making an endpoint available as an MCP tool
trycompai/comp2.1KUpdated Oct 24, 2026

Review specified files for design system usage, replace legacy @trycompai/ui components and lucide-react icons with available @trycompai/design-system equivalents, and run the app type check to verify the migration.

  • Migrating legacy UI components
  • Replacing lucide-react icons with Carbon icons
  • Checking specified files for design system compliance
trycompai/comp2.1KUpdated Oct 24, 2026

audit-hooks

FreeSummary

Review specified files for outdated hook and API patterns, then replace them with the prescribed SWR hooks, API clients, or server API calls. The guidance covers data fetching, mutations, cache updates, and response handling, followed by a typecheck command.

  • Auditing files for disallowed API and hook patterns
  • Replacing raw fetch calls with the API client
  • Migrating server actions and database mutations to API hooks
trycompai/comp2.1KUpdated Oct 24, 2026

audit-rbac

FreeSummary

Review NestJS API endpoints and frontend components for role-based access control and audit log compliance. The skill lists permission, guard, route, and UI gating rules, then directs the agent to fix violations and run type checks.

  • Auditing API routes for permission decorators
  • Checking UI actions against user permissions
  • Fixing access control inconsistencies
trycompai/comp2.1KUpdated Oct 24, 2026

audit-tests

FreeSummary

Audit unit tests for components that use permissions. Add missing tests and fix failures, checking that administrators can use mutation controls, auditors cannot, and read-only content remains visible to both.

  • Adding permission tests for a component
  • Checking admin and auditor behavior
  • Fixing failing permission-related tests
trycompai/comp2.1KUpdated Oct 24, 2026

Set up Better Auth for TypeScript applications, including server and client configuration, database adapters, sessions, email and social sign-in, and plugins. The guide also highlights environment variables, schema generation, and security settings to review.

  • Configuring Better Auth in a TypeScript app
  • Connecting an ORM or database adapter
  • Setting up sessions and cookie storage
trycompai/comp2.1KUpdated Oct 24, 2026

See all skills by trycompai

Report a problem with this skill