Back to skill

Security audit

Yunshang Aifei Cli Share

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real OA client, but it has broad production account access and security weaknesses that could leak session/API keys or cause unintended business changes.

Review before installing. Use only with a dedicated low-privilege OA account and a dedicated model-provider key, avoid the raw command, do not run production write actions without separate confirmation, and fix HTTPS transport plus protected token storage before handling sensitive business, HR, or finance data.

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

T09 · Insecure Skill Coding Practices

Error
Location
aifei_api.py:115
Finding

OA bearer token disclosure through unrestricted absolute URLs

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
aifei_api.py:80
Finding

Login credentials and bearer tokens transmitted over plaintext HTTP

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
aifei_api.py:156
Finding

Reusable OA session tokens stored in plaintext with default file permissions

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
modules/captcha_solver.py:27
Finding

CAPTCHA module accesses Agent-wide provider credentials beyond least privilege

Content
View full analysis
tuple: key = os.getenv('DASHSCOPE_API_KEY') base = os.getenv('DASHSCOPE_BASE_URL', '') if key: if not base: base = 'https://dashscope.aliyuncs.com/compatible-mode/v1' return key, base openclaw_paths = [ Path.home() / '.openclaw' / 'openclaw.json', Path(__file__).parent.parent.parent.parent / 'openclaw.json', ] for config_path in openclaw_paths: if config_path.exists(): try: config = json.loads(config_path.read_text(encoding='utf-8')) providers = config.get('models', {}).get('providers', {}) for name, provider in providers.items(): base_url = provider.get('baseUrl', '') if 'dashscope' in base_url or 'alibaba' in name: api_key = provider.get('apiKey', '') if api_key and api_key != '__OPENCLAW_REDACTED__': return api_key, base_url except Exception: pass ``` ```python response = requests.post( f'{base_url}/chat/completions', json={ 'model': CAPTCHA_MODEL, 'messages': [{ 'role': 'user', 'content': [ {'type': 'image_url', 'image_url': {'url': f'data:image/png;base64,{image_base64}'}}, {'type': 'text', 'text': 'Recognize the arithmetic CAPTCHA and return the expression and answer.'} ] }] }, headers={ 'Authorization': f'Bearer {api_key}', 'Content-Type': 'application/json' }, timeout=15 ) ``` ### Technical Analysis When a Skill-scoped API key is absent, the module searches glob ...[truncated 1966 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Third-party dependencies are installed without version or integrity constraints

Content
View full analysis
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
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (42)

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 · README.md (reported line 18)May include surrounding context.

复制 .env.example 为 .env,填入你的云上艾飞账号:

bash
cp .env.example .env
ini

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The raw command accepts arbitrary paths and methods and forwards them directly through the authenticated client, effectively exposing a generic API proxy to the operator. In a skill intended for curated business queries, this bypasses any command-level safety, least-privilege scoping, or business logic restrictions and can be used to access or modify unintended resources.

Content

No source excerpt is available for this finding.

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 · aifei_api.py (reported line 6)May include surrounding context.

python
"""
云上艾飞 API 客户端(分享版)
SM4 加解密 + Cookie Token 认证
账号密码从 .env 文件读取,不含任何硬编码敏感信息
"""

import sys

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 · aifei_api.py (reported line 19)May include surrounding context.

python
"""
云上艾飞 API 客户端(分享版)
SM4 加解密 + Cookie Token 认证
账号密码从 .env 文件读取,不含任何硬编码敏感信息
"""

import sys

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 · aifei_api.py (reported line 70)May include surrounding context.

python
"""
云上艾飞 API 客户端(分享版)
SM4 加解密 + Cookie Token 认证
账号密码从 .env 文件读取,不含任何硬编码敏感信息
"""

import sys

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 · aifei_api.py (reported line 75)May include surrounding context.

python
"""
云上艾飞 API 客户端(分享版)
SM4 加解密 + Cookie Token 认证
账号密码从 .env 文件读取,不含任何硬编码敏感信息
"""

import sys

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 · modules/captcha_solver.py (reported line 8)May include surrounding context.

python
"""
云上艾飞 API 客户端(分享版)
SM4 加解密 + Cookie Token 认证
账号密码从 .env 文件读取,不含任何硬编码敏感信息
"""

import sys

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 · modules/captcha_solver.py (reported line 56)May include surrounding context.

python
"""
云上艾飞 API 客户端(分享版)
SM4 加解密 + Cookie Token 认证
账号密码从 .env 文件读取,不含任何硬编码敏感信息
"""

import sys

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 · aifei_api.py (reported line 20)May include surrounding context.

python
from dotenv import load_dotenv

# 加载 .env
load_dotenv(Path(__file__).parent / '.env')

# 确保 UTF-8 输出
if sys.stdout.encoding != 'utf-8':

eval() call detected

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

Direct eval() call evaluates arbitrary expressions. This can be exploited to execute malicious code or exfiltrate data.

Content

Scanner excerpt · modules/captcha_solver.py (reported line 75)May include surrounding context.

python
# 验算
        op_map = {'+': '+', '-': '-', '×': '*', 'x': '*', 'X': '*', '*': '*', '÷': '/', '/': '/'}
        try:
            calc = str(int(eval(f'{num1}{op_map.get(op, op)}{num2}')))
            if calc != model_answer:
                print(f'[验证码] ⚠️ 模型={model_answer} 计算={calc},使用计算结果')
                return calc

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README states that captcha solving is performed automatically via an AI model and references use of a third-party API key, but it does not clearly disclose what data is transmitted to that external service during login. Even if only the captcha image is sent, this occurs in an authentication flow and may expose sensitive login-adjacent data or create compliance/privacy concerns for users who assume the tool is fully internal.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Line L003 explicitly claims the skill has 'zero browser dependency' as a pure API client. Later, the documented file structure lists login.py as 'Playwright 登录(备用)', which contradicts that claim because Playwright is a browser automation dependency.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The top-level description states there is no browser dependency. However, the dependency section explicitly lists Playwright for fallback login, which directly contradicts the claim of zero browser dependence rather than merely omitting an implementation detail.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill documents write-capable operations such as weekly comments and task creation against a production OA system without any warning, confirmation requirement, or safety guidance. In an agent setting, that materially increases the risk of unintended remote state changes, spam, workflow disruption, or unauthorized business actions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is presented as an OA system API client, but it also documents a DingTalk robot webhook push that sends content to an external third-party service. This expands the skill's data-flow surface and creates a clear exfiltration/notification channel for internal OA data without any stated guardrails, consent prompts, or scope limitation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The DingTalk webhook example transmits message content and user mentions to an external service, yet the documentation provides no warning about outbound data sharing or notification impact. This can lead to accidental disclosure of internal information and unsolicited paging of real users.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The documented requests.post(webhook, json=...) performs a direct external network transmission to DingTalk, creating an outbound channel that can carry OA-derived content, mentions, and potentially sensitive business data. In the context of an internal OA client, this is especially risky because it bridges internal system access with external messaging in a single skill.

Content

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

python
import requests
webhook = 'https://oapi.dingtalk.com/robot/send?access_token=daf5fd...'
requests.post(webhook, json={
    'msgtype': 'markdown',
    'markdown': {'title': '标题', 'text': '@康楠 内容...'},
    'at': {'atMobiles': ['手机号'], 'isAtAll': False}

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The top-level CLI docstring lists several read-only business commands but omits the raw subcommand that can perform arbitrary API calls, including state-changing requests. This mismatch hides a materially more powerful capability from users and reviewers, increasing the risk of misuse and reducing informed consent around what the tool can do.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The raw subcommand allows arbitrary POST and PUT requests with user-supplied JSON and executes them immediately, with no warning, dry-run mode, or confirmation prompt. That makes accidental or impulsive state-changing operations much more likely, especially against production because the default environment is prod.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module docstring explicitly claims there is no hardcoded sensitive information, but the file contains a fixed SM4 key in source code. A hardcoded cryptographic key is sensitive because anyone with code access can decrypt protected payloads or forge encrypted requests, and the misleading comment may cause reviewers to overlook the exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The client writes the bearer token to a local JSON file in the script directory without setting restrictive permissions, encryption, or warning the user. If another local user, process, backup system, or accidental commit accesses that file, the token can be reused to impersonate the account until expiry.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% 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 · api-catalog.json (reported line 2194)May include surrounding context.

json
{
              "method": "POST",
              "path": "/contractRecoupPlan/recoupPlanList",
              "methodName": "recoupList",
              "comment": "查询合同回款计划列表"
            },
            {

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% 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 · api-catalog.json (reported line 2247)May include surrounding context.

json
{
              "method": "POST",
              "path": "/contractRecoupPlan/recoupPlanList",
              "methodName": "recoupList",
              "comment": "查询合同回款计划列表"
            },
            {

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% 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 · api-catalog.json (reported line 2248)May include surrounding context.

json
{
              "method": "POST",
              "path": "/contractRecoupPlan/recoupPlanList",
              "methodName": "recoupList",
              "comment": "查询合同回款计划列表"
            },
            {

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% 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 · api-catalog.json (reported line 2493)May include surrounding context.

json
{
              "method": "POST",
              "path": "/contractRecoupPlan/recoupPlanList",
              "methodName": "recoupList",
              "comment": "查询合同回款计划列表"
            },
            {