Files
wekan/tests
Lauri Ojansivu 254adfd577 Docker entrypoint: no value read from the environment is logged, and db-ready says no credentials.
GitHub CodeQL code scanning alerts #617 and #618 (js/clear-text-logging,
high): the entrypoint's log and warn printed values read from the
environment - the port in the "waiting for database" line, and the
MONGO_URL_FILE path in its error. Running the same query locally showed
two more behind them: the FerretDB listen address and the WEKAN_DB value
repeated in its error. Each is now a fixed sentence that names the
variable, not its value; CodeQL's CleartextLogging query finds nothing
left in releases/ferretdb/.

And one CodeQL cannot see: db-ready's reason goes to the log AND onto
the public 'waiting for database' page. The driver never puts the
password in a message, but "Username contains unescaped characters"
names the username, so the userinfo of MONGO_URL is now taken out of
every message before it is printed.

Tests: tests/dockerEntrypoint.test.cjs (no log line interpolates the
port or the listen address, no thrown message is built from env, the
WEKAN_DB and MONGO_URL_FILE errors carry no value; db-ready run for real
hides the username and password of a malformed URL, and negative: keeps
the host and port of a refused connection), tests/envSecretFiles.test.cjs.

Thanks to GitHub CodeQL and xet7 !
2026-11-25 22:56:16 +02:00
..
…
2026-09-10 19:50:55 +03:00
…