Back to skill

Security audit

Secure Data Analyst Skill Suite

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marked this skill suspicious with medium confidence because scanners flagged misleading assurances about credential rotation and knowledge privacy; the review is incomplete because some referenced paths could not be resolved.

Consider the Review verdict before installing. Check whether credential changes are revoked at the service that issued them, whether knowledge sent to the AI can be visible in its context, and whether the local credential API is necessary and trusted. Coverage was partial: all eight listed components were scanned, but some references could not be resolved, so the evidence does not establish that every referenced artifact was reviewed.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (19)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · README.md (reported line 338)May include surrounding context.

md
- Request user authorization before every sensitive operation
- Apply scripts or workflows through MGC after authorization
- Never view script content
- Never access credentials
- Never automate workflow execution
- Never auto-select a script name (`info_owner` must be supplied by the user)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
| Document | When to use | Triggered by |
|----------|-------------|--------------|
| `credential_management.md` | Need to store or access credentials | user or agent |
| `script_management.md` | Need to store or run a script/workflow | user or agent |
| `collaboration_management.md` | Need to seal a workflow / skill package to another node | user or agent |
| `knowledge_management.md` | Need to store or read knowledge | user or agent |

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · prompts/credential_management.md (reported line 64)May include surrounding context.

md
# 3. How to Call Credentials with Zero Exposure (Core)

**MGC implementation**: scripts are stored in MGC; at runtime MGC decrypts and executes the script locally. If the script needs to access credentials, it calls a local API to fetch them internally.

## Standard Example: Script Internally Accesses Credentials Safely

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · agent_system_prompt.md (reported line 307)May include surrounding context.

md
- Say "I can run the script for you…"
- Say "I will automatically process the data…"
- Apply scripts or workflows without authorization
- Access credentials without authorization
- View or infer script content
- Automate workflow execution
- Delete records without explicit user approval

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · prompts/credential_management.md (reported line 71)May include surrounding context.

python
import os, requests, json

# Read MGC access token (fixed path, do not change)
with open(os.path.expanduser("~/.mgc/database/mgc_black_box/.mgc_token")) as f:
    MGC_TOKEN = f.read().strip()

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · prompts/credential_management.md (reported line 177)May include surrounding context.

4. How to Authorize Credential Access (User Must Confirm)

When AI needs to access credentials, it must ask the user:

text
Credential Name: db_warehouse_prod

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · prompts/credential_management.md (reported line 217)May include surrounding context.

md
| Issue | Solution |
|-------|----------|
| Script cannot access credentials | Check if `info_owner` matches |
| Credentials empty | Check if WebUI stored correctly |
| Execution failed | Check if script dependencies are available locally |
| `mgc_find` reports a parameter error | `mgc_find` does not accept `info_type` (removed since 1.5.0) — pass only `info_owner` / `diff_1..3` |

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · prompts/credential_management.md (reported line 181)May include surrounding context.

text
Credential Name: db_warehouse_prod
Operation: Access Credential
Authorization Required: YES

Do you authorize accessing this credential? Reply "yes" to proceed, or "no" to cancel.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · prompts/credential_management.md (reported line 206)May include surrounding context.

md
AI cannot protect plaintext credentials.

### ✔ 4. All Access Requires Authorization
AI must not automatically access credentials.

### ✔ 5. Clean Up Expired Credentials Promptly
After rotating a credential, if no other script still references the old one, remove the local record with `mgc_delete` (user authorization required).

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · prompts/script_management.md (reported line 266)May include surrounding context.

md
# 7. Zero-Exposure Credential Calls Inside Scripts

**MGC implementation**: scripts are stored in MGC; at runtime MGC decrypts the script and executes it locally. If the script needs to access credentials, it calls a local API to fetch them internally.

## Standard Example: Script Safely Accesses Credentials Internally

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · prompts/script_management.md (reported line 273)May include surrounding context.

python
import os, requests, json

# Read MGC access token (fixed path, do not change)
with open(os.path.expanduser("~/.mgc/database/mgc_black_box/.mgc_token")) as f:
    MGC_TOKEN = f.read().strip()

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 · prompts/credential_management.md (reported line 77)May include surrounding context.

md
def get_credential(info_owner="db_warehouse_prod"):
    """Fetch credential from MGC"""
    resp = requests.post(
        "http://127.0.0.1:57219/api/mgc/sensitive/get",
        headers={"X-MGC-Token": MGC_TOKEN},
        json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · prompts/credential_management.md (reported line 77)May include surrounding context.

md
def get_credential(info_owner="db_warehouse_prod"):
    """Fetch credential from MGC"""
    resp = requests.post(
        "http://127.0.0.1:57219/api/mgc/sensitive/get",
        headers={"X-MGC-Token": MGC_TOKEN},
        json={

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · prompts/credential_management.md (reported line 77)May include surrounding context.

md
def get_credential(info_owner="db_warehouse_prod"):
    """Fetch credential from MGC"""
    resp = requests.post(
        "http://127.0.0.1:57219/api/mgc/sensitive/get",
        headers={"X-MGC-Token": MGC_TOKEN},
        json={

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · prompts/script_management.md (reported line 279)May include surrounding context.

md
def get_credential(info_owner="db_warehouse_prod"):
    """Fetch credential from MGC"""
    resp = requests.post(
        "http://127.0.0.1:57219/api/mgc/sensitive/get",
        headers={"X-MGC-Token": MGC_TOKEN},
        json={

L143 claims that overwriting a locally stored credential immediately invalidates the old password, but L137–L142 only update the MGC record.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

Overwriting an MGC record changes the locally stored secret but does not invalidate the old password at the database or service that authenticates it. In a credential-management workflow, claiming immediate invalidation can cause users responding to compromise to leave a stolen credential usable.

Content

No source excerpt is available for this finding.

The prescribed knowledge-reading workflow exposes plaintext to AI despite explicit zero-exposure assurances.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The prescribed workflow retrieves knowledge for model use and explicitly marks it as visible to AI, contradicting repeated claims that AI cannot see its plaintext. Users may consequently authorize access to sensitive business rules or proprietary methods under a false confidentiality assumption; local decryption does not prevent disclosure through model-visible tool results.

Content

No source excerpt is available for this finding.

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 · prompts/script_management.md (reported line 279)May include surrounding context.

md
def get_credential(info_owner="db_warehouse_prod"):
    """Fetch credential from MGC"""
    resp = requests.post(
        "http://127.0.0.1:57219/api/mgc/sensitive/get",
        headers={"X-MGC-Token": MGC_TOKEN},
        json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · prompts/script_management.md (reported line 279)May include surrounding context.

md
def get_credential(info_owner="db_warehouse_prod"):
    """Fetch credential from MGC"""
    resp = requests.post(
        "http://127.0.0.1:57219/api/mgc/sensitive/get",
        headers={"X-MGC-Token": MGC_TOKEN},
        json={