Back to skill

Security audit

Backup Strategy

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only backup strategy helper, but its sample scripts need careful review before use in a real environment.

Install only if you want Chinese-language backup planning guidance. Do not run the sample scripts as-is: replace placeholder credentials with a secrets manager or protected MySQL option file, quote and validate paths, use dry-runs for rsync and cloud sync, encrypt backups, verify bucket ownership and access controls, and test restores outside production first.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:106
Finding

Plaintext MySQL Password Exposed Through Script and Command-Line Arguments

Content
View full analysis
${BACKUP_DIR}/${DATE}/${DATABASE}.sql.gz ``` ### Technical Analysis The backup template stores a MySQL password directly in a shell variable and then supplies it to `mysqldump` through the `-p` command-line option. Although `"password"` is presented as an example placeholder, users who adopt the template are encouraged to replace it with a real credential while retaining the insecure storage and invocation pattern. A real password embedded in this script may be disclosed through: - Read access to the script or copies of it in source control and backup systems. - Process inspection while `mysqldump` is running, depending on the operating system and process visibility controls. - Debugging output, command tracing such as `set -x`, monitoring agents, or diagnostic collection. - Accidental inclusion of the script in logs, support bundles, or shared configuration archives. The use of a dedicated `backup` username limits exposure only if that account is properly restricted. The example does not document or enforce least-privilege permissions. ### Attack Path 1. An administrator copies the documented backup script into an operational environment. 2. The placeholder value assigned to `MYSQL_PASS` is replaced with a valid database password. 3. The resulting script is stored on disk, committed to a repository, collected in a backup, or executed with the password present in its command-line arguments. 4. A local user, repository reader, monitoring service, or other actor with access to one of these disclosure channels ...[truncated 940 chars]
Remediation
View remediation
"${BACKUP_DIR}/${DATE}/${DATABASE}.sql.gz" ``` 3. Prefer `mysql_config_editor` or an approved secrets manager when supported. Retrieve secrets at runtime without printing them or persisting them in source-controlled files. 4. Run the backup under a dedicated operating-system identity and a dedicated MySQL account. 5. Grant the MySQL account only the permissions required to perform the intended backup. Restrict its accessible schemas, source hosts, and network paths. 6. Prevent shell tracing around secret retrieval and ensure logs, monitoring tools, and error handlers do not capture credentials. 7. Rotate any production password previously embedded in a copied version of this template and inspect source-control history, backup archives, and logs for prior exposure. 8. Quote path and database variable expansions in the final script to reduce unrelated shell-expansion risks. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill includes backup and restore commands that can delete or overwrite data, such as 'find ... -exec rm -rf {} ;', 'rsync --delete', and direct restore commands into live destinations, but it does not clearly warn users about these destructive effects. In a documentation-only skill this is not inherently malicious, but users could copy-paste the examples into production and cause accidental data loss or irreversible overwrites.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document shows syncing backup data to cloud storage using S3-compatible destinations without warning that the operation may transfer sensitive business, user, configuration, or log data outside the local environment. This can lead to unintended data exposure, regulatory issues, or storage of unencrypted sensitive data in external infrastructure if users follow the example blindly.

Content

No source excerpt is available for this finding.

Cloud Storage Exfiltration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is uploaded to cloud storage (S3 / GCS / Azure Blob). This may be a legitimate backup or exfiltration to an external bucket. Manual review is recommended.

Content

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

md
${BACKUP_DIR}/${DATE}/

# 同步到云存储
aws s3 sync ${BACKUP_DIR}/${DATE}/ ${REMOTE_BUCKET}/${DATE}/

# 记录日志
echo "[$(date)] File backup completed" >> /var/log/backup.log

Cloud Storage Exfiltration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is uploaded to cloud storage (S3 / GCS / Azure Blob). This may be a legitimate backup or exfiltration to an external bucket. Manual review is recommended.

Content

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

md
${BACKUP_DIR}/${DATE}/

# 同步到云存储
aws s3 sync ${BACKUP_DIR}/${DATE}/ ${REMOTE_BUCKET}/${DATE}/

# 记录日志
echo "[$(date)] File backup completed" >> /var/log/backup.log

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

技能名称与描述全文采用中文表述,且没有说明这是面向特定中文用户群或提供其他语言选项。按规则,若技能在语言/locale 上形成默认强制约束而未提供选择,可能构成自然语言政策问题。

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.