Skip to content

release: v0.0.135 batch - #1151

Merged
nc9 merged 11 commits into
mainfrom
integration/v0.0.135
Oct 26, 2026
Merged

nc9 merged 11 commits into
mainfrom
integration/v0.0.135

Conversation

@nc9

@nc9 nc9 commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

One CI run for the v0.0.135 queue. Every commit is the original PR's commit (author and DCO sign-off kept); the only new commits regenerate the rule hubs, fix one punctuation slip and list the CHANGELOG entries. Merged with "Rebase and merge" so each commit lands individually, then the source PRs are closed.

PR Author Summary
#1126 nc9 tests: metadata-hop egress refusal, User-Agent across origins documented
#1028 nc9 new rule images/hotlinked (info)
#1024 nc9 new rule content/h1-title-alignment (info)
#622 nc9 audit: progress and log lines go to stderr for machine-readable formats; unknown format exits 1

Rule-add pieces moved together: canonical golden (findings 102743, per-rule tally 311), noindex-skip list, docs rule index and hubs, docs.json nav.

Local checks: tests for both rules, noindex-skip, docs-rule-pages, audit-stdout, canonical golden, test-suites --check, docs make validate, release-version tests, tsgo on rules, cli and audit-engine.

Docs: included per PR. Skill: no change needed.

nc9 and others added 11 commits October 26, 2026 21:01
…gent redirect decision is written down

- probe-redirect-headers: a global fetch spy shows the metadata hop is never
  sent and the redirect to it was; probeFetch rejects with EgressRefusedError;
  a control redirect to a public address off the site IS followed, so the
  metadata case cannot pass for another reason (a deadline, a mock miss)
- headersForRedirect keeps a User-Agent set through custom headers on a
  cross-origin hop, on purpose (it names the client, not a credential); comment
  plus test; docs say so

Refs squirrelscan/repo#3332.

Signed-off-by: Nik Cubrilovic <[email protected]>
…checks its verdict; docs name every kept header

Refs squirrelscan/repo#3332.

Signed-off-by: Nik Cubrilovic <[email protected]>
…skip, stems silent e safely #929

Signed-off-by: Nik Cubrilovic <[email protected]>
`squirrel audit <url> -f json` printed "New crawl: ...", "Found N URLs in
sitemap" and intercepted logger lines on stdout ahead of the report, so
`squirrel audit <url> -f json | jq` failed. Progress now takes an output
stream, and audit sends it to stderr for every format except console.

`squirrel audit -f <unknown>` now validates the format up front and exits 1,
like `squirrel report -f`, instead of running the audit, printing nothing
and exiting 0.

Adds an end-to-end test against a local Bun.serve site that checks stdout
starts with the report for json, xml, llm, markdown and text, and that an
unknown format exits 1.

Signed-off-by: Claude <[email protected]>
@claude

claude Bot commented Oct 26, 2026

Copy link
Copy Markdown

Reviewed the CLI stderr routing, the format validation, and the two new rules (images/hotlinked, content/h1-title-alignment). I did not run the test suites. I read the diff only and did not check CI status.

  • (medium) apps/cli/src/cli/commands/audit.ts:2297: createWalkHeartbeat({ enabled: process.stdout.isTTY !== true }) still keys off stdout. With -f json on an interactive terminal, stdout is usually a pipe (| jq) while stderr is a TTY. The progress spinner now animates on stderr, and the heartbeat is also enabled (stdout is not a TTY), so both fire on the same terminal. The heartbeat should follow the same stream as the progress: isConsoleFormat ? stdout.isTTY : stderr.isTTY.
  • (low) apps/cli/src/cli/commands/audit.ts:1466: isConsoleFormat is !args.format || args.format === "console", but the new test treats text as machine-readable and expects its progress on stderr. Confirm that text writes the report to stdout, so routing it through stderr is intended. If so, a one-line comment saying why would help.
  • (low) packages/rules/src/images/hotlinked.ts (the img, picture source and [style] loops): the number of elements scanned is uncapped. The AGENTS.md "Untrusted input" section asks for bounds on site-controlled work. A page with tens of thousands of <img> tags or srcset candidates means one URL parse each, and the rule time budget cannot interrupt a synchronous loop. Cap the elements and srcset candidates read per page, e.g. 500 and 20.
  • (low) packages/rules/src/images/hotlinked.ts (BADGE_WORDS): /badge|embed|widget|featured|launch|seal|banner-ad/i runs against the whole URL path and the alt text. featured and launch are common in ordinary image paths (/featured/hero.jpg, launch-day.png). Those images are silently skipped and are not counted as content images, which creates false negatives. The residual is acknowledged in the header comment, but the smoke-test results on real pages, as step 9 of "Adding a rule" asks, are not in the PR description. Please add them.
  • (low) packages/rules/src/content/h1-title-alignment.ts: the header comment and the WARN_MIN_* constants talk about a "warning" and a future promotion. The rule always emits info, so the WARN_* names are misleading. Rename them to CONFIDENT_*.
  • (nit) packages/rules/src/content/h1-title-alignment.ts: the sameWord prefix and containment logic for de/nl (large.includes(small) with a minimum of 5 letters) can produce false matches. That only hides findings, which is the safe direction for an info rule.
  • (nit) packages/rules/src/content/data/h1-title-stopwords.ts and the new rule files: the formatting is not oxfmt style (long lines, trailing commas). AGENTS.md says CI does not check other packages, so this is fine.
  • (nit) apps/cli/tests/cli/audit-stdout.test.ts: the test spawns six full audits with a 60s timeout each. That is slow, but it exercises the real behaviour. It also needs isolateSquirrelHome or an exemption from the guard in squirrel-home-guard.test.ts — it uses a scratch HOME env directly. Please confirm that the guard test passes.

Positives: validating --format before the crawl fixes the silent exit 0. The User-Agent cross-origin redirect behaviour is now documented and tested. The golden pins, docs and changelog entries are included. I found nothing critical or high.

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.

2 participants