Skip to content

chore(Tasken): workflow hygiene — ubuntu-24.04, permissions#37

Merged
KooshaPari merged 1 commit into
mainfrom
chore/workflow-hygiene-ubuntu-24
Jun 2, 2026
Merged

chore(Tasken): workflow hygiene — ubuntu-24.04, permissions#37
KooshaPari merged 1 commit into
mainfrom
chore/workflow-hygiene-ubuntu-24

Conversation

@KooshaPari

@KooshaPari KooshaPari commented May 28, 2026

Copy link
Copy Markdown
Owner

User description

Summary

  • Replace ubuntu-latest with ubuntu-24.04 across all workflow files
  • Add minimal permissions: blocks to workflow files missing them

Test plan

  • CI passes on this branch
  • Merge after review

🤖 Generated with Claude Code


Note

Medium Risk
Runner pin is low risk; tightening default token permissions may break workflows that need write access (notably auto-merge and PR-comment jobs) until job-level permissions are added.

Overview
Standardizes GitHub Actions across the repo by pinning every job from ubuntu-latest to ubuntu-24.04, and adds workflow-level permissions: (contents: read, pull-requests: read) on workflows that previously relied on the default GITHUB_TOKEN scope.

Workflows that already declared their own permissions (e.g. CodeQL, release, pages deploy, scorecard, security) are unchanged except for the runner image; job-level permission overrides are left as-is.

Reviewed by Cursor Bugbot for commit 2569b38. Bugbot is set up for automated code reviews on this repo. Configure here.


CodeAnt-AI Description

Standardize GitHub Actions runs on Ubuntu 24.04 and limit workflow token access

What Changed

  • CI, security, release, coverage, benchmark, and maintenance workflows now run on Ubuntu 24.04 instead of the floating Ubuntu image
  • Several workflows now request only read access by default when they only need to check code or report results
  • Workflows that need extra access, such as releases, pages deployment, and security scans, keep their existing higher permissions

Impact

✅ More predictable CI runs
✅ Fewer workflow permission failures
✅ Safer default token access

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Copilot AI review requested due to automatic review settings May 28, 2026 08:30
@codeant-ai

codeant-ai Bot commented May 28, 2026

Copy link
Copy Markdown

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label May 28, 2026
Comment thread .github/workflows/auto-merge.yml
Comment thread .github/workflows/quality-gate.yml
Comment thread .github/workflows/sast.yml
@codeant-ai

codeant-ai Bot commented May 28, 2026

Copy link
Copy Markdown

CodeAnt AI finished reviewing your PR.

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 3 potential issues.

Fix All in Cursor

Bugbot Autofix prepared fixes for all 3 issues found in the latest run.

  • ✅ Fixed: Permissions too restrictive for PR merge operation
    • Added pull-requests:write and contents:write permissions to enable the merge operation.
  • ✅ Fixed: Missing security-events permission for CodeQL analyze action
    • Added security-events:write permission to allow CodeQL SARIF result uploads.
  • ✅ Fixed: Missing checks:write permission for rustsec/audit-check action
    • Added checks:write permission to allow audit-check to create GitHub Check Runs.

Create PR

Or push these changes by commenting:

@cursor push 1d7a54346e
Preview (1d7a54346e)
diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml
--- a/.github/workflows/auto-merge.yml
+++ b/.github/workflows/auto-merge.yml
@@ -1,7 +1,7 @@
 name: Auto Merge
 permissions:
-  contents: read
-  pull-requests: read
+  contents: write
+  pull-requests: write
 
 on:
   pull_request:

diff --git a/.github/workflows/cargo-audit.yml b/.github/workflows/cargo-audit.yml
--- a/.github/workflows/cargo-audit.yml
+++ b/.github/workflows/cargo-audit.yml
@@ -2,6 +2,7 @@
 permissions:
   contents: read
   pull-requests: read
+  checks: write
 
 on:
   push:

diff --git a/.github/workflows/sast.yml b/.github/workflows/sast.yml
--- a/.github/workflows/sast.yml
+++ b/.github/workflows/sast.yml
@@ -2,6 +2,7 @@
 permissions:
   contents: read
   pull-requests: read
+  security-events: write
 on:
   push:
     branches: [main, develop]

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 2569b38. Configure here.

Comment thread .github/workflows/auto-merge.yml
Comment thread .github/workflows/sast.yml
Comment thread .github/workflows/cargo-audit.yml

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@kilo-code-bot

kilo-code-bot Bot commented May 28, 2026

Copy link
Copy Markdown

Code Review Summary

Status: Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
.github/workflows/quality-gate.yml 4 pull-requests: read permission insufficient - workflow uses github.rest.issues.createComment which requires pull-requests: write permission
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
.github/workflows/auto-merge.yml 2-4 Already flagged by Cursor Bugbot: needs contents: write and pull-requests: write for merge operations
.github/workflows/sast.yml 2-4 Already flagged by Cursor Bugbot: needs security-events: write for CodeQL SARIF uploads
.github/workflows/cargo-audit.yml 2-4 Already flagged by Cursor Bugbot: needs checks: write for audit-check action
Files Reviewed (15 files)
  • .github/workflows/auto-merge.yml - Permissions issue documented by Cursor Bugbot
  • .github/workflows/benchmarks.yml - No issues
  • .github/workflows/cargo-audit.yml - Permissions issue documented by Cursor Bugbot
  • .github/workflows/cargo-deny.yml - No issues
  • .github/workflows/cargo-machete.yml - No issues
  • .github/workflows/cargo-semver-checks.yml - No issues
  • .github/workflows/ci.yml - No issues
  • .github/workflows/codeql-rust.yml - No issues
  • .github/workflows/codeql.yml - No issues
  • .github/workflows/coverage.yml - No issues
  • .github/workflows/journey-gate.yml - No issues
  • .github/workflows/pages-deploy.yml - No issues
  • .github/workflows/pre-commit.yml - No issues
  • .github/workflows/quality-gate.yml - 1 WARNING (insufficient permissions)
  • .github/workflows/release.yml - No issues
  • .github/workflows/sast.yml - Permissions issue documented by Cursor Bugbot
  • .github/workflows/security-gate.yml - No issues
  • .github/workflows/security.yml - No issues
  • .github/workflows/scorecard.yml - No issues
  • .github/workflows/trufflehog.yml - No issues

Summary:
This PR updates all workflow files to use ubuntu-24.04 instead of ubuntu-latest and adds permissions: blocks to workflows missing them.

Critical Issue: The quality-gate.yml workflow creates PR comments (line 194-198) but only has pull-requests: read permission. This will cause the PR comment step to fail. Additionally, Cursor Bugbot identified 3 other permission issues (auto-merge, sast.yml, cargo-audit.yml) that have existing comments.

Fix these issues in Kilo Cloud


Reviewed by laguna-m.1-20260312:free · 913,798 tokens

Comment thread .github/workflows/quality-gate.yml
@KooshaPari KooshaPari merged commit 52448d5 into main Jun 2, 2026
10 of 14 checks passed
@KooshaPari KooshaPari deleted the chore/workflow-hygiene-ubuntu-24 branch June 2, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants