Back to skill

Security audit

Vllm Plugin Fl Setup Flagos

Security checks for vulnerabilities and agentic risk

Overview

This setup skill appears legitimate, but it needs review because it downloads and builds unverified external code, changes the Python environment, may scan the filesystem broadly, and asks for proxy settings.

Install only in a disposable container or dedicated virtual environment, review the cloned repositories and build files before running commands, avoid sharing credential-bearing proxy URLs, provide explicit approval before any broad filesystem search, and prefer pinned commits or verified package hashes where possible.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Warning
Location
SKILL.md:62
Finding
Mutable Remote Source Repositories Are Built and Installed Without Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:62-76`, `SKILL.md:91-106`, and `SKILL.md:121-142` **Vulnerability Type**: Remote source execution and insecure software supply chain **Risk Level**: Medium Equivalent instructions also appear in `README.md:66-100` and `README_zh.md:64-98`. ### Vulnerable Code ```bash mkdir -p ~/flagos-workspace && cd ~/flagos-workspace git clone https://github.com/flagos-ai/vllm-plugin-FL ``` ```bash cd vllm-plugin-FL pip install -r requirements.txt pip install --no-build-isolation . ``` ```bash # Install build dependencies pip install -U scikit-build-core==0.11 pybind11 ninja cmake # Clone FlagGems source code cd ~/flagos-workspace git clone https://github.com/flagos-ai/FlagGems ``` ```bash cd FlagGems pip install --no-build-isolation . ``` ```bash cd ~/flagos-workspace git clone https://github.com/flagos-ai/FlagCX.git ``` ```bash cd FlagCX git submodule update --init --recursive # Build for your platform (e.g. USE_NVIDIA=1 for NVIDIA) make USE_NVIDIA=1 export FLAGCX_PATH="$PWD" # Install Python binding (replace [xxx] with your platform: nvidia, ascend, etc.) cd plugin/torch/ FLAGCX_ADAPTOR=[xxx] pip install --no-build-isolation . ``` ### Technical Analysis The installation workflow clones the current state of several remote repositories and immediately executes their dependency installers, Python build hooks, native build files, and recursively retrieved submodules. None of the repositories or submodules is pinned to a reviewed commit hash or authenticated release artifact. Consequently, the effective code executed by the Skill can change after the Skill itself has been audited. Relevant execution surfaces include: - Python package build backends invoked by `pip install`. - Dependencies dynamically resolved from `requirements.txt`. - Native commands and compiler invocations controlled by `Makefile`. - Arbitrary repositories referenced by recursively initialized Git submodules. - Runtime module i ...[truncated 2076 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every cloned repository to an immutable, reviewed commit: ```bash git clone --filter=blob:none https://github.com/flagos-ai/vllm-plugin-FL cd vllm-plugin-FL git checkout --detach <reviewed-commit-sha> test "$(git rev-parse HEAD)" = "<reviewed-commit-sha>" ``` 2. Pin every submodule to an expected commit and validate submodule URLs before initialization. Avoid unrestricted recursive initialization where possible. 3. Prefer signed release tags or release artifacts and verify signatures or published SHA-256 checksums before installation. 4. Replace unconstrained dependency installation with a reviewed lock file containing exact versions and hashes: ```bash python -m pip install --require-hashes -r requirements.lock ``` 5. Review `pyproject.toml`, `setup.py`, build backend configuration, `Makefile`, and submodule metadata before executing installation commands. 6. Run installation in a dedicated virtual environment or disposable container under an unprivileged account. Do not run the workflow as root. 7. Restrict filesystem mounts, credentials, SSH agents, cloud metadata access, and network access available to build processes. 8. Separate retrieval, verification, build, and installation into explicit stages so that no fetched content is executed before integrity validation. ]]>

T08 · Insecure Dependencies

Warning
Location
references/npu.md:10
Finding
FlagTree Is Installed From a Third-Party Package Index Without Package Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `references/npu.md:10-11` **Vulnerability Type**: Unverified third-party package source **Risk Level**: Medium ### Vulnerable Code ```bash RES="--index-url=https://resource.flagos.net/repository/flagos-pypi-hosted/simple --trusted-host=https://resource.flagos.net" pip install flagtree==0.4.0+ascend3.2 $RES ``` ### Technical Analysis The Ascend setup replaces the default package index with a third-party repository and installs `flagtree==0.4.0+ascend3.2` without validating a package hash or digital signature. Pinning a version controls the selected version identifier but does not authenticate the bytes served for that version. A compromised repository, publishing account, or package artifact could provide altered content under the same version string. Python packages can execute code during build and installation, and malicious code could also execute when the documented verification step imports `flagtree`. The `--trusted-host` option is unnecessary for an ordinary correctly configured HTTPS repository and weakens pip's host verification policy in configurations where TLS validation would otherwise fail. Although the URL uses HTTPS, transport security alone does not provide artifact-level integrity or protect against compromise of the repository itself. The audit found no evidence that the referenced domain or current FlagTree package is malicious. The vulnerability is the absence of artifact authentication and isolation. ### Attack Path 1. An attacker compromises the third-party package repository, its publishing credentials, or the artifact associated with version `0.4.0+ascend3.2`. 2. The attacker replaces or republishes that version with a package containing a malicious build backend, installation hook, native extension, or import-time payload. 3. An Ascend user follows the Skill and runs the documented `pip install` command. 4. Pip downloads the artifact without comparing it to an independentl ...[truncated 957 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Obtain the expected package artifact through a controlled release process and publish its SHA-256 hash through an independent trusted channel. 2. Download and verify the exact artifact before installation: ```bash python -m pip download \ --no-deps \ --index-url=https://resource.flagos.net/repository/flagos-pypi-hosted/simple \ flagtree==0.4.0+ascend3.2 echo "<expected-sha256> <artifact-file>" | sha256sum --check python -m pip install --no-deps <artifact-file> ``` 3. Alternatively, use a requirements file with an exact artifact hash and enforce it with `--require-hashes`. 4. Remove `--trusted-host` unless a documented and reviewed environment constraint makes it strictly necessary. Correct the certificate trust chain instead of weakening verification. 5. Mirror the reviewed artifact into an organization-controlled package repository with immutable package versions and restricted publishing permissions. 6. Install the dependency in a dedicated virtual environment or disposable, unprivileged container without access to sensitive credentials. 7. Review the wheel contents, package metadata, build configuration, native libraries, and import-time initialization before approving the package for deployment. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (13)

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The README directs users to clone repositories and run multiple `pip install` commands that modify the Python environment and install software from source. While this is the skill's purpose, the markdown does not include any explicit warning that these commands will change the local environment, install dependencies, and may affect existing setups.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The README instructs users to clone FlagCX, initialize submodules, run `make`, and install a torch plugin, all of which can significantly alter the local development environment. There is no accompanying warning about these system-impacting actions or recommendation to confirm compatibility before proceeding.

Skill Enumeration

Medium
Category
Agent Snooping
Content
## Usage in Your Project

Skills are typically placed under `.claude/skills/` (or the equivalent skills directory for your editor) in the project root.


### Install
Confidence
85% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The skill states it automates hardware detection, source installs, optional FlagCX installation, backend-specific configuration, and validation. These actions modify the local environment and execute shell/package-management operations, but the README does not give a clear user-facing warning that running the skill will change the system by installing software and altering configuration.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
The README instructs users or agents to clone code from external repositories, install Python packages, build native components, initialize submodules, and run make without any integrity verification, pinning, or trust warning. In an agent-executed context, this increases supply-chain risk and the chance of unintended system modification or execution of unreviewed build scripts.

Skill Enumeration

Medium
Category
Agent Snooping
Content
```bash
# 在项目根目录执行
mkdir -p .claude/skills
cp -r <本仓库路径>/skills/vllm-plugin-fl-setup-flagos .claude/skills/
```
Confidence
85% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Skill Enumeration

Medium
Category
Agent Snooping
Content
```bash
# 在项目根目录执行
mkdir -p .claude/skills
cp -r <本仓库路径>/skills/vllm-plugin-fl-setup-flagos .claude/skills/
```
Confidence
85% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill tells the agent to ask for proxy settings without any warning that proxy URLs may contain sensitive internal hostnames, usernames, passwords, or tokens. In practice, users may paste credential-bearing proxy strings, creating unnecessary exposure of secrets to the agent and logs.

Context-Inappropriate Capability

Medium
Confidence
92% confidence
Finding
The quick-test directs a broad filesystem search using `find /`, which enumerates directories across the host well beyond what is necessary for plugin setup. In an agent context, this expands the skill from installation into host discovery and may expose sensitive path information, mounted volumes, other users' data locations, or infrastructure layout.

Context-Inappropriate Capability

Low
Confidence
84% confidence
Finding
Instructing the agent to ask for and configure proxy settings extends the skill into network-environment management and may lead users to disclose sensitive internal proxy endpoints or embedded credentials. While related to cloning dependencies, it is broader than the core install task and lacks guardrails on how sensitive values should be handled.

Context-Inappropriate Capability

Low
Confidence
83% confidence
Finding
Repeating instructions to request and configure proxy settings reinforces a capability to alter network configuration that is not tightly scoped to plugin installation. This increases the chance of collecting sensitive enterprise configuration or causing unintended persistence of proxy settings affecting other tools.

Context-Inappropriate Capability

Low
Confidence
83% confidence
Finding
The FlagCX section again directs the agent to solicit and configure proxy settings, broadening the skill into system/network administration. Even if intended to help with GitHub access, this can expose internal network details and cause side effects outside the plugin setup scope.

Context-Inappropriate Capability

Low
Confidence
82% confidence
Finding
The troubleshooting guidance repeats the pattern of requesting and configuring proxy settings, normalizing collection of potentially sensitive network configuration during error handling. In agent-driven environments, troubleshooting paths often bypass scrutiny, making this a meaningful though low-severity scope expansion.

Static analysis

No suspicious patterns detected.