Skip to content

security: pin dependencies and restrict token permissions - #90

Merged
knecasov merged 1 commit into
containers:mainfrom
djach7:openssf-evaluation
May 7, 2026
Merged

security: pin dependencies and restrict token permissions#90
knecasov merged 1 commit into
containers:mainfrom
djach7:openssf-evaluation

Conversation

@djach7

@djach7 djach7 commented May 1, 2026

Copy link
Copy Markdown
Collaborator

Pin all GitHub Actions to commit SHAs and container images to digests
to prevent supply chain attacks. Add explicit permissions blocks to
workflows following principle of least privilege.

Changes:

  • Pin actions/checkout, actions/setup-go, codecov/codecov-action, actions/create-github-app-token, cycjimmy/semantic-release-action, goreleaser/goreleaser-action, and github/codeql-action to commit SHAs
  • Pin quay.io/fedora/fedora container image to sha256 digest
  • Add workflow-level "contents: read" permission to ci.yml and security.yml
  • Add job-level "contents: write" permission to version-release job

These changes address OpenSSF Scorecard findings:

  • Pinned-Dependencies: 0/10 -> 10/10
  • Token-Permissions: 0/10 -> 10/10
  • Expected overall score improvement: 6.8/10 -> ~8.0/10

Related: THEEDGE-4717

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

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

@codecov

codecov Bot commented May 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.37%. Comparing base (3a306a0) to head (7ed4b1b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #90      +/-   ##
==========================================
+ Coverage   79.19%   79.37%   +0.17%     
==========================================
  Files          10       10              
  Lines        1115     1115              
==========================================
+ Hits          883      885       +2     
+ Misses        134      133       -1     
+ Partials       98       97       -1     

☔ 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.

@miabbott

miabbott commented May 1, 2026

Copy link
Copy Markdown

I don't disagree with the pinning of the actions, but I just want to understand how we would handle updating them in the future.

Dependabot has made this easier in the past with their auto-generated PRs; can the behavior of dependabot be changed to use digests instead of tags?

@djach7

djach7 commented May 5, 2026

Copy link
Copy Markdown
Collaborator Author

Sorry @miabbott I missed this comment. From my understanding (and what I've learned grilling claude about this) dependabot should maintain whatever format is in the file. So after this PR is merged all future dependabot PRs should switch to using digests as well.

Comment thread .github/workflows/security.yml Outdated
Comment thread .github/workflows/security.yml Outdated
Comment thread .github/workflows/ci.yml
@djach7
djach7 force-pushed the openssf-evaluation branch from de67fa1 to 52f1e85 Compare May 5, 2026 15:17
Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/release.yml Outdated

@knecasov knecasov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I added a few comments.

@djach7
djach7 force-pushed the openssf-evaluation branch from 52f1e85 to 20ddf6d Compare May 5, 2026 17:52
@djach7

djach7 commented May 5, 2026

Copy link
Copy Markdown
Collaborator Author

@knecasov thanks for reviewing! I just pushed an update addressing your comments and I resolved the ones that were comment or hash updates. I left the digest one open in case we want to have more discussion there.

Comment thread .github/workflows/ci.yml Outdated
@djach7
djach7 force-pushed the openssf-evaluation branch from 20ddf6d to 5b970dd Compare May 5, 2026 19:28
@knecasov

knecasov commented May 6, 2026

Copy link
Copy Markdown
Collaborator

@knecasov thanks for reviewing! I just pushed an update addressing your comments and I resolved the ones that were comment or hash updates. I left the digest one open in case we want to have more discussion there.

Thank you very much, @djach7! I added some comments.

@djach7
djach7 force-pushed the openssf-evaluation branch from 5b970dd to 957002d Compare May 6, 2026 13:50

@knecasov knecasov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! Thank you very much for incorporating comments and the discussion.

@pcdubs pcdubs left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@djach7
djach7 force-pushed the openssf-evaluation branch from 957002d to 56ea7ff Compare May 7, 2026 18:05
  Pin all GitHub Actions to commit SHAs and container images to digests
  to prevent supply chain attacks. Add explicit permissions blocks to
  workflows following principle of least privilege.

  Changes:
  - Pin actions/checkout, actions/setup-go, codecov/codecov-action,
    actions/create-github-app-token, cycjimmy/semantic-release-action,
    goreleaser/goreleaser-action, and github/codeql-action to commit SHAs
  - Pin quay.io/fedora/fedora container image to sha256 digest
  - Add workflow-level "contents: read" permission to ci.yml and security.yml
  - Add job-level "contents: write" permission to version-release job

  These changes address OpenSSF Scorecard findings:
  - Pinned-Dependencies: 0/10 -> 10/10
  - Token-Permissions: 0/10 -> 10/10
  - Expected overall score improvement: 6.8/10 -> ~8.0/10

  Related: THEEDGE-4717

  Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Signed-off-by: djach7 <djachimo@redhat.com>
@djach7
djach7 force-pushed the openssf-evaluation branch from 56ea7ff to 7ed4b1b Compare May 7, 2026 18:15
@knecasov
knecasov merged commit 99bf09b into containers:main May 7, 2026
12 of 14 checks passed
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.

4 participants