agentleFS
ychabychab/museflow/.claude/skills/security-review/SKILL.md

security-review

Skill1 starsChanged 17 days agoMITView on GitHub

Review changed MuseFlow code for security vulnerabilities and audit dependencies. Use before opening a PR that touches authentication, API endpoints, external API adapters or settings.

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use linkerd-patterns, dependency-cve-sweep and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • xfstudioSkill

    linkerd-patterns

    Implement Linkerd service mesh patterns for lightweight, security-focused service mesh deployments. Use when setting up Linkerd, configuring traffic policies, or implementing zero-trust networking with minimal overhead.

    Also in 5 projects that use this

  • berntpoppSkill

    dependency-cve-sweep

    Use when handling Dependabot PRs, CodeQL/Trivy alerts, or doing a routine dependency/CVE sweep for this repo.

    Also in 12 projects that use this

  • berntpoppSkill

    fleet-standard-adoption

    Use when bringing this repo into compliance with a GeneFoundry fleet standard (tool-naming, response-envelope, container-hardening, versioning, MCP transport, or logging) or closing its tracking issue.

    Also in 12 projects that use this

  • HABUBUSSSkill

    project-guidelines-example

    Also in 16 projects that use this

  • niloykumarbarmanSkill

    agent-sort

    Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

    Also in 13 projects that use this

  • royaluniondesign-sysSkill

    configure-ecc

    Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.

    Also in 11 projects that use this

  • +2 more from berntpopp

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 1 is distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 164 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If no files are given above, review the branch: git diff --name-only origin/main...HEAD plus the uncommitted changes from git status …

    line 14
  2. Distinctive:

    No hardcoded credentials, API keys, tokens or passwords.

    line 29
  3. Very specific:

    No secrets in logs (user_id, status_code, provider are fine) or in API responses (raw OAuth tokens, hashes).

    line 30
  4. Very specific:

    Every protected endpoint depends on get_current_user.

    line 33
  5. Very specific:

    No raw SQL built from user values (f-strings, .format(), %).

    line 45
  6. Very specific:

    Every httpx client has a timeout.

    line 48
  7. Very specific:

    Run uv audit. For each CVE, give its severity and whether the vulnerable code path is reachable here.

    line 59

“Common” is measured: kept by at least 6 in 10 of the 164 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

You are a security engineer reviewing MuseFlow code. You report vulnerabilities; you do not fix them.

Scope

  • Files to review: $ARGUMENTS
  • If no files are given above, review the branch: git diff --name-only origin/main...HEAD plus the uncommitted changes from git status --short.

Context

  • API: FastAPI, JWT verified by the get_current_user dependency.
  • OAuth: Spotify flow with single-use state tokens, consumed through the consume_oauth_state use case in the get_user_from_state dependency.
  • DB: PostgreSQL through SQLAlchemy, accessed by use cases through the unit of work.
  • External APIs: Spotify and OpenRouter through httpx with tenacity retries.
  • Secrets: Pydantic BaseSettings, from environment variables only.

Checklist

Secrets

  • No hardcoded credentials, API keys, tokens or passwords; secrets come from settings only.
  • No secrets in logs (user_id, status_code, provider are fine) or in API responses (raw OAuth tokens, hashes).

Authentication and authorization

  • Every protected endpoint depends on get_current_user; no manual jwt.decode() in a route.
  • /register and /login are public on purpose: their errors must not reveal whether a user exists.
  • The OAuth callback uses get_user_from_state, which validates and consumes the state before anything else; a state is never reusable and expires after OAUTH_STATE_TTL_SECONDS.

Input validation

  • API input goes through Pydantic models (no raw request.body() or dict parsing); CLI input through typed Typer parameters and input schemas.
  • User-supplied file paths go through pathlib.Path; no open(str_from_user), no shell interpolation.
  • Numeric options (--batch-size, --limit) have explicit min / max bounds.

SQL

  • No raw SQL built from user values (f-strings, .format(), %); ORM constructs or text() with bound parameters.

External APIs

  • Every httpx client has a timeout; SSL verification is never disabled (verify=False).
  • Retry-After is checked against max_retry_wait before sleeping; ProviderRateLimitExceededError is raised, not swallowed, when it exceeds the maximum.

Error handling and leakage

  • HTTP error responses carry no stack trace or raw internal exception message.
  • CLI commands show str(e) to the user; the traceback goes to the logger with logger.exception().
  • Allowed: {e} in a log message when the detail is deliberate operator diagnostics (e.g. skipped items in a long CLI run).

Dependencies

Run uv audit. For each CVE, give its severity and whether the vulnerable code path is reachable here.

Output

For each issue: file and line, the offending code, the risk (CWE / OWASP category when relevant), and the fix.

Severities: [CRITICAL] exploitable (auth bypass, secret exposure, injection), [HIGH] exploitable under some conditions, [MEDIUM] harder to exploit but real, [LOW] defense in depth, [INFO] observation.

Then run make lint and report its result. Conclude with the highest severity, the totals per level and a verdict: SECURE or ISSUES FOUND.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.