Skip to content
cccskills
FreePublished on GitHubEnglish overview

npm-supply-chain-check

Review a JavaScript or TypeScript project's npm dependencies and CI configuration for supply-chain risks. The skill checks release age, install scripts, lockfiles, workflow permissions, and token handling, then prioritizes configuration changes without installing packages or running their scripts.

OriginalShow the original description

JavaScript / TypeScript のプロジェクトを、npm のサプライチェーン攻撃(乗っ取られたパッケージの悪性バージョン、インストール時に動くスクリプト、CI からの認証情報の窃取)への備えという観点で読むだけで点検し、直すべき設定を優先順に示す。

ロックファイルの全パッケージについて公開からの日数とインストールスクリプトを npm レジストリで調べる。「npm の依存は大丈夫?」「サプライチェーン攻撃の対策をしたい」「axios みたいな乗っ取りに備えたい」ときに使う。

Audits a JS project's npm supply-chain posture (release-age gates, install scripts, lockfiles, CI tokens).

cccskills/skills0 stars(GitHub 0 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Reviewing npm dependencies for supply-chain risks
  • Checking package release age and install scripts
  • Auditing CI workflow permissions and tokens
  • Finding missing or uncommitted lockfiles

Overview

What it does

This skill reads a JavaScript or TypeScript project to assess its defenses against npm supply-chain attacks. It identifies the package manager from the lockfile, then checks release-age settings, dependency install scripts, CI installation commands, GitHub Actions references and permissions, and token storage. For every package in the lockfile, it can also check npm registry publication dates and script definitions. The results can flag recently published or withdrawn versions and packages that run scripts during installation. Findings are ordered by priority and include configuration examples you can apply.

When it helps

Use it when you want to review the risks in your npm dependencies, check how CI handles permissions and credentials, or decide which configuration changes to make first.

Example requests

  • “Review this project’s npm dependencies.”
  • “Check the install scripts and CI token settings.”
  • “Rank the steps we should take to reduce supply-chain risks.”

Notes

Node.js 18 or later is required. The skill connects to registry.npmjs.org to retrieve package publication dates and script definitions. It does not send project files or credentials. If the network is unavailable, it skips checks that depend on public registry data. It does not install packages, run their scripts, or change settings. It edits files only if you approve.

This overview was written by AI (OpenAI Codex) from the public SKILL.md. Check the original below for the exact behavior.

Document check

AI checked the SKILL.md for operations that need care and for setup requirements. The score comes only from actually running the skill (hands-on test).

SafetyAre sending data, deleting files, and running commands disclosed?
AGoodRegistry-only metadata requests; no installs or script runs, and edits require approval.
Easy setupDoes it need few tools or API keys, and are they documented?
BPartly lackingNode.js 18+ and registry access are needed; offline behavior is specified.

Not counted in the score. Rated by AI (OpenAI Codex) as of Oct 27, 2026. Treat it as a guide and read the original before installing.

Disagree? Request a re-evaluation

Tell us which point is wrong and why. No login needed. We will check it against the SKILL.md, redo the evaluation, and show the result here.

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

Files included (2)

  • SKILL.md7.4 KB
  • scripts/lockfile-check.mjs6.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

npm-supply-chain-check

npm では、人気パッケージの開発者アカウントが乗っ取られ、悪性のバージョンが公開される事件が続いています(2025 年の自己増殖型ワーム Shai-Hulud、2026 年の axios の侵害など)。悪性バージョンの多くは、数時間から数日で見つかって取り下げられます。そのため、次の 3 つで被害の大半を防げます。

  • 公開されたばかりのバージョンを入れない
  • インストール時のスクリプトを勝手に動かさない
  • CI の認証情報を絞る

このスキルは、プロジェクトがこの 3 つをできているかを点検します。

守ること

  • 点検は 読むだけ。npm install などのインストール、パッケージのスクリプトの実行、設定ファイルの書き換えはしない。直すかどうかはユーザーが決める。
  • 外部への通信は、付属のスクリプトが https://registry.npmjs.org からパッケージの公開情報(公開日時・スクリプト定義)を取得するだけ。プロジェクトのファイルや認証情報は送らない。
  • .npmrc などにトークンが書かれていても、値は表示しない。「書かれている」ことだけを伝える。

前提

  • Node.js 18 以上(付属スクリプトが組み込みの fetch を使う)。
  • ネットワークに出られない環境では手順 3 を飛ばし、その旨を結果に書く。

手順

1. パッケージマネージャーとバージョンを確かめる

  • ロックファイルから判断する: package-lock.json(npm)・pnpm-lock.yaml(pnpm)・yarn.lock(Yarn)・bun.lock(Bun)。package.json の packageManager も見る。
  • バージョンを確かめる(npm -v・pnpm -v・yarn -v)。手順 2 の設定が使えるかどうかがバージョンで変わる。
  • ロックファイルがリポジトリに コミットされていない(.gitignore に入っている、存在しない)なら、それを最初の指摘にする。

2. 設定を点検する

#点検すること見る場所望ましい状態
1公開から日の浅いバージョンを避ける設定npm 11.10 以上: .npmrc の min-release-age(日数)/pnpm: pnpm-workspace.yaml の minimumReleaseAge(分。pnpm 11 は既定で 1440)/Yarn 4.10 以上: .yarnrc.yml の npmMinimalAgeGate1〜7 日の待ち時間がある。除外(minimumReleaseAgeExclude など)は最小限
2インストールスクリプトの扱いnpm: .npmrc の ignore-scripts/pnpm: onlyBuiltDependencies・strictDepBuilds(pnpm 10 以降は既定で依存のスクリプトを動かさない)/Yarn: enableScripts依存のスクリプトは既定で止め、必要なものだけ許可している
3CI のインストール方法.github/workflows/*.yml などnpm ci・pnpm install --frozen-lockfile・yarn install --immutable で、ロックファイルどおりに入れている
4GitHub Actions の固定uses: の行外部の Action はタグではなくコミット SHA で固定。pull_request_target で外部 PR のコードを checkout していない
5CI の権限とトークンワークフローの permissions:・secrets.*permissions を最小に絞っている。npm の公開には長期トークンではなく Trusted Publishing(OIDC)を使っている
6直接の依存の書き方package.json*・latest・Git の URL・知らないレジストリを使っていない
7認証情報の置き方.npmrc・.env がコミットされていないかトークンをリポジトリに置いていない

3. ロックファイルの全パッケージを調べる

node <このスキルのフォルダ>/scripts/lockfile-check.mjs <プロジェクトのフォルダ> --days 7
  • --days: これより新しいバージョンを「公開されたばかり」として挙げる(既定 7)。
  • --max: 調べる件数の上限(既定 5000)。大きいプロジェクトで時間がかかるときに使う。
  • 結果(JSON)の読み方:
    • recent: 公開から --days 日未満のバージョン。最優先で確かめる。 そのパッケージの GitHub のリリースや変更履歴にそのバージョンがあるか、npm のページで公開者がいつもと同じかを見る。乗っ取りの事件が報じられていれば、そのバージョンと照らし合わせる。
    • installScripts: インストール時にスクリプト(preinstall / install / postinstall)が動くパッケージ。手順 2 の #2 で許可しているものと照らし合わせ、知らないものがあれば挙げる。
    • missing: レジストリにもう無いバージョン(取り下げ済み)。悪性で取り下げられた可能性があるので、必ず挙げる。
    • deprecated: 非推奨。セキュリティ上の理由が書かれていれば挙げる。
    • errors: 取得に失敗したもの。社内レジストリのパッケージなどは対象外として扱う。

4. 結果を返す

## npm-supply-chain-check: <プロジェクト>

パッケージマネージャー: pnpm 10.18 / ロックファイル: あり(コミット済み) / 調べた依存: 612 件

### すぐ直す
1. **公開日数の待ちがない** — `pnpm-workspace.yaml` に次を足す(pnpm 10.16 以上)
   ```yaml
   minimumReleaseAge: 1440
  1. ...

確かめる

パッケージバージョン理由
foo3.2.1公開から 0.5 日。GitHub のリリースに 3.2.1 がない

できていること

  • CI は pnpm install --frozen-lockfile

- 「すぐ直す」は効果の大きい順に並べ、それぞれに貼れる設定の差分を付ける。設定名と単位(日・分)は、手順 1 で確かめたバージョンのものを使う。分からなければ公式ドキュメントで確かめるよう添える。
- 待ち時間の設定は、公開から日の浅い悪性バージョンには効くが、長く潜伏する攻撃は防げない。過信しないよう一言添える。
- 直すかどうかを聞き、ユーザーが了承したときだけ設定ファイルを編集する。

## このスキルについて

- 作者: cccskills(https://github.com/cccskills/skills)
- 外部への通信は `registry.npmjs.org` からの公開情報の取得だけ。インストール・スクリプトの実行はしない。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

cccskills-find

FreeSummary

Find Agent Skills for a task through the cccskills public API and compare their execution scores, safety checks, licenses, and update dates. The skill narrows the options and shows how to install a suitable candidate.

  • Finding a skill for meeting minutes
  • Comparing skills for a specific task
  • Checking skill scores, safety, and licenses
cccskills/skills0Updated Oct 27, 2026

Organize the first response to a suspected personal data breach at a Japanese company. The skill helps track events, identify reporting deadlines and required details, and draft internal updates, individual notices, public statements, and inquiry responses for review.

  • Responding to a suspected data breach
  • Preparing a PPC report draft
  • Drafting notices to affected people
cccskills/skills0Updated Oct 27, 2026

jp-business-mail

FreeSummary

Write or revise Japanese business emails for requests, thanks, apologies, reminders, refusals, scheduling, and first contact. The skill adjusts wording for the recipient, checks keigo and email structure, and explains edits while preserving the original facts and commitments.

  • Writing a polite business request
  • Revising an apology or reminder email
  • Scheduling a meeting with an external contact
cccskills/skills0Updated Oct 27, 2026

skill-md-review

FreeSummary

Review an Agent Skill's `SKILL.md` using four criteria: clarity, specific steps, safety, and setup. The skill checks format and referenced files, assigns A/B/C grades with evidence, and suggests concrete text changes for weaker areas.

  • Reviewing a skill before publishing
  • Improving a SKILL.md with low grades
  • Checking a skill's safety and setup requirements
cccskills/skills0Updated Oct 27, 2026

Review an Agent Skill or repository agent configuration before installing or opening it. The skill reads files without running their scripts, identifies suspicious instructions, data transfers, hooks, and other risks, then summarizes findings to support an installation decision.

  • Checking a skill before installation
  • Reviewing suspicious repository settings
  • Looking for hidden instructions or data theft
cccskills/skills0Updated Oct 27, 2026

See all skills by cccskills

Report a problem with this skill