Skip to content

Conversation

@JasperSui
Copy link
Owner

Security Improvements for GitHub Actions Workflows

This PR includes security improvements for our GitHub Actions workflows:

Changes

  1. Added explicit permissions to all workflow files:

    • labeler.yml: Added read/write permissions for contents, issues, and pull requests
    • release.yml: Added write permissions for contents and id-token
    • tests.yml: Added read permissions for contents/actions and write for checks
  2. Pinned all GitHub Actions to specific commit hashes for better security:

Security Benefits

These changes follow GitHub's security best practices by:

  • Using the principle of least privilege with explicit permissions
  • Preventing supply chain attacks by pinning action versions to specific commit hashes
  • Maintaining the same functionality while improving security posture

Testing

  • Workflows have been tested to ensure they continue to function as expected
  • All permissions are set to the minimum required levels for each workflow

@JasperSui JasperSui merged commit 2b9e977 into main Dec 21, 2024
37 checks passed
@JasperSui JasperSui deleted the chore/improve-workflow-security branch December 21, 2024 02:10
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.

1 participant