Back to skill

Security audit

ALAPI 接口助手

Security checks for vulnerabilities and agentic risk

Overview

This ALAPI helper is scoped to ALAPI documentation and API calls, but users should handle tokens carefully and prefer a pinned install source.

Install only from a source and revision you trust. Before live calls, understand that the skill may use ALAPI_TOKEN from the environment and send the token and request parameters to ALAPI; avoid putting real tokens in shell history or shareable snippets, and rotate any token that may have been logged.

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)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/alapi.py:227
Finding

ALAPI Token Exposure Through Process Arguments and URL Query Strings

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:26
Finding

Mutable and Unpinned npx Installation Sources

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (20)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

A second aspect of the same mismatch is that the skill is presented as a documentation/code-generation assistant, but the operational guidance centers on a CLI capable of real authenticated requests, with no enforceable confirmation mechanism shown. That can lead operators to enable the skill under a lower-risk assumption than its actual behavior warrants, which increases the chance of unintended external calls and credential exposure through use of ambient auth.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

A second aspect of the same mismatch is that the skill is presented as a documentation/code-generation assistant, but the operational guidance centers on a CLI capable of real authenticated requests, with no enforceable confirmation mechanism shown. That can lead operators to enable the skill under a lower-risk assumption than its actual behavior warrants, which increases the chance of unintended external calls and credential exposure through use of ambient auth.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding

The README instructs users to install the skill via npx skills add without pinning a specific package version or validating the package source. Because npx resolves and executes remote package code dynamically, a compromised or unexpectedly updated package in the dependency chain could result in arbitrary code execution during installation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

This line continues the recommendation to use npx skills add as the installation mechanism, again relying on an unpinned transient executable. In the context of a security-sensitive agent skill, encouraging dynamic execution of unversioned tooling increases supply-chain risk and can expose users to malicious package updates or package-resolution attacks.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill instructs the agent to use environment access and make live network requests, but it declares no tool scope or permission boundaries. That creates an authorization gap: a host system or reviewer cannot easily tell that the skill may read ALAPI_TOKEN and perform outbound requests, increasing the chance of unintended credential use or network actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The activation text is broad enough to trigger on ordinary ALAPI-related conversation, which can cause the skill to engage in contexts where the user did not intend tool-assisted API handling. In a skill that can use environment tokens and make network requests, overbroad triggering increases the risk of unintended credential-backed actions or unnecessary exposure of external requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill allows authenticated network calls using ALAPI_TOKEN from the environment, but it does not require a prominent user-facing warning that ambient credentials may be used and data will be sent to an external service. This is dangerous because users may believe no credentialed action will occur unless they paste a token, while the skill can silently rely on existing secrets in the runtime environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This JSON file contains multiple natural-language prompts and expected outputs written to require Chinese responses and behavior, but it does not indicate that the user can choose another language or that the skill is intentionally region-specific. Under the policy rule, forcing a specific language without opt-in is a locale-policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The templates are designed to send ALAPI_TOKEN to a remote third-party service, but the surrounding guidance does not explicitly call out that the token will be transmitted over the network as part of requests, including in URLs for some examples. In a code-generation skill context, users may paste real credentials into generated commands without fully appreciating the exposure, increasing the chance of token disclosure via shell history, logs, proxies, monitoring tools, or copied snippets.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation states that an explicitly provided token should take precedence over the environment variable, but the provided code templates largely hardcode use of ALAPI_TOKEN from the environment and do not implement that precedence. This can cause developers to rely on a security/control behavior that does not exist, leading to accidental use of the wrong credential, cross-environment token mixups, or failed attempts to override credentials safely during testing or incident response.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The cURL example places the ALAPI token directly in the URL query string, which is commonly exposed in shell history, process listings, reverse-proxy logs, browser history, observability systems, and support screenshots. In a code-template skill, this is especially risky because users may copy-paste the command verbatim with real credentials, causing avoidable secret leakage even though HTTPS protects the transport channel itself.

Content

Scanner excerpt · references/code-examples.md (reported line 13)May include surrounding context.


cURL

bash
# GET

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/code-examples.md (reported line 45)May include surrounding context.

md
url = f"{BASE_URL}/{path}"

    if method == "POST":
        resp = requests.post(url, json=params, timeout=10)
    else:
        resp = requests.get(url, params=params, timeout=10)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest says ALAPI should only be called when the user explicitly provides a token and confirms the call, but the code permits direct invocation by silently sourcing a token from ALAPI_TOKEN and immediately performing the network request. This creates a policy-bypass condition where an agent or wrapper could trigger outbound authenticated API calls without the user's contemporaneous awareness or consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The helper _resolve_token reads credentials from the process environment, expanding the skill's authority beyond the stated interaction model of user-supplied token usage. In agent environments, ambient credentials can be unexpectedly present, allowing the skill to authenticate as the user or operator without an explicit handoff in the current session.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This test explicitly validates that the CLI will read an ALAPI token from the ALAPI_TOKEN environment variable when the user does not provide one. That behavior conflicts with the skill description, which says the agent should only call ALAPI when the user explicitly provides a token and confirms the action. In an agent context, silently sourcing credentials from the environment can cause unintended use of secrets and external requests without the user's informed consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This test enforces both environment-token ingestion and precedence rules for an explicit token, confirming the tool is designed to handle credentials from multiple sources beyond what the manifest describes. Even though explicit override is normal CLI behavior, the underlying capability to automatically consume ambient secrets broadens the attack surface in an agent setting where hidden environment credentials may exist. The skill context makes this more dangerous because it is meant to call a third-party API, so unauthorized or unintended authenticated requests are plausible.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

Earlier instructions require 2–3 rounds of keyword fallback before concluding that no matching API exists (L059-L065, L120), but L206 says to directly state there is no match when search results are empty. This is an active contradiction in the skill's own documentation about how the agent should behave.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest presents the skill name and description in Chinese, but the default prompt instruction is fixed in English. This can amount to a language-policy issue because the skill appears to assume or force English behavior without explicit user opt-in or a documented language choice.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

Unlike the Python and PHP templates, the JavaScript/TypeScript example exposes a generic callAlapi helper but provides no method parameter or POST handling, even though the surrounding document presents these templates as general ALAPI integration code. This creates an intent mismatch within the multi-language template set by implying equivalent request capability while omitting it here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code sends the API token and all provided request parameters to a remote service via HTTP requests, including appending them to the URL for GET requests. Although network access is central to the tool's purpose, the file does not clearly warn users that secrets and parameters will be transmitted to an external API, which is relevant because tokens may be provided directly on the command line or via environment variable.

Content

No source excerpt is available for this finding.