Back to skill

Security audit

Api Push Frontend

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent, but it uploads potentially sensitive internal API definitions to a fixed external service, stores raw response history inside the skill tree, and includes an unused shell-execution helper.

Install only if the destination service is approved for your organization and you are comfortable sending API metadata there. Review and redact API definitions first, especially admin, user-management, role, delete, password, token, internal URL, and credential-related fields. Treat the saved push history as sensitive and remove or relocate it if it may be loaded by agents or committed to source control.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/push_api_to_frontend.py:29
Finding

Latent Arbitrary Command Execution Through an Unsafe Shell Helper

Content
View full analysis
Remediation
View remediation

T02 · Agent Memory Poisoning

Warning
Location
scripts/push_api_to_frontend.py:173
Finding

Persistent Agent-Context Poisoning Through Untrusted Server Responses

Content
View full analysis
Remediation
View remediation
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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (17)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/push_api_to_frontend.py --prdId "PRD-2026-001" --file ./api-definitions.json

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

Using shell=True with subprocess.run is a classic command-injection sink because shell metacharacters are interpreted by the shell rather than treated as data. In an agent skill context, where tools may eventually be composed with model-generated or user-provided values, this is especially dangerous because seemingly harmless strings can become executable commands.

Content

Scanner excerpt · scripts/push_api_to_frontend.py (reported line 34)May include surrounding context.

python
"""执行 shell 命令"""
    import subprocess
    try:
        result = subprocess.run(
            cmd,
            shell=True,
            capture_output=capture,

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill describes capabilities that imply shell execution, network access, and reading/writing local files, but it does not declare any explicit tool scope or permission boundaries. This increases the risk of over-privileged execution because an agent could invoke broader tools than the user expects when pushing API data or writing history logs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs users to transmit backend API definitions to an external platform, which may include sensitive internal endpoints, parameters, schemas, and authentication-related details, but it provides no warning, approval gate, or data-classification check. In this context, the lack of safeguards is more dangerous because the stated purpose is exfiltration of internal interface metadata to a remote service.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language invocation model is too open-ended: 'directly tell me your requirement, I guide you to complete the push' does not define clear boundaries for when the skill should activate or what approvals are needed. This can cause accidental triggering and unintended uploads of sensitive API documentation, especially when combined with network and file capabilities.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The push history shows this skill synchronizing a broad set of system-management APIs, including configuration, environment, product, project, menu, role, user, and user-role administration endpoints, which exceeds the narrow purpose suggested by the skill description of pushing backend API definitions to a frontend platform. This creates scope-expansion risk: a frontend-facing sync process can unintentionally expose or operationalize sensitive administrative capabilities in downstream systems, increasing attack surface and enabling misuse if the synced definitions are later consumed by less-trusted users or tooling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown history records sensitive API metadata, including credential-related fields and destructive operations such as delete endpoints, without any warning, minimization, or handling guidance. Even though this file is documentation, it can still leak operational knowledge about privileged capabilities and encourage unsafe propagation of high-impact interfaces to consumers who may not understand the security implications.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The recorded synced definitions include sensitive account and access-management fields such as accessAccount, accessPassword, and user/password parameters, which are not justified by a simple frontend API-push function. Publishing or propagating these schemas can normalize handling of credential-bearing interfaces in broader tooling, and may lead to credential exposure, insecure client integration, or unauthorized administrative actions if surfaced in frontend platforms.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document instructs users to upload API definitions to an external HTTPS endpoint but provides no warning about the sensitivity of the transmitted content, tenant boundaries, or approval requirements. API definitions often contain internal paths, parameter schemas, authentication expectations, and business logic details, so normalizing blind transmission to a remote service can cause unreviewed disclosure of internal system metadata.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The cURL example provides a ready-to-run command that posts API definitions to an external service, making exfiltration of internal interface details easy to perform. Because the skill’s purpose is pushing backend API definitions to a remote frontend platform, the surrounding context makes the external transmission more security-relevant, not less, especially if users treat all API schemas as safe by default.

Content

Scanner excerpt · references/frontend-api-docs.md (reported line 207)May include surrounding context.

}

text

### cURL 示例

```bash
curl -X POST "https://jffe.techgp.cn/md/api/uploadV4" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The JavaScript example sends API definition content from a client context to an external endpoint. Even though it is illustrative documentation, it operationalizes outbound transfer of potentially sensitive design information and may be copied into real workflows without safeguards such as auth, origin restrictions, or content review.

Content

Scanner excerpt · references/frontend-api-docs.md (reported line 227)May include surrounding context.

JavaScript 示例

javascript
fetch('https://jffe.techgp.cn/md/api/uploadV4', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The Python example performs a live POST of structured API definition data to an external domain. In the context of this skill, that encourages direct transmission of potentially sensitive internal API metadata without any mention of authentication, environment restrictions, consent, or redaction, which increases the risk of unintended data disclosure.

Content

Scanner excerpt · references/frontend-api-docs.md (reported line 267)May include surrounding context.

] }

response = requests.post(url, headers=headers, json=data) print(response.json())

text

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring, CLI description, help text, and interactive prompts are written in Chinese only, which imposes a specific language on users. The policy allows locale constraints only when users are given a choice or the restriction is clearly justified, neither of which is present here.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Including shell-command execution capability in a script whose stated purpose is only to parse API definitions and upload them to a frontend platform violates least functionality. Unrelated execution primitives are dangerous because they expand the attack surface and can be repurposed for arbitrary command execution if the code is later wired to user-controlled inputs or copied into other automation contexts.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
97% confidence
Finding

The script defines a generic shell execution helper using subprocess.run(..., shell=True), which can execute arbitrary shell commands if the cmd argument is influenced by external input. Even though this helper is not used elsewhere in the file, retaining dormant command-execution capability in a data-push utility materially increases the risk of later abuse, unsafe reuse, or accidental exposure through future changes.

Content

Scanner excerpt · scripts/push_api_to_frontend.py (reported line 34)May include surrounding context.

python
"""执行 shell 命令"""
    import subprocess
    try:
        result = subprocess.run(
            cmd,
            shell=True,
            capture_output=capture,

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This is a markdown file, so SQP-2 applies to missing warnings in documentation. The document provides a concrete DELETE interface example for deleting orders, but it does not include any warning about destructive effects, recovery limitations, or recommended confirmation safeguards, which are relevant when documenting behaviors that can affect user data or system integrity.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The best-practices section directs users to use English or a single naming language, which constitutes a natural-language locale/language constraint. Because the document does not present this as an optional preference or justify it as a region-specific requirement, it may violate the language-choice policy.

Content

No source excerpt is available for this finding.