Merge pull request #193 from ianlewis/renovate/npm-renovate-vulnerabi… #93
This file contains hidden or 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
| # Copyright 2025 Ian Lewis | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: Scorecards supply-chain security | |
| on: | |
| # Only the default branch is supported. | |
| branch_protection_rule: | |
| schedule: | |
| - cron: "39 9 * * 2" | |
| push: | |
| branches: ["main"] | |
| # Declare default permissions as read only. | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| analysis: | |
| name: Scorecards analysis | |
| runs-on: ubuntu-latest | |
| permissions: | |
| security-events: write # Needed to upload SARIF results. | |
| id-token: write # Used to validate the scorecard results. | |
| contents: read # Needed for private repositories. | |
| actions: read # Needed for private repositories. | |
| issues: read # To allow GraphQL ListCommits to work | |
| pull-requests: read # To allow GraphQL ListCommits to work | |
| checks: read # To detect SAST tools | |
| steps: | |
| - name: "Checkout code" | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: "Run analysis" | |
| uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3 | |
| with: | |
| results_file: results.sarif | |
| results_format: sarif | |
| # (Optional) Read-only PAT token. Uncomment the `repo_token` line below if: | |
| # - you want to enable the Branch-Protection check on a *public* repository, or | |
| # - you are installing Scorecards on a *private* repository | |
| # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. | |
| # repo_token: ${{ secrets.SCORECARD_READ_TOKEN }} | |
| # Publish the results for public repositories 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). Commenting out will disable uploads of run results in SARIF | |
| # format to the repository Actions tab. | |
| - name: "Upload artifact" | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.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@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10 | |
| # NOTE: Uploading SARIF requires GitHub Enterprise and GitHub Advanced Security license for private repositories. | |
| if: github.event.repository.private == false | |
| with: | |
| sarif_file: results.sarif |