Skip to content

Commit 98f5b93

Browse files
authored
chore: lock down workflows (#709)
1 parent f64b217 commit 98f5b93

File tree

5 files changed

+24
-3
lines changed

5 files changed

+24
-3
lines changed

.github/workflows/codeql-analysis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ jobs:
3939
steps:
4040
- name: Checkout repository
4141
uses: actions/checkout@v4
42+
with:
43+
persist-credentials: false
4244

4345
# Initializes the CodeQL tools for scanning.
4446
- name: Initialize CodeQL

.github/workflows/pr-check.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: PR Validation
33
on:
44
pull_request:
55

6+
permissions: {}
7+
68
env:
79
NODE_VERSION: 18.17.1
810
TEST_RESULTS_DIRECTORY: .
@@ -17,18 +19,22 @@ jobs:
1719
steps:
1820
- name: Checkout
1921
uses: actions/checkout@v4
22+
with:
23+
persist-credentials: false
2024

2125
- name: Build VSIX
2226
uses: ./.github/actions/build-vsix
2327
with:
24-
node_version: ${{ env.NODE_VERSION}}
28+
node_version: ${{ env.NODE_VERSION }}
2529

2630
lint:
2731
name: Lint
2832
runs-on: ubuntu-latest
2933
steps:
3034
- name: Checkout
3135
uses: actions/checkout@v4
36+
with:
37+
persist-credentials: false
3238

3339
- name: Lint
3440
uses: ./.github/actions/lint
@@ -52,6 +58,7 @@ jobs:
5258
uses: actions/checkout@v4
5359
with:
5460
path: ${{ env.special-working-directory-relative }}
61+
persist-credentials: false
5562

5663
# Install bundled libs using 3.9 even though you test it on other versions.
5764
- name: Use Python 3.9

.github/workflows/pr-labels.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ jobs:
1212
add-pr-label:
1313
name: 'Ensure Required Labels'
1414
runs-on: ubuntu-latest
15+
permissions:
16+
issues: write
17+
pull-requests: write
1518
steps:
1619
- name: 'PR impact specified'
17-
uses: mheap/github-action-required-labels@v5
20+
uses: mheap/github-action-required-labels@388fd6af37b34cdfe5a23b37060e763217e58b03 # v5.5.0
1821
with:
1922
mode: exactly
2023
count: 1

.github/workflows/push-check.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
- 'release/*'
99
- 'release-*'
1010

11+
permissions: {}
12+
1113
env:
1214
NODE_VERSION: 18.17.1
1315
TEST_RESULTS_DIRECTORY: .
@@ -22,18 +24,22 @@ jobs:
2224
steps:
2325
- name: Checkout
2426
uses: actions/checkout@v4
27+
with:
28+
persist-credentials: false
2529

2630
- name: Build VSIX
2731
uses: ./.github/actions/build-vsix
2832
with:
29-
node_version: ${{ env.NODE_VERSION}}
33+
node_version: ${{ env.NODE_VERSION }}
3034

3135
lint:
3236
name: Lint
3337
runs-on: ubuntu-latest
3438
steps:
3539
- name: Checkout
3640
uses: actions/checkout@v4
41+
with:
42+
persist-credentials: false
3743

3844
- name: Lint
3945
uses: ./.github/actions/lint
@@ -57,6 +63,7 @@ jobs:
5763
uses: actions/checkout@v4
5864
with:
5965
path: ${{ env.special-working-directory-relative }}
66+
persist-credentials: false
6067

6168
# Install bundled libs using 3.9 even though you test it on other versions.
6269
- name: Use Python 3.9

.vscode/settings.json

+2
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@
2020
"editor.defaultFormatter": "charliermarsh.ruff",
2121
"editor.formatOnSave": true
2222
},
23+
"git.branchProtection": ["main"],
24+
"git.branchRandomName.enable": true,
2325
}

0 commit comments

Comments
 (0)