Neutralize consumer names in engine comments + test fixtures (read tool-agnostic) #163

Closed
opened 2026-06-24 07:46:14 +00:00 by coilyco-ops · 2 comments
Member

The audit confirmed cli-guard is a clean standalone engine - the only smell is that consumer names are baked into examples/fixtures, so a fresh reader can infer it was carved from ward:

  • cli/execverb/describe.go, cli/execverb/guardfile.go: example comments say ward/ward-kdl/wrap ward git -> use a generic <cli> placeholder.
  • cli/catalog/catalog_test.go, cli/allowlist/allowlist_test.go, cli/profiles/profiles_test.go: fixtures named ward.yaml/coily.yaml/.ward -> neutral names (production code is already generic).
  • cli/repocfg/security.go:52 "kap, ward" comment -> generic.
    No production behaviour change.

From the 2026-06-24 ward/cli-guard boundary audit. See ward docs/architecture.md (the 3-layer model: cli-guard engine / ward-kdl generator / ward product). Related: ward#194, ward#200, cli-guard#139.

The audit confirmed cli-guard is a clean standalone engine - the only smell is that consumer names are baked into examples/fixtures, so a fresh reader can infer it was carved from ward: - `cli/execverb/describe.go`, `cli/execverb/guardfile.go`: example comments say `ward`/`ward-kdl`/`wrap ward git` -> use a generic `<cli>` placeholder. - `cli/catalog/catalog_test.go`, `cli/allowlist/allowlist_test.go`, `cli/profiles/profiles_test.go`: fixtures named `ward.yaml`/`coily.yaml`/`.ward` -> neutral names (production code is already generic). - `cli/repocfg/security.go:52` "kap, ward" comment -> generic. No production behaviour change. From the 2026-06-24 ward/cli-guard boundary audit. See ward docs/architecture.md (the 3-layer model: cli-guard engine / ward-kdl generator / ward product). Related: ward#194, ward#200, cli-guard#139.
Author
Member

🔒 Reserved by ward agent --driver claude — container ward-cli-guard-issue-163-claude-367d80a2 on host kais-macbook-pro-2.local is carrying this issue (reserved 2026-06-25T04:51:05Z). Concurrent ward agent runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); --force overrides.

— Claude (she/her), via ward agent

<!-- ward-agent-reservation --> 🔒 Reserved by `ward agent --driver claude` — container `ward-cli-guard-issue-163-claude-367d80a2` on host `kais-macbook-pro-2.local` is carrying this issue (reserved 2026-06-25T04:51:05Z). Concurrent `ward agent` runs are blocked until it finishes or the reservation goes stale (2h0m0s TTL); `--force` overrides. <!-- ward-agent-signature --> — Claude (she/her), via `ward agent`
Owner

Retrospective: this one was mechanically small but had a couple of teeth.

The scrub itself was exactly as scoped - swap ward/ward-kdl/coily/kap for a generic <cli> in doc comments and rename the ward.yaml/coily.yaml/.ward fixtures to neutral myapp.yaml/legacy.yaml/.myapp. No production code touched, so no behaviour to break.

Two things fought back. First, the comment edits land on exported struct fields, so godoc-current.txt drifted - the pinning hook would have failed if I had not regenerated it, which is the hook doing its job. Second, the code-comments discipline hook flagged a pre-existing 3-line block in guardfile.go the moment my commit touched that file, so I condensed it to two lines in passing. Mildly annoying but fair.

One honesty note: golangci-lint and trufflehog are not installed in this container, so I committed with SKIP=golangci-lint,trufflehog rather than --no-verify - every other hook ran and passed, and CI runs both anyway. The pre-existing sandbox/seccomp test failures (TestSetupDenied, the two TestSecurityClaim_*) reproduce on a clean tree too - they need a kernel feature this box lacks, unrelated to this change.

Confidence is high - it is comments and tempdir fixture names. Worth a follow-up someday: a grep-based hook that fails on consumer names leaking into the engine, so this stays scrubbed without a manual audit.

Retrospective: this one was mechanically small but had a couple of teeth. The scrub itself was exactly as scoped - swap `ward`/`ward-kdl`/`coily`/`kap` for a generic `<cli>` in doc comments and rename the `ward.yaml`/`coily.yaml`/`.ward` fixtures to neutral `myapp.yaml`/`legacy.yaml`/`.myapp`. No production code touched, so no behaviour to break. Two things fought back. First, the comment edits land on exported struct fields, so `godoc-current.txt` drifted - the pinning hook would have failed if I had not regenerated it, which is the hook doing its job. Second, the `code-comments` discipline hook flagged a pre-existing 3-line block in `guardfile.go` the moment my commit touched that file, so I condensed it to two lines in passing. Mildly annoying but fair. One honesty note: `golangci-lint` and `trufflehog` are not installed in this container, so I committed with `SKIP=golangci-lint,trufflehog` rather than `--no-verify` - every other hook ran and passed, and CI runs both anyway. The pre-existing sandbox/seccomp test failures (`TestSetupDenied`, the two `TestSecurityClaim_*`) reproduce on a clean tree too - they need a kernel feature this box lacks, unrelated to this change. Confidence is high - it is comments and tempdir fixture names. Worth a follow-up someday: a grep-based hook that fails on consumer names leaking into the engine, so this stays scrubbed without a manual audit.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/cli-guard#163
No description provided.