Skip to content

Commit f05eccd

Browse files
johnmathewsclaude
andcommitted
Remove hardcoded PostgreSQL password from setup script
Read PG_PASSWORD from environment variable instead of hardcoding in the script. The script now fails with a clear error if the variable is not set. The old password was exposed in git history on a public repo and should be rotated. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7cb6402 commit f05eccd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

infra/setup.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
# Prerequisites:
1212
# - az cli logged in
1313
# - Sufficient quota (4 vCPU in westeurope)
14+
# - PG_PASSWORD environment variable set
1415
#
1516
# Usage:
17+
# export PG_PASSWORD="your-secure-password"
1618
# ./infra/setup.sh
1719

1820
set -euo pipefail
@@ -23,7 +25,7 @@ ACR_NAME="acrdocumentstream"
2325
AKS_NAME="DocumentStreamManagedCluster"
2426
PG_NAME="documentstream-pg"
2527
PG_ADMIN="documentstream"
26-
PG_PASSWORD="REDACTED"
28+
PG_PASSWORD="${PG_PASSWORD:?Set PG_PASSWORD environment variable before running this script}"
2729
STORAGE_NAME="documentstreamstorage"
2830
BLOB_CONTAINER="documents"
2931

0 commit comments

Comments
 (0)