T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/run_batch.py:17- Finding
Batch execution permits confirmation and authorization bypass
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its knowledge-base import purpose, but it needs review because it can start batch jobs without enforcing confirmer identity and sends a powerful Gitea token to a default HTTP endpoint.
Install only in a controlled OpenClaw/Gitea environment. Before use, require HTTPS, replace the site-admin token with a narrowly scoped service account, pin dependencies, and fix run_batch.py so the confirmer identity is mandatory and revalidated before any background job or knowledge-base write starts.
scripts/run_batch.py:17Batch execution permits confirmation and authorization bypass
scripts/gitea_api.py:28Site-administrator Gitea token may be transmitted over plaintext HTTP
requirements.txt:1Setup installs unpinned third-party dependencies without integrity verification
The presence of a dedicated system configuration repository that stores user, team, chat binding, permission, event, and task state introduces a sensitive control plane far beyond simple batch import. If this capability is bundled into the same skill without explicit permission scoping, segregation, and data-handling limits, an error or abuse path could tamper with authorization, routing, or audit state for the wider system.
The presence of a dedicated system configuration repository that stores user, team, chat binding, permission, event, and task state introduces a sensitive control plane far beyond simple batch import. If this capability is bundled into the same skill without explicit permission scoping, segregation, and data-handling limits, an error or abuse path could tamper with authorization, routing, or audit state for the wider system.
The presence of a dedicated system configuration repository that stores user, team, chat binding, permission, event, and task state introduces a sensitive control plane far beyond simple batch import. If this capability is bundled into the same skill without explicit permission scoping, segregation, and data-handling limits, an error or abuse path could tamper with authorization, routing, or audit state for the wider system.
The presence of a dedicated system configuration repository that stores user, team, chat binding, permission, event, and task state introduces a sensitive control plane far beyond simple batch import. If this capability is bundled into the same skill without explicit permission scoping, segregation, and data-handling limits, an error or abuse path could tamper with authorization, routing, or audit state for the wider system.
The presence of a dedicated system configuration repository that stores user, team, chat binding, permission, event, and task state introduces a sensitive control plane far beyond simple batch import. If this capability is bundled into the same skill without explicit permission scoping, segregation, and data-handling limits, an error or abuse path could tamper with authorization, routing, or audit state for the wider system.
The presence of a dedicated system configuration repository that stores user, team, chat binding, permission, event, and task state introduces a sensitive control plane far beyond simple batch import. If this capability is bundled into the same skill without explicit permission scoping, segregation, and data-handling limits, an error or abuse path could tamper with authorization, routing, or audit state for the wider system.
The presence of a dedicated system configuration repository that stores user, team, chat binding, permission, event, and task state introduces a sensitive control plane far beyond simple batch import. If this capability is bundled into the same skill without explicit permission scoping, segregation, and data-handling limits, an error or abuse path could tamper with authorization, routing, or audit state for the wider system.
The presence of a dedicated system configuration repository that stores user, team, chat binding, permission, event, and task state introduces a sensitive control plane far beyond simple batch import. If this capability is bundled into the same skill without explicit permission scoping, segregation, and data-handling limits, an error or abuse path could tamper with authorization, routing, or audit state for the wider system.
The presence of a dedicated system configuration repository that stores user, team, chat binding, permission, event, and task state introduces a sensitive control plane far beyond simple batch import. If this capability is bundled into the same skill without explicit permission scoping, segregation, and data-handling limits, an error or abuse path could tamper with authorization, routing, or audit state for the wider system.
The presence of a dedicated system configuration repository that stores user, team, chat binding, permission, event, and task state introduces a sensitive control plane far beyond simple batch import. If this capability is bundled into the same skill without explicit permission scoping, segregation, and data-handling limits, an error or abuse path could tamper with authorization, routing, or audit state for the wider system.
The presence of a dedicated system configuration repository that stores user, team, chat binding, permission, event, and task state introduces a sensitive control plane far beyond simple batch import. If this capability is bundled into the same skill without explicit permission scoping, segregation, and data-handling limits, an error or abuse path could tamper with authorization, routing, or audit state for the wider system.
The presence of a dedicated system configuration repository that stores user, team, chat binding, permission, event, and task state introduces a sensitive control plane far beyond simple batch import. If this capability is bundled into the same skill without explicit permission scoping, segregation, and data-handling limits, an error or abuse path could tamper with authorization, routing, or audit state for the wider system.
The presence of a dedicated system configuration repository that stores user, team, chat binding, permission, event, and task state introduces a sensitive control plane far beyond simple batch import. If this capability is bundled into the same skill without explicit permission scoping, segregation, and data-handling limits, an error or abuse path could tamper with authorization, routing, or audit state for the wider system.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
except ImportError:
return
here = Path(__file__).resolve().parent
for candidate in (here / ".env", here.parent / ".env"):
if candidate.exists():
load_dotenv(candidate)
return
This module provisions and manages a persistent control-plane repository containing users, teams, chat bindings, permissions, and jobs, which materially exceeds the stated batch-compilation/import-tracking purpose of the skill. Hidden identity/team management state increases the blast radius of the skill and can enable unauthorized governance, cross-user linkage, or policy decisions in a repository the user may not expect to exist.
The code exposes primitives for invite-code generation and record/state management that support team onboarding and chat identity workflows not justified by the declared batch-compile function. In context, these capabilities suggest latent identity and access-control features that could be misused to associate users/chats or expand access boundaries beyond what operators expect from an import tool.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
#!/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"
The skill describes extensive use of local file access, network access, environment-backed credentials, and write operations, but it does not declare an explicit tool scope or permission boundary. In an agent setting, that omission weakens reviewability and increases the risk of over-privileged execution, especially because the workflow touches repositories, uploaded archives, and knowledge-base writes.
The skill title and operational instructions are written in Chinese and the prescribed user-facing prompts are also in Chinese, which implies the skill is intended to interact in a fixed language. There is no indication that the user can choose another language or that the Chinese-only behavior is required for a region-specific compliance reason.
The provided skill manifest context describes a capability to batch-compile material sources into knowledge bases with preview, confirmation, job tracking, archiving, codebase overview generation, and import reports. In contrast, the code-level description is only 'paper-kb v3 skill: batch_compile', which does not reflect that behavior and materially understates the skill's declared purpose.
The error messages returned to users at L45, L48, and L51 are hard-coded in Chinese. For a general-purpose cancellation script, this imposes a specific language on users without opt-in or justification, which matches the language/locale policy violation criteria.
This code defines multiple user-visible labels, titles, and summaries entirely in Chinese, such as button labels and card text, with no indication that the skill is China-specific or that users can choose another language. That creates a natural-language locale policy concern because the skill appears to enforce a specific language by default.
The write function updates catalog.json via g.put_file, which is a file-modifying operation, but there is no confirmation prompt, user-facing log/print, or explanatory comment/docstring disclosing that the skill will write repository contents. For code files, safety-relevant writes should have some visible disclosure unless clearly documented elsewhere, which is not present in this file.
regen_index rebuilds content and writes index.md through g.put_file, modifying repository files without any confirmation, user-visible message, or explanatory comment/docstring. This is a safety-relevant file write because it changes repository state and may overwrite prior index content.
Several natural-language error messages are hard-coded in Chinese, and the file provides no indication that users can opt into another language or that the skill is intentionally restricted to a Chinese-speaking context. This can violate language/locale policy when the skill is used in broader environments.
No suspicious patterns detected.