|
19 | 19 | push: |
20 | 20 | branches: [ "main" ] |
21 | 21 |
|
22 | | -permissions: read-all |
| 22 | +permissions: |
| 23 | + contents: read |
| 24 | + |
| 25 | +concurrency: |
| 26 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} |
| 27 | + cancel-in-progress: true |
23 | 28 |
|
24 | 29 | jobs: |
25 | 30 | analysis: |
26 | 31 | name: Scorecard analysis |
27 | | - runs-on: ubuntu-22.04 |
| 32 | + runs-on: ubuntu-latest |
| 33 | + if: ${{ github.repository == 'OpenVisualCloud/Intel-Tiber-Broadcast-Suite' }} |
28 | 34 | permissions: |
29 | 35 | security-events: write |
30 | 36 | id-token: write |
31 | | - |
| 37 | + contents: read |
| 38 | + actions: read |
32 | 39 | steps: |
33 | | - - name: "Harden Runner" |
| 40 | + - name: "scorecard: Harden Runner security" |
34 | 41 | uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 |
35 | 42 | with: |
36 | 43 | egress-policy: audit |
37 | 44 |
|
38 | | - - name: "Checkout code" |
39 | | - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
| 45 | + - name: "scorecard: Checkout code" |
| 46 | + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
40 | 47 | with: |
41 | 48 | persist-credentials: false |
42 | 49 |
|
43 | | - - name: "Run analysis" |
44 | | - uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 |
| 50 | + - name: "scorecard: Run analysis" |
| 51 | + uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3 |
45 | 52 | with: |
46 | | - results_file: results.sarif |
| 53 | + results_file: "scorecard-scan-results-${{ github.event.pull_request.number || github.sha }}.sarif" |
47 | 54 | results_format: sarif |
| 55 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
48 | 56 | publish_results: true |
49 | 57 |
|
50 | | - - name: "Upload artifact" |
51 | | - uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20 |
| 58 | + # Upload the results as artifacts (optional). |
| 59 | + - name: "scorecard: Upload results artifact" |
| 60 | + uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 |
52 | 61 | with: |
53 | | - name: SARIF file |
54 | | - path: results.sarif |
55 | | - retention-days: 7 |
| 62 | + name: "scorecard-scan-results-${{ github.event.pull_request.number || github.sha }}" |
| 63 | + path: "scorecard-scan-results-${{ github.event.pull_request.number || github.sha }}.sarif" |
| 64 | + retention-days: 5 |
56 | 65 |
|
57 | | - - name: "Upload to code-scanning" |
58 | | - uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9 |
| 66 | + - name: "scorecard: Upload results to code-scanning" |
| 67 | + uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11 |
59 | 68 | with: |
60 | | - sarif_file: results.sarif |
| 69 | + sarif_file: "scorecard-scan-results-${{ github.event.pull_request.number || github.sha }}.sarif" |
0 commit comments