Skip to content

chore(audit): execute 2026-06-11 audit — docs GFM tables fix + guardrails (3 findings, 2 refuted) - #161

Merged
agjs merged 3 commits into
mainfrom
chore/audit-fixes-20260611-0856
Jun 11, 2026
Merged

chore(audit): execute 2026-06-11 audit — docs GFM tables fix + guardrails (3 findings, 2 refuted)#161
agjs merged 3 commits into
mainfrom
chore/audit-fixes-20260611-0856

Conversation

@agjs

@agjs agjs commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Executes the 2026-06-11 monorepo audit. Of the report's 5 findings, 3 were real and fixed; 2 were false findings (verified and skipped, not patched), plus 4 carried-over blocked items refuted.

  • F001 (high, docs): GFM was never wired into the Starlight MDX pipeline, so every pipe table across the docs site (14 pages incl. /skills/spec-loop/, auth-contract, env-vars, …) shipped as literal | … | text instead of <table>. Wired remark-gfm into markdown.remarkPlugins, pinned it as a direct dep, and added a post-build check:rendered-markdown guard (in build:ci) that fails if any rendered page contains unrendered table-delimiter residue — proven to flag all 14 pages when GFM is removed and to ignore intentional table syntax inside fenced code blocks.
  • F003 (med, api): engine-pin-parity only checked a nonexistent apps/api/.github/workflows/ci.yml, leaving all root workflows' bun-version pins unvalidated against engines.bun. Extended it to scan every root workflow and every bun-version: occurrence; added a multi-workflow test. Proven: injecting a drifted pin now fails lint:meta.
  • F005 (low, ui): Playwright PORT was hardcoded to 7331; now overridable via PLAYWRIGHT_PORT (propagates to baseURL and the webServer readiness URL).

Skipped as false findings (verified, not patched)

  • F002: infra-compose-security-secrets.yml already gates the expensive gitleaks steps via an in-job dorny/paths-filter. The unfiltered pull_request trigger is the repo's documented intended pattern (see lint-meta github-actions-paths-filter-parity: "PR triggers stay unfiltered so branch protection always gets a status"). Adding a PR paths filter would remove the stable required-status guarantee.
  • F004: Committed og-image.png (56,705 bytes) is reproduced byte-for-byte by generate:og-image. The audit's claimed 100KB HEAD blob was wrong. No drift.

Also refuted: gitleaks "missing pipefail" (set -euo pipefail already present), Trivy SARIF continue-on-error (GitHub-recommended if: always() pattern; scan still gates via exit-code: 1), and the security-workflow cancel-in-progress item (intentional, enforced by github-actions-security-no-cancel).

Test plan

  • bun run check — api ✅ and ui ✅ green
  • cd apps/docs && bun run build:ci ✅ (build + fragments + new check:rendered-markdown + linkcheck all pass via pre-push)
  • Pre-push full security/smoke + linkcheck gate passed on push
  • engine-pin-parity tests: 6 pass (5 original + 1 new multi-workflow)

App merge bars

Area Command
API cd apps/api && bun run validate
UI cd apps/ui && bun run validate
Docs cd apps/docs && bun run build:ci
Repo drift bun run check (from repo root)

Conventions

  • No any, no blind as, no !
  • New env vars in schema + .env.example (+ SECURITY.md when relevant) — n/a (PLAYWRIGHT_PORT is a local test-runner override, not an app env var)
  • Tests updated for changed behavior (engine-pin-parity multi-workflow test)

Screenshots

Tables now render as real <table> elements site-wide (e.g. /skills/spec-loop/) instead of literal pipe text. No app-UI change.

agjs added 3 commits June 11, 2026 09:04
…ession

GFM was never wired into the Starlight MDX pipeline, so every pipe table across the docs site shipped as literal '| ... |' text instead of <table>. Add remark-gfm to markdown.remarkPlugins, pin it as a direct dep, and add a post-build check:rendered-markdown guard (wired into build:ci) that fails if any rendered page contains unrendered table-delimiter residue.

Audit: F001
The engine-pin-parity rule only checked apps/api/.github/workflows/ci.yml, which does not exist in this monorepo (workflows live at the repo root). Every root workflow's bun-version pin was therefore unvalidated against package.json engines.bun. Scan all workflowFiles and flag every bun-version occurrence that drifts from the pin; add a multi-workflow test.

Audit: F003
PORT was hardcoded to 7331, silently breaking e2e when the UI dev server is remapped (Docker port mapping, port conflicts). Default stays 7331; PLAYWRIGHT_PORT overrides it and propagates to baseURL and the webServer readiness URL.

Audit: F005
@agjs
agjs merged commit 491b5ea into main Jun 11, 2026
28 checks passed
@agjs
agjs deleted the chore/audit-fixes-20260611-0856 branch June 11, 2026 07:14
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