Skip to content

Commit cbdf34d

Browse files
ci: fix zizmor audit findings (#1899)
* ci: fix zizmor audit findings * chore: make consistent with other workflows * chore: fix inconsistency --------- Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
1 parent d862e81 commit cbdf34d

6 files changed

Lines changed: 21 additions & 4 deletions

File tree

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "monthly"
7+
cooldown:
8+
default-days: 7
79
groups:
810
# Creates a separate PR for each non-security-related major update.
911
major-version-updates:

.github/workflows/add-to-project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Add to Ecosystem WG Project
22

3-
on:
3+
on: # zizmor: ignore[dangerous-triggers]
44
issues:
55
types:
66
- opened

.github/workflows/canary.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ on:
55
- cron: "15 8 * * *"
66
workflow_dispatch:
77

8+
permissions: {}
9+
810
jobs:
911
build:
1012
runs-on: ${{ matrix.os }}
13+
permissions:
14+
contents: read
1115
strategy:
1216
matrix:
1317
os: [windows-latest, macOS-latest, ubuntu-latest]
@@ -18,6 +22,7 @@ jobs:
1822
repository: electron/minimal-repro
1923
ref: refs/heads/main
2024
path: minimal-repro
25+
persist-credentials: false
2126
- name: Setup Node.js
2227
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # tag: v6.3.0
2328
with:
@@ -37,9 +42,11 @@ jobs:
3742
npm install --save-dev @electron/packager@latest
3843
shell: bash
3944
- name: Package
45+
env:
46+
MATRIX_OS: ${{ matrix.os }}
4047
run: |
4148
cd minimal-repro
42-
if [ "${{ matrix.os }}" == "macOS-latest" ]; then
49+
if [ "$MATRIX_OS" == "macOS-latest" ]; then
4350
node_modules/.bin/electron-packager . --arch=universal
4451
else
4552
node_modules/.bin/electron-packager . --arch=all

.github/workflows/docs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ jobs:
1515
environment: docs-publish
1616
steps:
1717
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
with:
19+
persist-credentials: false
1820
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
1921
with:
2022
node-version-file: '.nvmrc'
21-
cache: 'yarn'
23+
package-manager-cache: false
2224
- name: Install dependencies
2325
run: yarn --immutable
2426
- name: Build API documentation
@@ -32,5 +34,5 @@ jobs:
3234
- name: Upload to Azure Blob Storage
3335
uses: azure/cli@9eb25b8360668fb0ecbafa808d40e2197b2f5f52 # v3.0.0
3436
with:
35-
inlineScript: |
37+
inlineScript: | # zizmor: ignore[template-injection] This only runs on tags
3638
az storage blob upload-batch --account-name ${{ secrets.AZURE_ECOSYSTEM_PACKAGES_STORAGE_ACCOUNT_NAME }} -d '$web/${{ github.event.repository.name }}/${{ github.ref_name }}' -s ./typedoc --overwrite --auth-mode login

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ on:
55
branches:
66
- main
77

8+
permissions: {}
9+
810
jobs:
911
test:
12+
permissions:
13+
contents: read
1014
uses: ./.github/workflows/test.yml
1115

1216
release:

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
steps:
2525
- name: Checkout
2626
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
with:
28+
persist-credentials: false
2729
- name: Setup Node.js
2830
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
2931
with:

0 commit comments

Comments
 (0)