T08 · Insecure Dependencies
- Location
SKILL.md:20- Finding
Unpinned npm Package Installation and Automatic Execution
- Content
View full analysis
- Remediation
View remediation
npx --no-install s -v npx --no-install s deploy ``` ]]>
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a coherent Alibaba Cloud Function Compute guide, but it asks users to handle cloud credentials and run deploy/remove tooling with unnecessary elevated local privileges and weak safety guidance.
Review this skill carefully before installing. Prefer a pinned, user-scoped Serverless Devs install, do not run the CLI with sudo, avoid putting Alibaba Cloud secrets directly in commands or exported JSON where they may be logged, and use least-privilege or short-lived credentials. Treat deploy and remove as explicit mutating/destructive cloud actions and verify region, account, and target resources first.
SKILL.md:20Unpinned npm Package Installation and Automatic Execution
SKILL.md:41Alibaba Cloud Secrets Exposed Through Command Arguments and Environment Variables
The skill recommends sudo npm install @serverless-devs/s -g, which runs package installation with elevated privileges. If the package or a dependency is malicious or compromised, it gains root-level code execution on the host, substantially increasing impact versus a user-scoped install.
Global install (requires sudo):
sudo npm install @serverless-devs/s -g
sudo s -v
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo npm install @serverless-devs/s -g
sudo s -v
No-sudo alternative (recommended in restricted environments):
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo npm install @serverless-devs/s -g
sudo s -v
No-sudo alternative (recommended in restricted environments):
The skill instructs users to execute npx -y @serverless-devs/s without pinning a specific version, which causes retrieval and execution of whatever package version is current at runtime. In a security-sensitive CLI/setup skill, this creates supply-chain risk because a compromised or breaking upstream release could be executed immediately on the user's machine.
The skill instructs users to run sudo s config add, which processes cloud credentials under elevated privileges. This can store configuration files as root, expand blast radius if the CLI is compromised, and normalize unnecessary privileged handling of sensitive cloud access material.
sudo s config add
Choose Alibaba Cloud (alibaba), provide AccountID, AccessKeyID, AccessKeySecret, and set alias.
The skill shows command-line patterns that place AccessKeyID and AccessKeySecret directly in shell commands and environment variables, but it does not warn about shell history, process-list exposure, terminal logging, or accidental persistence in profiles. Because these are cloud credentials, disclosure could let an attacker access and modify Alibaba Cloud resources.
Using sudo s init start-fc3-python creates project files through a privileged process, which can leave root-owned artifacts in the workspace and unnecessarily expose users to elevated-code-execution risk. Initialization also fetches/templates content, so the use of root broadens consequences of any compromised dependency or template source.
sudo s init start-fc3-python
cd start-fc3-python
The documented s remove command deletes deployed resources, but the section does not clearly warn that it is destructive. In an operational cloud skill, omission of a deletion warning can lead to accidental teardown, downtime, and loss of associated configuration or billing surprises.
The deployment command sudo s deploy performs a mutating cloud action from a root-privileged local process. This unnecessarily combines elevated local execution with remote infrastructure changes, increasing host-compromise risk if the CLI or dependencies are malicious and making mistakes more damaging.
sudo s deploy
sudo s invoke -e "test"
sudo s remove
Running sudo s invoke -e "test" executes the CLI with root privileges for a task that does not require host elevation. Although invocation is less destructive than deployment or removal, unnecessary root execution still raises the impact of any CLI compromise and can mishandle local files or logs as root.
sudo s deploy
sudo s invoke -e "test"
sudo s remove
The skill documents sudo s remove, combining destructive cloud resource deletion with root execution on the local machine. This magnifies both the chance and severity of operator error and any compromise of the CLI, since the command can both delete infrastructure and run with full local privileges.
sudo s deploy
sudo s invoke -e "test"
sudo s remove
The deployment example pipes confirmation into npx -y @serverless-devs/s deploy without a pinned version, combining unattended execution with an unversioned remote package fetch. That increases the danger because users may non-interactively run arbitrary newly published code during a mutating cloud deployment action.
The document instructs users to run s config add and enter Alibaba Cloud AccountID/AK/SK but provides no warning that these are sensitive long-lived credentials or guidance on secure handling. In a CLI setup guide, this omission can lead users to expose secrets through shell history, screenshots, shared terminals, notes, or use of overly privileged keys, increasing the chance of account compromise.
No suspicious patterns detected.