Files
softharbor/.gitea/workflows/quarantine.yml
T
poli0981andClaude Opus 5.5 20e312b851
CI / gates (push) Successful in 49s
Reusable / Security / Secrets (gitleaks) (push) Successful in 14s
Reusable / Security / Rust (cargo-deny) (push) Skipped
Reusable / Security / .NET (NuGetAudit) (push) Skipped
Reusable / Security / SAST (Opengrep) (push) Successful in 33s
Reusable / Security / Dependencies (osv-scanner) (push) Successful in 18s
Security / security (push) Successful in 1m7s
Reusable / Qodana / Qodana (push) Successful in 3m23s
Qodana / qodana (push) Successful in 3m23s
CI / build (push) Successful in 5m29s
CI / record (push) Skipped
CI / deploy (push) Successful in 1m9s
chore(deps): upkeep 2026-12-05 — 16 non-major bumps, clear six dev-tooling advisories (#11)
Dependency upkeep for 2026-12-05. Supersedes #10.

* fix(deps): update all non-major dependencies (Renovate: actions/setup-node 7.2.0, @vite-pwa/astro 2.0.5)
* chore(deps): upkeep 2026-12-05 — 16 non-major bumps, clear six dev-tooling advisories
  astro 7.4.14, svelte 5.60.1, wrangler 4.171.0, eslint 10.16.0, knip 6.51.0, prettier 3.10.2, @playwright/test 1.65.2, @astrojs/rss 4.0.20, @astrojs/sitemap 3.7.7, eslint-plugin-astro 3.2.3, svelte-eslint-parser 1.13.0, globals 17.15.0, sharp 0.35.6, @iconify-json/lucide 1.2.163, @iconify-json/simple-icons 1.2.105.
  pnpm audit / osv-scanner now clean: cross-spawn 7.1.1 (GHSA-ghv9-86vm-4v8m critical, GHSA-m6qr-m48x-3xhh, GHSA-w3gc-668g-rf8f), ws >= 8.23.0 (GHSA-37g9-w4hg-h9qr), minimatch 11.0.10 (GHSA-3924-r96c-gp9w), terser gone from the lockfile (GHSA-6jpm-p5cq-9q44). All build/dev tooling; no override added.
* fix(e2e): size the Playwright pool by the container's CPU quota
  The ubuntu jobs moved to runner anon-docker (2026-12-04, `--cpus=4`), but os.cpus() reports the host's 28 cores, so 14 workers shared four CPUs and the axe tests timed out — main failed the same way (dispatched run 1565). playwright.config.ts reads /sys/fs/cgroup/cpu.max; no quota keeps Playwright's default.

No release: routine upkeep (docs/13 §1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-05 03:36:07 +00:00

90 lines
3.9 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# docs/12 §4 — enforces hard rule 5 mechanically.
#
# Runs on data pushes AND daily. The daily run re-checks main so a flagged
# entry that slipped past review is moved within a day — as a PR, not a push
# to main, so a human stays in the loop and branch protection still applies.
#
# On Gitea (D38):
# - The bot commits to `quarantine/auto` and pushes with the job token, then
# opens or updates the PR through the API (scripts/gitea.mjs). Its commits
# are unsigned — Gitea has no API that signs them — which is why branch
# protection does not require signed commits.
# - A push or PR the job token makes starts no workflow, so this job
# dispatches ci.yml and security.yml on the branch; ci.yml's `record` job
# turns the dispatched results into the statuses protection asks for.
# - `[quarantine] <slug>` issues are created only when none is open.
# - Step outputs never reach `run:` bodies through `${{ }}` (expression
# injection); they pass through `env:`, and gitea.mjs validates slugs.
# - Daily at 13:17 UTC (20:17 Vietnam), inside the runner's 13:00–16:00 UTC
# window, on a slot from the cron registry (poli0981/.github
# docs/migration/README.md).
name: quarantine
on:
push:
branches: [main]
paths: ['src/data/apps/**']
schedule:
- cron: '17 13 * * *'
workflow_dispatch:
permissions: {}
concurrency:
group: quarantine
cancel-in-progress: false
jobs:
sweep:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write # push quarantine/auto
pull-requests: write # open or update the PR
issues: write # one tracking issue per slug
actions: write # dispatch the checks onto the PR branch
steps:
# No persisted token while repository code (quarantine.mjs) runs; the
# push below authenticates on its own.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-node@8fccf151e3ba8038c300f83b40c8fd1e94f9c5ce # v7.2.0
with:
node-version-file: .nvmrc
- id: sweep
run: node scripts/quarantine.mjs
- name: Commit and push quarantine/auto
id: push
if: steps.sweep.outputs.moved != ''
env:
TOKEN: ${{ github.token }}
MOVED: ${{ steps.sweep.outputs.moved }}
run: |
set -euo pipefail
git config user.name 'SoftHarbor bot'
git config user.email 'actions@noreply.git.poli0981.dev'
git switch -c quarantine/auto
git add -A src/data/apps data/quarantine
git commit -q -m "data: quarantine ${MOVED}"
auth=$(printf 'x-access-token:%s' "$TOKEN" | base64 -w0)
git -c "http.extraheader=AUTHORIZATION: basic ${auth}" push -q --force origin HEAD:refs/heads/quarantine/auto
printf 'Automated sweep: entries with `security.status: "flagged"` were\nmoved to `data/quarantine/`, which is outside the content glob, so\nthey stop rendering on the next build (docs/03 §5).\n\nNothing was deleted. Restoring is a `git mv` plus a status edit;\nthe reason and evidence live in the linked tracking issue.\n' > "$RUNNER_TEMP/pr-body.md"
echo "pushed=true" >> "$GITHUB_OUTPUT"
- name: Open the PR, run its checks, open the tracking issues
if: steps.push.outputs.pushed == 'true'
env:
GITEA_API: ${{ github.api_url }}
GITEA_REPO: ${{ github.repository }}
GITEA_TOKEN: ${{ github.token }}
MOVED: ${{ steps.sweep.outputs.moved }}
run: |
set -euo pipefail
node scripts/gitea.mjs pr quarantine/auto 'data: quarantine flagged entries' "$RUNNER_TEMP/pr-body.md" 'security,quarantine'
node scripts/gitea.mjs dispatch quarantine/auto ci.yml security.yml
# shellcheck disable=SC2086 # one argument per slug, on purpose
node scripts/gitea.mjs quarantine-issues $MOVED