8f2be42c16
Closes https://github.com/dart-lang/sdk/pull/62794 GitOrigin-RevId: 5b55d62897f0d16701f61d54e3a409371c3daf40 Change-Id: I68ad718308f5a526ea5b167b2824e6c50c592078 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/484321 Reviewed-by: Alexander Thomas <athom@google.com> Commit-Queue: Alexander Thomas <athom@google.com>
58 lines
1.9 KiB
YAML
58 lines
1.9 KiB
YAML
name: Scorecards supply-chain security
|
|
|
|
on:
|
|
# Only the default branch is supported.
|
|
branch_protection_rule:
|
|
schedule:
|
|
# “At 00:00 (UTC) daily.”
|
|
- cron: '0 0 * * *'
|
|
|
|
# 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
|
|
actions: read
|
|
contents: read
|
|
# Needed to access OIDC token.
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: "Checkout code"
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: "Run analysis"
|
|
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a
|
|
with:
|
|
results_file: results.sarif
|
|
results_format: sarif
|
|
# Read-only PAT token. To create it,
|
|
# follow the steps in https://github.com/ossf/scorecard-action#pat-token-creation.
|
|
repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
|
|
# Publish the results to enable scorecard badges. For more details, see
|
|
# https://github.com/ossf/scorecard-action#publishing-results.
|
|
# For private repositories, `publish_results` will automatically be set to `false`,
|
|
# regardless of the value entered here.
|
|
publish_results: true
|
|
|
|
# Upload the results as artifacts (optional).
|
|
- name: "Upload artifact"
|
|
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
|
|
with:
|
|
name: SARIF file
|
|
path: results.sarif
|
|
retention-days: 5
|
|
|
|
# Upload the results to GitHub's code scanning dashboard.
|
|
- name: "Upload to code-scanning"
|
|
uses: github/codeql-action/upload-sarif@89a39a4e59826350b863aa6b6252a07ad50cf83e
|
|
with:
|
|
sarif_file: results.sarif
|