|
| 1 | +--- |
| 2 | +name: Dependency review |
| 3 | + |
| 4 | +on: # yamllint disable-line rule:truthy |
| 5 | + merge_group: |
| 6 | + types: |
| 7 | + - checks_requested |
| 8 | + pull_request: |
| 9 | + |
| 10 | +# Set a default shell for any run steps. The `-Eueo pipefail` sets errtrace, |
| 11 | +# nounset, errexit, and pipefail. The `-x` will print all commands as they are |
| 12 | +# run. Please see the GitHub Actions documentation for more information: |
| 13 | +# https://docs.github.com/en/actions/using-jobs/setting-default-values-for-jobs |
| 14 | +defaults: |
| 15 | + run: |
| 16 | + shell: bash -Eueo pipefail -x {0} |
| 17 | + |
| 18 | +jobs: |
| 19 | + diagnostics: |
| 20 | + name: Run diagnostics |
| 21 | + # This job does not need any permissions |
| 22 | + permissions: {} |
| 23 | + runs-on: ubuntu-latest |
| 24 | + steps: |
| 25 | + # Note that a duplicate of this step must be added at the top of |
| 26 | + # each job. |
| 27 | + - name: Apply standard cisagov job preamble |
| 28 | + uses: cisagov/action-job-preamble@v1 |
| 29 | + with: |
| 30 | + check_github_status: "true" |
| 31 | + # This functionality is poorly implemented and has been |
| 32 | + # causing a lot of problems due to the MITM implementation |
| 33 | + # hogging or leaking memory, so we disable it for now. |
| 34 | + monitor_permissions: "false" |
| 35 | + output_workflow_context: "true" |
| 36 | + # Use a variable to specify the permissions monitoring |
| 37 | + # configuration. By default this will yield the |
| 38 | + # configuration stored in the cisagov organization-level |
| 39 | + # variable, but if you want to use a different configuration |
| 40 | + # then simply: |
| 41 | + # 1. Create a repository-level variable with the name |
| 42 | + # ACTIONS_PERMISSIONS_CONFIG. |
| 43 | + # 2. Set this new variable's value to the configuration you |
| 44 | + # want to use for this repository. |
| 45 | + # |
| 46 | + # Note in particular that changing the permissions |
| 47 | + # monitoring configuration *does not* require you to modify |
| 48 | + # this workflow. |
| 49 | + permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }} |
| 50 | + dependency-review: |
| 51 | + name: Dependency review |
| 52 | + needs: |
| 53 | + - diagnostics |
| 54 | + permissions: |
| 55 | + # actions/checkout needs this to fetch code |
| 56 | + contents: read |
| 57 | + runs-on: ubuntu-latest |
| 58 | + steps: |
| 59 | + - name: Apply standard cisagov job preamble |
| 60 | + uses: cisagov/action-job-preamble@v1 |
| 61 | + with: |
| 62 | + # This functionality is poorly implemented and has been |
| 63 | + # causing a lot of problems due to the MITM implementation |
| 64 | + # hogging or leaking memory, so we disable it for now. |
| 65 | + monitor_permissions: "false" |
| 66 | + # Use a variable to specify the permissions monitoring |
| 67 | + # configuration. By default this will yield the |
| 68 | + # configuration stored in the cisagov organization-level |
| 69 | + # variable, but if you want to use a different configuration |
| 70 | + # then simply: |
| 71 | + # 1. Create a repository-level variable with the name |
| 72 | + # ACTIONS_PERMISSIONS_CONFIG. |
| 73 | + # 2. Set this new variable's value to the configuration you |
| 74 | + # want to use for this repository. |
| 75 | + # |
| 76 | + # Note in particular that changing the permissions |
| 77 | + # monitoring configuration *does not* require you to modify |
| 78 | + # this workflow. |
| 79 | + permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }} |
| 80 | + - id: checkout-repo |
| 81 | + name: Checkout the repository |
| 82 | + uses: actions/checkout@v4 |
| 83 | + - id: dependency-review |
| 84 | + name: Review dependency changes for vulnerabilities and license changes |
| 85 | + uses: actions/dependency-review-action@v4 |
0 commit comments