Back to skill

Security audit

Jason's OpenClaw Security Scanner

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real OpenClaw security scanner, but it can expose secrets in its own output and can make unattended workspace changes.

Review before installing. Run scan-only first, avoid --json and repair modes with real secrets until output redaction is fixed, and do not use --fix-all unless you are comfortable with edits to .gitignore, rule files, and workspace permissions.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/scan_security.py:205
Finding

Full AppSecret Exposed Through JSON and Repair Output

Content
View full analysis
Dict: """修复:提示用户设置环境变量""" return { "success": False, "message": "需要手动设置环境变量", "detail": f"请在 shell 配置文件中添加:\n export {fix['var_name']}='{fix['var_value']}'\n然后从 {fix['config_file']} 中删除 {fix['config_path']}" } ``` ```python if args.json: print(json.dumps(report, ensure_ascii=False, indent=2)) elif args.fix is not None: result = scanner.execute_fix(args.fix) if result['success']: print(f"✅ {result['message']}") else: print(f"⚠️ {result['message']}") if result.get('detail'): print(f" {result['detail']}") ``` ### Technical Analysis Although the human-readable finding masks the Feishu AppSecret, the scanner stores the complete secret in the `auto_fix.var_value` field. The complete report object is subsequently serialized by the `--json` mode, exposing the secret without masking. The repair path also incorporates the complete value into a shell export instruction and prints that instruction to standard output. Consequently, a security tool intended to detect sensitive-data exposure creates an additional disclosure channel. Standard output is frequently retained in terminal scrollback, CI/CD logs, monitoring systems, support transcripts, or redirected report files. Anyone wi ...[truncated 1302 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/scan_security.py:288
Finding

Unnecessary Full-Content Reads of SSH Private-Key Files

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (22)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill is described primarily as a security scanner, but the documented behavior includes modifying configuration files, changing file permissions via chmod, and performing bulk automatic fixes. That mismatch is dangerous because users or orchestrators may invoke it expecting read-only analysis, while it can make privileged, potentially destructive system changes.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/scan_security.py

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/scan_security.py

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/scan_security.py

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/scan_security.py

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/scan_security.py

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 · scripts/scan_security.py (reported line 62)May include surrounding context.

python
# 敏感文件名
SENSITIVE_FILES = [
    ".env", ".env.local", ".env.production", ".env.development",
    "credentials.json", "secrets.json",
    "id_rsa", "id_ed25519"
]

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 · scripts/scan_security.py (reported line 62)May include surrounding context.

python
# 敏感文件名
SENSITIVE_FILES = [
    ".env", ".env.local", ".env.production", ".env.development",
    "credentials.json", "secrets.json",
    "id_rsa", "id_ed25519"
]

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 · scripts/scan_security.py (reported line 62)May include surrounding context.

python
# 敏感文件名
SENSITIVE_FILES = [
    ".env", ".env.local", ".env.production", ".env.development",
    "credentials.json", "secrets.json",
    "id_rsa", "id_ed25519"
]

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 · scripts/scan_security.py (reported line 62)May include surrounding context.

python
# 敏感文件名
SENSITIVE_FILES = [
    ".env", ".env.local", ".env.production", ".env.development",
    "credentials.json", "secrets.json",
    "id_rsa", "id_ed25519"
]

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/scan_security.py (reported line 63)May include surrounding context.

python
# 敏感文件名
SENSITIVE_FILES = [
    ".env", ".env.local", ".env.production", ".env.development",
    "credentials.json", "secrets.json",
    "id_rsa", "id_ed25519"
]

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/scan_security.py (reported line 63)May include surrounding context.

python
# 敏感文件名
SENSITIVE_FILES = [
    ".env", ".env.local", ".env.production", ".env.development",
    "credentials.json", "secrets.json",
    "id_rsa", "id_ed25519"
]

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 · scripts/scan_security.py (reported line 301)May include surrounding context.

python
if file == pattern or file.startswith(pattern.split('.')[0] + '.'):
                        self._check_env_file(file_path)
                
                if file.endswith(('.env', '.json', '.yaml', '.yml')):
                    self._check_file_content(file_path)
        
        print("✅ 敏感信息扫描完成")

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 · scripts/scan_security.py (reported line 307)May include surrounding context.

python
print("✅ 敏感信息扫描完成")
    
    def _check_env_file(self, file_path: Path):
        """检查 .env 文件"""
        try:
            with open(file_path, 'r', encoding='utf-8', errors='ignore') as f:
                content = f.read()

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 · scripts/scan_security.py (reported line 550)May include surrounding context.

python
print("✅ 敏感信息扫描完成")
    
    def _check_env_file(self, file_path: Path):
        """检查 .env 文件"""
        try:
            with open(file_path, 'r', encoding='utf-8', errors='ignore') as f:
                content = f.read()

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises executable behaviors that include reading files, writing files, and invoking shell commands, but it declares no explicit tool scope or permissions boundary. In an agent environment, this creates an authorization gap where a scanning skill may unexpectedly perform state-changing actions, increasing the chance of misuse or overreach.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest description and the entire skill documentation are written as directives in Chinese, with no indication that the skill can operate in other languages or that Chinese output is optional. This creates a language/locale policy concern because the skill appears to impose 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
95% confidence
Finding

The module description states the tool scans configuration and generates a report in Chinese, and the user-facing strings throughout the script are Chinese-only. This imposes a specific language choice on users without offering a locale option or documenting that the tool is intentionally region-specific.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The remediation path for environment-variable migration prints the full secret value back to stdout in an export command. Console output is commonly captured in logs, terminals, CI records, or agent transcripts, so this behavior can amplify an existing secret exposure and leak credentials to additional storage locations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill advertises scanning with interactive one-click repair, but the CLI also supports non-interactive repair paths such as --fix and --fix-all that directly modify files and permissions. In an agent setting, this creates a safety gap because a caller can trigger unattended state-changing actions without per-action confirmation, increasing the chance of unintended repository or workspace changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Automatic fix mode applies all available fixes without any per-action warning or confirmation, including chmod changes and edits to workspace files. In an agent or automation context, bulk unattended modifications can be abused or accidentally triggered, causing policy changes, masking of sensitive files, or permission drift without user review.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The _fix_content_update docstring claims to perform a content update, suggesting the file's sensitive contents will be changed. In reality, the function only creates or appends to .gitignore, leaving the sensitive content in place, which materially contradicts the documented intent of the routine.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.