CI audit is non-blocking and nothing gates a release on known advisories

オープン 初心者向け
#460 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions, typescript
領域
ci-cd, devops

調査の方向性

.github/workflows/ci.ymlの111~115行付近を読み、その後、.github/workflows/release.ymlと.github/workflows/publish.ymlのbundleジョブとbuildジョブを比較してください。issueの説明に従い、releaseの各経路に本番依存関係のブロッキング監査を追加し、PRの監査は助言的なものとして維持してください。新しい動作を示す実行でworkflowの変更を検証してください。issueにはnpm run build && npm testとtypecheckおよびlintのコマンドも記載されています。

索引モデルが issue の本文から書いたものです。

説明

ci effort: small priority: medium

Summary

CI audit is non-blocking and nothing gates a release on known advisories. The reasoning for PRs is sound, but the same leniency applies to the release path, where the .mcpb freezes the lockfile's production tree into an artifact users install. A critical advisory in shipped dependencies is currently visible only to someone who opens a green job's log. The project works directly on main with no PR review step, so nobody is prompted to look.

Where

  • .github/workflows/ci.yml:111
  • .github/workflows/ci.yml:114
  • .github/workflows/publish.yml:26
  • .github/workflows/release.yml:126
  • scripts/build-mcpb.mjs:41

Details

The only audit step is

# Report advisories in shipped (non-dev) dependencies without blocking
# the build; a new upstream advisory should not fail an unrelated PR.
- name: npm audit (production deps)
  continue-on-error: true
  run: npm audit --omit=dev --audit-level=high

(ci.yml:111-115). It fails today (a cross-spawn advisory with a fix available) and the job stays green. publish.yml (build job: npm ci, build, test, pack, lines 26-34) and release.yml (bundle job: npm ci, build, build-mcpb.mjs, lines 124-128) run no audit at all, and build-mcpb.mjs:41 passes --no-audit to the npm ci that fills the bundle's node_modules.

Impact

The reasoning for PRs is sound, but the same leniency applies to the release path, where the .mcpb freezes the lockfile's production tree into an artifact users install. A critical advisory in shipped dependencies is currently visible only to someone who opens a green job's log. The project works directly on main with no PR review step, so nobody is prompted to look.

How to see it

Open any recent CI run: the "npm audit (production deps)" step shows a failure annotation while the job passes; release 0.60.0's bundle was built from the same lockfile.

Suggested fix

Keep the PR step advisory, and add a blocking npm audit --omit=dev --audit-level=high to the release bundle job (release.yml, before build-mcpb.mjs) and to publish.yml's build job, or make the CI step blocking on push to main only (continue-on-error: ${{ github.event_name == 'pull_request' }}).

Acceptance criteria

  • The workflow change is in place and a run shows the new behavior

Getting started

  • Relevant files: .github/workflows/ci.yml, .github/workflows/publish.yml, .github/workflows/release.yml, scripts/build-mcpb.mjs
  • How to run tests: npm run build && npm test (also npm run typecheck and npm run lint)
  • Related docs: CONTRIBUTING.md, AGENTS.md

Filed by repo-audit/full-audit at b8156ef. Severity: medium. Effort: S. audit-key: ci|.github/workflows/ci.yml|npm-audit-continue-on-error

主要言語
TypeScript
スター
1
フォーク
4
平均マージ
3日 4時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TMHSDigital/screencast-mcp のほかの issue

TMHSDigital/screencast-mcp の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。