code-audit-authz

Audit server-side authorization for missing ownership checks and IDOR.

22|3|Updated Jul 28, 2024
One-click install
npx skills add https://github.com/webdevcody/go-mailing-list --skill code-audit-authz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-audit-authz
Source: https://github.com/webdevcody/go-mailing-list/tree/main/.claude/skills/code-audit-authz
Command: npx skills add https://github.com/webdevcody/go-mailing-list --skill code-audit-authz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you detect authorization vulnerabilities in your backend where authenticated users can access or modify resources they do not own, or where endpoints accidentally allow anonymous access to user-scoped data.

Core Features & Use Cases

  • Enumerates server entry points: scans server functions, HTTP handlers, webhook receivers, queue/worker handlers, and IPC handlers to build a complete audit surface.
  • Classifies access requirements: distinguishes public, authenticated, user-scoped, admin/role-gated, and service/internal endpoints based on how inputs map to resources.
  • Flags concrete authz findings: detects missing auth checks, IDOR patterns, admin gating mistakes, weak webhook validation, and ordering issues that can leak information.
  • Produces actionable fixes: recommends targeted code changes using the project’s existing auth helpers, and requires confirmation for applying fixes.

Quick Start

Audit your codebase for authorization bugs by running: audit auth for every server-side entry point and return findings with severity and the exact missing check.

Frequently Asked Questions about code-audit-authz

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find IDOR vulnerabilities and missing ownership checks in my backend code?

This authorization audit scans server functions, HTTP route handlers, webhook receivers, queue workers, and IPC handlers to classify access scope and identify missing ownership checks for user-scoped resources.

How do I audit webhook handlers for weak validation and anonymous access leaks?

Auditing webhook handlers for weak validation requires classifying their access scope and verifying enforcement against existing auth helpers to detect accidental anonymous access to user-scoped data and ordering issues that leak information.

Does this authorization audit work with TanStack Start server functions and IPC handlers?

Yes, this authorization audit explicitly supports TanStack Start server functions, HTTP route handlers, webhook handlers, queue workers, and IPC handlers where request inputs name resources like userId or orgId.

What is the best way to detect role-based access control mistakes across a codebase?

The best way to detect role-based access control mistakes is to enumerate all server entry points, classify access requirements into public, authenticated, user-scoped, and admin-gated scopes, and verify enforcement against existing auth helpers.

How to fix authorization bugs flagged during a backend security audit?

To fix flagged authorization bugs, you apply targeted code changes using the project's existing auth helpers, with the audit requiring explicit confirmation before applying fixes to remediate missing auth checks and IDOR patterns.

When do I need to audit server-side authorization for user-scoped resources?

You need to audit server-side authorization for user-scoped resources when authenticated users risk accessing or modifying resources they do not own, or when endpoints accidentally allow anonymous access to user-scoped data across your codebase.