Repository navigation
Lint: typos, oxlint and ShellCheck in CI and the hook (sc-9611) - #261
Open
ndbroadbent wants to merge 8 commits into
Open
ndbroadbent wants to merge 8 commits into
ndbroadbent wants to merge 8 commits into
Conversation
… files, stage_fixed); the lint job's cargo fmt --check goes (sc-9611) Nathan's decision (5 Dec 2026): formatters fix in a hook, CI has no format gate. mise.toml pins lefthook 2.2.4; rustfmt.toml names the edition, since rustfmt on stdin doesn't read Cargo.toml. The hook formats each staged file through stdin, so it never follows mod declarations into unstaged files. AGENTS.md: install the hooks once per clone, never --no-verify. oxfmt for the frontend follows in its own PR, in a quiet window.
… pre-commit hook; every action pinned by SHA; release workflows hardened (sc-9611) - pinact pinned every action (and pypi-publish's release/v1 branch) to a commit SHA, with the version in a comment. - persist-credentials: false on every checkout: no job pushes with the checkout's token (deploy uses its own key). - release.yml: contents: write only on the job that creates the release and moves v0; expressions reach run: scripts through env; no rust-cache for the binaries users download; workflow_run stays, with the reason it's safe. - Gallery release workflows: setup-node sets no cache (zizmor ignore with the reason). The GitHub Action's GITHUB_PATH writes: ignore with the reason. - shellcheck SC2337 (grep -q under pipefail) fixed in four package-content checks. - .betterleaks.toml allows the made-up test database users and redaction examples; the tree scans clean.
…ew advisory never turns main red (sc-9611)
…ree Rust workspaces and Trivy for every lockfile, failing on stale ignores (sc-9611) Starts green: pin-project-lite 0.2.18 (yanked) updated; rsa's Marvin advisory ignored (dev-dependency only); jsonwebtoken's CVE-2026-25537 ignored until 5 Jun 2027 (app/ only signs JWTs; the upgrade is its own story). pnpm audit isn't used: it reads the gallery workspace's astro/ folder as the astro package and reports 19 false advisories. Its own workflow, so a new advisory never holds back the CLI release (release.yml follows CI).
…toml fails on stale entries, Trivy ignores expire (sc-9611)
… images (app gates pull requests, renderer reports until sc-9674); the app image takes Debian's security updates; the live app image scanned daily (sc-9611) The pinned debian:trixie-slim (Debian's newest) has fixable HIGH CVEs in openssl and zstd: the app's runtime stage now runs apt-get upgrade, with today's date as a build arg so BuildKit's cache never keeps old packages. FROM lines keep tags: CI pins them by digest through build-contexts (amd64-only digests would break local arm64 builds).
…(typos -w fixes and stages); the hook runs one tool at a time (sc-9611) Starts green: two endsWith fixes (scripts/screenshots/lightbox.mjs), cp -R and a here-string in place of grep -q in a pipe (visual.sh, on-dev). _typos.toml allows the domain words (PNGs, BRIN, FlateDecode, DecodeParms), the test inputs misspelled on purpose and possessive identifiers. .oxlintrc.json turns off no-control-regex for the gallery's URL checks (on purpose) and no-empty-file for Sprockets' manifest. scripts/ci/shellcheck.sh checks every shell script, found by shebang.
…iberate misspellings only where they occur; hook lints .astro and shellchecks only staged scripts (review)
ndbroadbent
force-pushed
the
ci-images
branch
from
December 5, 2026 16:56
cb7eea1 to
07a9510
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fifth PR for sc-9611. It's stacked on #259.
New checks in CI's
securityjob and the pre-commit hook (mise.toml pins them):_typos.toml). The hook runstypos -w, which fixes what it's sure of and stages the result..oxlintrc.json,--deny-warnings).scripts/ci/shellcheck.sh). Until now only the orb's scripts and the workflows'run:blocks were checked.It starts green:
_typos.tomlallows each kind with its reason:café;thresold,APP_S3_REGOIN,MYAPP_DATABSE_POOL), which check that typos in settings get caught;unparseable, which is valid English;close_the_branchs_builds). Renaming those would touch app code other sessions are working in.endsWithfixes inscripts/screenshots/lightbox.mjs(same behaviour).no-control-regexis off for the gallery'smodel.ts: its URL checks reject control characters on purpose. Done in config, so the gallery files are untouched.no-empty-fileis off for Sprockets' requiredmanifest.js.cp -Rin place ofcp -r(scripts/ci/visual.sh), and a here-string in place of| grep -qunder pipefail (scripts/on-dev).Hook: it now runs one tool at a time. rustfmt and
typos -wboth rewrite staged files, and two fixers on one file in parallel would lose an edit. The whole hook takes about 2 s.Checked in a scratch clone: a staged
.rsfile withteh recieveand bad formatting was committed asthe receive, formatted. A planted/x$/.test(s)made the commit fail on oxlint. Everything passes on the tree.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.