summaryrefslogtreecommitdiffstats
path: root/.github/workflows/scorecards.yml
blob: 6168c459fc6a752cfdbec03fa9fdd75630c9395a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
# vi: ts=2 sw=2 et:
# SPDX-License-Identifier: LGPL-2.1-or-later
name: Scorecards supply-chain security
on:
  # Only the default branch is supported.
  branch_protection_rule:
  schedule:
    - cron: '15 21 * * 6'
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
    paths:
      - '.github/workflows/scorecards.yml'

# Declare default permissions as read only.
permissions: read-all

jobs:
  analysis:
    name: Scorecards analysis
    if: github.repository == 'systemd/systemd'
    runs-on: ubuntu-24.04
    permissions:
      id-token: write # Used to receive a badge.

    steps:
      - name: Checkout code
        uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
        with:
          persist-credentials: false

      - name: Run analysis
        uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
        with:
          results_file: results.sarif
          results_format: sarif
          publish_results: ${{ github.event_name != 'pull_request' }}