Skip to content

Fix/token permissions id 20260911 - #774

Merged
hyperpolymath merged 6 commits into
mainfrom
fix/token-permissions-id-20260911
Sep 12, 2026
Merged

Fix/token permissions id 20260911#774
hyperpolymath merged 6 commits into
mainfrom
fix/token-permissions-id-20260911

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Closes #

Type of change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (would change existing behaviour)
  • 🕳️ Soundness fix (fixes a checker/proof false-negative)
  • 📖 Documentation
  • 🧹 Refactor / tech debt (behaviour-preserving)
  • ⚡ Performance
  • 🔧 Build / CI / tooling

How has this been verified?

Checklist

  • My commits are signed (git commit -S).
  • I ran the project's own checks/tests locally and they pass.
  • New files carry the correct SPDX-License-Identifier (code/config MPL-2.0,
    prose CC-BY-SA-4.0); I did not relicense existing files.
  • Docs are updated, and no public claim now overstates what the code does.
  • I have not introduced a soundness hole (or I have flagged where I might have).

Notes for reviewers

hyperpolymath and others added 5 commits September 11, 2026 10:01
Removing rust-ci.yml workflow since this repository has no Rust code
(Cargo.toml not present). The reusable rust-ci-reusable.yml already guards
itself by detecting Cargo.toml presence, but repos without Rust code
shouldn't trigger unnecessary workflow runs.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…le workflows

- Add persist-credentials: false to checkout action in codeql-reusable.yml
- Add persist-credentials: false to checkout action in hypatia-scan-reusable.yml

This prevents credential persistence in CI/CD workflows, improving security.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…-level write

Apply principle of least privilege for GITHUB_TOKEN:
- Change top-level permissions from 'contents: write' to 'contents: read'
- Add job-level 'permissions: contents: write' to jobs that need it

This resolves Scorecard TokenPermissionsID alerts by following GitHub's
recommended security practice of granting minimal top-level permissions
and escalating only at the job level where needed.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Apply principle of least privilege for GITHUB_TOKEN:
- Change top-level permissions to read-only
- Jobs inherit read permissions, can escalate as needed

This resolves Scorecard TokenPermissionsID alerts.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
- Add Optimus-Branch.json for branch protection
- Add Immutable-Tags.json for tag protection
- Both use native GitHub rulesets API (no bypass actors)
- Replaces deprecated probot/settings branch protection

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 3c106370-1bb4-4fa5-bb21-27285e94ca5f

📥 Commits

Reviewing files that changed from the base of the PR and between cc88e9c and 1730741.

📒 Files selected for processing (8)
  • .github/workflows/changelog.yml
  • .github/workflows/codeql-reusable.yml
  • .github/workflows/hypatia-scan-reusable.yml
  • .github/workflows/readme-derive.yml
  • .github/workflows/rust-ci.yml
  • .github/workflows/signed-push-smoke.yml
  • config/rulesets/Immutable-Tags.json
  • config/rulesets/Optimus-Branch.json

📝 Summary

Summary by CodeRabbit

  • Security & Access Controls

    • Reduced default workflow permissions to read-only, granting write access only where required.
    • Prevented Git credentials from being retained after automated repository checkouts.
  • Repository Protection

    • Added immutable tag protections, including signed-tag requirements and safeguards against deletion or rewriting.
    • Added default-branch protections requiring signed commits, pull-request approvals, resolved discussions, and successful status checks.
  • Maintenance

    • Removed the standalone Rust CI workflow.

Walkthrough

The changes narrow GitHub Actions permissions, prevent checkout credential persistence, remove the standalone Rust CI workflow, and add active rulesets for tag and default-branch protection.

Changes

Repository governance

Layer / File(s) Summary
Workflow permission and credential hardening
.github/workflows/changelog.yml, .github/workflows/readme-derive.yml, .github/workflows/signed-push-smoke.yml, .github/workflows/codeql-reusable.yml, .github/workflows/hypatia-scan-reusable.yml
The workflows use read-only contents permissions or disable persisted checkout credentials. The smoke-test job retains its required write permission.
Rust workflow removal
.github/workflows/rust-ci.yml
The standalone Rust CI workflow is deleted.
Tag and branch rulesets
config/rulesets/Immutable-Tags.json, config/rulesets/Optimus-Branch.json
Active rulesets protect all tags and the default branch. They enforce signed changes, update restrictions, pull-request review, thread resolution, and strict status checks.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: joshuajewell

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

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

A rabbit checks the workflow gate,
Read-only keys now guard the state.
Tags stand firm and branches stay bright,
Signed steps guide each change aright.
The carrot CI path rests tonight.

Comment @coderabbitai help to get the list of available commands.

@hyperpolymath
hyperpolymath merged commit 8ebeb45 into main Sep 12, 2026
11 of 15 checks passed
@hyperpolymath
hyperpolymath deleted the fix/token-permissions-id-20260911 branch September 12, 2026 16:32
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants