Skip to content

feat(security): enforce GitHub-hosted Ubuntu runner policy in CI (#2700) #5

feat(security): enforce GitHub-hosted Ubuntu runner policy in CI (#2700)

feat(security): enforce GitHub-hosted Ubuntu runner policy in CI (#2700) #5

Workflow file for this run

# Copyright (c) 2026 Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
name: OpenSSF Scorecard
on:
schedule:
- cron: '0 3 * * 0' # Sundays at 3 AM UTC
push:
branches:
- main
workflow_run:
workflows:
- 'Stable Release Pipeline'
- 'Pre-Release Pipeline'
types:
- completed
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
jobs:
scorecard:
name: Scorecard Analysis
runs-on: ubuntu-latest
# Skip runs triggered by failed release pipelines
if: >-
github.event_name != 'workflow_run'
|| github.event.workflow_run.conclusion == 'success'
permissions:
security-events: write # Required for SARIF upload to Security tab
id-token: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Run Scorecard
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
with:
results_file: results.sarif
results_format: sarif
publish_results: true
- name: Upload SARIF results
uses: github/codeql-action/upload-sarif@ce729e4d353d580e6cacd6a8cf2921b72e5e310a # v3.27.0
with:
sarif_file: results.sarif
category: openssf-scorecard
continue-on-error: true
- name: Upload artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: scorecard-results
path: results.sarif
retention-days: 90