chore: scrub identifiers from the tree and close the .gitignore gaps - #30
Merged
Conversation
Housekeeping found while auditing the repo before pushing. None of it
is a live credential; all of it is on a public repo today.
Identifiers replaced with documentation-space equivalents:
* `z3502076@ad.unsw.edu.au` — a real student ID and institutional
address — appeared in a doc comment on `build_openconnect_cookie`
and in three assertions of the percent-encoding test. The test only
needs a username containing `@`; it now uses `alice@ad.example.edu`.
* `ra.vpn.unsw.edu.au`, a real production GlobalProtect portal FQDN,
was quoted in a libopenconnect log excerpt in `wintun_cleanup`.
Nothing in that doc's argument depends on the hostname — the point
is that libopenconnect names the adapter after the portal.
* `172.26.6.44` / `172.26.6.45`, addresses a real gateway assigned
from its internal pool, illustrated the pre-CSTP vs CSTP HIP
mismatch in `main.rs` and `gp-tunnel`. The argument is entirely
about the two differing, so RFC 5737 space works identically.
The SAML callback fixture in `gp-auth` is the one worth explaining. It
carried a 52-byte high-entropy `prelogin-cookie` next to a username
that had been hand-blanked to `xxxxxxxxxxxx.com` — the signature of a
capture that was only half redacted. It traces to a public upstream bug
report (yuezk/GlobalProtect-openconnect#431), so it is a third party's
long-expired session token rather than ours, and there is nothing to
revoke. Republishing someone else's bearer token as a test fixture is
still not something to leave in place. Replaced with a synthetic blob
of identical shape and element order; verified it round-trips.
`.gitignore` had three gaps, each confirmed with `git check-ignore -v`:
* `/target` was root-anchored, so `crates/*/target/` and
`bins/*/target/` were NOT ignored — two per-crate rules had been
added reactively after the fact. That is exactly how 710 blobs of
Windows build output (58 MiB of pack) reached this repo's history.
One un-anchored `target/` covers every depth, now and later.
* A bare `config.toml` line matches at every depth, so it also
swallowed `.cargo/config.toml` — which this repo has a real use for
(release.yml sets OPENCONNECT_DIR / LIBCLANG_PATH per job, and the
natural refactor is a checked-in `[env]` block). A `git add` would
have silently done nothing. Now anchored, and `config.toml.tmp` —
written by `Config::save_to` before its rename, containing the
portal URL, username and Okta tenant — is covered too.
* None of the release-packaging output (`dist/`, `dll-cache/`,
`wintun-extract/`, the tarballs) was ignored, so reproducing a
release build locally leaves a directory of binaries next to a
`git add -A`.
The credential globs (`*.pem`, `*.key`, `*.log`, …) stay deny-by-
default but now re-admit `**/tests/fixtures/**`: `PortalProfile`
already has `client_cert` / `client_key` fields and client-certificate
auth is a planned item, so a synthetic fixture cert is a near-term
certainty and would otherwise fail to stage with no visible reason.
Verified `git ls-files | git check-ignore --stdin` is empty — no
currently-tracked file becomes ignored.
cargo test --workspace --locked -> 268 passed, 0 failed
cargo clippy --workspace --all-targets -- -D warnings -> clean
cargo fmt --all --check -> clean
Not addressed here, needs a decision: `frank.li@unsw.edu.au` is the
author AND committer of 28 of 186 commits, and `bins/pgn-tray/target/`
still holds those 710 build blobs (with `C:\Users\kyaky\…` paths in the
.pdb files). Neither can be fixed by editing files — both need a
`git filter-repo` pass and a force-push, which rewrites every SHA and
breaks open PRs, so it is deliberately left as a separate call.
kyaky
force-pushed
the
chore/repo-hygiene
branch
from
August 26, 2026 12:36
cbbc861 to
200a0df
Compare
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.
Housekeeping found while auditing the repo before pushing. Nothing here is a live credential, and there is nothing to revoke — but all of it is on a public repo today.
Identifiers → documentation space
z3502076@ad.unsw.edu.aualice@ad.example.edubuild_openconnect_cookiedoc comment + 3 assertionsra.vpn.unsw.edu.aura.vpn.example.comwintun_cleanupmodule doc172.26.6.44/.45198.51.100.44/.45main.rs,gp-tunnelHIP-mismatch docsThe student ID is the one that actually matters — it is an account identifier, and the test only ever needed a username containing
@. The others are a real production portal FQDN and two addresses a real gateway assigned from its internal pool; in each case the doc's argument is independent of the value.(
129.94.0.230/129.94.0.0/16in thegp-routetests get the same treatment in #29 — that PR rewrote most of those same lines, so splitting it here would only have produced a conflict.)The SAML fixture — worth reading before you skim past it
crates/gp-auth/src/saml_common.rscarried a base64globalprotectcallback:blob that decodes to:52 bytes of high-entropy data next to a username that had been hand-blanked — the signature of a capture that was only half redacted. I traced it: it is verbatim from yuezk/GlobalProtect-openconnect#431, a public bug report where a third party pasted their callback string and scrubbed the username but not the cookie.
So: not ours, long expired, already public, nothing to revoke. Republishing someone else's bearer token as a test fixture is still not something to leave in place. Replaced with a synthetic blob of identical shape and element order; verified it round-trips through the same parser and the assertions still exercise the same path.
.gitignore — three gaps, each confirmed with
git check-ignore -v1.
/targetwas root-anchored. Socrates/*/target/andbins/*/target/were not ignored, and two per-crate rules had been bolted on after the fact. That is exactly how 710 blobs of Windows build output (58 MiB of pack) reached this repo's history. One un-anchoredtarget/covers every depth, now and for whatever gets added later.2. A bare
config.tomlmatches at every depth — including.cargo/config.toml, which this repo has a real use for (release.yml setsOPENCONNECT_DIR/LIBCLANG_PATHper job; the natural refactor is a checked-in[env]block). Agit addwould have silently done nothing and CI would have failed on a linker error with no hint pointing at .gitignore. Now anchored — andconfig.toml.tmpis covered too, whichConfig::save_towrites before its rename and which holds the portal URL, username and Okta tenant.3. No release-packaging output was ignored (
dist/,dll-cache/,wintun-extract/, the tarballs). Reproducing a release build locally — the obvious move when a release job fails — leaves a directory of binaries next to agit add -A.The credential globs stay deny-by-default but now re-admit
**/tests/fixtures/**.PortalProfilealready hasclient_cert/client_keyfields and client-certificate auth is a planned item, so a synthetic fixture cert is a near-term certainty — and it would currently fail to stage with no visible reason.Verified
git ls-files | git check-ignore --stdinis empty: no currently-tracked file becomes ignored.Verification
cargo test --workspace --locked→ 268 passed ·cargo clippy --workspace --all-targets -- -D warnings→ clean ·cargo fmt --all --check→ cleanTwo things this cannot fix — your call
Both need
git filter-repoand a force-push, which rewrites every SHA and breaks open PRs and existing clones. Deliberately not attempted:frank.li@unsw.edu.auis the author and committer of 28 of 186 commits. Commit metadata is not reachable by editing files — a.mailmapchanges localgit logrendering, but GitHub still serves the original author line on every commit page and through the API. Fixing it meansgit filter-repo --mailmap. (andylizf@outlook.comshould be left alone — that is an outside contributor's own chosen identity.)bins/pgn-tray/target/still holds those 710 blobs, including 25.pdbfiles embeddingC:\Users\kyaky\Documents\Playground\pangolin\…. Dropping them also takes ~58 MiB off every future clone.Related: the message on 8572dfb ("security: remove session archives from repo") is wrong in both directions. It claims the archives were removed from tracking and remain in history; in fact
git show --statshows it changed.gitignoreand nothing else, and.session-archives/has never existed anywhere in history. The ignore rule is correct and preventive, so it stays — but no BFG pass is needed for it. The two items above are the real ones.