Add Scorecard workflow for supply-chain security analysis#138
Add Scorecard workflow for supply-chain security analysis#138unclesp1d3r merged 2 commits intomainfrom
Conversation
This workflow runs Scorecard analysis for supply-chain security on the main branch and schedules it weekly. Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Summary by CodeRabbit
WalkthroughAdds a new GitHub Actions workflow Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub as GitHub (Events)
participant Actions as Actions Runner
participant Scorecard as ossf/scorecard-action
participant Artifact as SARIF Artifact Storage
participant CodeScan as GitHub Code Scanning API
GitHub->>Actions: trigger workflow (push / schedule)
Actions->>Scorecard: run analysis on repo
Scorecard-->>Actions: produce results.sarif
Actions->>Artifact: upload results.sarif (artifact)
alt publish_results enabled
Actions->>CodeScan: upload SARIF to code-scanning
CodeScan-->>GitHub: store/code-scanning insights
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Adds an OpenSSF Scorecard GitHub Actions workflow to evaluate supply-chain security posture and publish results (SARIF artifact + code scanning upload) on the default branch and on a weekly schedule.
Changes:
- Introduces a new
scorecard.ymlworkflow withpushandscheduletriggers (plusbranch_protection_rule). - Runs
ossf/scorecard-actionand publishes results to GitHub code scanning and as an artifact.
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@unclesp1d3r I've opened a new pull request, #139, to work on those changes. Once the pull request is ready, I'll request review from you. |
…-chain pinning (#139) Addresses code review feedback on the Scorecard workflow to follow repository security patterns and supply-chain hardening practices. **Security Hardening** - Replace `permissions: read-all` with explicit least-privilege grants (`contents: read`, `actions: read`) - Pin `github/codeql-action/upload-sarif@v3` to commit SHA `33119e582d3ab4ed79c2610af108cb08ff983917` **Workflow Improvements** - Add `workflow_dispatch:` trigger for manual runs - Remove unused `|| github.event_name == 'pull_request'` condition from job gate (no PR trigger exists) ```yaml # Before permissions: read-all # After permissions: contents: read actions: read ``` Aligns with patterns in `codeql.yml`, `ci.yml`, and `security.yml` workflows. <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: unclesp1d3r <251112+unclesp1d3r@users.noreply.github.com>
This workflow runs Scorecard analysis for supply-chain security on the main branch and schedules it weekly.