CI: no secret scanning, and config.json (incl. any gifApiKey) ships inside the build image #95

Closed
opened 2026-09-12 01:57:44 -04:00 by jared · 0 comments
Owner

Location: .gitea/workflows/ci.yml, .husky/pre-commit (lint-staged: eslint + prettier only), vite.config.js static-copy of config.json, Dockerfile (COPY . /src/)

Problem

Nothing checks commits or the built artifact for credentials. config.json is copied verbatim into dist/ and the Docker image; today gifApiKey is empty, but the moment it is filled in it is a public secret in a public repo and a public bundle (see #68 for the privacy side). The temporary Gitea token used for this audit is exactly the kind of thing that ends up in a scratch file and then a commit.

Suggested fix

Add gitleaks (or trufflehog) as a CI step on pull requests and as a lint-staged hook, with a baseline file for the known public homeserver URLs. Move any real third-party key out of config.json into a deploy-time substitution (the nginx image can template it) so the repo never carries it.


Filed from the September 2026 client audit (CI pipeline review, branch lotus @ 4bea4895).

**Location:** `.gitea/workflows/ci.yml`, `.husky/pre-commit` (lint-staged: eslint + prettier only), `vite.config.js` static-copy of `config.json`, `Dockerfile` (`COPY . /src/`) ### Problem Nothing checks commits or the built artifact for credentials. `config.json` is copied verbatim into `dist/` and the Docker image; today `gifApiKey` is empty, but the moment it is filled in it is a public secret in a public repo and a public bundle (see #68 for the privacy side). The temporary Gitea token used for this audit is exactly the kind of thing that ends up in a scratch file and then a commit. ### Suggested fix Add `gitleaks` (or `trufflehog`) as a CI step on pull requests and as a lint-staged hook, with a baseline file for the known public homeserver URLs. Move any real third-party key out of `config.json` into a deploy-time substitution (the nginx image can template it) so the repo never carries it. --- _Filed from the September 2026 client audit (CI pipeline review, branch `lotus` @ 4bea4895)._
jared added this to the Audit 2026-09 · Medium & Low milestone 2026-09-12 01:57:44 -04:00
jared added the priority: mediumtech-debtarea: build-ci labels 2026-09-12 01:57:44 -04:00
jared self-assigned this 2026-09-12 01:57:44 -04:00
jared closed this issue 2026-09-13 00:56:44 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
2026-11-14
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#95