dependency-cooldown-skill
Adds dependency cooldowns to projects to mitigate the risk of supply chain attacks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Adds dependency cooldowns to projects to mitigate the risk of supply chain attacks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | dependency-cooldown-skill |
| description | Adds dependency cooldowns to projects to mitigate the risk of supply chain attacks. |
A dependency cooldown delays installing a newly-published package version (typically 7 days). The window gives security vendors time to detect and report supply chain attacks before the malicious version reaches builds. Recent data: 8 of 10 supply chain attacks had a window of opportunity under 7 days, so a 7-day cooldown blocks the majority. Cooldowns complement — they don't replace — pinning, lockfiles, and trusted publishing.
Do NOT use when:
Before changing anything, identify:
pyproject.toml/uv.lock, package.json/pnpm-lock.yaml/yarn.lock/bun.lockb, Cargo.toml, Gemfile, go.mod, .github/workflows/*.yml, etc.).github/dependabot.yml (Dependabot) or renovate.json/.renovaterc (Renovate)cooldown, minimumReleaseAge, min-release-age, npmMinimalAgeGate, exclude-newer, uploaded-prior-to, stabilityDays, minimum-dependency-ageReport findings to the user. If cooldowns are already set up for every ecosystem in use, stop.
Two layers — apply both for defense in depth:
Default: start with the package-manager layer. Add a bot layer if the project already uses one or the user wants automated PRs gated too.
Recommended cooldown: 7 days (14 days for higher-risk projects — prod infra, payments, auth).
For each package manager in the project, look up the current syntax — feature names and config locations are young and have shifted across versions. Approach, in order:
<tool> --help to find the relevant flag (e.g. uv add --help, pip install --help, pnpm install --help, deno update --help).--help is insufficient. Confirm the minimum version required.pyproject.toml, .npmrc, .yarnrc.yml, bunfig.toml, etc.) — not just as a one-off CLI flag — so every install respects it.The feature has different names per tool: exclude-newer (uv), --uploaded-prior-to (pip), minimumReleaseAge (pnpm/bun), min-release-age (npm), npmMinimalAgeGate (yarn), --minimum-dependency-age (deno). pnpm/npm/yarn/bun take values in minutes (7 days = 10080); the rest take human-readable strings. Verify against current docs before writing.
For ecosystems without native cooldown support (Ruby/Bundler, Go modules, Composer, Maven, Gradle, Swift PM, Hex, Dart pub), skip to the bot layer.
Security updates bypass cooldowns automatically in both Dependabot and similar tools — keep that default.
.github/dependabot.yml)Add one updates: entry per ecosystem:
version: 2
updates:
- package-ecosystem: pip # change per ecosystem
directory: /
schedule:
interval: weekly
cooldown:
default-days: 7
# Optional per-semver-level overrides:
# semver-major-days: 14
# semver-minor-days: 7
# semver-patch-days: 3
Valid package-ecosystem values include npm, pip, bundler, cargo, gomod, nuget, composer, docker, github-actions, gradle, maven, mix, pub, swift, terraform. Consider adding github-actions if the repo has workflows — it's a real attack target (tj-actions, nx).
zizmor .github/dependabot.yml (its dependabot-cooldown rule also flags missing cooldowns); for Renovate, run its config validator; for package managers, run the tool's normal install/check