This repository has been archived by the owner on Aug 15, 2024. It is now read-only.
Merge pull request #31 from h4rldev/dependabot/github_actions/step-se… #99
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow uses actions that are not certified by GitHub. They are provided | |
# by a third-party and are governed by separate terms of service, privacy | |
# policy, and support documentation. | |
name: OSSF Scorecard analysis workflow | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: read-all | |
jobs: | |
analysis: | |
name: Scorecard analysis | |
runs-on: ubuntu-latest | |
permissions: | |
# Needed if using Code scanning alerts | |
security-events: write | |
# Needed for GitHub OIDC token if publish_results is true | |
id-token: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- name: "Checkout code" | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
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: 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" | |
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 | |
with: | |
name: SARIF file | |
path: results.sarif | |
retention-days: 5 | |
# required for Code scanning alerts | |
- name: "Upload to code scanning" | |
uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 | |
with: | |
sarif_file: results.sarif |