Skip to content
Back to skills

Auth Boundary

ASecurity

Checklist for building authentication into a new entry point from the first commit — auth-by-default wiring, refusing to start without a secret, named opt-outs, closed failure, and binding credentials to the host they were issued for. Use when adding or reviewing an HTTP route, IPC accept-loop, WebSocket upgrade, external-input queue consumer or mutating CLI subcommand, when code attaches a token to a URL or path read from a lockfile, manifest or other persisted config, or when the user asks ...

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 13, 2026
ai-agentsrust

Works with

  • cli

Security analysis

A100/100

Scanned November 13, 2026

npx -y skills add jckeen/dotfiles --skill auth-boundary --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Auth Boundary?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Auth Boundary
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jckeen-auth-boundary/badge)](https://www.skillsdirectory.com/skills/jckeen-auth-boundary)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: auth-boundary
description: Checklist for building authentication into a new entry point from the first commit — auth-by-default wiring, refusing to start without a secret, named opt-outs, closed failure, and binding credentials to the host they were issued for. Use when adding or reviewing an HTTP route, IPC accept-loop, WebSocket upgrade, external-input queue consumer or mutating CLI subcommand, when code attaches a token to a URL or path read from a lockfile, manifest or other persisted config, or when the user asks "does this need auth" or "is this endpoint protected".
---

# Auth at the boundary

If a service could ever need auth, build it in from the first commit. Never
assume "auth will be added later" or "the layer above handles it." Across six
repos, every CWE-306 finding traced to the same *auth-by-config* pattern — a
route that authenticates only when an env var is set, trusting some upstream
layer to catch it.

## Checklist for every new entry point

An entry point is an HTTP route, IPC accept-loop, WebSocket upgrade,
external-input queue consumer, or mutating CLI subcommand.

1. Auth-by-default, not auth-by-config — the framework wiring forces it.
2. Refuse to start if the auth secret is unset or too short.
3. Opt-out is explicit, named, and greppable (e.g. `@PublicRoute(reason="…")`).
4. Never trust upstream layers — each layer rejects on its own.
5. Failure mode is closed — if the auth check throws, reject the request.
6. Local dev uses a real token through the same verifier — no skip-auth branch.
7. Credentials bind to the host they were issued for. Never attach an ambient
   token (env fallback, "current login") to a URL or path read from persisted
   or attacker-influenced state — a lockfile, install manifest, or any config
   committed to a repo and cloned onto another machine. Resolve the token by
   exact host/URL match only, require https (loopback aside), set
   `redirect: "error"` on any fetch carrying a bearer, and confine a stored
   path (backup/restore target) with a `..`-rejecting, realpath-contained
   check before reading it. Twice now the same shape — a manifest field fed to
   the network or filesystem with an ambient credential attached — was a
   supply-chain exfiltration primitive.

## Verify

- Start the service with the auth secret unset: it must refuse to start.
- Call the new entry point with no credential and with a wrong one: both are
  rejected by this layer, not by a proxy in front of it.
- `rg` for the opt-out marker and confirm every hit carries a reason.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.