skywalkskills

CatalogueSecurity & Compliance

A4Ready

Authentication & Authorization Review

Checks whether being signed in is the same thing as being allowed to see or change a particular record.

What it examines

  • Object ids that are not checked against the current user or tenant
  • Admin and bulk actions that check the session and skip the role
  • Permission checks scattered across handlers instead of one place
  • Sessions that survive login, privilege changes, or sign-out incorrectly
  • JSON Web Tokens accepted with a bad signature, no expiry, or the wrong audience
  • Tokens that cannot be revoked before they expire

What you get back

A findings file. Each item has the evidence, how serious it is, and a fix.

Dependencies

  • An AI coding agent that reads SKILL.md files, such as Claude Code, Codex or Gemini CLI
  • Read access to the repository
  • A description of your permission model: tenants, roles and ownership rules. The audit asks for it, because it cannot judge whether access is broken without knowing what correct looks like.
  • Python 3 with the jsonschema package, to check findings.json before fixing anything

How it works

The audit is read-only. It compares what each endpoint does with the permission model you describe.

It runs six checks: object-level authorization, missing role checks on privileged functions, scattered permission logic, session handling, JWT validation and token revocation.

You get findings.json and findings.md. The remediate skill reads findings.json. It applies simple fixes with tests, asks you to approve larger changes such as centralizing permission checks, and plans the rest.

Setup

  1. Unzip the download. Copy the audit and remediate folders into your agent's skills folder (for Claude Code, .claude/skills/) in the repository you want to check.
  2. Write down your tenants, roles and who may touch which records. A short list is enough.
  3. Open the repository in your agent and ask it to run the a4-authentication-authorization-audit skill.
  4. Check the result with the validator: pip install jsonschema, then python3 schema/validate.py findings.json.
  5. Ask your agent to run the a4-authentication-authorization-remediate skill using findings.json. Fix some findings and leave the rest open if you like.

Run it with your agent

Copy the prompt, fill in the parts in square brackets, and paste it into your agent.

Audit prompt

Run the a4-authentication-authorization-audit skill on this repository. Our permission model: [tenants, roles, and who may access which records]. Mode: audit only. Do not change any code. Write findings.json and findings.md in the repository root.

Fix prompt, after you have findings.json

Run the a4-authentication-authorization-remediate skill using findings.json. Work through the findings I choose, and leave the rest open.

What is inside

The files that make up this skill, as your agent reads them.

packages/a4-authentication-authorization

audit › SKILL.md

Sign in to download

Use the email and password you signed up with.