Back to skill

Security audit

Api Scaffold Gen Free

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate API scaffold generator, but it asks for broad write/execute authority and includes an unsafe OAuth2 token-introspection template that users should review carefully.

Install only if you are comfortable with a scaffold skill that can write files and run commands. Use it in a dedicated project directory, review generated code before running it, avoid using callback URLs unless you know exactly what will be sent, and do not deploy the OAuth2 introspection template without adding trusted HTTPS endpoint allowlisting, token encoding, client authentication, timeout handling, and secret-management controls.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:303
Finding

Bearer Token Disclosure Through an Unrestricted OAuth2 Introspection Endpoint

Content
View full analysis
{ const authHeader = req.headers.authorization; if (!authHeader) { return res.status(401).json({ code: 2001, message: '未授权', data: null }); } const token = authHeader.slice(7); try { const resp = await fetch(introspectUrl, { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, body: `token=${token}` }); ``` ### Technical Analysis The generated OAuth2 middleware extracts a sensitive access token from the incoming `Authorization` header and transmits it to the supplied `introspectUrl`. No restrictions are placed on this destination. If an attacker can influence deployment configuration or otherwise control `introspectUrl`, the middleware will send users' bearer tokens to an attacker-controlled server. The same primitive can cause server-side requests to loopback, private-network, link-local, or cloud metadata endpoints. Additional weaknesses include: - The destination is not restricted to trusted HTTPS hosts. - Redirect behavior is not controlled. - Private and special-purpose IP ranges are not rejected. - The code checks only whether the authorization header exists, not whether it follows the `Bearer <token>` scheme. - The token is interpolated directly into form data instead of being safely encoded. - No request timeout is configured. - The generated introspection request does not demonstrate client authentication, which is commonly required by OAuth2 introspection endpoints. - Declaring the middleware factory itself as `async` returns a Promise instead of middleware directly, potentially causing integration errors. Sending a token to a configured OAuth2 ...[truncated 1842 chars]
Remediation
View remediation
`. 6. Encode the request body safely: ```javascript const body = new URLSearchParams({ token }); ``` 7. Use the introspection service's required client authentication mechanism and retrieve client credentials from a protected secret manager or environment configuration. 8. Add a short request timeout, response-size limit, and controlled error handling. Do not log tokens or include them in error messages. 9. Remove the unnecessary `async` modifier from the factory unless asynchronous initialization is required: ```javascript function authOAuth2(introspectUrl) { return async (req, res, next) => { // Middleware implementation }; } ``` 10. Prefer accepting a preconfigured introspection client rather than a raw URL. This centralizes TLS, destination validation, authentication, timeout, and logging policy. 11. Add tests confirming rejection of non-HTTPS URLs, redirects, unapproved hosts, private addresses, malformed authorization headers, and timeout conditions. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (9)

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 · SKILL.md (reported line 124)May include surrounding context.

md
});
// ...
/**
 * DELETE /users/:id - 删除用户
 */
router.delete('/:id', (req, res) => {
  const id = parseInt(req.params.id);

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation scope is broad enough to match generic development, debugging, testing, and deployment requests, which raises the chance of the skill being invoked outside its intended narrow use case. In an agent environment with write and exec tools, over-broad triggering increases the risk of unintended file generation, command execution, or user confusion about what the skill will do.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill exposes read/write/exec capabilities but the description does not clearly warn users that generated workflows may write files and execute shell commands locally. In agent contexts, this omission can lead users to authorize or trigger side effects without informed consent, increasing the chance of accidental system modification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill is presented as a code/scaffold generator, but the documented callback_url introduces optional outbound data transmission that is not necessary for local code generation. This expands the trust boundary and can leak user prompts, generated code, or metadata to arbitrary external endpoints if the skill or agent implements it without strict controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The callback_url parameter implies that user-provided or generated data may be sent to an external endpoint, but the documentation does not provide a privacy warning or explain what data could be transmitted. This can expose sensitive prompts, code, or project details to third parties without meaningful user awareness.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The OAuth2 introspection template embeds live network-dependent behavior into a skill whose stated purpose is scaffold generation. While generating sample auth code is legitimate, including a remote introspection flow without strong framing can cause users to adopt production-sensitive network behavior blindly, and it normalizes external calls that exceed the core local scaffolding scope.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The keyword coverage list includes many common natural-language phrases that can collide with ordinary coding requests, making accidental activation more likely. Because the skill advertises write and exec capabilities, broad trigger matching can turn benign conversations into filesystem changes or command suggestions without clear user intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The license section explicitly states '完全中文化表达', indicating the skill is redesigned to force Chinese-language expression. This is a natural-language policy issue because the file does not offer users a language or locale choice, nor does it justify a region-specific constraint.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The documentation states the tool itself does not need an API key, but elsewhere provides an OAuth2 introspection template that depends on a remote authentication service. This inconsistency can mislead users about external dependencies and privacy/security implications, increasing the chance they enable or deploy networked auth code without understanding the trust model.

Content

No source excerpt is available for this finding.