Back to skill

Security audit

API Design Principles

Security checks for vulnerabilities and agentic risk

Overview

The skill itself is mostly API-design documentation, but its README recommends an unpinned executable install command from a mutable GitHub branch, which users should review before installing.

Review the install path before using this skill. Prefer installing from a pinned commit, verified archive, or trusted local copy instead of running the README's unpinned `npx add` command. If you copy the FastAPI template into a real service, replace wildcard CORS with explicit allowed origins and review destructive CRUD endpoints before deployment.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T08 · Insecure Dependencies

Warning
Location
README.md:33
Finding

Unpinned Third-Party Installer and Mutable Repository Source

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
templates/fastapi-template.py:20
Finding

Unrestricted CORS Configuration in a Production-Labeled API Template

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/quick-reference.md (reported line 44)May include surrounding context.

md
GET    /api/resources/{id}     → Get one
PUT    /api/resources/{id}     → Replace
PATCH  /api/resources/{id}     → Partial update
DELETE /api/resources/{id}     → Remove

# Nested (max 1 level)
GET    /api/users/{id}/orders  → User's orders

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/quick-reference.md (reported line 179)May include surrounding context.

md
|-------|-------|
| `POST /getUsers` | `GET /users` |
| `GET /createUser` | `POST /users` |
| `POST /users/delete/123` | `DELETE /users/123` |
| `/user/123` | `/users/123` (plural) |
| `/api/users/123/orders/456/items` | Max 2 levels |
| 200 for everything | Correct status codes |

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 41)May include surrounding context.

From your project root:

bash
mkdir -p .cursor/skills
cp -r ~/.ai-skills/skills/backend/api-design-principles .cursor/skills/api-design-principles

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 57)May include surrounding context.

From your project root:

bash
mkdir -p .claude/skills
cp -r ~/.ai-skills/skills/backend/api-design-principles .claude/skills/api-design-principles

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 64)May include surrounding context.

Claude Code (global)

bash
mkdir -p ~/.claude/skills
cp -r ~/.ai-skills/skills/backend/api-design-principles ~/.claude/skills/api-design-principles

External Model or Provider Selection

Medium
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · SKILL.md (reported line 3)May include surrounding context.

md
---
name: api-design-principles
model: reasoning
---

# API Design Principles

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This code defines a DELETE endpoint for user removal, which is a destructive and potentially irreversible action. Although the docstring states the HTTP response behavior, it does not provide any user warning, confirmation step, or explicit disclosure about the impact of deletion.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.