Back to skill

Security audit

bidding-tracker

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent bidding-management tool, but its document evaluation and CLI identity handling create review-worthy local data and role-access risks.

Install only for a trusted single-user or tightly controlled OpenClaw/WeCom environment. Do not expose the CLI or project_data.file to untrusted users, run it from trusted directories only, and restrict database plus attachment permissions because evaluation can read local files accessible to the skill process.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
bidding_tracker/skill.py:158
Finding

Arbitrary Local File Disclosure Through the Tender Evaluation Function

Content
View full analysis
tuple[str, str]: """Extract document text and return (content, error). Supports PDF, Word, and plain text.""" path = os.path.abspath(file_path) if not os.path.exists(path): return "", f"File does not exist: {path}" ext = os.path.splitext(path)[1].lower() if ext == '.pdf': try: from pypdf import PdfReader reader = PdfReader(path) pages = [page.extract_text() or "" for page in reader.pages] return "\n".join(pages), "" except ImportError: return "", "Missing dependency: install pypdf" except Exception as e: return "", f"PDF parsing failed: {e}" elif ext == '.docx': try: import docx doc = docx.Document(path) paragraphs = [p.text for p in doc.paragraphs if p.text.strip()] return "\n".join(paragraphs), "" except ImportError: return "", "Missing dependency: install python-docx" except Exception as e: return "", f"Word document parsing failed: {e}" else: try: with open(path, encoding='utf-8') as f: return f.read(), "" except Exception as e: return "", f"File reading failed: {e}" ``` ```python def cmd_evaluate(args, user_id: str): """Parse a tender document and assemble an analysis prompt for OpenClaw.""" if not args.file: return {"status": "error", "message": "A file path is required"} text, err = extract_document_text(args.file) if err: return {"status": "error", "message": err} if not text.strip(): ...[truncated 3310 chars]
Remediation
View remediation
Path: path = Path(candidate).resolve(strict=True) try: path.relative_to(UPLOAD_ROOT) except ValueError: raise PermissionError("The file is outside the authorized attachment directory") return path ``` 4. Reject unsupported extensions rather than treating every other file as plain text. Use an explicit allowlist such as `.pdf`, `.docx`, and `.txt`. 5. Verify that the attachment belongs to a project accessible to the requesting user. 6. Consider restricting `evaluate` to directors if managers do not require independent document evaluation. 7. Run document parsing under a minimally privileged service account with no access to unrelated credentials or host configuration. 8. Apply file-size and parser resource limits to reduce denial-of-service exposure from oversized or malformed documents. 9. Avoid returning raw document contents when only an analysis result is required; pass content through a narrowly scoped internal processing channel instead. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
bidding_tracker/skill.py:524
Finding

CLI User Identity Spoofing Allows Role Impersonation

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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (86)

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 25)May include surrounding context.

输出:数据库初始化完成:data/bids.db

3. 配置(可选)

cp .env.example .env

编辑 .env,设置 DB_PATH 等参数

text

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill declares a narrow bidding-management purpose but also documents reading local .env files, user home configuration, and exposing storage-path behavior. This undisclosed configuration and filesystem reach increases the risk of unintended local data access and makes the tool more dangerous than its business description suggests.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill declares a narrow bidding-management purpose but also documents reading local .env files, user home configuration, and exposing storage-path behavior. This undisclosed configuration and filesystem reach increases the risk of unintended local data access and makes the tool more dangerous than its business description suggests.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill declares a narrow bidding-management purpose but also documents reading local .env files, user home configuration, and exposing storage-path behavior. This undisclosed configuration and filesystem reach increases the risk of unintended local data access and makes the tool more dangerous than its business description suggests.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
75% confidence
Finding

Loading configuration from Path.cwd()/.env means the effective configuration can be influenced by whichever directory the process is started in. In environments where an attacker can control or entice execution from an untrusted working directory, they may be able to inject configuration values such as DB_PATH or ATTACHMENTS_DIR, causing the application to read/write unintended files or use attacker-chosen resources.

Content

Scanner excerpt · bidding_tracker/config.py (reported line 61)May include surrounding context.

python
# 快照进程原有的键(这些键不会被覆盖)
    original_keys: frozenset[str] = frozenset(os.environ.keys())

    user_env = Path.home() / ".config" / "bidding-tracker" / ".env"
    cwd_env = Path.cwd() / ".env"

    # 读取两个文件,CWD 优先(后者覆盖前者相同的键)

Credential Access

High
Category
Privilege Escalation
Confidence
75% confidence
Finding

The explicit use of both a user config .env and a current-directory .env creates a configuration injection surface, especially with CWD taking precedence. If the application is launched from an attacker-controlled directory, local configuration can override safe defaults and redirect storage paths or other behavior in ways the operator may not expect.

Content

Scanner excerpt · bidding_tracker/config.py (reported line 62)May include surrounding context.

python
original_keys: frozenset[str] = frozenset(os.environ.keys())

    user_env = Path.home() / ".config" / "bidding-tracker" / ".env"
    cwd_env = Path.cwd() / ".env"

    # 读取两个文件,CWD 优先(后者覆盖前者相同的键)
    merged = _read_dotenv(user_env)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · bidding_tracker/skill.py (reported line 148)May include surrounding context.

python
"""运行 scripts/ 下的脚本"""
    script_path = os.path.join(SCRIPTS_DIR, script_name)
    cmd = [sys.executable, script_path] + args
    env = os.environ.copy()
    env['DB_PATH'] = db_path or get_db_path()
    # 确保子进程能够导入 bidding_tracker 包
    project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

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 · bidding_tracker/config.py (reported line 2)May include surrounding context.

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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 · bidding_tracker/config.py (reported line 23)May include surrounding context.

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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 · bidding_tracker/config.py (reported line 47)May include surrounding context.

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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 · bidding_tracker/config.py (reported line 50)May include surrounding context.

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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 · bidding_tracker/config.py (reported line 51)May include surrounding context.

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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 · bidding_tracker/config.py (reported line 77)May include surrounding context.

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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 · bidding_tracker/config.py (reported line 85)May include surrounding context.

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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 · bidding_tracker/config.py (reported line 87)May include surrounding context.

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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 · bidding_tracker/config.py (reported line 96)May include surrounding context.

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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 · bidding_tracker/config.py (reported line 109)May include surrounding context.

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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 · build/lib/milb_tracker/config.py (reported line 2)May include surrounding context.

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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 · build/lib/milb_tracker/config.py (reported line 6)May include surrounding context.

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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 · build/lib/milb_tracker/config.py (reported line 7)May include surrounding context.

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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 · build/lib/milb_tracker/config.py (reported line 23)May include surrounding context.

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

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 · build/lib/milb_tracker/config.py (reported line 47)May include surrounding context.

python
"""
配置加载模块:环境变量与 .env 文件管理。

加载优先级(从高到低):
  1. 进程启动时已有的环境变量(最高,永不被覆盖)

Static analysis

No suspicious patterns detected.