Security checks for vulnerabilities and agentic risk
Overview
The skill is for creating a course-progress tracking sub-agent, but it also grants broad OpenClaw admin, approval, pairing, write, and secrets-related permissions without enough review.
Review carefully before installing. Do not run the permission approval script or approve broad OpenClaw scopes unless you have independently inspected the exact pending request and truly need those privileges. A course-progress sub-agent should not normally need admin, pairing, approvals, write, or secrets-related access.
The script approves the newest pending device permission request without validating the request ID, device ID, requester identity, requested scopes, or intended agent. The meaning of --latest depends on mutable global request ordering rather than a trusted identifier.
This creates a time-of-check/time-of-use and request-substitution risk. An attacker capable of submitting a permission request can attempt to make their request the latest immediately before the script is executed. The script would then approve the attacker's request instead of the request expected by the user.
The documented permission set also violates least privilege for an educational progress-recording agent. Administrative access, permission-approval authority, device pairing, write access, and secret-related communication are not demonstrated as necessary for the stated task.
Attack Path
An attacker submits a device permission or privilege-escalation request to the same OpenClaw environment.
The attacker times the submission so that it becomes the newest pending request.
A user follows the Skill instructions or executes scripts/approve_permissions.sh.
openclaw devices approve --latest resolves to the attacker-controlled request.
The request is approved without displaying or validating its identity and scopes.
The attacker uses the granted capabilities to administer the enviro
...[truncated 685 chars]
Remediation
View remediation
Remediation Suggestions
Remove the unconditional --latest approval operation.
List pending requests and display each request's ID, device identity, requester, origin, requested scopes, and creation time.
Require the user to select and confirm an exact request ID.
Verify that the request belongs to the expected device and workflow before approval.
Reject unexpected or stale requests and fail closed if identity verification cannot be completed.
Grant only the minimum scopes required to spawn and operate the educational subagent.
Exclude administrative, approval, pairing, and secret-related scopes unless each scope has a documented and unavoidable requirement.
Record approval decisions in an audit log and warn the user before granting high-impact scopes.
Prefer a command pattern equivalent to:
bash
request_id=${1:?Usage: approve_permissions.sh REQUEST_ID}
openclaw devices show-request "$request_id"
# Continue only after explicit identity and scope confirmation.
openclaw devices approve "$request_id"
The exact commands should be adjusted to the supported OpenClaw CLI syntax.
The original script uses the literal shell segment:
text
--agentId <your_agent_id>
Technical Analysis
In Bash, angle brackets are input and output redirection operators; they are not safe placeholder delimiters. The shell therefore does not pass the literal placeholder as the value of --agentId.
The opening angle bracket attempts to read standard input from a file named your_agent_id. The closing angle bracket is interpreted as output redirection, with a following token potentially treated as the output filename instead of a command argument. Depending on which redirections succeed, this can cause command failure or unintended filesystem creation or truncation.
The script does not validate that an agent ID was supplied, quote a user-provided value, enable strict error handling, or confirm that the spawn operation succeeded.
Attack Path
A user executes scripts/create_educational_subagent.sh without manually editing the placeholder.
Bash parses the angle brackets as redirection syntax.
The shell attempts to open your_agent_id as an input file and interprets a later token as an output-redirection target.
The intended agent ID is not supplied to openclaw sessions_spawn.
The operation fails or causes unintended filesystem effects if the relevant redirections can be opened.
This issue does not independently demonstrate remote compromise. Its principal effects are unreliable execution, denial of the intended operation, and possible local file creation or truncation under the invoking user's privileges.
Impact Assessment
...[truncated 380 chars]
Remediation
View remediation
Remediation Suggestions
Replace the shell placeholder with a required positional argument or explicitly named option, validate it, and quote it before use:
bash
#!/usr/bin/env bash
set -euo pipefail
agent_id=${1:?Usage: create_educational_subagent.sh AGENT_ID}
if [[ ! "$agent_id" =~ ^[A-Za-z0-9._:-]+$ ]]; then
printf 'Invalid agent ID.\n' >&2
exit 2
fi
openclaw sessions_spawn \
--runtime acp \
--agentId "$agent_id" \
--label "educational subagent" \
--mode run \
--task "..."
Additionally:
Never represent editable shell placeholders with unquoted angle brackets.
Keep all variable expansions quoted.
Validate the agent ID against the exact format accepted by OpenClaw.
Enable strict shell error handling.
Check and report the command's exit status.
Consider accepting task text from a safely referenced static file to improve maintainability and avoid shell-quoting errors.
The skill is presented as a benign educational progress tracker, but its instructions also direct the operator to approve device permissions and manage access-control state. That is a material behavior mismatch because users invoking the skill for recordkeeping would not reasonably expect administrative actions, creating an opportunity for privilege escalation under a misleading label.
Content
No source excerpt is available for this finding.
Vague Triggers
High
Category
Not specified by scanner
Confidence
96% confidence
Finding
The manifest description says the skill should trigger not only for creating a sub-agent to track course progress, but also for '任何涉及长期记录和追踪任务的需求' ('any need involving long-term recording and tracking tasks'). This is far broader than the educational domain and could overlap with many ordinary user requests, causing unintended invocation.
Content
No source excerpt is available for this finding.
Context-Inappropriate Capability
High
Category
Not specified by scanner
Confidence
99% confidence
Finding
The skill instructs approving broad operator privileges, including admin, approvals, pairing, write, and especially secrets access, which are far beyond what is needed to create or run a course-progress tracking sub-agent. If followed, these steps could grant excessive control over the device and sensitive data, enabling compromise well outside the educational use case.
Content
No source excerpt is available for this finding.
Context-Inappropriate Capability
High
Category
Not specified by scanner
Confidence
99% confidence
Finding
The script unconditionally approves the latest device permission request via openclaw devices approve --latest, which is a sensitive action unrelated to the stated purpose of creating an educational sub-agent for tracking class progress. Because it targets the 'latest' request rather than a specific reviewed request, it can authorize unintended or attacker-triggered access without validation or user awareness.
Content
No source excerpt is available for this finding.
Natural-Language Policy Violations
Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding
The title and description are entirely in Chinese and the embedded sub-agent prompt defines a Chinese persona and response pattern, but the file does not state that the user opted into Chinese or that the tool is region-specific. This can violate language/locale policy when a skill implicitly forces one language without user choice.
Content
No source excerpt is available for this finding.
Description-Behavior Mismatch
Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding
Although the manifest says the skill creates a teaching-progress sub-agent, the documented workflow centers on resolving failures by changing gateway state and approving escalated permissions. This disconnect can mislead users and reviewers into authorizing sensitive administrative actions under the guise of ordinary educational automation.
Content
No source excerpt is available for this finding.
Missing User Warnings
Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding
The skill includes steps to approve permissions and elevate capabilities without any user-facing warning about the consequences of granting those rights. This is dangerous because operators may execute security-sensitive commands without understanding that they are expanding administrative and secrets-access scope.
Content
No source excerpt is available for this finding.
Context-Inappropriate Capability
Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding
The embedded device ID and request ID expose environment-specific identifiers unrelated to the core teaching-progress function. Such details can aid targeting, correlation of approval flows, or unauthorized operational probing if the skill content is shared or logged broadly.
Content
No source excerpt is available for this finding.
Missing User Warnings
Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding
This command performs a privileged approval action with no user-facing warning, confirmation, or review step. In the context of an educational tracking skill, silent permission approval is especially dangerous because users would not reasonably expect the skill to modify device-access permissions, increasing the chance of covert privilege escalation.
Content
No source excerpt is available for this finding.
Natural-Language Policy Violations
Low
Category
Not specified by scanner
Confidence
88% confidence
Finding
The only natural-language description in the file is a Chinese comment, which imposes a specific language context without offering alternatives or documenting that the skill is intended only for Chinese-speaking users. This may conflict with organizational language or locale policies when no opt-in or justification is provided.
Content
No source excerpt is available for this finding.
Missing User Warnings
Low
Category
Not specified by scanner
Confidence
94% confidence
Finding
The script immediately spawns a new agent session when run, with no user-facing confirmation, dry-run mode, or warning about the side effect. While the task content itself appears administrative and not overtly malicious, automatic agent creation can still surprise users, create unintended persistent processes, or be abused if the script is triggered indirectly in a larger workflow.