T08 · Insecure Dependencies
- Location
main.js:187- Finding
Unverified Third-Party Skill Installation from GitHub
- Content
View full analysis
Vulnerability Details
File Location:
main.js:187,main.js:265-294
Vulnerability Type: Untrusted and mutable supply-chain component installation
Risk Level: MediumVulnerable Code
js const results = await httpGet( `https://api.github.com/search/repositories?q=openclaw+${encodeURIComponent(query)}+in:name,description&per_page=15` );js // Install from GitHub async function installFromGitHub(repo, name) { log(`\nInstalling ${name} from GitHub...`, 'cyan'); const skillsDir = path.join(__dirname, '..'); const targetDir = path.join(skillsDir, name); if (fs.existsSync(targetDir)) { log(`Skill "${name}" already exists`, 'yellow'); return false; } const cmd = `git clone https://github.com/${repo}.git "${targetDir}"`; return new Promise((resolve) => { exec(cmd, (error) => { if (error) { err(`Failed to install: ${error.message}`); resolve(false); return; } log(`Installed to ${targetDir}`, 'green'); const config = loadConfig(); config.installed.push({ name, repo, installedAt: new Date().toISOString() }); saveConfig(config); resolve(true); }); }); }Technical Analysis
GitHub repositories are discovered through a public keyword search and can be published by arbitrary accounts. The selected repository is cloned directly into the active skills directory without:
- A trusted-publisher or repository allowlist
- Commit pinning
- Cryptographic signatures or checksum verification
- Manifest validation
- Content scanning
- A quarantine or review stage
- Clear trust information about the repository owner
The matching algorithm evaluates names and descriptions for relevance, but relevance is not a security or authenticity control. An attacker can create a repository whose metadata closely matches co ...[truncated 1787 chars]
- Remediation
View remediation
Remediation Suggestions
- Restrict installations to an approved registry or an explicit allowlist of trusted GitHub owners and repositories.
- Resolve and pin every installation to an immutable commit hash rather than cloning a mutable default branch.
- Verify a cryptographically signed manifest or trusted checksum before placing files in the skills directory.
- Clone repositories into a temporary quarantine directory first.
- Validate the repository structure and scan scripts, symbolic links, executable files, and skill instructions before activation.
- Display the repository owner, immutable commit, creation age, trust status, and source URL, then require explicit confirmation.
- Separate installation from activation so downloaded code cannot become available to the agent until review succeeds.
- Record the verified commit and integrity metadata in the installation history.
- Prefer
spawnorexecFilewith argument arrays over shell-basedexec, even though the currently observed repository values originate from GitHub API fields.
