From a2244ee8d860ce3d362f70f5907887840268c84f Mon Sep 17 00:00:00 2001 From: heitorlessa Date: Wed, 21 Jun 2023 17:17:23 +0200 Subject: [PATCH 1/2] chore(ci): introduce supply chain score card scans --- .github/workflows/ossf_scorecard.yml | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/ossf_scorecard.yml diff --git a/.github/workflows/ossf_scorecard.yml b/.github/workflows/ossf_scorecard.yml new file mode 100644 index 00000000000..88d1ca429ca --- /dev/null +++ b/.github/workflows/ossf_scorecard.yml @@ -0,0 +1,45 @@ +name: Scorecard supply-chain security +on: + # For Branch-Protection check. Only the default branch is supported. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection + branch_protection_rule: + schedule: + - cron: "41 2 * * 4" + push: + branches: [$default-branch] + +permissions: read-all + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + permissions: + security-events: write # update code-scanning dashboard + id-token: write # confirm org+repo identity before publish results + + steps: + - name: "Checkout code" + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af # v2.1.3 + with: + results_file: results.sarif + results_format: sarif + publish_results: true # publish to OSSF Scorecard REST API + + - name: "Upload results" + uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 + 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@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4 + with: + sarif_file: results.sarif From 7ea6ffa06d78e066887dd57cc3472d77c2198868 Mon Sep 17 00:00:00 2001 From: Leandro Damascena Date: Wed, 21 Jun 2023 22:44:27 +0100 Subject: [PATCH 2/2] fix: adjusting crontab --- .github/workflows/ossf_scorecard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ossf_scorecard.yml b/.github/workflows/ossf_scorecard.yml index 88d1ca429ca..05f5feb996e 100644 --- a/.github/workflows/ossf_scorecard.yml +++ b/.github/workflows/ossf_scorecard.yml @@ -4,7 +4,7 @@ on: # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection branch_protection_rule: schedule: - - cron: "41 2 * * 4" + - cron: "0 9 * * *" push: branches: [$default-branch]