Back to skill

Security audit

proxy auto config

Security checks for vulnerabilities and agentic risk

Overview

This proxy setup skill is broadly purpose-aligned, but it makes persistent network/security changes with unsafe defaults that users should review before installing.

Install only if you are comfortable reviewing and modifying the scripts first. Avoid running the installer as-is on a machine with existing cron jobs, sensitive proxy credentials, or security-sensitive Gateway traffic; remove the TLS-disable settings, fix shell escaping, preserve existing crontab entries, and make persistence explicitly opt-in.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (6)

T06 · System Persistence

Error
Location
scripts/install_proxy_skill.py:90
Finding

Installer Automatically Establishes Cross-Session Persistence Through Cron and systemd

Content
View full analysis
> ~/.openclaw/logs/proxy_check.log 2>&1 @reboot cd ~/.openclaw/workspace/skills/proxy-auto-config && python3 scripts/gateway_proxy_setup.py >> ~/.openclaw/logs/gateway_proxy_setup.log 2>&1 """ cron_file = os.path.expanduser("~/.openclaw/proxy_cron") with open(cron_file, 'w') as f: f.write(cron_content) subprocess.run(['crontab', cron_file], check=True, capture_output=True) ``` ```python subprocess.run( ['systemctl', '--user', 'enable', 'openclaw-proxy-check.timer'], capture_output=True ) subprocess.run( ['systemctl', '--user', 'start', 'openclaw-proxy-check.timer'], capture_output=True ) ``` ```python create_cron_job() create_gateway_hook() create_systemd_integration() ``` ### Technical Analysis Running the installer automatically creates an hourly cron task, an `@reboot` task, and an enabled user-level systemd timer. These mechanisms continue executing after the original Skill invocation and across user sessions. Periodic proxy checking is part of the declared functionality, so the persistence is not hidden. However, the installer establishes two overlapping scheduling mechanisms without a dedicated opt-in, confirmation prompt, or choice of scheduler. It also does not provide uninstall or integrity-verification logic. The scheduled commands execute Python files from a writable path under the user's home directory. If those files are subsequently modified or replaced, cron and systemd will execute the changed content automatically. ### Attack Path 1. The user runs `python3 scripts/install_p ...[truncated 822 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
` installs the supplied file as the complete crontab for the current user. The installer does not first retrieve the current crontab with `crontab -l`, merge the Skill's entries, or preserve unrelated jobs. Consequently, installing this Skill can silently delete all existing scheduled tasks belonging to the user. This is unnecessary for the stated proxy-configuration purpose. ### Attack Path 1. A user has existing cron tasks for backups, maintenance, monitoring, or application operation. 2. The user runs ...[truncated 703 chars]:94
Finding

Installer Replaces the User's Entire Existing Crontab

Content
View full analysis
> ~/.openclaw/logs/proxy_check.log 2>&1 @reboot cd ~/.openclaw/workspace/skills/proxy-auto-config && python3 scripts/gateway_proxy_setup.py >> ~/.openclaw/logs/gateway_proxy_setup.log 2>&1 """ cron_file = os.path.expanduser("~/.openclaw/proxy_cron") with open(cron_file, 'w') as f: f.write(cron_content) subprocess.run(['crontab', cron_file], check=True, capture_output=True) ``` ### Technical Analysis Invoking `crontab ` installs the supplied file as the complete crontab for the current user. The installer does not first retrieve the current crontab with `crontab -l`, merge the Skill's entries, or preserve unrelated jobs. Consequently, installing this Skill can silently delete all existing scheduled tasks belonging to the user. This is unnecessary for the stated proxy-configuration purpose. ### Attack Path 1. A user has existing cron tasks for backups, maintenance, monitoring, or application operation. 2. The user runs the Skill installer. 3. The installer creates a file containing only the two OpenClaw entries. 4. `crontab ~/.openclaw/proxy_cron` replaces the user's complete crontab. 5. All pre-existing jobs stop running. ### Impact Assessment The issue causes loss of scheduled operations under the current user's account. Depending on the removed jobs, this can disable backups, monitoring, certificate renewal, synchronization, or other availability and security controls. It does not directly elevate privileges, but it can cause significant integrity and availability impact. ]]>
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/proxy_detector.py:365
Finding

Untrusted Proxy URLs Are Embedded in Executable Shell Scripts Without Escaping

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/gateway_proxy_setup.py:105
Finding

Gateway Configuration Globally Disables Node.js TLS Certificate Verification

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/simple_proxy_check.py:23
Finding

Proxy URLs and Potential Credentials Are Printed and Stored in Permissively Accessible Files

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/install_proxy_skill.py:43
Finding

Installer Downloads and Installs Unpinned Python Dependencies at Runtime

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (50)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The documented purpose omits sensitive behaviors such as reading shell startup files and proxy configs, collecting detailed process metadata, invoking system tools like ss, persisting detection artifacts to disk, and contacting external services such as httpbin.org. In security context, undisclosed host reconnaissance and outbound network access materially increase risk, especially for an auto-triggered skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documented purpose omits sensitive behaviors such as reading shell startup files and proxy configs, collecting detailed process metadata, invoking system tools like ss, persisting detection artifacts to disk, and contacting external services such as httpbin.org. In security context, undisclosed host reconnaissance and outbound network access materially increase risk, especially for an auto-triggered skill.

Content

No source excerpt is available for this finding.

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

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

config

应用配置

source ~/.openclaw/proxy_config/configure_proxy.sh

text

### 示例 2: Gateway 集成
```bash
# 配置 Gateway 代理
python3 scripts/gateway_proxy_setup.py --config-dir ~/.openclaw

# 查看 Gateway 配置
cat ~/.openclaw/gateway.json | jq '.plugins["http-proxy"]'

# 使用代理启动 Gateway
openclaw-proxy start

示例 3: 定时检查

bash
# 查看定时任务
crontab -l | grep openclaw

# 查看检查日志
tail -f ~/.openclaw/logs/proxy_check.log

# 手动运行检查
python3 scripts/proxy_detector.py --configure

示例 4: 故障排除

bash
# 测试代理连接
python3 scripts/proxy_detector.py --test --configure

# 查看详细日志
tail -f ~/.openclaw/logs/proxy_setup.log

# 重置配置
rm -rf ~/.openclaw/proxy_config/
python3 scripts/install_proxy_skill.py

脚本文件

scripts/ 目录

包含所有可执行的 Python 脚本:

  1. proxy_detector.py - 核心代理检测脚本
    • 自动检测系统代理配置

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

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

tail -f ~/.openclaw/logs/proxy_setup.log

重置配置

rm -rf ~/.openclaw/proxy_config/ python3 scripts/install_proxy_skill.py

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

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).

Content

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

tail -f ~/.openclaw/logs/proxy_setup.log

重置配置

rm -rf ~/.openclaw/proxy_config/ python3 scripts/install_proxy_skill.py

text

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code unconditionally sets NODE_TLS_REJECT_UNAUTHORIZED=0, which disables TLS certificate validation for Node.js processes. This allows man-in-the-middle interception and spoofing of HTTPS connections, and is broader than proxy setup requires because it weakens transport security for all Node traffic in the affected process environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

TLS verification is disabled without explicit warning or confirmation before modifying the process environment. In a proxy auto-configuration tool, this is especially dangerous because users may expect connectivity fixes, not a silent downgrade of HTTPS authenticity guarantees.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The generated startup script persistently exports NODE_TLS_REJECT_UNAUTHORIZED=0, causing future Gateway launches through that script to run with weakened HTTPS validation. This creates an easy path for interception of traffic and makes the insecure state repeatable across sessions.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The generated systemd service bakes NODE_TLS_REJECT_UNAUTHORIZED=0 into a persistent service definition without explicit user warning. Because services may restart automatically, this can continuously run Gateway with disabled certificate validation, extending exposure over time.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README encourages automatic proxy configuration and shell sourcing that can alter user and application network behavior, including persistent startup automation, without prominently warning users about the scope of those changes or the risk of routing all traffic through a proxy. In this skill context, that is more dangerous because the stated purpose is to auto-detect and auto-apply proxy settings for OpenClaw Gateway, so users may execute commands that silently change connectivity, trust boundaries, and privacy posture.

Content

No source excerpt is available for this finding.

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

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

python3 scripts/proxy_detector.py --verbose --debug

查看生成的配置

ls -la ~/.openclaw/proxy_config/ cat ~/.openclaw/proxy_config/configure_proxy.sh

text

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill declares broad capabilities to read environment variables, inspect files and processes, write configuration files, invoke shell commands, and perform network actions, but it does not declare any tool scope or permission boundaries. That creates an overprivileged and non-transparent skill surface, making it easier for a user or orchestrator to invoke sensitive behavior without informed consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill is described as auto-triggering whenever the system is using a proxy network environment, but no narrow activation criteria are defined. Overly broad trigger conditions can cause unintended execution of system-modifying logic in contexts where the user did not request it, increasing the chance of surprise persistence or configuration drift.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The markdown advertises automatic configuration of environment variables, gateway settings, startup scripts, and system-level proxy settings without prominent warnings about the impact of these changes. Silent or poorly disclosed system modification is risky because it can alter network routing, application behavior, and startup state across future sessions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill describes creating periodic tasks, startup hooks, and systemd integration without clearly warning that these are persistent changes that survive the current session. Persistence mechanisms are security-sensitive because they can continuously reapply behavior, expand blast radius, and resemble common foothold techniques if not transparently disclosed.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

示例 3: 定时检查

bash
# 查看定时任务
crontab -l | grep openclaw

# 查看检查日志
tail -f ~/.openclaw/logs/proxy_check.log

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The listed scenarios for automatic activation include Gateway startup, network changes, proxy process changes, and manual requests, but they lack clear boundaries and safety checks. In practice this can lead to repeated or unintended invocations that modify environment variables, files, or service state without a deliberate user decision each time.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
97% confidence
Finding

Embedding NODE_TLS_REJECT_UNAUTHORIZED="0" in the generated startup script creates an insecure default for normal use. In this skill's context, proxy automation does not justify default TLS-disable behavior, so the default meaningfully increases the chance of traffic interception or spoofed upstream services.

Content

Scanner excerpt · scripts/gateway_proxy_setup.py (reported line 133)May include surrounding context.

python
export ALL_PROXY="{proxy_url}"

# Node.js 设置
export NODE_TLS_REJECT_UNAUTHORIZED="0"

# 启动 OpenClaw Gateway
echo "使用代理启动 OpenClaw Gateway: {proxy_url}"

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script creates a persistent user systemd service that survives beyond the immediate proxy-detection/setup task. In this skill context, persistence expands the blast radius of a bad proxy configuration and can cause future Gateway runs to inherit insecure settings automatically, especially since the service also embeds disabled TLS verification.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
97% confidence
Finding

Setting NODE_TLS_REJECT_UNAUTHORIZED=0 in the generated systemd unit makes insecure transport behavior the default for the persisted service. Because the unit may auto-restart and be reused long-term, the unsafe default is amplified compared with a one-time interactive session.

Content

Scanner excerpt · scripts/gateway_proxy_setup.py (reported line 164)May include surrounding context.

python
Environment="HTTP_PROXY={proxy_url}"
Environment="HTTPS_PROXY={proxy_url}"
Environment="ALL_PROXY={proxy_url}"
Environment="NODE_TLS_REJECT_UNAUTHORIZED=0"
WorkingDirectory={self.config_dir}
ExecStart=/usr/bin/openclaw gateway start
Restart=on-failure

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/gateway_proxy_setup.py (reported line 263)May include surrounding context.

python
if service_path:
            print(f"\n🔧 systemd 服务:")
            print(f"   服务文件: {service_path}")
            print(f"   启用服务: systemctl --user enable openclaw-gateway-proxy")
            print(f"   启动服务: systemctl --user start openclaw-gateway-proxy")
        
        print(f"\n📁 配置文件:")

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The CLI advertises --no-gateway-config and --no-startup-script safety/control flags, but the implementation ignores them and still performs those actions. This undermines user consent and operational safeguards, causing unexpected file modification and persistence-related side effects even when the user tries to disable them.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/install_proxy_skill.py (reported line 26)May include surrounding context.

python
# 检查 Python 3
    try:
        subprocess.run(['python3', '--version'], capture_output=True, check=True)
        print("✅ Python 3 已安装")
    except:
        missing.append('python3')

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Auto-installing Python packages gives the skill the ability to fetch and install additional code from package sources, which is broader than simple proxy setup. In an adversarial or compromised environment, this creates a supply-chain risk and silently changes the user's Python environment.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
78% confidence
Finding

The installer automatically runs pip install to add software to the environment, which extends the skill's capabilities beyond proxy configuration and performs network-retrieved code installation. Even with a fixed package list, this is a meaningful supply-chain and environment-modification risk in an agent skill installer.

Content

Scanner excerpt · scripts/install_proxy_skill.py (reported line 62)May include surrounding context.

python
return False
        elif dep in ['psutil', 'requests']:
            try:
                subprocess.run([sys.executable, '-m', 'pip', 'install', dep], 
                             check=True, capture_output=True)
                print(f"✅ 已安装 {dep}")
            except subprocess.CalledProcessError as e: