T03 · Remote Payload Retrieval and Execution
- Location
scripts/deploy.sh:46- Finding
Privileged Execution of an Unverified Remote Installation Script
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This deployment skill is mostly aligned with its stated purpose, but it asks users to make privileged, persistent system changes with unsafe installation and credential practices.
Review the deployment script before running it. Install only on a non-sensitive test machine or container unless you are comfortable with sudo package changes, PostgreSQL and Redis service enablement, cron jobs, OpenClaw hook setup, and plaintext database credentials. Replace the default password, pin and verify any cognitive-brain repository, avoid pipe-to-sudo-bash installation, and back up memory data before following destructive troubleshooting steps.
scripts/deploy.sh:46Privileged Execution of an Unverified Remote Installation Script
scripts/deploy.sh:162Persistent Scheduled Execution of Unverified External Skill Code
scripts/deploy.sh:62Predictable Plaintext Database Credential Exposed in Configuration and Output
scripts/deploy.sh:125Unpinned Dependency Installation with Package Lifecycle and System-Python Risk
The declared purpose understates the real operational footprint: installing additional services and dependencies, modifying system services and cron, and using fixed database credentials are materially more invasive than the description suggests. This mismatch can mislead users into approving a skill that makes privileged, persistent, or insecure changes they did not knowingly authorize.
The command chains a remote curl fetch directly into sudo bash, combining external content retrieval, shell execution, and privilege elevation in one step. This is especially dangerous in a deployment guide because users are encouraged to run it verbatim, making full root compromise straightforward if the upstream content is malicious or altered.
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo bash - && \
sudo apt install -y postgresql postgresql-contrib redis-server git && \
sudo systemctl enable --now postgresql redis
Piping curl output directly into sudo bash creates a high-risk command chain where attacker-controlled network content is executed immediately with root privileges. In a one-click deployment/troubleshooting skill, users are especially likely to run the command verbatim, amplifying the chance of full host compromise.
解决:
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo bash -
sudo apt install -y nodejs
node -v # 应该显示 v18.x.x
The troubleshooting guidance recommends DROP TABLE memories; and recreating the table to fix a dimension mismatch, but it does not warn that this permanently deletes all stored memory data. In a deployment/troubleshooting skill for a semantic memory system, this can cause immediate, irreversible data loss if followed during routine maintenance.
The script creates application database credentials with a hardcoded password and applies grants automatically, without warning the user or generating unique secrets. Hardcoded shared credentials are easily disclosed and reused, especially since the same password is later printed and embedded into config, increasing the chance of database compromise.
The script overwrites config.json in place with embedded plaintext database credentials and no confirmation or backup. This can destroy existing secure configuration and leaves reusable secrets exposed in a predictable path, which is especially dangerous in a multi-user or backup-synced environment.
The skill advertises and invokes shell-based deployment behavior but does not declare any tool scope or permissions boundary. In a deployment skill that installs services and alters host configuration, missing explicit tool constraints reduces user visibility and reviewability, increasing the chance of unintended or over-broad system changes.
The skill description mentions configuration of cron jobs and hooks but does not warn that these create persistent automation that will continue operating after deployment. Persistent mechanisms materially change risk because they can execute later without direct user initiation and may be overlooked during approval.
The markdown directly instructs users to run a one-click shell script without warning that it may install software, alter databases, enable services, or create persistence. In the context of a deployment skill, this increases the risk of users executing high-impact changes without informed consent or an opportunity to review the script first.
The guide instructs piping a remotely fetched script directly into sudo bash, causing unreviewed network content to execute with root privileges. If the remote script is compromised or intercepted, it results in full system compromise.
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo bash - && \
sudo apt install -y postgresql postgresql-contrib redis-server git && \
sudo systemctl enable --now postgresql redis
The SQL creates a dedicated database user with a hard-coded password and grants broad privileges on the database and schema. Embedding reusable credentials in documentation encourages insecure credential reuse and can allow unauthorized long-term access if the host or config file is exposed.
在 psql 里执行:
CREATE DATABASE cognitive_brain;
CREATE USER cognitivebrain WITH PASSWORD 'cog_brain_2024';
GRANT ALL PRIVILEGES ON DATABASE cognitive_brain TO cognitivebrain;
\c cognitive_brain
The guide instructs users to add recurring cron jobs that automatically execute local scripts, including deletion, reflection, and autonomous learning tasks. This establishes ongoing execution persistence, which increases blast radius if the skill or its scripts are later modified or compromised.
crontab -e
添加:
The cron job explicitly schedules node scripts/forget.cjs to run daily and labels it as cleaning unimportant memories, but the guide does not clearly warn users that this causes automatic data deletion. In a memory-storage system, unattended deletion can lead to integrity and availability loss, especially if retention criteria are misconfigured or the script behaves unexpectedly.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
解决:
sudo systemctl status postgresql
sudo systemctl start postgresql
sudo systemctl enable postgresql
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
解决:
sudo systemctl status postgresql
sudo systemctl start postgresql
sudo systemctl enable postgresql
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
解决:
sudo systemctl status postgresql
sudo systemctl start postgresql
sudo systemctl enable postgresql
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
解决:
sudo systemctl status postgresql
sudo systemctl start postgresql
sudo systemctl enable postgresql
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
解决:
sudo systemctl status postgresql
sudo systemctl start postgresql
sudo systemctl enable postgresql
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
解决:
sudo systemctl status postgresql
sudo systemctl start postgresql
sudo systemctl enable postgresql
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
解决:
sudo systemctl status postgresql
sudo systemctl start postgresql
sudo systemctl enable postgresql
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
解决:
sudo systemctl status postgresql
sudo systemctl start postgresql
sudo systemctl enable postgresql
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
解决:
sudo systemctl status postgresql
sudo systemctl start postgresql
sudo systemctl enable postgresql
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
解决:
sudo systemctl status postgresql
sudo systemctl start postgresql
sudo systemctl enable postgresql
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
解决:
sudo systemctl status postgresql
sudo systemctl start postgresql
sudo systemctl enable postgresql
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
解决:
sudo systemctl status postgresql
sudo systemctl start postgresql
sudo systemctl enable postgresql
No suspicious patterns detected.