Skip to content

chore(audit-fixes): fix .gitignore gaps + apply gofmt to all example files - #2

Merged
shing1211 merged 2 commits into
mainfrom
chore/audit-fixes
Oct 1, 2026
Merged

shing1211 merged 2 commits into
mainfrom
chore/audit-fixes

Conversation

@shing1211

Copy link
Copy Markdown
Owner

Summary

Two fixes from the 2026-10-01 audit of :

1. .gitignore credential-backup gap (security fix)

only blocked , not . A backup file made during the session
(, 485 bytes, RSA key + trade password + WS secret) would be
picked up by a plain and committed as a new file to this public repo.

Fix: Added patterns to block all common env-backup naming conventions:

.env.bak
.env.bak.*
.env.local
.env.*.local
.env.*.bak

Confirmed: dry-run now ignores the backup file. History is clean — the
credential file was never committed.

2. gofmt applied to 118 example files

118 of 126 example files failed , causing the CI "Check example numbering"
step to fail on every push. Applied across all files (119 files changed,
+365/−352 lines).

Build / vet / test / race results (all pass)

Check Result
go build -p 1 ./... ✅
go vet -p 1 ./... ✅
go test -p 1 ./... ✅
go test -p 1 -race ./... ✅
go list -m -u all ✅ no outdated direct deps

Not fixed in this PR (requires owner action)

  • Secret scanning not enabled — GitHub repo Settings → Security → Secret scanning → Enable
  • CI "Check example numbering" logic — the gofmt fix makes the step pass; the step itself
    is in which I was not authorized to modify

Fixes CI 'Check example numbering' failure. 118 of 126 example
directories had unformatted main.go files, causing every push to
fail the gofmt gate in ci.yml.
The check-example-numbers.sh CI step counts 121 standalone examples
(126 numeric dirs minus 5 letter sub-examples 97a-97e). The header
quote in docs/EXAMPLES.md was stale at 114.
@shing1211
shing1211 merged commit 2c5ac4c into main Oct 1, 2026
1 check passed
@shing1211
shing1211 deleted the chore/audit-fixes branch October 1, 2026 12:01
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