chore(ci): check the RustSec advisory database on a schedule, so a new advisory is found on main and not on someone's pull request

未关闭
#90 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
56/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, rust

调研方向

Read .github/workflows/ci.yml for the existing deny job and .github/workflows/flake-hunt.yml for the schedule precedent, then review deny.toml and the supply-chain section of ADR-0101. Add a scheduled, manually dispatchable advisory check and document its failure handling in docs/src/architecture/cicd.md and docs/src/contributing/standards.md; verify the documented control by removing the RUSTSEC-2023-0071 ignore on a throwaway branch and confirming the run names the advisory.

由索引模型根据 Issue 内容生成。

描述

area:process prio:p1

Context

The deny job (added by #87, closing #40) runs cargo deny --locked check, which fetches the RustSec advisory database on every run, and it is in gate's needs, the only required check. So a newly published advisory turns the job red, and every Rust pull request with it, with no change to the code. Nothing looks at the database between pull requests, so the first person to find out is whoever happens to open one.

This is not hypothetical. When deny.toml was written, seven advisories already failed on main, and two of them (RUSTSEC-2026-0385 and -0387) had been published on 2026-10-23, three days after #40 was filed on 2026-10-20. They were found only because that work ran against the live database.

ci.yml triggers on pull_request, merge_group, push to main and workflow_dispatch. The only scheduled workflow is flake-hunt.yml (weekly).

Problem

  • A new advisory is first seen on an unrelated pull request, which is then red for a reason it did not cause.
  • main can be red-in-waiting for as long as nobody pushes.

Proposal

  • A scheduled workflow that runs cargo deny --locked check advisories against main, with the same pinned cargo-deny and the same deny.toml, and fails visibly when an advisory appears. Decide how it tells someone: a failing scheduled run that watchers are notified of, or one tracking issue it opens and updates. Daily is probably right for something time-sensitive; flake-hunt.yml is weekly.
  • Keep it out of gate: it reports on main, and gate is about the pull request in front of it.
  • Decide whether the pull-request deny job should keep the advisories check. Keeping it means an unrelated advisory blocks every pull request until it is fixed (today's behaviour, fail-closed). Dropping it to licenses bans sources decouples pull requests from drift but leaves advisories to the schedule alone. The schedule does not change which of those you pick; it only makes the warning arrive on main first.
  • Note that flake-hunt.yml records that GitHub disables scheduled workflows in a public repository after 60 days without repository activity.

Acceptance criteria

  • A scheduled workflow exists (actions pinned by SHA, permissions no wider than it needs) and can also be started by workflow_dispatch.
  • The control: on a throwaway branch with the RUSTSEC-2023-0071 ignore deleted from deny.toml, a dispatched run fails and names that advisory (as the throwaway pull request #88 did for the pull-request job).
  • What happens when it fails, and who is told, is written in docs/src/architecture/cicd.md. That page and docs/src/contributing/standards.md ("Decided, and built only in part") now say there is no scheduled check of the advisory database; update both.

References

#40, #87; deny.toml; the deny job in .github/workflows/ci.yml; .github/workflows/flake-hunt.yml (the schedule precedent and the 60-day note); ADR-0101 (.agents/plans/contrail/adrs/ci/0101-ci-supply-chain.md); docs/src/architecture/cicd.md, "Permissions and supply chain".

主要语言
Rust
星标
0
派生
0
平均合并
1 小时 35 分钟
30 天内合并 PR
67

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

aRustyDev/thrust 的其他 Issue

查看 aRustyDev/thrust 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

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