Skip to content

Commit 74357a4

Browse files
carlewisaacostadiaz
authored andcommitted
Implement OpenSSF Scorecard suggestions (codeplaysoftware#83)
* [CP-Sec] Set permissions to the workflows tokens * [CP-Sec] Workflow actions version pinning
1 parent 36b92b3 commit 74357a4

File tree

5 files changed

+20
-11
lines changed

5 files changed

+20
-11
lines changed

.github/workflows/codeql.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
schedule:
99
- cron: '23 5 * * 5'
1010

11+
permissions: {}
12+
1113
jobs:
1214
analyze:
1315
name: Analyze (${{ matrix.language }})
@@ -32,11 +34,11 @@ jobs:
3234

3335
steps:
3436
- name: Checkout repository
35-
uses: actions/checkout@v4
37+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
3638

3739
# Initializes the CodeQL tools for scanning.
3840
- name: Initialize CodeQL
39-
uses: github/codeql-action/init@v3
41+
uses: github/codeql-action/init@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
4042
with:
4143
languages: ${{ matrix.language }}
4244
build-mode: ${{ matrix.build-mode }}
@@ -80,6 +82,6 @@ jobs:
8082
cmake --build .
8183
8284
- name: Perform CodeQL Analysis
83-
uses: github/codeql-action/analyze@v3
85+
uses: github/codeql-action/analyze@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
8486
with:
8587
category: "/language:${{matrix.language}}"

.github/workflows/labeler.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ name: "Pull Request Labeler"
22
on:
33
- pull_request_target
44

5+
permissions: {}
6+
57
jobs:
68
triage:
79
runs-on: ubuntu-latest
810
steps:
9-
- uses: actions/labeler@main
11+
- uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
1012
with:
1113
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/new-issues-to-triage-projects.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,30 @@ on:
77
env:
88
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
99

10+
permissions:
11+
issues: read
12+
1013
jobs:
1114
assign_one_project:
1215
runs-on: ubuntu-latest
1316
name: Assign to New Issues to Triage Project
1417
steps:
1518
- name: Process bug issues
16-
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
19+
uses: takanabe/github-actions-automate-projects@5d004c140c65fa8b4ef3b18a38219ce680bce816 # v2.0.0
1720
if: contains(github.event.issue.labels.*.name, 'bug') && contains(github.event.issue.labels.*.name, '? - Needs Triage')
1821
env:
1922
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2023
GITHUB_PROJECT_URL: https://github.com/NVIDIA/cutlass
2124
GITHUB_PROJECT_COLUMN_NAME: 'Needs prioritizing'
2225
- name: Process feature issues
23-
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
26+
uses: takanabe/github-actions-automate-projects@5d004c140c65fa8b4ef3b18a38219ce680bce816 # v2.0.0
2427
if: contains(github.event.issue.labels.*.name, 'feature request') && contains(github.event.issue.labels.*.name, '? - Needs Triage')
2528
env:
2629
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2730
GITHUB_PROJECT_URL: https://github.com/NVIDIA/cutlass
2831
GITHUB_PROJECT_COLUMN_NAME: 'Needs prioritizing'
2932
- name: Process other issues
30-
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
33+
uses: takanabe/github-actions-automate-projects@5d004c140c65fa8b4ef3b18a38219ce680bce816 # v2.0.0
3134
if: contains(github.event.issue.labels.*.name, '? - Needs Triage') && (!contains(github.event.issue.labels.*.name, 'bug') && !contains(github.event.issue.labels.*.name, 'feature request'))
3235
env:
3336
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/scorecard.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: "Checkout code"
28-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
2929
with:
3030
persist-credentials: false
3131

@@ -48,6 +48,6 @@ jobs:
4848
# Upload the results to GitHub's code scanning dashboard (optional).
4949
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
5050
- name: "Upload to code-scanning"
51-
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
51+
uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
5252
with:
5353
sarif_file: results.sarif

.github/workflows/stale.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ on:
44
schedule:
55
- cron: "0 * * * *"
66

7+
permissions: {}
8+
79
jobs:
810
mark-inactive-30d:
911
runs-on: ubuntu-latest
1012
steps:
1113
- name: Mark 30 day inactive issues and pull requests
12-
uses: actions/stale@v3
14+
uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
1315
with:
1416
repo-token: ${{ secrets.GITHUB_TOKEN }}
1517
stale-issue-message: >
@@ -35,7 +37,7 @@ jobs:
3537
runs-on: ubuntu-latest
3638
steps:
3739
- name: Mark 90 day inactive issues and pull requests
38-
uses: actions/stale@v3
40+
uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
3941
with:
4042
repo-token: ${{ secrets.GITHUB_TOKEN }}
4143
stale-issue-message: >

0 commit comments

Comments
 (0)