Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
authorLeitwolf112026-10-10 20:22:57 +0300
committerLeitwolf112026-10-10 20:22:57 +0300
commitaf41dcfb2da79fa9b864b57a8472334155896d93 (patch)
tree862b2cba91e0a3c64aa82b79ea7fae77c3cad566 /.github
parentbd009a31cbc06ccecbb870e60cf5d7868a3c8722 (diff)
downloadwebsite-af41dcfb2da79fa9b864b57a8472334155896d93.tar.gz
Add workflow, repository and dependency analysis
zizmor audits the workflows themselves for what makes a workflow unsafe, and uploads what it finds to code scanning. Its first run here found one thing, 4 times: a checkout that leaves the job's token in the checked-out repository, where any later step can read it. No workflow pushes or needs the token after the checkout, so every checkout now sets persist-credentials to false, and zizmor reports nothing. OpenSSF Scorecard grades how the repository is kept: branch protection, pinned dependencies, token permissions and the like. It runs on the default branch and weekly, publishes its score and uploads its findings to code scanning. Dependency Review fails a pull request that adds or changes a dependency with a known vulnerability of high severity or worse. Dependabot watches what is already there; this holds what comes in. Every new action is pinned to a commit, each job names the permissions it needs, and no new workflow has a default permission.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml6
-rw-r--r--.github/workflows/codeql.yml2
-rw-r--r--.github/workflows/dependency-review.yml34
-rw-r--r--.github/workflows/scorecard.yml52
-rw-r--r--.github/workflows/zizmor.yml38
5 files changed, 132 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f6db466..70631c6 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,6 +21,8 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
@@ -50,6 +52,8 @@ jobs:
timeout-minutes: 25
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
- uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
@@ -119,4 +123,6 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
- uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 0b29f44..c5dde81 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -29,6 +29,8 @@ jobs:
build_mode: manual
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
- uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
if: matrix.language == 'java-kotlin'
with:
diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml
new file mode 100644
index 0000000..de6e480
--- /dev/null
+++ b/.github/workflows/dependency-review.yml
@@ -0,0 +1,34 @@
+# SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+# SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+name: Dependency Review
+
+# Looks at the dependencies a pull request adds or changes, and fails when
+# one of them has a known vulnerability of high severity or worse.
+# Dependabot watches what is already there; this holds what comes in.
+
+on:
+ pull_request:
+
+permissions: {}
+
+concurrency:
+ group: dependency-review-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ review:
+ name: Dependency review
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ permissions:
+ contents: read
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
+ with:
+ persist-credentials: false
+
+ - name: Review the dependency changes
+ uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
+ with:
+ fail-on-severity: high
diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml
new file mode 100644
index 0000000..82d07f9
--- /dev/null
+++ b/.github/workflows/scorecard.yml
@@ -0,0 +1,52 @@
+# SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+# SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+name: Scorecard
+
+# OpenSSF Scorecard grades how the repository itself is kept: branch
+# protection, pinned dependencies, token permissions, and more. It reads the
+# default branch only. Its findings are uploaded to code scanning.
+
+on:
+ branch_protection_rule:
+ push:
+ branches:
+ - main
+ schedule:
+ - cron: '37 5 * * 2'
+
+permissions: {}
+
+jobs:
+ analysis:
+ name: Scorecard analysis
+ runs-on: ubuntu-latest
+ timeout-minutes: 15
+ permissions:
+ actions: read
+ contents: read
+ id-token: write
+ security-events: write
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
+ with:
+ persist-credentials: false
+
+ - name: Run the analysis
+ uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
+ with:
+ results_file: results.sarif
+ results_format: sarif
+ publish_results: true
+
+ - name: Keep the results
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
+ with:
+ name: scorecard-results
+ path: results.sarif
+ retention-days: 5
+
+ - name: Upload to code scanning
+ uses: github/codeql-action/upload-sarif@7999b86c43a865dc79d8923397f35af22de63401 # v4
+ with:
+ sarif_file: results.sarif
diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml
new file mode 100644
index 0000000..ee34012
--- /dev/null
+++ b/.github/workflows/zizmor.yml
@@ -0,0 +1,38 @@
+# SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
+# SPDX-License-Identifier: AGPL-3.0-or-later WITH AdditionRef-Progmasoft-Patent-Grant-1.1
+
+name: Workflow Security
+
+# zizmor reads the workflows of this repository for what makes a workflow
+# unsafe: a token that is wider than its job needs, text from a pull request
+# that reaches a shell, an action that is not pinned. Its findings are
+# uploaded to code scanning.
+
+on:
+ pull_request:
+ push:
+ branches:
+ - main
+
+permissions: {}
+
+concurrency:
+ group: zizmor-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ zizmor:
+ name: zizmor
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
+ with:
+ persist-credentials: false
+
+ - name: Audit the workflows
+ uses: zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482 # v0.6.4