Set explicit permissions for release publishing workflows

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
半天
新手友好度
42/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
docker, github-actions, rust

调研方向

Start with the container and crate publishing workflow files under .github/workflows, where the permissions blocks for the publishing jobs are declared or missing. Map each job's token needs (Cargo registry, Docker Hub) to the minimal scopes, documenting a consumer for each. Done when all seven flagged jobs declare explicit permissions, secret boundaries are unchanged, and the CodeQL alerts close after merge.

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

描述

Continuous Integration Security task

Goal

Declare the minimum required GITHUB_TOKEN permissions for every release-publishing job currently relying on repository defaults, without changing release behavior or credential access.

Background

CodeQL reports seven missing-permission findings in the container and crate publishing workflows. The repository default is currently read-only, so the findings do not demonstrate a present write-token exploit. This is p3 release-supply-chain hardening against a future repository-default change.

Scope

  • Map each affected publishing job to its actual token requirements.
  • Add explicit minimum permissions for alerts 75, 78, 79, 80, 81, 82, and 104.
  • Preserve Cargo registry and Docker Hub publishing behavior and environment-secret boundaries.
  • Confirm the seven CodeQL alerts close after merge.

Acceptance criteria

  • All seven publishing jobs declare explicit minimum permissions.
  • Every granted permission has a documented consumer.
  • Publishing behavior and secret boundaries remain unchanged.
  • The scoped CodeQL alerts close.

Related to #2493.

主要语言
Rust
星标
532
派生
56
平均合并
11 小时 20 分钟
30 天内合并 PR
282

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

torrust/torrust-tracker 的其他 Issue

查看 torrust/torrust-tracker 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

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