Skip to content

Conversation

@maresb
Copy link
Contributor

@maresb maresb commented Nov 12, 2025

Description

Related Issue

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.49%. Comparing base (85a234a) to head (d22fc2d).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #7959   +/-   ##
=======================================
  Coverage   91.49%   91.49%           
=======================================
  Files         116      116           
  Lines       18962    18962           
=======================================
  Hits        17349    17349           
  Misses       1613     1613           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR tightens GitHub Actions security by implementing the principle of least privilege for workflow permissions. The changes follow a "deny-by-default" approach by setting top-level permissions: {} and then explicitly granting only the required permissions at the job level.

Key changes:

  • Added permissions: {} at the workflow level for all workflow files
  • Removed unnecessary contents: read permission from the devcontainer-docker-image.yml job
  • Refactored zizmor workflow to use the official zizmor-action instead of manual uvx execution
  • Added cooldown configuration to dependabot to reduce update frequency

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/zizmor.yml Refactored to use zizmor-action and tightened permissions with workflow-level permissions: {}
.github/workflows/tests.yml Added workflow-level permissions: {} to enforce least privilege
.github/workflows/slash_dispatch.yml Added workflow-level permissions: {} to enforce least privilege
.github/workflows/release.yml Added workflow-level permissions: {} to enforce least privilege
.github/workflows/publish-release-notes-to-discourse.yml Added workflow-level permissions: {} to enforce least privilege
.github/workflows/pr-auto-label.yml Added workflow-level permissions: {} to enforce least privilege
.github/workflows/mypy.yml Added workflow-level permissions: {} to enforce least privilege
.github/workflows/docker-image.yml Added workflow-level permissions: {} to enforce least privilege
.github/workflows/devcontainer-docker-image.yml Added workflow-level permissions: {} and removed unnecessary contents: read from job level
.github/dependabot.yml Added 7-day cooldown to reduce dependabot update frequency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


# Set permissions for GitHub token
# <https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#authenticating-to-package-registries-on-github>
permissions:
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

The job uses actions/checkout (line 27) which requires contents: read permission. Without this permission, the checkout action may fail. Even though actions/checkout can work with default permissions in some contexts, explicitly removing contents: read when the workflow uses checkout is problematic. The workflow-level permissions: {} denies all permissions, so the job needs explicit contents: read to checkout the repository.

Suggested change
permissions:
permissions:
contents: read

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Clearly incorrect.

Copy link
Contributor

@williambdean williambdean left a comment

Choose a reason for hiding this comment

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

Looks good from my side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants