Security scan

From 5throck/ai-workspace-standards · View interactive version

Security scan is an AI agent skill from the GitHub repository 5throck/ai-workspace-standards. Runs static analysis, secret detection (via gitleaks), dependency vulnerability auditing (via bun audit), and auth-surface auditing (unauthenticated signup endpoints) across the workspace.

How to use this skill

Skill file

🛠️ Skill: security-scan

Context

Used by the security-expert agent to ensure that no hardcoded credentials or malicious scripts exist in the ai-workspace-standards repository.

Execution Steps

  1. Execute the built-in secret scan hook:

Gitleaks only auto-discovers .gitleaks.toml in the scan target directory — a

subdirectory scan (e.g. --source templates) without --config silently falls

back to the upstream default ruleset, losing every workspace allowlist entry and

reporting documentation placeholders as leaks (observed 2026-08-30).

  1. Check dependency vulnerabilities (on-demand CVE gate):

(.github/workflows/test.yml "Security audit - dependency vulnerabilities").

Low/moderate findings are reported as a summary without failing.

immediate visibility when a newly disclosed CVE arrives between runs.

  1. Verify .githooks/ permissions (should be executable on Unix-like systems).
  2. Verify .gitignore rules effectively exclude memory/, scripts/temp/, and .env files.
  3. Auth-surface audit — unauthenticated registration/signup endpoints (added v1.3.0, T-20261103-006):

web trees) for account-creation endpoints reachable WITHOUT an authenticated

session (register / signup / self-service invite acceptance), and determine

which authenticated role a successful signup grants.

authenticated role** — a default-open auth surface lets anyone who can reach

the login page mint an account and inherit everything that role can read

(business pipelines, MNPI-adjacent material). Default-open is the finding;

the granted role's privilege only sets the severity.

Projects/co-newbiz/app/web-next/app/api/auth/register/route.ts, owner

decision 2026-11-02):

1. Default-closed: registration refused unless an explicit environment

flag enables it (co-newbiz: CO_NEWBIZ_ALLOW_REGISTER === "1", read per

request so an operator can flip it without a code change);

2. Refusal BEFORE body-parse and throttle: while closed the endpoint

returns one uniform 403 at the door — no request-shape oracle, no

rate-limit quota consumption by closed-surface traffic;

3. Dated owner-decision comment in the route source (who closed it,

when, why, and which provisioning paths are unaffected);

4. Admin-provisioned accounts as the default identity path (CLI or

admin-session-gated flows, never public signup);

5. Documented reversibility: the enabling flag recorded in the env

sample so reopening is a deliberate operator action.

  1. Report any security violations immediately.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.