Back to skill

Security audit

Scan Updates

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent update-scanning purpose, but it uses broad Gitea administrator-backed write authority with weak authorization and unsafe state handling.

Review before installing. Use only in a tightly controlled environment with a least-privilege Gitea token, HTTPS enforced, trusted scheduler-only access to system actions, and restricted script invocation. Do not expose these scripts directly to ordinary agent commands until the system identity bypass, standalone deletion authorization, mutable /tmp scan input, and admin-token scope are fixed.

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
env-example.txt:1
Finding

Site Administrator Token Is Transmitted Over Plaintext HTTP

Content
View full analysis
dict: return {"Authorization": f"token {ADMIN_TOKEN}", "Content-Type": "application/json"} def api(method: str, path: str, *, json_body: dict | None = None, params: dict | None = None, ok: tuple[int, ...] = (200, 201, 204)): if not GITEA_URL: raise GiteaError("GITEA_URL is not configured") resp = requests.request( method, f"{GITEA_URL}/api/v1{path}", headers=headers(), json=json_body, params=params, timeout=30, ) ``` ### Technical Analysis The supplied example configuration points to a public IP address over unencrypted HTTP. The API client attaches `GITEA_ADMIN_TOKEN` to every request through the `Authorization` header without requiring HTTPS. HTTP does not provide confidentiality or server authentication. A network-positioned attacker can observe the token directly or modify API requests and responses. The credential is explicitly declared as an administrator token and is used by code capable of accessing administrative endpoints, creating repositories, and modifying repository contents. Because `setup.sh` copies `env-example.txt` to `.env` when no configuration exists, the insecure transport value can become the active default configuration. ### Attack Path 1. An operator runs `setup.sh`, which copies the example environment file to `.env`. 2. The operator populates `GITEA_ADMIN_TOKEN` without replacing the HTTP endpoint with HTTPS. 3. A scan or state-management operation invokes `gitea_api.api()`. 4. The ...[truncated 714 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/permissions.py:6
Finding

Caller-Controlled Identity Values Can Grant Universal System Authorization

Content
View full analysis
tuple[bool, str]: if open_id in {"", "system"}: return True, "" ``` ```python # scripts/scan_updates.py:47-49 parser.add_argument("--source_id", required=True) parser.add_argument("--open_id", default="system") parser.add_argument("--sender_id", default="", help="OpenClaw SenderId: the message sender open_id.") ``` ```python # scripts/scan_updates.py:59-60 actor = chat_context.actor_id(args.open_id, args.sender_id) chat_type = chat_context.normalize_chat_type(args.chat_type) ``` ```python # scripts/scan_updates.py:75-76 allowed, reason = permissions.can_scan_source(actor, source) if not allowed: ``` ```python # scripts/run_incremental.py:32-36 parser.add_argument("--source_id", required=True) parser.add_argument("--updates_file", required=True) parser.add_argument("--threshold", type=int, default=100) parser.add_argument("--created_by", default="system") parser.add_argument("--sender_id", default="", help="OpenClaw SenderId: the message sender open_id.") ``` ```python # scripts/daily_scan_worker.py:150-153 parser = argparse.ArgumentParser() parser.add_argument("--threshold", type=int, default=100) parser.add_argument("--created_by", default="system") parser.add_argument("--source_id", default="", help="optional single source for manual scan") ``` ```python # scripts/daily_scan_worker.py:166 allowed, reason = permissions.can_scan_source(args.created_by, source) ``` ### Technical Analysis The authorization layer treats both an empty identity and the literal value `system` as universally trusted. Multiple user-invocable ...[truncated 2019 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/mark_source_deleted.py:15
Finding

Standalone Deletion Marker Modifies Arbitrary Repositories Without Authorization

Content
View full analysis
None: parser = argparse.ArgumentParser() parser.add_argument("--owner", required=True) parser.add_argument("--repo", required=True) parser.add_argument("--source_id", required=True) parser.add_argument("--source_path", required=True) args = parser.parse_args() ``` ```python # scripts/mark_source_deleted.py:23-29 cat = catalog.read(args.owner, args.repo) matched = None for doc in cat.get("documents", []): if doc.get("source_id") == args.source_id and doc.get("source_path") == args.source_path: doc["source_deleted"] = True doc["source_deleted_at"] = now_str() doc["updated_at"] = now_str() ``` ```python # scripts/mark_source_deleted.py:37-42 try: result = g.get_file(args.owner, args.repo, matched["file"]) if result and "source deletion marker" not in result[0]: notice = f"> Source file `{args.source_path}` was removed from the material source ({now_str()}).\n\n" g.put_file(args.owner, args.repo, matched["file"], notice + result[0], "paper-kb: mark source deleted", sha=result[1]) catalog.write(args.owner, args.repo, cat) catalog.regen_index(args.owner, args.repo, args.repo, cat) ``` The displayed notice condition and text above are an English rendering of the corresponding source-language literals; the control flow and affected operations are unchanged. ### Technical Analysis The command accepts repository owner, repository name, source identifier, and source path directly from the caller. It performs no authentication or authorization and does not resolve the target repository from a trusted source record. Once a matching catalog entry is found, the command: - Changes deletion m ...[truncated 1580 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/run_incremental.py:44
Finding

Mutable and Unbound Scan JSON Controls Privileged Repository Changes

Content
View full analysis
dict: updates_file = task.get("updates_file", "") if updates_file and Path(updates_file).exists(): return json.loads(Path(updates_file).read_text(encoding="utf-8")) return { "changes": task.get("changes", {}), ``` ```python # scripts/confirm_incremental.py:104-105 scan = load_scan(task) final_chat_type = chat_type or task_chat_type or "direct" ``` ```python # scripts/confirm_incremental.py:133-137 "changes": scan.get("changes", {}), "change_count": scan.get("change_count", task.get("change_count", 0)), "current_finge ...[truncated 3747 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned Python Dependencies Produce Non-Reproducible Privileged Installs

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 (52)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If this skill surface also creates and maintains a control-plane repository and writes system JSON files for jobs, tasks, permissions, and bindings, then it holds sensitive orchestration authority well beyond simple scan execution. In that context, poor separation of duties becomes dangerous because a compromise or misuse of the scan skill could tamper with control-plane state, permissions, or job metadata, affecting multiple users and teams.

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

python
except ImportError:
        return
    here = Path(__file__).resolve().parent
    for candidate in (here / ".env", here.parent / ".env"):
        if candidate.exists():
            load_dotenv(candidate)
            return

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code includes admin-scoped behavior such as probing /admin/users and creating repositories for arbitrary users via /admin/users/{username}/repos, which implies use of a site-admin token. In a source-scan skill, retaining administrative API power greatly increases blast radius: compromise or misuse lets the skill act across users and repositories instead of only reading registered sources.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill is described as scanning registered sources and detecting updates, but this helper also creates repositories, adds collaborators, and writes repository contents. Those are state-changing capabilities far beyond read-only scanning, and if invoked by the agent they could create unauthorized repos, modify tracked sources, or tamper with data in Gitea.

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 · setup.sh (reported line 4)May include surrounding context.

sh
#!/usr/bin/env bash
set -e
python3 -m pip install -r requirements.txt
if [ ! -f .env ]; then cp env-example.txt .env; fi
echo "setup complete"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill documentation defines shell commands that invoke local scripts, read and write JSON files under /tmp and persistent stores, and interact with external Git/Gitea resources, but it does not declare any explicit tool scope such as allowed-tools or permissions. In an agent setting, missing capability scoping increases the chance of overbroad execution, unintended filesystem access, or network use beyond what the skill actually requires.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The provided manifest context says this skill scans registered Gitea or Obsidian Git sources, detects file changes, creates incremental compilation jobs, and updates fingerprints. In the code, the exported description is only "paper-kb v3 skill: scan_updates," which does not describe that behavior and materially understates the skill's intended operational scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Multiple natural-language strings shown to users, such as permission-denied reasons, are hardcoded in Chinese only. This imposes a specific language on users without opt-in or any documented justification for a Chinese-only locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The card titles, summaries, and action labels shown to users are hard-coded in Chinese, which imposes a specific language on all users. The file does not indicate that this skill is limited to a Chinese-speaking environment or provide any opt-in or fallback for other locales.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.