Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

πŸ›‘οΈ Zizmor security scan of workflows

Alicia Sykes76210427f5ed
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3cec25f6..e1a941cf 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -5,6 +5,9 @@ on:
pull_request:
branches: ['master', 'develop']
+permissions:
+ contents: read
+
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
@@ -17,6 +20,7 @@ jobs:
lockfile: ${{ steps.filter.outputs.lockfile }}
workflows: ${{ steps.filter.outputs.workflows }}
locales: ${{ steps.filter.outputs.locales }}
+ translations: ${{ steps.filter.outputs.translations }}
steps:
- name: Checkout Code
uses: actions/checkout@v6
@@ -35,6 +39,8 @@ jobs:
- 'src/**/*.vue'
- 'src/**/*.js'
- 'tests/locales/**'
+ translations:
+ - 'src/assets/locales/**'
lint:
name: πŸ›‘οΈ Lint
@@ -110,6 +116,20 @@ jobs:
- name: Check Locales
run: yarn validate-locales
+ spellcheck:
+ name: ✏️ Spellcheck
+ runs-on: ubuntu-latest
+ needs: changes
+ if: needs.changes.outputs.translations == 'true'
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v6
+
+ - name: Spellcheck en.json
+ uses: crate-ci/typos@v1
+ with:
+ files: src/assets/locales/en.json
+
build:
name: πŸ—οΈ Build Check
runs-on: ubuntu-latest
@@ -187,8 +207,8 @@ jobs:
head: ${{ github.event.pull_request.head.sha }}
extra_args: --only-verified
- actionlint:
- name: πŸ› οΈ Lint Actions
+ workflow-audit:
+ name: πŸ› οΈ Workflow Audit
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.workflows == 'true'
@@ -200,3 +220,10 @@ jobs:
uses: raven-actions/actionlint@v2
with:
fail-on-error: true
+
+ - name: Run Zizmor
+ uses: zizmorcore/[email protected]
+ with:
+ inputs: .github/workflows/
+ advanced-security: false
+ annotations: true
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index e4eeb141..32b3053b 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -168,9 +168,13 @@ jobs:
CREATED=${{ steps.timestamp.outputs.iso }}
- name: 🧬 Write digest
+ env:
+ DIGEST: ${{ steps.push.outputs.digest }}
+ DIGESTS_DIR: ${{ runner.temp }}/digests
+ ARCH: ${{ matrix.arch }}
run: |
- mkdir -p "${{ runner.temp }}/digests"
- echo "${{ steps.push.outputs.digest }}" > "${{ runner.temp }}/digests/${{ matrix.arch }}"
+ mkdir -p "$DIGESTS_DIR"
+ echo "$DIGEST" > "$DIGESTS_DIR/$ARCH"
- name: πŸ“€ Upload digest
uses: actions/upload-artifact@v7
diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml
index 55bdc512..fc599c6b 100644
--- a/.github/workflows/mirror.yml
+++ b/.github/workflows/mirror.yml
@@ -6,6 +6,10 @@ on:
workflow_dispatch:
schedule:
- cron: '30 3 * * 0' # At 03:30 on Sunday
+
+permissions:
+ contents: read
+
jobs:
codeberg:
runs-on: ubuntu-latest
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 7548c52a..c4f7c581 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -42,10 +42,9 @@ jobs:
fetch-depth: 0
- name: πŸ”§ Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v6 # zizmor: ignore[cache-poisoning]
with:
node-version: '20'
- cache: 'yarn'
- name: πŸ“₯ Install dependencies
run: yarn install --frozen-lockfile --ignore-engines --network-timeout 300000
@@ -119,7 +118,9 @@ jobs:
- name: πŸ“ Create draft release
id: release
- uses: softprops/action-gh-release@v3
+ # Kept over `gh release create` for built-in generate_release_notes,
+ # previous_tag selection, fail_on_unmatched_files, and multi-file upload.
+ uses: softprops/action-gh-release@v3 # zizmor: ignore[superfluous-actions]
with:
tag_name: ${{ env.TAG }}
name: Release ${{ env.TAG }}
diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml
index 2b286fba..58902f4f 100644
--- a/.github/workflows/tag.yml
+++ b/.github/workflows/tag.yml
@@ -24,7 +24,9 @@ on:
description: 'Version to tag (e.g. 4.1.0). Leave blank to auto-increment patch.'
required: false
type: string
- pull_request_target:
+ # Btw, this is a safe and intentional trigger
+ # It only runs once reviewed PR merged, and secrets are scoped
+ pull_request_target: # zizmor: ignore[dangerous-triggers]
types: [closed]
branches: [master]
diff --git a/.github/workflows/update-docs-site.yml b/.github/workflows/update-docs-site.yml
index acb6454b..72fa8150 100644
--- a/.github/workflows/update-docs-site.yml
+++ b/.github/workflows/update-docs-site.yml
@@ -12,6 +12,8 @@ on:
paths:
- 'docs/**'
+permissions:
+ contents: write
# Jobs to be run:
# 1. Checkout master branch
diff --git a/.github/workflows/wiki-sync.yml b/.github/workflows/wiki-sync.yml
index 2d320b26..3e6af4a9 100644
--- a/.github/workflows/wiki-sync.yml
+++ b/.github/workflows/wiki-sync.yml
@@ -4,6 +4,10 @@ on:
workflow_dispatch: # Manual dispatch
schedule:
- cron: '0 1 * * 0' # At 01:00 on Sunday.
+
+permissions:
+ contents: read
+
jobs:
update-wiki:
runs-on: ubuntu-latest
diff --git a/.github/zizmor.yml b/.github/zizmor.yml
new file mode 100644
index 00000000..fce28059
--- /dev/null
+++ b/.github/zizmor.yml
@@ -0,0 +1,17 @@
+# zizmor config, for the static analysis of our GH Actions workflows
+# Run with: `zizmor .github/workflows/`. Docs: https://docs.zizmor.sh
+# Scan is also runs in our ci.yml, whenever workflow changes are made
+
+# 2 rules are disabled right now:
+# - unpinned-uses: The only unpinned versions are official ones.
+# And in the context of each, there shouldn't be any risk.
+# Pinning causes the need to update each whenever a new version or patch is released
+# - artipacked: Too many false positives.
+# Was flagging every `actions/checkout` for not having `persist-credentials: false`
+# Even tho we never upload or do anything public with the checkout artifacts
+
+rules:
+ unpinned-uses:
+ disable: true
+ artipacked:
+ disable: true