Back to skill

Security audit

API Quality Check

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent API testing tool, but it can persist and advertise plaintext API keys in generated outputs and logs.

Review before installing or using in shared environments. If used, keep provider configs and all generated output directories private, do not publish report folders as CI artifacts or static pages, avoid running init commands where stdout is logged, and rotate any API keys that were already copied into shared reports or transcripts.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/run_daily_check.sh:65
Finding

Daily report artifacts expose plaintext API credentials

Content
View full analysis
summary.json provider.json smoke.json lt-detect.json b3it-detect.json ``` ### Technical Analysis The daily wrapper copies the complete provider configuration into each dated run directory. Provider configuration files are required to contain an `api_key`, so the copied `provider.json` contains the credential in plaintext. The same directory contains an HTML report that explicitly links to `provider.json`. As a result, a report directory intended for review or archival also becomes a credential-bearing directory. No sanitization, removal of the `api_key` field, restrictive permission assignment, or separation between secret configuration and publishable output is performed. This is particularly dangerous when daily report directories are: - Published through a static web server. - Uploaded as CI/CD artifacts. - Archived to shared storage. - Sent to other users for troubleshooting. - Readable by other local accounts due to default filesystem permissions. ### Attack Path 1. An operator creates a provider configuration containing a valid API key. 2. The operator runs the documented daily workflow: ```bash bash scripts/run_daily_check.sh ./provider.json ./daily-out my-endpoint ``` 3. The script copies the complete source configuration to: ```text daily-out/my-endpoint/runs/YYYY-MM-DD/provider.json ``` 4. The script creates `index.html` in the same directory and adds a dir ...[truncated 925 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/run_batch_checks.sh:55
Finding

Batch reports duplicate and advertise plaintext provider credentials

Content
View full analysis
providers.lt-ready.json providers.b3it-ready.json ``` ### Technical Analysis Each source provider object includes an `api_key`. The batch wrapper places the original object into `lt_ready` or `b3_ready` and serializes it without sanitization. This duplicates valid keys into: - `providers.lt-ready.json` - `providers.b3it-ready.json` Both files are created inside the user-selected report output directory. The generated `index.html` explicitly advertises them as downloadable raw artifacts. Although these files are subsequently used as internal inputs for deeper checks, they are treated simultaneously as public report artifacts. This violates secret/output separation and increases the number of plaintext copies of every eligible credential. The files are also created with process-default permissions rather than an explicitly restrictive mode. ### Attack Path 1. An operator creates `providers.json` containi ...[truncated 1460 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/api_quality_check.py:1309
Finding

Configuration initialization emits raw API keys to stdout and optional result files

Content
View full analysis
Dict[str, Any]: template: Dict[str, Any] = { "provider": canonical_connection_type(cfg.provider, cfg.base_url), "base_url": cfg.base_url, "api_key": cfg.api_key, "model_id": cfg.model_id, } if name: template["name"] = name if cfg.headers: template["headers"] = cfg.headers if cfg.extra_body: template["extra_body"] = cfg.extra_body return template ``` The complete template is embedded in the command result: ```python def command_init_config(args: argparse.Namespace) -> Dict[str, Any]: cfg = build_config(args) template = render_config_template(cfg, name=getattr(args, "name", None)) config_payload: Any = {"configs": [template]} if getattr(args, "batch", False) else template config_output = getattr(args, "config_output", None) if config_output: Path(config_output).write_text( json.dumps(config_payload, ensure_ascii=False, indent=2), encoding="utf-8", ) smoke_target = config_output or "./provider.json" return { "mode": "init-config", "config_output": config_output, "config_format": "batch" if getattr(args, "batch", False) else "single", "template": config_payload, "normalized_provider": canonical_connection_type(cfg.provider, cfg.base_url), "normalized_base_url": cfg.base_url, "extra_body_source": cfg.extra_body_source, "recommended_smoke_command": f'python "$APIQ" smoke --config "{smoke_target}"', } ``` Every command result is then saved and printed without redacting the initia ...[truncated 2433 chars]
Remediation
View remediation
"`, or omit the field completely. 4. Ensure `--output` receives only the sanitized command result. 5. Write the actual provider configuration only when `--config-output` is explicitly provided. 6. Create secret-bearing configuration files atomically with mode `0600`, rather than relying on the process umask. 7. Prefer storing an environment-variable reference or credential-store identifier instead of the key itself. 8. Redact sensitive custom headers as well as `api_key`, especially `Authorization`, `x-api-key`, cookies, and vendor-specific tokens. 9. Add regression tests asserting that stdout and report JSON never contain the input key. 10. Rotate credentials if initialization commands have already run in retained CI logs or shared Agent transcripts. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (36)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/api_quality_check.py (reported line 558)May include surrounding context.

python
prompts.append(prompt)
            seen.add(prompt)
            if len(prompts) >= count:
                return prompts

        size = 2
        while len(prompts) < count:

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/api_quality_check.py (reported line 573)May include surrounding context.

python
prompts.append(prompt)
            seen.add(prompt)
            if len(prompts) >= count:
                return prompts

        size = 2
        while len(prompts) < count:

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/api_quality_check.py (reported line 1429)May include surrounding context.

python
prompts.append(prompt)
            seen.add(prompt)
            if len(prompts) >= count:
                return prompts

        size = 2
        while len(prompts) < count:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill instructs the agent to run scripts that read and write local files and make outbound network requests, but it declares no explicit tool scope such as permissions or allowed-tools. In an agent environment, this can cause overbroad execution authority, making accidental exfiltration, unintended file modification, or unsafe network use more likely because the runtime has no built-in restriction boundary for this skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation instructs users to create configuration files containing raw API keys but does not warn about protecting those files, avoiding commits, or using safer secret-handling mechanisms. In a developer skill context, this can lead to accidental credential disclosure through source control, logs, backups, or shared workspaces.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 48)May include surrounding context.

md
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 213)May include surrounding context.

md
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/config-schema.md (reported line 51)May include surrounding context.

md
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/endpoint-types-playbook.md (reported line 81)May include surrounding context.

md
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/endpoint-types-playbook.md (reported line 82)May include surrounding context.

md
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/kimi-anthropic-quickstart.md (reported line 5)May include surrounding context.

md
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/kimi-anthropic-quickstart.md (reported line 22)May include surrounding context.

md
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/kimi-anthropic-quickstart.md (reported line 33)May include surrounding context.

md
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/kimi-coding-quickstart.md (reported line 5)May include surrounding context.

md
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/kimi-coding-quickstart.md (reported line 7)May include surrounding context.

md
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/kimi-coding-quickstart.md (reported line 11)May include surrounding context.

md
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/kimi-coding-quickstart.md (reported line 28)May include surrounding context.

md
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/kimi-coding-quickstart.md (reported line 42)May include surrounding context.

md
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/kimi-coding-quickstart.md (reported line 78)May include surrounding context.

md
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/providers.example.json (reported line 34)May include surrounding context.

json
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/workflows.md (reported line 23)May include surrounding context.

md
Use this for Moonshot Kimi coding endpoints that expose an OpenAI-compatible API root such as:

- `https://api.kimi.com/coding/v1`

If you start from the Kimi coding base address `https://api.kimi.com/coding`, use the OpenAI-compatible form by appending `/v1`.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 41)May include surrounding context.

bash
python "$CODEX_HOME/skills/api-quality-check/scripts/api_quality_check.py" init-config \
  --provider "OpenAI-Compatible" \
  --base-url "https://api.siliconflow.cn/v1/chat/completions" \
  --api-key "$API_KEY" \
  --model-id "deepseek-ai/DeepSeek-V3.2" \
  --name "siliconflow-v3-2" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 104)May include surrounding context.

bash
python "$CODEX_HOME/skills/api-quality-check/scripts/api_quality_check.py" init-config \
  --provider "OpenAI-Compatible" \
  --base-url "https://api.siliconflow.cn/v1/chat/completions" \
  --api-key "$API_KEY" \
  --model-id "deepseek-ai/DeepSeek-V3.2" \
  --name "siliconflow-v3-2" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/config-schema.md (reported line 19)May include surrounding context.

bash
python "$CODEX_HOME/skills/api-quality-check/scripts/api_quality_check.py" init-config \
  --provider "OpenAI-Compatible" \
  --base-url "https://api.siliconflow.cn/v1/chat/completions" \
  --api-key "$API_KEY" \
  --model-id "deepseek-ai/DeepSeek-V3.2" \
  --name "siliconflow-v3-2" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/providers.example.json (reported line 27)May include surrounding context.

json
```bash
python "$CODEX_HOME/skills/api-quality-check/scripts/api_quality_check.py" init-config \
  --provider "OpenAI-Compatible" \
  --base-url "https://api.siliconflow.cn/v1/chat/completions" \
  --api-key "$API_KEY" \
  --model-id "deepseek-ai/DeepSeek-V3.2" \
  --name "siliconflow-v3-2" \