Logotipo de Auditing Declarative Authorization

Auditing Declarative Authorization

Organización
UnboundCompute
auditing-declarative-authorization

Audit authorization expressed as configuration or framework convention rather than inline code: row-level security and policy rules, framework before-action and middleware filters that must be attached to every protected route, serverless and gateway access rules, and object-ownership checks. Covers routes that skip the filter, policies with a permissive default, rules that check authentication but not ownership, and gaps between where the rule is declared and where the data is accessed. Use when reviewing role- or policy-driven access control. Coverage and correctness are separate checks.

Descripción general

EditorUnboundCompute
Repositoriosecurity-agent-skills
Nombre de la habilidadauditing-declarative-authorization
Estrellas
27
Forks
8
Archivos incluidos
Solo instrucciones
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Todo en las instrucciones

    Todo lo que necesita el modelo está en las instrucciones: no hay archivos adicionales que sincronizar.

  • Código abierto

    Publicada por UnboundCompute en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Auditing Declarative Authorization en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-declarative-authorization
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UnboundCompute/security-agent-skills.git /tmp/security-agent-skills
mkdir -p .claude/skills
cp -r /tmp/security-agent-skills/skills/auditing-declarative-authorization .claude/skills/auditing-declarative-authorization
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Auditing Declarative Authorization en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Auditing Declarative Authorization automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Auditing Declarative Authorization no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Auditing declarative authorization: coverage and correctness are two audits

Modern authorization is often declarative: a policy attached to a table, a filter registered on a controller, a rule in a gateway or serverless config. The strength of that model is also its weakness, security depends on the rule being attached to every path that needs it, and on the rule actually expressing the intended constraint. The failures are gaps (a route the filter never covers) and mis-statements (a rule that checks the wrong thing), and both are invisible if you only read the routes that are protected.

When to use

  • You are reviewing role- or policy-driven access control.
  • Authorization is enforced by row-level policies, controller filters, middleware, or gateway rules.
  • Protection depends on a rule being attached per route, per table, or per resource.

Scope check

Audit access control in systems you own or are authorized to test, with test accounts across roles and tenants. If you can't name the authorization, stop.

The loop

  1. Locate every declared rule and its scope. Inventory the authorization rules: row-level policies, controller filters, middleware, gateway or serverless access rules, and ownership checks. For each, determine exactly which paths, tables, or resources it covers. The audit is about coverage and correctness, so start by mapping what each rule protects.

  2. Find the paths the rule does not cover. Enumerate every route, query, or resource access and check which are not covered by any rule. A framework filter that must be added per controller is missing wherever a developer forgot it; a policy on one table does not protect a sibling table or a raw query that bypasses the policy layer. The uncovered path is the bug.

  3. Check the default of the policy layer. When no rule matches, does access default to deny or allow? A row-level-security system with policies enabled but a permissive fallback, or a gateway that allows unmatched routes, grants access wherever a rule is absent. Confirm the default is deny.

  4. Check that the rule states ownership, not just presence. Does the rule confirm this user may access this specific object, or only that the user is authenticated? A filter that checks "logged in" but not "owns this record," or a policy that scopes by table but not by row or tenant, lets any authenticated user reach another's data. Authentication is not authorization.

  5. Check the declaration-to-access gap. Is the rule enforced at the same layer the data is actually accessed, or can a code path reach the data beneath the rule (a raw query under row-level security, a direct service call under a gateway rule, an admin path that skips the middleware)? A rule declared in one place and data reached in another is unenforced there.

  6. Confirm and record. Confirm a gap by accessing a protected resource through the uncovered path or as the wrong user; confirm a mis-statement by reaching another user's object through the rule. Kill the lead if every path is covered, the default is deny, and rules enforce ownership at the access layer. Record with the exact uncovered path or wrong-object access.

Where declarative authz leaks

  • Coverage is per path, correctness is per rule. Check both; the protected routes tell you nothing about the unprotected ones.
  • The default when no rule matches is the whole ballgame. Deny-by-default contains mistakes; allow-by-default amplifies them.
  • Authenticated is not authorized. A filter that stops at identity, not ownership, is a horizontal-access bug.
  • Rules and data can drift apart. A path that reaches the data below the rule's layer is unprotected no matter how the rule reads.

Worked example (a confirm and a kill)

Confirm. An app enforces access with a per-controller before-action filter. A newer controller exposing the same records was added without the filter. Requesting those records through the new controller returns any user's data with only a valid session. Confirmed missing-filter gap, high, remediation = enforce authorization globally with explicit opt-out, or add the filter and a test that every controller is covered.

Kill. Row-level security is enabled with a deny-by-default fallback, every table has an ownership-scoped policy keyed to the tenant and user, raw queries run under the same policy, and no code path reaches the data beneath the policy layer. Cross-user and uncovered-path attempts return nothing. Killed, kill_reason = "deny-by-default, ownership-scoped policies on every table enforced at the data layer, no bypass path."

Rationalizations to reject

  • "Authorization is handled by the framework." → Only where the rule is attached. Enumerate the paths that lack it.
  • "The policy is enabled." → Enabled with what default and what scope? A permissive default or table-only scope still leaks.
  • "The user is authenticated." → Authentication is not ownership. Check that the rule constrains which object, not just which user.
  • "The rule is declared on the model." → And the data is reached where? A path under the rule's layer is unprotected.

Executing this in practice

You need the full set of declared rules and their scopes, a complete enumeration of routes and data accesses to find the uncovered ones, and the ability to request protected resources through each path and as different users. A call graph that maps every access to the data and shows which are covered by a guard is ideal; the coverage-and-correctness pass is the method.

Related

  • auditing-guard-gaps - the unguarded-peer pattern, here applied to declarative rules and routes.
  • finding-fail-open-flaws - the permissive-default failure mode of a policy layer.
  • hunting-business-logic-flaws - authorization of outcomes reached through a permitted path.
  • FINDING-SCHEMA.md - source = the uncovered path or wrong-user request, sink = the protected resource it reaches.

Preguntas frecuentes

¿Qué hace la habilidad de IA Auditing Declarative Authorization?

Audit authorization expressed as configuration or framework convention rather than inline code: row-level security and policy rules, framework before-action and middleware filters that must be attached to every protected route, serverless and gateway access rules, and object-ownership checks. Covers routes that skip the filter, policies with a permissive default, rules that check authentication but not ownership, and gaps between where the rule is declared and where the data is accessed. Use when reviewing role- or policy-driven access control. Coverage and correctness are separate checks.

¿Por qué usar Auditing Declarative Authorization en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Auditing Declarative Authorization está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Auditing Declarative Authorization en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-declarative-authorization. TypingMind lee su archivo SKILL.md y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Auditing Declarative Authorization?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Auditing Declarative Authorization?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Auditing Declarative Authorization con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Auditing Declarative Authorization?

Sí. UnboundCompute la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇