Skip to content

Add CI validation, gated Pages deploy, and Dependabot - #1

Merged
mlapin merged 6 commits into
mainfrom
ci/validate-and-protect
Nov 3, 2026
Merged

mlapin merged 6 commits into
mainfrom
ci/validate-and-protect

Conversation

@mlapin

@mlapin mlapin commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

What

CI (.github/workflows/site.yml). Three required checks run on PRs, on pushes to main, and weekly:

  • attribution refuses any commit introduced by the PR or push that carries an attribution or session marker (Co-Authored-By, "Generated with ...", agent emails and identities for Claude, Codex and Cursor, claude.ai, cursor.com and chatgpt.com/codex session links). A scheduled or manual run, or a rewritten base, audits the whole history.
  • hygiene runs the pre-commit file checks on the whole tree (merge-conflict markers, large files, private keys, YAML/JSON syntax, whitespace) and scans the full git history with gitleaks.
  • validate:
    • html-validate with the recommended preset. no-inline-style is off because the self-contained topk demos use inline styles.
    • lychee link check. .lycheeignore skips sites that block CI runners or bots: Google Scholar, ACM DL / doi.org/10.1145, X, and the Saarland thesis repository.
    • A 5 MB file-size guard.

Deploy. The deploy job publishes to Pages from main only after all three checks pass. It uploads only the site files: no dotfiles, tooling, or AGENTS.md.

Local hooks (.pre-commit-config.yaml). Install with pre-commit install:

  • prepare-commit-msg strips attribution lines. Unlike the other hooks, it still runs under git commit --no-verify.
  • commit-msg and pre-push refuse whatever the strip misses.
  • pre-commit runs the file checks and gitleaks on staged changes.

The checker lives in .github/scripts/check_commit_messages.py and needs only python3.

Agent policy.

  • AGENTS.md covers no attribution, no commits to main, no hook bypass, no secrets, the setup steps, and site conventions.
  • .claude/settings.json disables Claude Code's commit and PR attribution at the source.

Dependabot sends monthly, grouped updates for action versions.

Fixes found by the validator

  • index.html: the highlights <div aria-label> is now a <section>, because screen readers ignore labels on plain divs.
  • topk/*.html: labelled <canvas> elements get role="img".
  • The dead cispa.saarland link to Mario Fritz's group now points to cispa.de/en/research/groups/fritz.

Repo settings (already applied)

  • protect-main ruleset:
    • Blocks force-pushes and deletion.
    • Requires a PR (0 approvals) with attribution, hygiene and validate passing.
    • Admins can bypass.
  • Merging: squash only, and the squash message comes from the commits, not the PR body. Merged branches are deleted automatically.
  • Pages source: GitHub Actions.
  • Secret scanning and push protection: on. Generic (non-provider) patterns could not be enabled on a personal repo; gitleaks covers them.

- Highlights block: div -> section so its aria-label is exposed
- topk demos: add role="img" to labelled canvases
- Replace dead cispa.saarland group link with cispa.de
- validate job: html-validate (recommended preset), lychee link
  check, and a 5 MB file-size guard; runs on PRs, pushes, and weekly
- deploy job: publishes to GitHub Pages from main only after
  validate passes (requires Pages source = GitHub Actions)
- Dependabot keeps action versions up to date
- Attribution: .github/scripts/check_commit_messages.py strips markers
  at prepare-commit-msg, refuses them at commit-msg and pre-push, and
  the CI attribution job refuses any commit a PR or push introduces
- Hygiene: pre-commit file checks, detect-private-key and gitleaks on
  staged changes; CI runs the hooks on the whole tree and gitleaks on
  the full history
- AGENTS.md states the repo policy; .claude/settings.json disables
  Claude Code attribution at the source
- Deploy waits for all three checks and publishes only site files
@mlapin
mlapin force-pushed the ci/validate-and-protect branch from 2fc82af to 5e61f72 Compare November 3, 2026 20:12
- Session-Link: chatgpt.com/codex task links and ChatGPT share and
  conversation links
@mlapin
mlapin merged commit b5309e8 into main Nov 3, 2026
4 checks passed
@mlapin
mlapin deleted the ci/validate-and-protect branch November 3, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant