supply-chain-security
БесплатноБез исполняемых скриптовНе проверенSupply chain security model for the marketplace plugin ecosystem
от TheLobbi★ 22 звезды на GitHubОб этом скилле
Supply Chain Security & Trust Scoring
This skill documents the marketplace plugin security model, including how plugins are verified, sandboxed, scored, and audited.
Architecture Overview
The security module (src/security/trust-engine.ts) provides four interlocking components:
.cpkg Bundle
|
v
+------------------+
| SignatureVerifier | Integrity check (SHA-512)
+------------------+
|
v
+------------------+
| SecurityAuditor | Static code analysis
+------------------+
|
v
+------------------+
| PermissionSandbox| Permission boundary enforcement
+------------------+
|
v
+------------------+
| TrustScorer | Composite trust score (0-100)
+------------------+
|
v
Trust Report
1. Signature Verification
How It Works
Every .cpkg bundle can include a __signature__.json containing:
{
"algorithm": "sha512",
"checksum": "a1b2c3d4e5f6...",
"author": {
"identity": "[email protected]",
"provider": "github",
"verified": true
},
"timestamp": "2026-02-20T14:30:00Z",
"transparencyLogEntry": "24f9a8b3-1234-4abc-9def-567890abcdef"
}
The verifier:
- Recomputes SHA-512 of the bundle content (excluding the signature block)
- Performs constant-time comparison against the stored checksum
- Validates the author identity against supported providers (github, google, microsoft, gitlab)
- Checks the timestamp is not in the future and not expired (>2 years)
- Optionally validates the transparency log entry format (Rekor UUID or hex)
Using the Verifier
import { SignatureVerifier } from './trust-engine';
const verifier = new SignatureVerifier();
const result = await verifier.verify(bundleBuffer, signatureInfo);
if (result.valid) {
console.log('Bundle verified:', result.details);
} else {
console.error('Verification failed:', result.status, result.errors);
}
Verification Statuses
| Status | Meaning |
|---|---|
verified |
Checksum matches, author valid, timestamp in range |
tampered |
Checksum mismatch or invalid algorithm |
unsigned |
No signature metadata present |
expired |
Signature older than max age (default 2 years) |
unknown-signer |
Identity provider not in allowed list |
2. Permission Sandbox
Permission Model
Plugins declare their resource requirements in the manifest:
{
"permissions": {
"filesystem": ["read:./src", "write:./dist"],
"network": ["api.github.com", "*.npmjs.org"],
"exec": ["npm", "docker"],
"env": ["AWS_REGION", "NODE_ENV"]
}
}
Permission string conventions:
- filesystem:
<access>:<path>where access isreadorwrite. Write implies read. Paths are relative to plugin root. - network: Exact hostnames or wildcard patterns (
*.example.commatches any subdomain). - exec: Binary names the plugin may spawn via child_process.
- env: Environment variable names the plugin may read from
process.env.
Script Validation
The sandbox statically analyzes hook scripts to detect undeclared resource access:
import { PermissionSandbox } from './trust-engine';
const sandbox = new PermissionSandbox(
{ filesystem: ['read:./src'], network: ['api.github.com'], exec: ['npm'], env: ['NODE_ENV'] },
'/path/to/plugin'
);
const result = sandbox.validateScript(hookScriptContent);
if (!result.allowed) {
for (const v of result.violations) {
console.warn(`Line ${v.line}: undeclared ${v.category} access to ${v.resource}`);
}
}
Shell Wrapper Generation
For runtime enforcement, the sandbox generates restricted shell wrappers:
const wrapper = sandbox.generateWrapper(originalScript);
// wrapper.script contains the restricted bash script
// wrapper.allowedEnv lists exposed environment variables
// wrapper.allowedPaths lists accessible filesystem paths
The wrapper:
- Unsets all environment variables except those in the allowlist
- Restricts PATH to standard binary directories
- Includes an exec guard function that blocks undeclared binaries
- Documents filesystem and network boundaries (actual OS-level enforcement requires additional tooling)
3. Trust Scoring
Scoring Formula
The trust score is a weighted linear combination of five factors:
overall = signed * 0.30
+ reputation * 0.20
+ codeAnalysis * 0.25
+ community * 0.15
+ freshness * 0.10
Each factor produces a 0-100 sub-score. The overall score maps to a letter grade:
| Grade | Range | Meaning |
|---|---|---|
| A | 90-100 | Fully |
Установить supply-chain-security в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл supply-chain-security?
Supply chain security model for the marketplace plugin ecosystem
Как установить скилл supply-chain-security?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл supply-chain-security запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic