Skip to content

Commit 866e31a

Browse files
fix: add github permissions (#263)
1 parent 9c514a9 commit 866e31a

File tree

8 files changed

+41
-4
lines changed

8 files changed

+41
-4
lines changed

.changeset/purple-bikes-jam.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
"@codecov/astro-plugin": patch
3+
"@codecov/bundle-analyzer": patch
4+
"@codecov/bundler-plugin-core": patch
5+
"@codecov/nextjs-webpack-plugin": patch
6+
"@codecov/nuxt-plugin": patch
7+
"@codecov/remix-vite-plugin": patch
8+
"@codecov/rollup-plugin": patch
9+
"@codecov/solidstart-plugin": patch
10+
"@codecov/sveltekit-plugin": patch
11+
"@codecov/vite-plugin": patch
12+
"@codecov/webpack-plugin": patch
13+
---
14+
15+
update GitHub Actions workflow permissions

.github/workflows/cache_cleanup.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
types:
55
- closed
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
cleanup:
912
runs-on: ubuntu-latest
@@ -21,7 +24,7 @@ jobs:
2124
echo "Fetching list of cache key"
2225
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
2326
24-
## Setting this to not fail the workflow while deleting cache keys.
27+
## Setting this to not fail the workflow while deleting cache keys.
2528
set +e
2629
echo "Deleting caches..."
2730
for cacheKey in $cacheKeysForPR

.github/workflows/enforce-license-compliance.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request:
55
branches: [main, master]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
enforce-license-compliance:
912
runs-on: ubuntu-latest

.github/workflows/prepare-publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Prepare Publish
33
on:
44
workflow_dispatch:
55

6+
permissions:
7+
contents: read
8+
pull-requests: write
9+
610
concurrency: ${{ github.workflow }}-${{ github.ref }}
711

812
jobs:

.github/workflows/publish.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
paths:
88
- "**/CHANGELOG.md"
99

10+
permissions:
11+
contents: read
12+
1013
concurrency: ${{ github.workflow }}-${{ github.ref }}
1114

1215
jobs:
@@ -16,7 +19,7 @@ jobs:
1619
# For whatever reason, yaml does not like the full "meta(changelog): Update package versions" string
1720
# So we check this in two parts
1821
if: |
19-
contains(github.event.head_commit.message, 'meta(changelog)')
22+
contains(github.event.head_commit.message, 'meta(changelog)')
2023
&& contains(github.event.head_commit.message, 'Update package versions')
2124
steps:
2225
- name: Checkout Repo
@@ -68,7 +71,7 @@ jobs:
6871
# For whatever reason, yaml does not like the full "meta(changelog): Update package versions" string
6972
# So we check this in two parts
7073
if: |
71-
contains(github.event.head_commit.message, 'meta(changelog)')
74+
contains(github.event.head_commit.message, 'meta(changelog)')
7275
&& contains(github.event.head_commit.message, 'Update package versions')
7376
steps:
7477
- name: Checkout Repo

.github/workflows/test-api-ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
paths:
66
- integration-tests/test-api/**
77

8+
permissions:
9+
content: read
10+
811
concurrency:
912
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1013
cancel-in-progress: true

.github/workflows/test-api-push.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
paths:
88
- integration-tests/test-api/**
99

10+
permissions:
11+
content: read
12+
1013
concurrency:
1114
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1215
cancel-in-progress: true

.github/workflows/typedoc-manual-deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Publish TypeDocs
33
on:
44
workflow_dispatch:
55

6+
permissions:
7+
content: read
8+
69
jobs:
710
deploy_docs:
811
permissions:
@@ -43,4 +46,4 @@ jobs:
4346
run: node scripts/publish-docs.mjs
4447
env:
4548
GIT_USERNAME: ${{ steps.import-gpg.outputs.name }}
46-
GIT_EMAIL: ${{ steps.import-gpg.outputs.email }}
49+
GIT_EMAIL: ${{ steps.import-gpg.outputs.email }}

0 commit comments

Comments
 (0)