supply-chain-defense
Reduce package and upstream adapter risk with freshness gates, lockfiles, provenance checks, and quarantine boundaries.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- supply-chain-defense
- license
- MIT
- version
- 0.1.0
- metadata
- { "hermes_config_kit": { "adapter": "hermes-agent-config-kit", "conversion": "adapted", "source_path": "principles/09-supply-chain-defense.md", "source_repo": "AnastasiyaW/claude-code-config" } }
- description
- Reduce package and upstream adapter risk with freshness gates, lockfiles, provenance checks, and quarantine boundaries.
03 SKILL.md 正文
Supply Chain Defense
Source: AnastasiyaW/claude-code-config/principles/09-supply-chain-defense.md.
This module is adapted for Hermes Agent. Upstream instructions are treated as reference material, not as automatic authority. Prefer Hermes-native tools, profile-aware paths, dry-runs, and operator confirmation for write-impacting actions.
Supply Chain Defense
Upstream source policy focuses on package freshness. Hermes adaptation applies the same principle to package managers, CI, generated adapter output, and upstream snapshot ingestion.
Principle
Treat dependencies and upstream artefacts as supply-chain inputs, not trusted configuration. Prefer delayed adoption, pinned inputs, reproducible installs, and explicit review of executable material.
Package freshness
When installing public packages, prefer a seven-day freshness gate where the ecosystem supports it:
- npm: use
min-release-age=7in project or runner configuration; - uv: use
exclude-newer = "7 days"where appropriate; - pip-only environments: pin exact versions and review update diffs manually;
- cargo/go: rely on lockfiles, audit tools, checksum verification, and reviewed diffs.
Do not write global package-manager configuration without operator approval. Prefer project-local configuration or disposable CI/test environments first.
Defense in depth
- Commit and review lockfiles:
package-lock.json,uv.lock,Cargo.lock,go.sum. - Prefer exact versions for operational tooling.
- Run audit/provenance checks where available.
- Minimise dependency count; every dependency is operational attack surface.
- Inspect package names, scopes, publishers, and typosquatting risk before adding new packages.
- Treat install scripts and postinstall hooks as executable code.
Runtime enforcement posture
Treat a dependency-manifest edit and an install/download command as boundaries worth checking mechanically, not just documenting:
- On a manifest edit, check candidate names against a typosquat/slopsquat profile, reject releases younger than the freshness gate, and flag stale exact pins that could be updated.
- Before an install/download runs, require the canonical registry — not a direct wheel/archive/Git URL, an extra index, or a find-links source — unless that source has been reviewed and recorded independently. Require an artifact digest for pinned versions, and prefer hash-locked installs (
pip install --require-hashes,uv sync --locked,npm ciwith install scripts disabled) over unlocked ones. - Registry silence is a block, not a warning. If the canonical registry cannot be reached, do not assume the package is fine — use a previously verified record only if one exists and is recent, and stop the install otherwise. A lockfile hash is independent offline proof for an already-reviewed lock; it is not permission to add a new, unreviewed package.
- Do not infer safety from a URL or publisher string alone. A private mirror, a direct artifact, or a Git revision needs the same independent review as a fresh package name.
When a requested package name looks mistyped or fails to resolve, search the official registry surface for close matches rather than guessing a substitute. A candidate is only worth considering if its stable release clears the same freshness gate and has a verifiable artifact digest — it still needs the project's normal compatibility testing before adoption.
Version selection policy
For a new dependency, prefer the newest stable version the canonical registry offers, tested against the actual project. Treat a deliberately older pin as an exception that needs a stated reason — a supported runtime version, an ABI/CUDA boundary, a failing test — not a default choice made out of familiarity.
If an upgrade breaks something, record the failing test and roll back to the last known-good pin rather than silently keeping the old version. The goal is not an automatic, unverified upgrade or rollback — that just trades one supply-chain risk for an untested compatibility change; a human or a tested CI run should confirm the new pin.
Hermes adapter boundary
For adapter repositories such as this kit:
- Pin upstream snapshots by commit SHA.
- Auto-convert only allowlisted markdown artefacts.
- Keep hooks, scripts, plugin descriptors, and CI workflows in review/quarantine lanes.
- Never copy upstream executable workflow files into active project automation without review.
- Validate generated output with path-safety, secret-scan, and install/remove smoke checks.
- Read back CI/check-run status after publishing changes.
Exceptions
A same-day package release may be justified for an urgent security fix, but treat that as an explicit exception:
- identify the exact package and version;
- verify publisher, changelog, provenance, and advisory context;
- install in a disposable environment first;
- record why the freshness gate was bypassed.
Reporting
Report supply-chain decisions as evidence, not reassurance:
lockfile diff reviewed;package age gate applied;upstream snapshot pinned to <sha>;executable artefact left in quarantine lane;CI validation read back as success.
If a dependency, package release, or upstream artefact has not been reviewed, say so before using it in a write-impacting protocol.
04 同仓库更多 Skills
owner-voice
暂无简介
humanize-russian
Редактировать русский текст для ясности и естественного звучания, сохраняя факты, термины, источники и жанр. Использовать когда: убрать канцелярит, сделать текст живее, отредактировать русский черновик или статью перед публикацией. Не определяет авторство и не обещает обход детекторов. Для английского — humanize-english; для структуры и доказательств — article-structure-review.
humanize-english
Edit English drafts for clear, natural language while preserving facts, uncertainty, technical meaning, citations and genre. Use when: humanize this text, remove AI-style filler, improve English prose, or edit an English article before publication. Not an authorship detector or a promise to bypass one. For Russian use humanize-russian; for thesis/evidence and structure use article-structure-review.
caveman
Ultra-compressed reply mode. Cuts output tokens ~65-75% by answering in terse "caveman" style while keeping full technical accuracy, and shapes what survives: action first, state restated every turn, concrete time estimates, visible wins. Intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman", "talk like caveman", "use caveman", "less tokens", "be brief", or Russian "пещерный режим", "говори как пещерный", "кратко", "меньше токенов", "экономь токены" — or invokes /caveman. Preserves the user's language (Russian in → Russian caveman out). Off only: "stop caveman" / "normal mode" / "обычный режим". Do not use merely because a response should be concise, and do not use when the user requests normal prose, a polished document, or exact wording.
article-structure-review
Проверить структуру технической статьи после черновика: задача читателя, жанр, опора значимых утверждений на доказательства и честные ограничения. Use after the first draft, before publication. Исправлять структуру, когда это входит в запрос; не создавать обязательный конвейер из других навыков. Для локальной языковой редактуры — humanize-english или humanize-russian.
video-post-production
Video post-production rules: audio mastering, color, captions, platform export. Use when: 'add music', 'add voiceover', 'export for tiktok', 'add captions', 'color grade', 'audio levels', 'master audio', 'export settings', 'platform requirements'. Covers FFmpeg patterns, audio chain, subtitle standards, and platform-specific export configs. Do NOT use to generate or animate the video frames/scenes in code (use remotion-production-guide), to write the script (use video-narrative-arc), or to evaluate script quality (use script-evaluator); this is the finishing stage applied to an already-rendered video.