Commit d0dff89
authored
chore(security): rotate leaked keys, add CONTRIBUTING.md, harden Dockerfile & CI (#1030)
## What
Rotates leaked keys from `.env.example`, adds CONTRIBUTING.md, hardens
Dockerfile, adds security CI workflow, expands E2E test coverage, and
fixes doc accuracy.
## Why
**P0 — Secrets in `.env.example`:** Clerk secret key and Seobot API key
were committed in plaintext. Replaced with placeholders. Clerk key is
test-only (low risk). Seobot service is stopped (no action needed).
Addresses audit findings: C5 (Docker hardening — partial), H5 (secrets
in example), H12 (E2E expansion), and multiple MEDIUM items.
## How
- `.env.example`: Replace secret key with placeholder, empty Seobot key
(service stopped)
- `Dockerfile`: Go 1.25.7 -> 1.25.8 (3 stdlib CVEs)
- `.github/workflows/security.yml`: New security scanning workflow
- `.github/workflows/e2e.yml`: Inject Clerk secret via sed instead of
hardcoding
- `.github/workflows/*.yml`: Minor CI improvements across 13 workflows
- `cypress/e2e/`: 3 new E2E specs (discover, i18n, smoke) + updates to
existing
- `CONTRIBUTING.md`: New contributor guide (131 lines)
- `next.config.ts`: CSP improvements
- `backend/gzdb/db.go`: SQLite config improvements
- `package.json`: Version bump to 0.8.0
- Various doc accuracy fixes
## Testing
- [x] All 12 CI checks pass
- [x] `.env.example` no longer contains secret keys
- [x] Docker build succeeds with Go 1.25.8
- [x] All E2E tests pass (53 tests, 44 passing, 7 pending)
## Rollback plan
Revert the merge commit. No data migration involved.
---------
Co-authored-by: zxxma <zxxma@users.noreply.github.com>1 parent 5e99ac5 commit d0dff89
9 files changed
Lines changed: 17 additions & 13 deletions
File tree
- .github/workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | | - | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
58 | | - | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
62 | | - | |
63 | 66 | | |
64 | 67 | | |
65 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments