Skip to content

Harden scorecard workflow with least-privilege permissions and supply-chain pinning#139

Merged
unclesp1d3r merged 2 commits intoAdd-OSSF-Scorecard-Scanningfrom
copilot/sub-pr-138
Feb 7, 2026
Merged

Harden scorecard workflow with least-privilege permissions and supply-chain pinning#139
unclesp1d3r merged 2 commits intoAdd-OSSF-Scorecard-Scanningfrom
copilot/sub-pr-138

Conversation

Copy link
Contributor

Copilot AI commented Feb 7, 2026

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)
# Before
permissions: read-all

# After
permissions:
  contents: read
  actions: read

Aligns with patterns in codeql.yml, ci.yml, and security.yml workflows.


💡 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 in the docs.

- Set explicit least-privilege permissions (contents: read, actions: read)
- Add workflow_dispatch trigger for manual runs
- Fix job condition by removing pull_request check (no PR trigger exists)
- Pin codeql-action/upload-sarif to commit SHA 33119e582d3ab4ed79c2610af108cb08ff983917

Co-authored-by: unclesp1d3r <251112+unclesp1d3r@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Scorecard workflow for supply-chain security analysis Harden scorecard workflow with least-privilege permissions and supply-chain pinning Feb 7, 2026
Copilot AI requested a review from unclesp1d3r February 7, 2026 02:51
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 7, 2026
@unclesp1d3r unclesp1d3r marked this pull request as ready for review February 7, 2026 03:18
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 7, 2026
@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

@unclesp1d3r unclesp1d3r merged commit 0fd7851 into Add-OSSF-Scorecard-Scanning Feb 7, 2026
3 checks passed
@unclesp1d3r unclesp1d3r deleted the copilot/sub-pr-138 branch February 7, 2026 03:18
@dosubot dosubot bot added the security Security-related issues and vulnerabilities label Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer security Security-related issues and vulnerabilities size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants