Back to skill

Security audit

Encrypted File Reader

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed local file reader, but it can read and print sensitive files such as environment and infrastructure state files without safeguards.

Review this skill before installing. Use it only on files you intentionally choose, and avoid pointing it at secrets, production environment files, cloud state files, private configs, or untrusted Office documents unless you are prepared for their contents to be exposed to the agent output.

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
read_file.py:76
Finding

Unbounded Office archive decompression can cause resource exhaustion

Content
View full analysis
]*>([^<]*)', content) for match in matches: texts.append(match.decode('utf-8')) return '\n'.join(texts) def read_xlsx(file_path): """读取 Excel 表格 (.xlsx) 内容""" texts = [] with zipfile.ZipFile(file_path, 'r') as z: # 读取 sharedStrings.xml try: content = z.read('xl/sharedStrings.xml') # 提取所有 t 标签中的文本 matches = re.findall(b'([^<]*)', content) for match in matches: texts.append(match.decode('utf-8')) except KeyError: # 如果没有 sharedStrings.xml,尝试读取 worksheets for name in z.namelist(): if name.startswith('xl/worksheets/sheet') and name.endswith('.xml'): content = z.read(name) # 提取 cell 中的值 matches = re.findall(b'([^<]*)', content) for match in matches: try: texts.append(match.decode('utf-8')) except: pass return '\n'.join(texts) ``` ### Technical Analysis DOCX and XLSX documents are ZIP archives. The implementation calls `ZipFile.read()` on archive entries without validating the input file size, uncompressed entry size, cumulative uncompressed size, compression ratio, or number of worksheet entries. `ZipFile.read()` decompresses an ent ...[truncated 1998 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

The skill explicitly advertises reading arbitrary local files including sensitive configuration files such as .env, and frames itself as usable for 'encrypted/protected' files accessible via authorized applications. In an agent setting, this materially increases the risk of secret disclosure, because .env files commonly contain API keys, tokens, passwords, and database credentials that could be exfiltrated through stdout.

Content

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

md
|------|--------|
| **文本类** | .txt, .md, .markdown, .log, .csv, .tsv |
| **代码类** | .java, .py, .js, .ts, .jsx, .tsx, .c, .cpp, .h, .cs, .go, .rs, .rb, .php, .vue, .svelte |
| **配置类** | .json, .json5, .xml, .yaml, .yml, .toml, .ini, .cfg, .conf, .properties, .gradle, .config, .env |
| **Web 前端** | .html, .htm, .css, .scss, .sass, .less, .styl |
| **脚本类** | .sh, .bash, .bat, .cmd, .ps1, .sql, .graphql |
| **Git 相关** | .gitignore, .gitattributes, .gitmodules, .editorconfig |

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

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

md
- **文本类**: .txt, .md, .markdown, .rst, .log, .csv, .tsv
- **代码类**: .java, .py, .js, .ts, .jsx, .tsx, .c, .cpp, .h, .cs, .go, .rs, .rb, .php, .vue
- **配置类**: .json, .xml, .yaml, .yml, .toml, .ini, .cfg, .properties, .gradle, .config, .env
- **样式类**: .html, .htm, .css, .scss, .sass, .less
- **脚本类**: .sh, .bash, .bat, .cmd, .ps1, .sql
- **Word 文档**: .docx

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

Support for .env.production is especially risky because production environment files commonly contain live credentials for external services and databases. Directly reading and printing these values could lead to immediate compromise of production systems.

Content

Scanner excerpt · read_file.py (reported line 60)May include surrounding context.

python
'.sql', '.graphql', '.gql',
    
    # 配置文件
    '.config', '.env', '.env.example', '.env.local', '.env.production',
    '.htaccess', '.editorconfig', '.gitignore', '.gitattributes', '.gitmodules',
    '.dockerfile', '.dockerignore',
    '.makefile', '.mk', '.cmake',

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

Support for .env.production is especially risky because production environment files commonly contain live credentials for external services and databases. Directly reading and printing these values could lead to immediate compromise of production systems.

Content

Scanner excerpt · read_file.py (reported line 60)May include surrounding context.

python
'.sql', '.graphql', '.gql',
    
    # 配置文件
    '.config', '.env', '.env.example', '.env.local', '.env.production',
    '.htaccess', '.editorconfig', '.gitignore', '.gitattributes', '.gitmodules',
    '.dockerfile', '.dockerignore',
    '.makefile', '.mk', '.cmake',

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

Support for .env.production is especially risky because production environment files commonly contain live credentials for external services and databases. Directly reading and printing these values could lead to immediate compromise of production systems.

Content

Scanner excerpt · read_file.py (reported line 60)May include surrounding context.

python
'.sql', '.graphql', '.gql',
    
    # 配置文件
    '.config', '.env', '.env.example', '.env.local', '.env.production',
    '.htaccess', '.editorconfig', '.gitignore', '.gitattributes', '.gitmodules',
    '.dockerfile', '.dockerignore',
    '.makefile', '.mk', '.cmake',

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill documentation is written entirely in Chinese, including usage, warnings, and legal notes, with no indication that users may choose another language or locale. This can violate a language/locale policy when a skill imposes a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The package description is written entirely in Chinese and presents the skill in a single language, with no indication that users may choose another language or locale. This can violate language/locale policy when a skill implicitly mandates one language without opt-in or documented regional justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The program accepts an arbitrary local path, reads the file, and prints its raw contents with no path restriction, sensitivity checks, or warning to the user. In a skill/agent environment, this creates a straightforward local file exfiltration primitive that can disclose credentials, tokens, private documents, and system configuration data.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script explicitly supports reading secret-bearing file types such as .env and .tfstate and then prints their contents directly to stdout. In an agent skill context, unrestricted local file disclosure can expose API keys, cloud credentials, database passwords, and infrastructure state far beyond what is necessary for ordinary document reading.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

Natural-language instructions, usage text, and descriptions are presented only in Chinese. If organizational policy requires not forcing a specific language without user choice, this is a language-policy issue because no alternate language or opt-in mechanism is provided.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.