Skip to content

Conversation

OmBiradar
Copy link
Contributor

Description

This PR addresses security findings from Scorecard regarding GitHub workflow token permissions. It implements the principle of least privilege by explicitly defining minimal required permissions in all workflow files.

Specific changes:

  • Added explicit top-level permissions to workflows where they were missing
  • Added appropriate comments documenting why each permission is needed
  • Ensured all workflows follow permission best practices

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)

Additional requirements

  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

Code of Conduct

By submitting this PR, you agree to follow our Code of Conduct.

  • I agree to follow this project's Code of Conduct

References:

permissions:
  actions: read|write|none
  checks: read|write|none
  contents: read|write|none
  deployments: read|write|none
  id-token: read|write|none
  issues: read|write|none
  discussions: read|write|none
  packages: read|write|none
  pages: read|write|none
  pull-requests: read|write|none
  repository-projects: read|write|none
  security-events: read|write|none
  statuses: read|write|none

Copy link

codecov bot commented Aug 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.87%. Comparing base (714a29d) to head (78d7983).
⚠️ Report is 210 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (714a29d) and HEAD (78d7983). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (714a29d) HEAD (78d7983)
2 1
Additional details and impacted files
@@             Coverage Diff              @@
##              main     #759       +/-   ##
============================================
- Coverage   100.00%   80.87%   -19.13%     
============================================
  Files           15       14        -1     
  Lines         1071     1511      +440     
============================================
+ Hits          1071     1222      +151     
- Misses           0      289      +289     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kairoaraujo kairoaraujo merged commit 6af1a63 into repository-service-tuf:main Aug 19, 2025
25 of 26 checks passed
@OmBiradar OmBiradar deleted the fix/reduce-github-workflow-tokens-permissions branch August 20, 2025 23:42
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