Skip to content

Harden the public-content guard and the remote e2e secrets handling - #18

Merged
aevnsvi merged 5 commits into
mainfrom
review-fixes-guard-secrets
Oct 29, 2026
Merged

aevnsvi merged 5 commits into
mainfrom
review-fixes-guard-secrets

Conversation

@aevnsvi

@aevnsvi aevnsvi commented Oct 29, 2026

Copy link
Copy Markdown

Hardens the public-content guard and the remote e2e tooling.

  • The guard now exits 1 when a configured private denylist holds no entry (empty or comment only), naming the setting and printing no entry. With no denylist configured the guard still runs the public rules, but now says so on every run, so the pre-commit and pre-push hooks warn each time.
  • Staged and ranged diffs are scanned with --text, and --all no longer skips files with a NUL byte, so a file marked -diff or holding a NUL byte is no longer invisible to the guard.
  • Remote e2e storage and cookie assertions compare booleans, so a failure never prints the password.
  • Remote, crawl and setup projects record no Playwright trace (the traces keep request headers, including the sign-in credential). The smoke project keeps its traces.
  • The dev server binds to 127.0.0.1 when API_PROXY names a target that is not on this machine; DEV_HOST is the explicit override. Documented in the README.

Tests added for an empty denylist, the hook warning, a NUL-bearing file in --staged, --all and --range, a -diff attributed markdown file, and the dev host default.

… when unset

A configured denylist with no active entry matched nothing and let every
change through without output; it is now an error that names the setting
without printing any entry. When no denylist is configured the guard still
runs the public rules, but now says so on every run, including from the
pre-commit and pre-push hooks with nothing to scan.
Git reports such files as binary, so staged and ranged diffs held no
hunks for them, and the full-tree scan skipped any buffer with a NUL. A
private address inside one was never seen. Diffs now use --text and
--no-textconv, and the full-tree scan decodes NUL-bearing files one byte
per character instead of skipping them.
A trace keeps the headers of every request, so a failing run left the
Basic credential of the sign-in requests in the test output and the HTML
report. The setup, teardown, remote and crawl projects now run untraced;
the smoke project keeps its failure traces.
A failed not.toContain(password) prints the received string, which here
is the stored text holding the password, into the terminal, the HTML
report and the error context files. The storage and cookie assertions
now compare a boolean and carry a message instead.
The proxy presents the target's own Host, Origin and Referer, so a dev
server listening on every interface is a relay to the target for anyone
on the network. With API_PROXY naming a target that is not on this
machine the default bind is now 127.0.0.1; DEV_HOST remains the explicit
override.
@aevnsvi
aevnsvi merged commit 60ba84b into main Oct 29, 2026
6 checks passed
@aevnsvi
aevnsvi deleted the review-fixes-guard-secrets branch October 29, 2026 21:08
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