Skip to content

Add Scorecard workflow for supply-chain security analysis#138

Merged
unclesp1d3r merged 2 commits intomainfrom
Add-OSSF-Scorecard-Scanning
Feb 7, 2026
Merged

Add Scorecard workflow for supply-chain security analysis#138
unclesp1d3r merged 2 commits intomainfrom
Add-OSSF-Scorecard-Scanning

Conversation

@unclesp1d3r
Copy link
Member

This workflow runs Scorecard analysis for supply-chain security on the main branch and schedules it weekly.

This workflow runs Scorecard analysis for supply-chain security on the main branch and schedules it weekly.

Signed-off-by: UncleSp1d3r <unclesp1d3r@evilbitlabs.io>
Copilot AI review requested due to automatic review settings February 7, 2026 02:39
@unclesp1d3r unclesp1d3r self-assigned this Feb 7, 2026
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Feb 7, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 7, 2026

Summary by CodeRabbit

  • Chores
    • Added an automated supply-chain security workflow that runs on code changes and schedules, generates security assessment reports, uploads artifacts, and publishes results to code scanning; includes configurable options for token/permission setup and repository visibility.

Walkthrough

Adds a new GitHub Actions workflow .github/workflows/scorecard.yml that runs OSSF Scorecard analysis on pushes and scheduled branch-protection triggers, uploads SARIF results, and can publish results to GitHub code-scanning with configurable permissions and token guidance. (49 words)

Changes

Cohort / File(s) Summary
GitHub Actions Security Workflow
.github/workflows/scorecard.yml
Added a workflow that runs OSSF Scorecard via ossf/scorecard-action, checks out the repo, writes results.sarif, uploads the SARIF artifact, and optionally publishes code-scanning results. Includes scheduled and push triggers, minimal default permissions, and commented guidance for token/permission adjustments.

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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through code to find each trace,
I scanned the chains in every place,
A SARIF bag clutched to my paws,
I left small notes and handy laws,
Securely hopping on my way — hooray! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: adding a Scorecard workflow for supply-chain security analysis, which matches the changeset that introduces a new GitHub Actions workflow file.
Description check ✅ Passed The description is directly related to the changeset, explaining that the workflow runs Scorecard analysis for supply-chain security on the main branch with weekly scheduling, which aligns with the workflow file additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Add-OSSF-Scorecard-Scanning

Comment @coderabbitai help to get the list of available commands and usage tips.

@dosubot
Copy link

dosubot bot commented Feb 7, 2026

Related Documentation

Checked 21 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@dosubot dosubot bot added the security Security-related issues and vulnerabilities label Feb 7, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.yml workflow with push and schedule triggers (plus branch_protection_rule).
  • Runs ossf/scorecard-action and publishes results to GitHub code scanning and as an artifact.

@unclesp1d3r
Copy link
Member Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

Copilot AI commented Feb 7, 2026

@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>
@unclesp1d3r unclesp1d3r enabled auto-merge (squash) February 7, 2026 03:20
@unclesp1d3r unclesp1d3r disabled auto-merge February 7, 2026 03:48
@unclesp1d3r unclesp1d3r merged commit 0accb1c into main Feb 7, 2026
17 checks passed
@unclesp1d3r unclesp1d3r deleted the Add-OSSF-Scorecard-Scanning branch February 7, 2026 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security Security-related issues and vulnerabilities size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants