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

未关闭 适合新手
#460 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
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 小时
30 天内合并 PR
4

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TMHSDigital/screencast-mcp 的其他 Issue

查看 TMHSDigital/screencast-mcp 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。