Skip to content

Conversation

@a-ariff
Copy link
Owner

@a-ariff a-ariff commented Sep 19, 2025

Summary

This PR adds a comprehensive OSSF Scorecard workflow to enhance supply chain security monitoring and assessment.

Changes Made

  • New workflow file: scorecard.yml in .github/workflows/
  • Scheduled execution: Runs weekly on Monday at 3 AM UTC
  • Comprehensive permissions: Includes all required permissions (security-events, id-token, contents, actions)
  • Public API integration: Publishes results to OpenSSF REST API for badge support
  • Security integration: Uploads SARIF results to GitHub Security tab
  • Artifact storage: Retains analysis results for 30 days

Benefits

  • Provides automated supply chain security assessments
  • Enables public Scorecard badge for the repository
  • Integrates security findings into GitHub's native security dashboard
  • Supports both public and private repository configurations
  • Enhances transparency and security posture

Type of Change

  • New feature (non-breaking change that adds functionality)
  • Security enhancement
  • Configuration change

Testing

The workflow configuration follows OSSF Scorecard best practices and includes proper error handling with if: always() conditions.

Add comprehensive OSSF Scorecard workflow for supply chain security analysis:

- Runs weekly on Monday at 3 AM UTC to assess repository security posture
- Includes proper permissions (security-events, id-token, contents, actions)
- Publishes results to OpenSSF REST API for public badge display
- Uploads SARIF results to GitHub Security tab for detailed findings
- Stores artifacts for 30-day retention
- Supports both public and private repository configurations

This enhances the project's supply chain security monitoring and provides transparency for security assessments.
@a-ariff a-ariff requested a review from Copilot October 2, 2025 10:08
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

This PR adds an OSSF Scorecard workflow to implement automated supply chain security monitoring and assessment for the repository.

  • Introduces scheduled weekly security assessments using OSSF Scorecard
  • Configures proper permissions and security integrations for comprehensive monitoring
  • Enables public badge support and GitHub Security tab integration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +24 to +33
permissions:
# Needed to upload the results to code-scanning dashboard
security-events: write
# Needed to publish results and get a badge
id-token: write
# Needed to detect the repository's programming languages
contents: read
# Needed for the analysis to run
actions: read

Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

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

The permissions block is duplicated between the workflow level (lines 10-18) and job level (lines 24-32). Since permissions are inherited from the workflow level, the job-level permissions are redundant and should be removed to avoid duplication.

Suggested change
permissions:
# Needed to upload the results to code-scanning dashboard
security-events: write
# Needed to publish results and get a badge
id-token: write
# Needed to detect the repository's programming languages
contents: read
# Needed for the analysis to run
actions: read

Copilot uses AI. Check for mistakes.
persist-credentials: false

- name: Run OSSF Scorecard
uses: ossf/scorecard-action@v2
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

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

Using a major version tag (@v2) instead of a specific commit hash or patch version creates potential security risks. Consider pinning to a specific version like @v2.x.x or using a commit hash for better supply chain security.

Suggested change
uses: ossf/scorecard-action@v2
uses: ossf/scorecard-action@v2.1.7

Copilot uses AI. Check for mistakes.

# Upload the results as artifacts (optional)
- name: Upload artifact
uses: actions/upload-artifact@v4
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

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

Using a major version tag (@v4) instead of a specific commit hash or patch version creates potential security risks. Consider pinning to a specific version like @v4.x.x or using a commit hash for better supply chain security.

Suggested change
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.3.1

Copilot uses AI. Check for mistakes.

# Upload the results to GitHub's code scanning dashboard
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@v3
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

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

Using a major version tag (@V3) instead of a specific commit hash or patch version creates potential security risks. Consider pinning to a specific version like @v3.x.x or using a commit hash for better supply chain security.

Suggested change
uses: github/codeql-action/upload-sarif@v3
uses: github/codeql-action/upload-sarif@v3.25.2

Copilot uses AI. Check for mistakes.
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.

2 participants