Skip to content

Update vulnerable dev dependencies and restrict CI token permissions - #145

Merged
izikaj merged 3 commits into
mainfrom
security-deps-update
Nov 25, 2026
Merged

izikaj merged 3 commits into
mainfrom
security-deps-update

Conversation

@izikaj

@izikaj izikaj commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Close the open Dependabot and code-scanning alerts. All affected gems are dev and test dependencies only. The gemspec does not depend on them, so the published gem does not change.

Changes

  • Bump rack 3.2.4 → 3.2.9, addressable 2.8.8 → 2.10.0, net-imap 0.6.2 → 0.6.8, json 2.18.0 → 2.21.2, erb 6.0.1 → 6.0.7, yard 0.9.38 → 0.9.45, mail 2.9.0 → 2.9.1
    • Conservative, minor-only update: json stays on 2.x, so rubocop does not change
  • Set permissions: contents: read in the CI workflow, because the job only checks out the code and runs tests
  • Run bundle exec rspec in CI before the Appraisal runs. The Appraisal gemfiles are not committed, so they resolve the newest gem versions, and no PR ran the specs against Gemfile.lock (or mail 2.9) before

How to test

No QA needed — non-user-facing dev dependency and CI changes only

Summary by CodeRabbit

  • Chores
    • Limited the automated workflow to read-only access to repository contents.
    • Clarified test labels to distinguish runs using the latest gem versions from runs using the locked dependencies.

Bump rack, addressable, net-imap, json, erb, yard and mail to patched
versions. Use a conservative, minor-only update so json stays on 2.x
and rubocop does not change. These gems are dev and test dependencies
only; the gemspec does not depend on them.

Set the workflow token to read-only contents, because the CI job only
checks out the code and runs tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The workflow now grants read access to repository contents. It also labels the RSpec and Appraisal test steps and notes that Appraisal runs use the newest gem versions because Appraisal gemfiles are not committed.

Changes: Workflow Configuration

Layer / File(s) Summary
Set contents permission
.github/workflows/main.yml
A top-level permissions block sets contents to read.
Label test steps
.github/workflows/main.yml
The workflow labels the RSpec step “Test with Gemfile.lock” and the Appraisal step “Test with Appraisals.” A comment notes that Appraisal gemfiles are not committed and the runs use the newest gem versions.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: r4do

Merge Risk: Minimal · up to 9ca5f · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the two changes in the PR: updating vulnerable development dependencies and restricting CI token permissions. The raw summary and objectives confirm both changes: the dependency bumps …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description covers the motivation, the list of changes, and a test note. It explains that the bumped gems are dev and test dependencies only, so the published gem does not change. It also explains…
Full details: Title check

Explanation

The title names the two changes in the PR: updating vulnerable development dependencies and restricting CI token permissions. The raw summary and objectives confirm both changes: the dependency bumps and the workflow change to contents: read. The title is specific and matches the main changeset.

Full details: Description check

Explanation

The description covers the motivation, the list of changes, and a test note. It explains that the bumped gems are dev and test dependencies only, so the published gem does not change. It also explains why the CI permissions change and the new bundle exec rspec step were added. The How to test section says no QA is needed and gives a reason. The template's Images and GIFs section is missing, and the How to test section has no checklist items. Both gaps are non-critical for a dev-dependency and CI change.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 29a068f and 9ca5fec.

Files selected for processing: 1

  • .github/workflows/main.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the dependency updates and CI token permission restrictions.

No open issues 🎉

What changed in this PR

Updates development and test dependencies to address reported vulnerabilities and restricts CI token permissions, without changing the published gem’s dependencies.

Changes:

  • Updates seven gems in Gemfile.lock, keeping JSON on 2.x and RuboCop unchanged.
  • Sets workflow-level token permissions to contents: read.
File Description
Gemfile.lock Updates addressable, erb, json, mail, net-imap, rack, and yard.
.github/​workflows/​main.yml Restricts the CI token to read-only repository contents access.

Review effort: Balanced

@izikaj izikaj self-assigned this Nov 25, 2026
@izikaj
izikaj marked this pull request as ready for review November 25, 2026 12:52
@izikaj
izikaj requested review from IgorDobryn and mklocek November 25, 2026 12:52
@izikaj
izikaj enabled auto-merge November 25, 2026 15:06
The Appraisal gemfiles are not committed, so appraisal rspec resolves
the newest gem versions and never uses Gemfile.lock. Without this step,
a lockfile change first runs the specs in the release workflow. It also
runs the specs with mail 2.9, which no Appraisal covers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@izikaj
izikaj merged commit 0daada0 into main Nov 25, 2026
4 checks passed
@izikaj
izikaj deleted the security-deps-update branch November 25, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants