T09 · Insecure Skill Coding Practices
- Location
scripts/audit.py:326- Finding
MEDIUM findings do not block documented publishing workflows
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This security-audit skill is mostly purpose-aligned, but it can copy detected secrets into logs and has fail-open checks that can give users false confidence.
Review this skill before installing in any workflow that handles real credentials. If used, treat its output as sensitive, avoid saving JSON or terminal logs where others can read them, do not rely on a clean exit as proof that all files were scanned, and replace the hardcoded Aladdin path and reporting instruction with your own local configuration.
scripts/audit.py:326MEDIUM findings do not block documented publishing workflows
scripts/audit.py:234The node_modules detection rule is unreachable
scripts/audit.py:248Git command failures are silently reported as clean scans
scripts/audit.py:234Unreadable files are silently omitted from the audit
scripts/audit.py:190Detected secrets are exposed in console and JSON output
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
---
name: zero2ai-security-audit
description: Security auditing for git commits, repos, and skills before publishing. Run automatically before any `git commit`, `git push`, or `clawhub publish`. Detects hardcoded secrets, API keys, tokens, absolute paths, committed node_modules, .env files, and other sensitive patterns. Use when reviewing code for security issues, pre-publishing skills, or investigating a potential secret exposure.
---
# Security Audit
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
---
name: zero2ai-security-audit
description: Security auditing for git commits, repos, and skills before publishing. Run automatically before any `git commit`, `git push`, or `clawhub publish`. Detects hardcoded secrets, API keys, tokens, absolute paths, committed node_modules, .env files, and other sensitive patterns. Use when reviewing code for security issues, pre-publishing skills, or investigating a potential secret exposure.
---
# Security Audit
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
{
"id": "refresh-token",
"severity": "MEDIUM",
"description": "Possible refresh/access token value",
"regex": r'(Atzr|Atza|ATNR)\|[A-Za-z0-9+/\|]{40,}',
},
{
The skill instructs users to run a local Python script and references capabilities consistent with shell, file access, and environment interaction, but it does not declare any explicit tool scope or permissions boundary. This can cause the skill to operate with broader-than-expected authority, reducing transparency and increasing the chance of unsafe execution in automation contexts.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def scan_git_files(mode='staged'):
if mode == 'staged':
result = subprocess.run(['git', 'diff', '--cached', '--name-only'], capture_output=True, text=True)
else:
result = subprocess.run(['git', 'diff', 'HEAD~1', '--name-only'], capture_output=True, text=True)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
if mode == 'staged':
result = subprocess.run(['git', 'diff', '--cached', '--name-only'], capture_output=True, text=True)
else:
result = subprocess.run(['git', 'diff', 'HEAD~1', '--name-only'], capture_output=True, text=True)
files = [f.strip() for f in result.stdout.split('\n') if f.strip()]
all_findings = []
The documentation reveals a specific absolute local path in a user's home directory, which unnecessarily discloses workstation structure and username information. While not directly exploitable on its own, such environmental details can aid targeting, social engineering, or path-dependent attacks when combined with other information.
The instruction 'Report to Aladdin immediately' is a natural-language policy constraint embedded in the skill documentation. It hard-codes an organization-specific escalation target without documenting context, alternatives, or opt-in, which can violate policy expectations when the skill is reused in other environments.
This code invokes external git commands via subprocess.run to inspect staged or last-commit files. Although the operation is non-destructive, the file provides no inline comment, log output, or other user disclosure around this shell execution path.