Set explicit permissions for release publishing workflows

Open
#2,496 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
42/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, github-actions, rust

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Rust
Stars
532
Forks
56
Avg merge
11h 20m
Merged PRs (30d)
282

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from torrust/torrust-tracker

All issues in torrust/torrust-tracker

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.