2022-10-19 12:57:45 +05:30
|
|
|
name: Scorecards supply-chain security
|
|
|
|
on:
|
|
|
|
# Only the default branch is supported.
|
|
|
|
branch_protection_rule:
|
|
|
|
schedule:
|
|
|
|
- cron: '30 1 * * 6'
|
|
|
|
push:
|
|
|
|
branches: [ "main" ]
|
|
|
|
|
|
|
|
# Declare default permissions as read only.
|
|
|
|
permissions: read-all
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
analysis:
|
|
|
|
name: Scorecards analysis
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
# Needed to upload the results to code-scanning dashboard.
|
|
|
|
security-events: write
|
|
|
|
# Used to receive a badge.
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: "Checkout code"
|
2022-12-05 09:43:16 +01:00
|
|
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.0.0
|
2022-10-19 12:57:45 +05:30
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
|
|
|
|
- name: "Run analysis"
|
2022-12-06 07:25:15 +00:00
|
|
|
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # tag=v2.0.6
|
2022-10-19 12:57:45 +05:30
|
|
|
with:
|
|
|
|
results_file: results.sarif
|
|
|
|
results_format: sarif
|
|
|
|
repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
|
|
|
|
publish_results: true
|
|
|
|
|
|
|
|
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
|
|
|
# format to the repository Actions tab.
|
|
|
|
- name: "Upload artifact"
|
2022-12-02 10:19:44 +00:00
|
|
|
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3.0.0
|
2022-10-19 12:57:45 +05:30
|
|
|
with:
|
|
|
|
name: SARIF file
|
|
|
|
path: results.sarif
|
|
|
|
retention-days: 5
|
|
|
|
|
|
|
|
# Upload the results to GitHub's code scanning dashboard.
|
|
|
|
- name: "Upload to code-scanning"
|
2022-12-02 11:21:16 +00:00
|
|
|
uses: github/codeql-action/upload-sarif@b2a92eb56d8cb930006a1c6ed86b0782dd8a4297 # tag=v2.1.35
|
2022-10-19 12:57:45 +05:30
|
|
|
with:
|
|
|
|
sarif_file: results.sarif
|