Skip to content

Commit e10cef2

Browse files
committed
harden ci: only persist github token during checkout where needed, set proper permissions
Signed-off-by: Armin Schrenk <armin.schrenk@skymatic.de>
1 parent 486a588 commit e10cef2

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
steps:
3030
- name: Checkout
3131
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
32+
with:
33+
persist-credentials: false
3234
- name: Setup Pages
3335
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
3436
- name: Verify lockfile has no non-registry sources

‎.github/workflows/update-windows-info.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
repository_dispatch:
55
types: [desktop-release]
66

7+
permissions: {}
8+
79
defaults:
810
run:
911
shell: bash
@@ -23,6 +25,8 @@ jobs:
2325
steps:
2426
- name: Checkout repo
2527
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
28+
with:
29+
persist-credentials: true # needed for git push below
2630
- name: Create new branch
2731
run: |
2832
git config --global --add safe.directory "$GITHUB_WORKSPACE"

0 commit comments

Comments
 (0)