Back to skill

Security audit

api-test-reporter

Security checks for vulnerabilities and agentic risk

Overview

The skill is an API testing/reporting tool, but it publishes real-looking database credentials and can run broad database-backed tests while saving sensitive request and response data without redaction.

Review before installing. Rotate the exposed database password if it was ever valid, replace examples with placeholders, run only against approved staging systems, use least-privilege read-only database accounts, restrict fixture SQL to reviewed SELECT queries, redact secrets and personal/business data from generated reports, and pin dependencies or bundle report assets locally.

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 (5)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:117
Finding

Plaintext Database Credentials Embedded in Skill Documentation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/run_api_test.py:97
Finding

Arbitrary Configuration-Supplied SQL Execution Against the Fixture Database

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/generate_report.py:36
Finding

Generated Reports Load Remote Executable JavaScript Without Integrity Verification

Content
View full analysis
``` ```html ``` The same remote references are present in both the embedded template in `generate_report.py` and the standalone `report_template.html`. ### Technical Analysis Generated local reports load Bootstrap JavaScript and CSS from a third-party CDN. The references do not include Subresource Integrity hashes or an accompanying restrictive Content Security Policy. Opening the report therefore initiates an external connection and trusts code supplied at viewing time rather than code included and reviewed with the skill. If CDN delivery, dependency publication, DNS resolution, TLS trust, or the client environment is compromised, altered JavaScript can execute in the report's browser context. The report context is sensitive because `__REPORT_DATA__.js` contains complete API request and response content. The remote dependency also contradicts the documentation's assertion that report CSS and JavaScript are fully embedded. ### Attack Path 1. The test runner produces an HTML report and `__REPORT_DATA__.js`. 2. A user opens the report while network access is available. 3. The browser requests Bootstrap assets from `cdn.jsdelivr.net`. 4. An attacker compromises or substitutes the delivered script through a supply-chain or network trust failure. 5. The altered script executes in the report document. 6. The script reads rendered report data or the global `reportData` variable and may transmit it to an attacker-controlled endpoint. ### Impact Assessment Exploitation could disclose all API requests, responses, database ...[truncated 319 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/run_api_test.py:419
Finding

Complete API Requests, Responses, and Fixture Values Are Persisted Without Redaction

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:221
Finding

Python Dependencies Are Installed Without Version or Hash Pinning

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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (13)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly instructs the agent to pull real values from a database, send them to HTTP endpoints, and include full request/response data in generated reports, but provides no user warning or consent gate for handling sensitive data. In this context, that can expose credentials, tax identifiers, invoice data, and live business records to external services and to persistent local artifacts such as HTML and JS report files.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown skill lists trigger phrases such as "生成测试报告" and "逐个验证参数", which are broad enough to overlap with common requests outside this specific API-testing skill. The description does not provide negative examples or tighter activation constraints to distinguish when the skill should or should not activate.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The natural-language comments and labels are written entirely in Chinese, indicating the skill configuration is intended to be used in a single language without any opt-in or alternative locale. Under the policy, forcing a specific language without user choice or a documented regional justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The document describes automatically generating and executing API tests against a configurable base URL and collecting results, but it does not warn about targeting staging-only environments or the possible effects on live systems. Without such guardrails, users may unintentionally send bulk or malformed test traffic to production endpoints, causing data corruption, operational noise, or service disruption.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow explicitly instructs the test runner to connect to MySQL, execute configured SQL queries, and pull real values into API tests, but it provides no warning to avoid production systems, minimize sensitive data access, or protect credentials. In a testing skill, this omission can lead users to run queries against live databases and expose customer or business data in logs, reports, or downstream requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script supports connecting to a real MySQL instance using provided credentials and executing arbitrary configured SQL to pull production-like data into test requests. In this skill context, that increases the chance of exposing sensitive database contents into logs, reports, or downstream HTTP requests, especially because there are no environment restrictions, query safeguards, or masking controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code sends API requests using user-supplied configuration and request bodies, which can include business or system data, but there is no user-facing disclosure at the point of transmission beyond generic test-run output. The surrounding docstring describes functionality, but it does not warn that request payloads and target URLs will be transmitted over the network to the configured endpoint.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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 · scripts/run_api_test.py (reported line 163)May include surrounding context.

python
if http_method.upper() == "GET":
            resp = requests.get(url, params=body, headers=headers, timeout=timeout)
        else:
            resp = requests.post(url, json=body, headers=headers, timeout=timeout)
        try:
            return {"status_code": resp.status_code, "body": resp.json(),
                    "raw": resp.text, "error": None}

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The tool persists full request bodies and response bodies to JSON and HTML reports, which can include credentials, personal data, tokens, invoices, or other sensitive business data returned from real APIs. In this testing context, the risk is elevated because the script also supports loading real database values and transmitting them to live services, so the saved artifacts can become a durable local data leak.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/run_api_test.py (reported line 479)May include surrounding context.

python
report_script = os.path.join(os.path.dirname(os.path.abspath(__file__)), "generate_report.py")
    if os.path.exists(report_script):
        import subprocess
        subprocess.run(
            [sys.executable, report_script,
             "--results", json_path,
             "--output", html_path,

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The HTML declares lang="zh-CN", which fixes the report to a specific language/locale. The policy for this audit flags locale constraints when the skill does not offer user opt-in or explain why the report must be Chinese.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

Visible strings such as the title, loading text, labels, and error messages are all written in Chinese, indicating the skill forces one language for generated output. There is no evidence in this file of a user-selectable language option or documented regional scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The file's user-facing docstring and command guidance are entirely in Chinese, with no indication that another language is available or that the locale is intentionally constrained. Under the stated policy, user-facing language constraints should be optional or clearly justified.

Content

No source excerpt is available for this finding.