T09 · Insecure Skill Coding Practices
- Location
index.js:1212- Finding
Agent-Generated Output Is Evaluated as JavaScript
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has real Feishu reporting and evolver lifecycle functions, but it also adds under-disclosed autonomous execution, persistence, repository publishing, and cross-skill modification behavior.
Install only after reviewing and accepting that this skill can keep itself running, spawn agent work, mutate workspace memory and skill files, send logs and telemetry to Feishu, install packages in sibling skills, and automatically push repository changes. It should be constrained or changed to require explicit approval for cron/daemon persistence, git publication, package installation, raw log export, and any delegated-agent prompt injection.
index.js:1212Agent-Generated Output Is Evaluated as JavaScript
index.js:1066Wrapper Injects Mandatory Instructions into Delegated Agent Tasks
lifecycle.js:74Recurring Cron Job and Detached Watchdog Create Durable Persistence
lifecycle.js:219Environment and API Values Are Interpolated into Shell Commands
report.js:412Generating a Report Can Install Dependencies and Modify Sibling Skills
index.js:558Autonomous Evolution Cycles Commit and Push Broad Workspace Paths
report.js:256Reports and Exports Can Disclose Logs, Telemetry, and Sensitive Workspace Data to Feishu
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
Offline weekly analytics/report generation from local event/log files is less risky than process control, but it still materially differs from the declared interactive lifecycle/reporting wrapper role. This becomes dangerous if operators grant network or daemon-management trust based on the description while the skill instead aggregates potentially sensitive local history for reporting.
This utility exposes a generic shell execution primitive by accepting an arbitrary command string and passing it directly to child_process.exec. In a Feishu-integrated wrapper or evolver-management skill, that capability materially increases risk because any upstream user-controlled input, prompt injection, or compromised caller can be turned into OS command execution, and the cache does not mitigate that danger.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const WORKSPACE_ROOT = path.resolve(__dirname, '../..');
try {
require('dotenv').config({ path: path.join(WORKSPACE_ROOT, '.env') });
} catch (e) {}
const DOC_TOKEN = process.env.FEISHU_EVOLVER_DOC_TOKEN || '';
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const WORKSPACE_ROOT = path.resolve(__dirname, '../..');
try {
require('dotenv').config({ path: path.join(WORKSPACE_ROOT, '.env') });
} catch (e) {}
const DOC_TOKEN = process.env.FEISHU_EVOLVER_DOC_TOKEN || '';
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
let token;
try { token = JSON.parse(fs.readFileSync(TOKEN_FILE)).token; } catch(e) {}
if (!token) return console.error("Error: No Feishu access token in " + TOKEN_FILE);
let logContent = '';
try { logContent = fs.readFileSync(LOG_FILE, 'utf8'); } catch(e) { return console.error("No log file: " + LOG_FILE); }
The wrapper performs git add, git commit, git pull --rebase, and git push against a remote branch, which is materially broader than a lifecycle/reporting wrapper. This gives the skill autonomous power to mutate repository state and publish changes externally, creating supply-chain and integrity risk if the delegated agent is steered, compromised, or simply wrong.
The wrapper falls back to new Function('return (' + sanitized + ')')() on extracted agent output, effectively evaluating untrusted text as JavaScript. Because all child output must be treated as adversarial, this creates a direct code-execution path inside the wrapper process.
The wrapper appends high-priority natural-language instructions framed as mandatory authority, including file-writing requirements and behavioral rules for the delegated agent. This is dangerous because it can override the delegated agent's original constraints, manipulate outputs, and silently steer execution toward wrapper-chosen behavior.
The one-time thought injection reads arbitrary text from a file and places it into EVOLVE_HINT, directly influencing subsequent agent behavior. Any actor able to write that file gains a stealthy prompt-injection channel into the autonomous workflow.
The 'ensure' path contains a hidden 'think phase' that goes beyond lifecycle management and performs autonomous task processing, cross-skill file reads, queue mutation, inbox writes, temporary script generation, and detached background execution. In a wrapper whose stated purpose is Feishu-integrated evolver lifecycle control, this materially expands authority and creates an unexpected code-execution and content-manipulation path that could be triggered without explicit user awareness.
Detected: suspicious.dangerous_exec, suspicious.dynamic_code_execution, suspicious.env_credential_access (+1 more)