Build / build (push) Skipped
Build / package (push) Skipped
Reusable / Security / Rust (cargo-deny) (pull_request) Skipped
Build / build (pull_request) Successful in 1m35s
Reusable / Qodana / Qodana (pull_request) Successful in 3m6s
Qodana / qodana (pull_request) Successful in 3m6s
Security / workflow-lint (pull_request) Successful in 9s
Reusable / Security / Secrets (gitleaks) (pull_request) Successful in 9s
Reusable / Security / SAST (Opengrep) (pull_request) Successful in 16s
Reusable / Security / Dependencies (osv-scanner) (pull_request) Successful in 13s
Reusable / Security / .NET (NuGetAudit) (pull_request) Successful in 40s
Security / scan (pull_request) Successful in 1m21s
Build / package (pull_request) Successful in 7m26s
The ops repository's v2026.11.5 names CommandForge (and the other Velopack apps released from Gitea) as Velopack in the release-pipeline notifier, so its release posts say so, and fixes the shared security scan's .NET restore on Docker runners without ICU (CommandForge runs it on windows-latest, which was not affected). Every ops call and its ops_ref move to the tag's commit (b93b371). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
83 lines
3.8 KiB
YAML
83 lines
3.8 KiB
YAML
name: Security
|
||
|
||
# Gitea has no CodeQL, no dependency review and no code-scanning UI (ops runbook §1, migration
|
||
# decision D7). This workflow covers instead:
|
||
#
|
||
# workflow-lint actionlint + shellcheck on .gitea/workflows/*.yml (CodeQL's `actions` analysis
|
||
# is gone; Opengrep's GitHub Actions rules below also check for injection)
|
||
# scan the ops repo's security.yml: gitleaks (full history), Opengrep (SAST, report
|
||
# only), osv-scanner (lockfiles; this repo has none, so it has nothing to scan)
|
||
# and a `dotnet restore` with NuGetAudit that fails on high/critical advisories
|
||
# (NU1903/NU1904). build.yml's restore already fails on moderate ones.
|
||
#
|
||
# Weekly as well, so a new advisory against unchanged dependencies turns it red: Friday 14:11 UTC
|
||
# = 21:11 Vietnam (a free slot in the ops repo's cron registry; the runner is the maintainer's PC
|
||
# and only runs 13:00–16:00 UTC).
|
||
|
||
on:
|
||
push:
|
||
branches: [main]
|
||
pull_request:
|
||
branches: [main]
|
||
schedule:
|
||
- cron: '11 14 * * 5'
|
||
workflow_dispatch:
|
||
|
||
permissions:
|
||
contents: read
|
||
|
||
concurrency:
|
||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||
|
||
jobs:
|
||
# Both linters as release binaries at pinned versions, SHA-256 verified (the pins of the ops
|
||
# repo's ops-lint.yml). Renovate does not update them: bump version and checksum together.
|
||
workflow-lint:
|
||
runs-on: ubuntu-latest
|
||
timeout-minutes: 10
|
||
permissions:
|
||
contents: read
|
||
env:
|
||
ACTIONLINT_VERSION: 1.7.12
|
||
ACTIONLINT_SHA256: 8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8 # actionlint_1.7.12_linux_amd64.tar.gz
|
||
SHELLCHECK_VERSION: v0.11.0
|
||
SHELLCHECK_SHA256: 8c3be12b05d5c177a04c29e3c78ce89ac86f1595681cab149b65b97c4e227198 # shellcheck-v0.11.0.linux.x86_64.tar.xz
|
||
steps:
|
||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||
with:
|
||
persist-credentials: false
|
||
|
||
- name: Install actionlint ${{ env.ACTIONLINT_VERSION }} + shellcheck ${{ env.SHELLCHECK_VERSION }}
|
||
run: |
|
||
set -euo pipefail
|
||
tmp="${RUNNER_TEMP:-/tmp}"
|
||
bin="$tmp/lint-bin"
|
||
mkdir -p "$bin"
|
||
curl -fsSL --retry 3 -o "$tmp/actionlint.tar.gz" \
|
||
"https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz"
|
||
echo "${ACTIONLINT_SHA256} $tmp/actionlint.tar.gz" | sha256sum -c -
|
||
tar -xzf "$tmp/actionlint.tar.gz" -C "$bin" actionlint
|
||
curl -fsSL --retry 3 -o "$tmp/shellcheck.tar.xz" \
|
||
"https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz"
|
||
echo "${SHELLCHECK_SHA256} $tmp/shellcheck.tar.xz" | sha256sum -c -
|
||
tar -xJf "$tmp/shellcheck.tar.xz" -C "$bin" --strip-components=1 "shellcheck-${SHELLCHECK_VERSION}/shellcheck"
|
||
echo "$bin" >> "$GITHUB_PATH"
|
||
|
||
# The files by name: actionlint only finds .github/workflows by itself. .github/actionlint.yaml
|
||
# ignores only the Gitea features actionlint does not know; everything else stays an error.
|
||
- name: actionlint (workflow syntax and expressions)
|
||
run: |
|
||
actionlint -version
|
||
actionlint -color -config-file .github/actionlint.yaml \
|
||
-shellcheck "$(command -v shellcheck)" .gitea/workflows/*.yml
|
||
|
||
scan:
|
||
permissions:
|
||
contents: read
|
||
uses: poli0981/.github/.gitea/workflows/security.yml@b93b3711b3049a879cfdfd515f7e72c23864da8f # ops v2026.11.5
|
||
with:
|
||
dotnet: true
|
||
dotnet-runs-on: windows-latest # WPF (net10.0-windows) restores only on Windows
|
||
dotnet-solution: CommandForge.slnx
|