Skip to content

Commit acc46ce

Browse files
committed
Add permissions block and actions analysis
This change does two things. If it is complicated to review I will split up. First, this ensures that all workflows have minimal permissions blocks. Second, this adds actions analysis.
1 parent e9003a0 commit acc46ce

File tree

6 files changed

+26
-1
lines changed

6 files changed

+26
-1
lines changed

.github/workflows/cli-test.yml

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
find-nightly:
1818
name: Find Nightly Release
1919
runs-on: ubuntu-latest
20+
permissions:
21+
contents: read
2022
outputs:
2123
url: ${{ steps.get-url.outputs.nightly-url }}
2224
steps:
@@ -33,6 +35,8 @@ jobs:
3335
set-matrix:
3436
name: Set Matrix for cli-test
3537
runs-on: ubuntu-latest
38+
permissions:
39+
contents: read
3640
steps:
3741
- name: Checkout
3842
uses: actions/checkout@v4
@@ -47,6 +51,8 @@ jobs:
4751
runs-on: ${{ matrix.os }}
4852
needs: [find-nightly, set-matrix]
4953
timeout-minutes: 30
54+
permissions:
55+
contents: read
5056
strategy:
5157
matrix:
5258
os: [ubuntu-latest, windows-latest]

.github/workflows/codeql.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ on:
1111
jobs:
1212
codeql:
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
language:
17+
- javascript
18+
- actions
19+
fail-fast: false
1420

1521
permissions:
1622
contents: read
@@ -24,7 +30,7 @@ jobs:
2430
- name: Initialize CodeQL
2531
uses: github/codeql-action/init@main
2632
with:
27-
languages: javascript
33+
languages: ${{ matrix.language }}
2834
config-file: ./.github/codeql/codeql-config.yml
2935
tools: latest
3036

.github/workflows/e2e-tests.yml

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
pull_request:
66
branches: [main]
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
e2e-test:
1013
name: E2E Test

.github/workflows/label-issue.yml

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
issues:
44
types: [opened]
55

6+
permissions:
7+
issues: write
8+
69
jobs:
710
label:
811
name: Label issue

.github/workflows/main.yml

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
branches:
88
- main
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
build:
1215
name: Build

.github/workflows/release.yml

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
build:
1717
name: Release
1818
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
1921
steps:
2022
- name: Checkout
2123
uses: actions/checkout@v4
@@ -156,6 +158,8 @@ jobs:
156158
needs: build
157159
environment: publish-open-vsx
158160
runs-on: ubuntu-latest
161+
permissions:
162+
contents: read
159163
env:
160164
OPEN_VSX_TOKEN: ${{ secrets.OPEN_VSX_TOKEN }}
161165
steps:

0 commit comments

Comments
 (0)