libp2p / libp2p/rust-libp2p

Changelog enforcement can be skipped based on contributor-controlled PR titles

Open
#6,407 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
5.6k
Forks
1.3k
Avg merge
8h 47m
Merged PRs (30d)
19

Description

### Summary

The CI workflow disables changelog/version enforcement when a PR title starts with `chore`, `refactor`, `deps`, or `docs`. Since contributors control the initial PR title, an untrusted metadata field determines whether the policy check runs. Maintainers still decide whether to merge, but the system can present a false impression that changelog policy was enforced when it was actually skipped.

### Expected behavior

Whether changelog/version enforcement runs should depend only on trusted signals, such as maintainer-applied labels or diff-based classification of the changed files.

### Actual behavior

A contributor can open a PR that changes crate code and give it an exempt title prefix, causing the enforcement step to be skipped. If the maintainer does not rename the title or otherwise catch the mismatch, the PR may merge without the intended changelog/version check.

### Relevant log output

```shell
There may be no failing log output because the enforcement step is skipped entirely by this condition in `/.github/workflows/ci.yml`:

if: >
github.event_name == 'pull_request' &&
!startsWith(github.event.pull_request.title, 'chore') &&
!startsWith(github.event.pull_request.title, 'refactor') &&
!startsWith(github.event.pull_request.title, 'deps') &&
!startsWith(github.event.pull_request.title, 'docs') &&
!contains(github.event.pull_request.labels.*.name, 'internal-change')
```

### Possible Solution

Remove PR-title prefixes from the skip logic. Only allow exemptions through trusted maintainer actions, such as labels, or through deterministic diff-based checks. If title prefixes are kept, treat them only as hints and validate them against the actual changed files before skipping enforcement.

### Version

_No response_

### Would you like to work on fixing this bug?

Yes

Contributor guide

Open the contributing guide

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.

Research direction

Start in .github/workflows/ci.yml and inspect the pull_request condition that uses contributor-controlled title prefixes to skip changelog/version enforcement. Confirm how trusted labels or changed-file classification can determine exemptions, and consider the work done when an exempt title alone can no longer bypass enforcement.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, rust
Domain
ci-cd, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.