T09 · Insecure Skill Coding Practices
- Location
scripts/setup-cron.sh:112- Finding
Persistent Shell Command Injection Through Executable .env Configuration
- Content
View full analysis
"$CONFIG_FILE" <- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its logbook automation purpose, but its setup scripts make broad persistent changes and have an unsafe executable .env configuration path.
Review before installing. Use this only in a workspace where you are comfortable with recurring OpenClaw cron jobs, Telegram delivery, GitHub/GitLab activity reads, and possible MIS submission. Avoid running setup until .env handling is fixed, and back up HEARTBEAT.md plus crontab or OpenClaw cron configuration first.
scripts/setup-cron.sh:112Persistent Shell Command Injection Through Executable .env Configuration
scripts/setup-cron.sh:129Destructive Overwrite of Shared Persistent Agent Heartbeat Instructions
scripts/setup-cron.sh:123Overbroad Crontab Cleanup Can Alter Unrelated Scheduled Jobs
If the skill can directly submit MIS logbooks or bypass the stated approval step, that weakens an explicit human-review control and can cause unauthorized or incorrect submissions. In this context, the skill handles external reporting workflows, so approval bypass materially increases the risk of accidental disclosure, false records, or unintended actions on behalf of the user.
If the skill can directly submit MIS logbooks or bypass the stated approval step, that weakens an explicit human-review control and can cause unauthorized or incorrect submissions. In this context, the skill handles external reporting workflows, so approval bypass materially increases the risk of accidental disclosure, false records, or unintended actions on behalf of the user.
If the skill can directly submit MIS logbooks or bypass the stated approval step, that weakens an explicit human-review control and can cause unauthorized or incorrect submissions. In this context, the skill handles external reporting workflows, so approval bypass materially increases the risk of accidental disclosure, false records, or unintended actions on behalf of the user.
If the skill can directly submit MIS logbooks or bypass the stated approval step, that weakens an explicit human-review control and can cause unauthorized or incorrect submissions. In this context, the skill handles external reporting workflows, so approval bypass materially increases the risk of accidental disclosure, false records, or unintended actions on behalf of the user.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
WORKSPACE="$(resolve_workspace "$DAILY_DIR")"
export OPENCLAW_WORKSPACE="$WORKSPACE"
CONFIG_FILE="$DAILY_DIR/.env"
if [ -f "$CONFIG_FILE" ]; then
set -a
# shellcheck disable=SC1090
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
WORKSPACE="$(resolve_workspace "$DAILY_DIR")"
export OPENCLAW_WORKSPACE="$WORKSPACE"
CONFIG_FILE="$DAILY_DIR/.env"
if [ -f "$CONFIG_FILE" ]; then
set -a
# shellcheck disable=SC1090
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
WORKSPACE="$(resolve_workspace "$DAILY_DIR")"
export OPENCLAW_WORKSPACE="$WORKSPACE"
CONFIG_FILE="$DAILY_DIR/.env"
if [ -f "$CONFIG_FILE" ]; then
set -a
# shellcheck disable=SC1090
Without declared permissions the skill's intent is opaque and cannot be validated.
The description and overview repeatedly state that the skill generates Indonesian summaries and logbook text, but do not offer a language choice or explicit opt-in. That creates a natural-language locale policy concern because the skill appears to force a specific language by default.
The document states that it provides standards for generating internship logbook entries in Indonesian, which sets a fixed language requirement. Because the file does not present this as an optional preference or explain a region-specific compliance need, it constitutes a natural-language locale policy concern under the stated rule.
These lines explicitly label mixed English as incorrect and prescribe full Indonesian as the correct form. That is a direct language-policy constraint, and the file does not indicate that users may choose their preferred language or that the restriction is limited to a documented locale-specific requirement.
This JSON file contains natural-language summaries in Indonesian (for example, 'Backend utama...' and 'Contoh project pribadi...') but does not indicate that the skill is intentionally locale-specific or that users can opt into that language. Under the stated policy, forcing a specific language without user choice is a natural-language policy violation.
The extraction logic only recognizes Indonesian headings such as "Versi 2", "Aktivitas", and "Hasil". This creates a language-specific behavior in the skill without offering user choice or documenting a justified locale restriction, which matches the natural-language policy concern for forced language/locale assumptions.
This code fixes the locale and generated report content to Indonesian/WIB context, including Indonesian date formatting and Indonesian report text, without any user opt-in or configurable language selection. That is a natural-language policy concern because it forces a specific language/locale choice on all users of the script.
This code emits user-facing status text in Indonesian, and the pattern continues throughout the script in titles, notes, and generated report prose. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.
The script emits user-facing status and approval messages entirely in Indonesian, and the same language continues through the final confirmation text. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.
The approval request presented to the user is fully in Indonesian and directly instructs the user how to respond, but there is no indication that the user can choose another language. This matches the policy's example of a language/locale constraint imposed without user opt-in.
The script's stated purpose is to generate a report and print a WhatsApp-ready confirmation, but it also performs a live MIS submission as a side effect via submit-logbook.js. This creates a dangerous trust boundary issue: a user or calling agent may invoke it expecting read-only formatting behavior, yet it modifies an external system and can create unintended submissions or duplicate operational actions.
The script unconditionally overwrites the skill-local .env file with a here-doc containing only GITHUB_USER. This can silently destroy existing configuration, including unrelated settings or secrets stored in that file, causing misconfiguration or credential loss; in a skill that manages automated reporting, unexpected local config mutation is operationally risky.
The script inspects and rewrites the user's crontab as part of installing a recurring delivery workflow, which establishes persistence beyond the current execution. In the context of an automation skill that also writes OpenClaw cron jobs and sends messages to Telegram, this increases the risk of unintended long-lived behavior and makes removal or auditing harder if the user did not explicitly approve it.
echo " Telegram target: $TELEGRAM_CHAT"
echo ""
EXISTING_CRONTAB=$(crontab -l 2>/dev/null || true)
FILTERED_CRONTAB=$(printf "%s\n" "$EXISTING_CRONTAB" | grep -vF "$SKILL_DIR/scripts/cron-generate.sh" | grep -vF "# Daily logbook report -" | grep -vE '^CRON_TZ=(Asia/Jakarta|UTC)$' || true)
printf "%s\n" "$FILTERED_CRONTAB" | crontab -
The script removes entries from the user's crontab and later restarts the OpenClaw gateway without any confirmation or dry-run safeguard. Modifying persistence and restarting a service are privileged, state-changing actions that can disrupt other scheduled jobs, create availability issues, and establish long-lived automated behavior the user may not fully intend.
This shell script creates the cron directory, initializes jobs.json if absent, and then rewrites the cron configuration before moving it into place. Although it prints success messages afterward, there is no confirmation prompt or explicit warning before changing persistent scheduler state, which is a safety-relevant file modification.
The script invokes openclaw gateway restart, which is a service-affecting subprocess operation that can interrupt running work or alter system behavior. While there is an informational echo immediately before execution, it does not ask for confirmation and the file lacks an upfront warning that setup will restart the gateway.
This shell script emits all user-facing status and error messages in Indonesian, including confirmations, failures, and success summaries. Forcing a specific language without user opt-in matches the natural-language policy violation criteria, and the file does not document that the skill is intentionally restricted to Indonesian-speaking users or a locale-specific workflow.
The setup instructions encourage installation of recurring cron jobs and writing local configuration without clearly warning that these are persistent system changes. That can lead users to unknowingly create long-lived automated tasks that continue accessing repos, generating messages, or using credentials after initial setup, increasing the chance of unintended data exposure or operational abuse.
Detected: suspicious.dangerous_exec