Back to skill

Security audit

AK Data Daily Timeout Report

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent database reporting helper, but it needs Review because it routinely exposes raw request data and runs unaudited project-level scripts with database credentials.

Install only in an approved project where the referenced Python scripts are reviewed and controlled. Use a read-only database account, avoid production credentials unless necessary, and treat generated reports and raw request fields as potentially sensitive data.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T07 · Tool Hijacking and Spoofing

Error
Location
run.sh:4
Finding

Execution of Unverified Code Outside the Skill Package

Content
View full analysis
&2 exit 2 ;; esac ``` ### Technical Analysis The launcher derives `ROOT_DIR` by traversing three parent directories from the directory containing `run.sh`. It then executes Python scripts under that derived root rather than scripts contained in the audited Skill package. The referenced Python files are absent from the supplied project artifact. Consequently, the effective behavior of `run.sh` depends on external, unaudited files at: - `$ROOT_DIR/scripts/data/run_daily_timeout_report.py` - `$ROOT_DIR/scripts/data/run_daily_timeout_trend_report.py` No canonical-path containment check, ownership validation, permission check, or integrity verification is performed before execution. If the Skill is relocated, unpacked into an unexpected directory hierarchy, or used in a project where another party can modify the referenced scripts, an attacker can substitute arbitrary Python code while preserving the legitimate-looking `run.sh day` or `run.sh trend` invocation. All additional command-line arguments are passed to the external scripts. This is not directly a shell-command-injection issue because `"$@"` preserves argument boundaries, but the safety of argument processing cannot be assessed because the receiving implementations were not supplied. ### Attack Path 1. The attacker obtains write access to the derived `$ROOT_DIR/scripts/data/` directory or controls the project into which the Skill is i ...[truncated 1248 chars]
Remediation
View remediation
&2 exit 1 ;; esac ``` 3. Fail closed if the implementation is missing, is a symbolic link, is not a regular file, or is writable by untrusted users. 4. Distribute a signed manifest or trusted cryptographic hashes for executable files and verify their integrity before execution. 5. If project-level scripts must remain external, explicitly define the trusted project root through a validated configuration value rather than inferring it through parent-directory traversal. 6. Include the referenced Python implementations in future audits so their database queries, argument handling, filesystem writes, output sanitization, and network behavior can be reviewed. ]]>

T08 · Insecure Dependencies

Warning
Location
MIGRATION.md:92
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis
Remediation
View remediation
``` 2. Generate and commit a dependency lockfile containing cryptographic hashes. Install with hash enforcement, for example: ```bash python3 -m pip install --require-hashes -r requirements.lock ``` 3. Use a dedicated virtual environment and avoid system-wide or privileged installation: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.lock ``` 4. Use `python3 -m pip` to ensure dependencies are installed for the same interpreter used by `run.sh`. 5. Configure an approved package index, disable untrusted extra indexes, and apply dependency scanning and update review before changing locked versions. 6. Record the supported Python and dependency versions in the migration documentation and test the locked environment before distribution. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (6)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill mandates that default drill-down output include 'request' and related log-enrichment fields, which operationalizes disclosure of raw request content as a normal workflow rather than an exceptional debug path. Because this is a unified reporting skill meant for conversational use, the context makes accidental overexposure more likely: users asking for timeout samples may receive sensitive payload data without necessity, warning, or authorization checks.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · MIGRATION.md (reported line 51)May include surrounding context.

Skill 层

text
.pi/skills/ak-data-daily-timeout-report/SKILL.md
.pi/skills/ak-data-daily-timeout-report/run.sh
.pi/skills/ak-data-daily-timeout-report/MIGRATION.md
.pi/skills/ak-data-task-timeout-created-report/SKILL.md

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · MIGRATION.md (reported line 54)May include surrounding context.

.pi/skills/ak-data-daily-timeout-report/SKILL.md .pi/skills/ak-data-daily-timeout-report/run.sh .pi/skills/ak-data-daily-timeout-report/MIGRATION.md .pi/skills/ak-data-task-timeout-created-report/SKILL.md .pi/skills/ak-data-depart-timeout-log-report/SKILL.md

text

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · MIGRATION.md (reported line 55)May include surrounding context.

.pi/skills/ak-data-daily-timeout-report/run.sh .pi/skills/ak-data-daily-timeout-report/MIGRATION.md .pi/skills/ak-data-task-timeout-created-report/SKILL.md .pi/skills/ak-data-depart-timeout-log-report/SKILL.md

text

### 执行脚本层(必须一起迁移)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The migration guide instructs operators to set real database credentials in .env and run local scripts that query production-like job/log data, but it does not include any warning about handling sensitive data, least-privilege access, or the system impact of executing those commands. In a skill package, this can lead users to run DB-connected reporting scripts against live environments and potentially expose confidential operational data in generated JSON/Markdown outputs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill explicitly supports returning example records '带 request' and later describes enriching examples with log fields, but it provides no warning, minimization rule, or redaction requirement for potentially sensitive request payloads. In an operational reporting skill, raw request bodies can contain user identifiers, auth tokens, internal parameters, or business data, so exposing them in routine drill-down output materially increases data leakage risk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.