Skip to content

ci: add OpenSSF Scorecard analysis - #1341

Open
AdepuSriCharan wants to merge 3 commits into
dapr:mainfrom
AdepuSriCharan:feat/openssf-scorecard
Open

AdepuSriCharan wants to merge 3 commits into
dapr:mainfrom
AdepuSriCharan:feat/openssf-scorecard

Conversation

@AdepuSriCharan

@AdepuSriCharan AdepuSriCharan commented Oct 22, 2026 •

Copy link
Copy Markdown

Description

This PR adds an OpenSSF Scorecard workflow that assesses the Python SDK repository's supply-chain security practices.

The workflow runs on pushes to main, on a weekly schedule, and when branch protection rules change. It publishes Scorecard results using OIDC, uploads the SARIF findings to GitHub code scanning, and keeps the SARIF report as an artifact for five days. A concurrency group cancels superseded runs, so only the newest scan publishes results.

The workflow also:

  • Skips forks, which the official Scorecard action does not support.
  • Pins every action to a full commit SHA with a version comment. I checked each SHA against its release tag.
  • Uses read-all permissions at the top level, as Add the OpenSSF Scorecard GitHub Action and publish the results #1332 asks, with explicitly scoped job permissions.
  • Disables persisted checkout credentials.
  • Stays within the restrictions Scorecard's publishing API enforces: no top-level env or defaults, no top-level write permissions, and only allowed actions.
  • Leaves existing CI workflows and SDK code unchanged.

Validation:

Publication and code scanning uploads can only be verified upstream after merge, because the Scorecard action doesn't run on forks.

Issue reference

Closes #1332

Checklist

  • Code compiles correctly

Signed-off-by: Adepu Sri Charan <sricharan.adepu36@gmail.com>
@AdepuSriCharan
AdepuSriCharan requested review from a team as code owners October 22, 2026 16:53
@CasperGN CasperGN assigned CasperGN and unassigned CasperGN Oct 22, 2026
@CasperGN CasperGN self-assigned this Oct 26, 2026

@sicoyle sicoyle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you so much @AdepuSriCharan for your interest in the Dapr open source project and for putting this together! 🙌 The workflow is nicely locked down: read-only top-level permissions, a narrowly scoped job, non-persisted checkout credentials and SHA-pinned actions all line up with the upstream Scorecard template. Could you double-check that each pinned SHA matches the tag in its trailing comment? We'll also keep an eye on the first run on main, since publishing can't be exercised from a fork 👀. I left one small comment inline, please take a look.

Drafted with AI assistance and reviewed by me.

types: [created, edited, deleted]

permissions: read-all

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: what do you think about adding a concurrency group here? If several pushes land on main close together, or a push lands near the weekly cron, each one kicks off a full Scorecard run that publishes results and uploads SARIF, but only the latest run actually matters. Something like this at the top level would drop the redundant runs:

concurrency:
 group: ${{ github.workflow }}-${{ github.ref }}
 cancel-in-progress: true

I'd use the block form rather than an inline { ... } mapping so the ${{ }} expression doesn't get tangled up with YAML flow syntax. Not blocking, happy to merge without it if you'd prefer to keep the workflow identical to the upstream template.

(

)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks @sicoyle, good idea! I have added it in block form as you suggested. All three triggers run against main, so they share one group, and a newer run cancels the older one. The SARIF upload steps already skip cancelled runs. I also checked Scorecard's publish verifier, and it has no restriction on top-level concurrency, so publishing isn't affected.

@CasperGN CasperGN removed their assignment Oct 27, 2026
@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.18%. Comparing base (461d576) to head (ba9b1e7).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1341      +/-   ##
==========================================
+ Coverage   87.83%   88.18%   +0.35%     
==========================================
  Files         163      165       +2     
  Lines       13065    13432     +367     
==========================================
+ Hits        11475    11845     +370     
+ Misses       1590     1587       -3     

☔ View full report in Codecov by Harness.
📢 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.

Signed-off-by: Adepu Sri Charan <sricharan.adepu36@gmail.com>
@CasperGN CasperGN self-assigned this Oct 27, 2026
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.

Add the OpenSSF Scorecard GitHub Action and publish the results

3 participants