Add the OpenSSF Scorecard GitHub Action and publish the results
Maintainer antworten meist innerhalb von 2 Tagen
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 78/100
Rechercherichtung
Beginne mit dem README der Scorecard-Action und den vorhandenen Workflows unter .github/workflows/; füge einen Workflow hinzu, der die aufgeführten Anforderungen an Trigger, Berechtigungen, Action-Pinning, Veröffentlichung der Ergebnisse und den SARIF-Upload erfüllt. Führe actionlint .github/workflows/scorecard.yaml aus, um ihn zu prüfen. Fertig ist die Aufgabe, wenn der Workflow die Akzeptanzkriterien erfüllt und die bestehende CI weiterhin grün ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem
python-sdk has no OpenSSF Scorecard results published. The public Scorecard API returns nothing for it today (curl -s https://api.securityscorecards.dev/projects/github.com/dapr/python-sdk is a 404), while dapr/dapr is already scanned. Running the official Scorecard action on a schedule gives users a public score for the project's supply-chain practices, and gives maintainers a list of concrete things to fix (pinned dependencies, token permissions, branch protection and so on) in the repo's code scanning alerts.
Proposed change
Add a workflow, for example .github/workflows/scorecard.yaml, using ossf/scorecard-action. The action's README has a starter workflow; the important parts are:
- Triggers:
pushtomain, a weeklyschedule, andbranch_protection_rule. - Top-level
permissions: read-all, and on the job only what it needs:security-events: write(upload SARIF),id-token: write(publish results),contents: read,actions: read. ossf/scorecard-actionwithresults_format: sarifandpublish_results: true.- Upload the SARIF with
github/codeql-action/upload-sarifso findings appear under Security, Code scanning. - Optionally upload the SARIF with
actions/upload-artifacttoo, for easy download.
Pin the actions in this new workflow to commit SHAs with the version as a trailing comment (for example uses: actions/checkout@<sha> # v7.0.0). Scorecard's own Pinned-Dependencies check expects it, and publish_results: true requires the workflow to follow the action's restrictions (see its README).
Optionally, add the Scorecard badge to README.md:
[](https://scorecard.dev/viewer/?uri=github.com/dapr/python-sdk)
Acceptance criteria
- A Scorecard workflow runs on push to
main, weekly, and on branch protection changes. - It uses
ossf/scorecard-actionwithpublish_results: true, and uploads the SARIF to code scanning. - The workflow's token has read-only permissions at the top level and only the job-level write permissions listed above.
- All
uses:in the new workflow are pinned to full commit SHAs with a version comment. - Existing CI stays green.
How to test
- Run
actionlint .github/workflows/scorecard.yamllocally. - After merge (or via
workflow_dispatchif you add it), check the run succeeds and that results appear under Security, Code scanning. - Confirm
curl -s https://api.securityscorecards.dev/projects/github.com/dapr/python-sdkreturns a JSON result. - Before opening the PR you can preview the score locally with the scorecard CLI:
scorecard --repo=github.com/dapr/python-sdk(needs aGITHUB_AUTH_TOKEN).
- Vorherrschende Sprache
- Python
- Sterne
- 274
- Forks
- 160
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 70
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus dapr/python-sdk
-
SDK Alignment of Workflow ExamplesEvtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offendapr-ext-workflow good first issue kind/enhancement P2
Schwierigkeit 2/5 1-2 Tage Anfängerfreundlichkeit 72/100
dapr/python-sdk#853 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 47/100
dapr/python-sdk#1346 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Add PyPI keywords and project links to the dapr packageEvtl. vergeben @SpinachDigital hat das vor 4 Tagen übernommen. Offengood first issue help wanted kind/enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 20/100
dapr/python-sdk#1335 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Give each workflow's token only the permissions it needsEvtl. vergeben @AlphaNen hat das vor 4 Tagen übernommen. Offengood first issue help wanted
dapr/python-sdk#1333 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 2 Tagen
-
ci/release-failure release
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 25/100
dapr/python-sdk#1320 ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in dapr/python-sdk
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
nansencenter/geodataset#39 ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
awslabs/visual-asset-management-system#804 ·
Maintainer antworten meist innerhalb von 1 Tag
-
follow-up
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
odoo/odoo#297927 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
link-rot
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 67/100