Repository navigation
Replace personal-looking name in selfheal test fixture - #4
Merged
Merged
Conversation
A systemd template-unit fixture in update/selfheal_linux_test.go used a personal given name as the instance. It is now foxtrack-bridge@test.service. The assertion is unchanged: unitFromCgroup must still return that last .service component.
Hacktron Security Check - SkippedReason: Code Review is not active for this organization
|
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.
What
In
update/selfheal_linux_test.go, a systemd template-unit fixture used a personal given name as the instance (foxtrack-bridge@<name>.servicein the cgroup path and in the expected unit name). That is nowfoxtrack-bridge@test.service.The test still checks the same behavior:
unitFromCgroupmust return the last path component when it ends in.service. The instance was not replaced withtest@example.invalidbecause that suffix would make the helper return an empty string and would weaken the case.No other
*_test.goor testdata file had a real-looking personal email. Remaining address-like strings in tests are alreadyexample.complaceholders, the standard systemduser@1000.serviceunit, or fake RTSP logins on.localhosts.Why
This is a public repo. Test fixtures should only use obviously fake data, including names inside systemd unit strings that look like email addresses.
Tested
In
/workspace/fd14-bridgeongrok/fake-test-email:CGO_ENABLED=0 go test -tags headless ./...: all packages with tests passed (includingfoxtrack-bridge/update)CGO_ENABLED=0 go vet -tags headless ./...: cleanNot tested
foxtrack-bridge@.servicetemplate. The change is test-fixture only.docs/bambu-cloud.md, and TP-Link factory default usernames inplug/klap.goandplug/tapo_aes.go, still appear in production or docs code.