← back to Hollywood Import
security: strip hardcoded dw_admin secret -> env-first/passwordless. No rotation/deploy.
add48d62f5745076dabe87ecd6b7e8d5590fd3a1 · 2026-09-13 00:21:36 -0700 · Steve
Files touched
M momentum-feed/assign-sku.mjsM momentum-feed/build-acoustic-manifest.mjsM momentum-feed/build-wallcovering-canary.mjsM momentum-feed/enrich.mjsM momentum-feed/prep-golive.mjsM momentum-feed/price-backfill.mjsM momentum-feed/refresh.mjs
Diff
commit add48d62f5745076dabe87ecd6b7e8d5590fd3a1
Author: Steve <steve@designerwallcoverings.com>
Date: Sun Sep 13 00:21:36 2026 -0700
security: strip hardcoded dw_admin secret -> env-first/passwordless. No rotation/deploy.
---
momentum-feed/assign-sku.mjs | 2 +-
momentum-feed/build-acoustic-manifest.mjs | 2 +-
momentum-feed/build-wallcovering-canary.mjs | 2 +-
momentum-feed/enrich.mjs | 2 +-
momentum-feed/prep-golive.mjs | 2 +-
momentum-feed/price-backfill.mjs | 2 +-
momentum-feed/refresh.mjs | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/momentum-feed/assign-sku.mjs b/momentum-feed/assign-sku.mjs
index 7fe6382..d1fc2b6 100644
--- a/momentum-feed/assign-sku.mjs
+++ b/momentum-feed/assign-sku.mjs
@@ -7,7 +7,7 @@
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const { Pool } = require('pg');
-const pool = new Pool({ connectionString: 'postgresql://dw_admin:DW2024!@127.0.0.1:5432/dw_unified' });
+const pool = new Pool({ connectionString: (process.env.PGCONNSTRING || 'postgresql://dw_admin@127.0.0.1:5432/dw_unified') });
const COMMIT = process.argv.includes('--commit');
// --- TK-10630/TK-10634 GUARD (2026-08-17) ---------------------------------
diff --git a/momentum-feed/build-acoustic-manifest.mjs b/momentum-feed/build-acoustic-manifest.mjs
index 8563ffa..605655c 100644
--- a/momentum-feed/build-acoustic-manifest.mjs
+++ b/momentum-feed/build-acoustic-manifest.mjs
@@ -5,7 +5,7 @@ import { createRequire } from 'module';
import fs from 'fs';
const require = createRequire(import.meta.url);
const { Pool } = require('pg');
-const pool = new Pool({ connectionString: 'postgresql://dw_admin:DW2024!@127.0.0.1:5432/dw_unified' });
+const pool = new Pool({ connectionString: (process.env.PGCONNSTRING || 'postgresql://dw_admin@127.0.0.1:5432/dw_unified') });
const OUT = new URL('acoustic-golive.json', import.meta.url).pathname;
async function main() {
diff --git a/momentum-feed/build-wallcovering-canary.mjs b/momentum-feed/build-wallcovering-canary.mjs
index 5a6bcc1..ed760b6 100644
--- a/momentum-feed/build-wallcovering-canary.mjs
+++ b/momentum-feed/build-wallcovering-canary.mjs
@@ -9,7 +9,7 @@ import { createRequire } from 'module';
import fs from 'fs';
const require = createRequire(import.meta.url);
const { Pool } = require('pg');
-const pool = new Pool({ connectionString: 'postgresql://dw_admin:DW2024!@127.0.0.1:5432/dw_unified' });
+const pool = new Pool({ connectionString: (process.env.PGCONNSTRING || 'postgresql://dw_admin@127.0.0.1:5432/dw_unified') });
const OUT = new URL('wallcovering-canary.json', import.meta.url).pathname;
const REPORT = new URL('wallcovering-canary-verify.json', import.meta.url).pathname;
const AUDIT = new URL('../hollywood-create-audit.jsonl', import.meta.url).pathname;
diff --git a/momentum-feed/enrich.mjs b/momentum-feed/enrich.mjs
index 4be9a52..ab96224 100644
--- a/momentum-feed/enrich.mjs
+++ b/momentum-feed/enrich.mjs
@@ -11,7 +11,7 @@ const { Pool } = require('pg');
const OLLAMA = process.env.OLLAMA_HOST || 'http://localhost:11434';
const MODEL = process.env.OLLAMA_VL || 'qwen2.5vl:7b';
-const pool = new Pool({ connectionString: 'postgresql://dw_admin:DW2024!@127.0.0.1:5432/dw_unified' });
+const pool = new Pool({ connectionString: (process.env.PGCONNSTRING || 'postgresql://dw_admin@127.0.0.1:5432/dw_unified') });
const argLimit = (() => { const i = process.argv.indexOf('--limit'); return i > -1 ? parseInt(process.argv[i + 1], 10) : null; })();
const argCat = (() => { const i = process.argv.indexOf('--category'); return i > -1 ? process.argv[i + 1] : null; })();
diff --git a/momentum-feed/prep-golive.mjs b/momentum-feed/prep-golive.mjs
index 52d42fe..c460106 100644
--- a/momentum-feed/prep-golive.mjs
+++ b/momentum-feed/prep-golive.mjs
@@ -10,7 +10,7 @@ import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const { Pool } = require('pg');
const COMMIT = process.argv.includes('--commit');
-const pool = new Pool({ connectionString: 'postgresql://dw_admin:DW2024!@127.0.0.1:5432/dw_unified' });
+const pool = new Pool({ connectionString: (process.env.PGCONNSTRING || 'postgresql://dw_admin@127.0.0.1:5432/dw_unified') });
const DIM = /(\d+(?:\.\d+)?\s*H\s*[x×]\s*\d+(?:\.\d+)?\s*L|\b\d+(?:\.\d+)?\s?(?:IN|MM)\b)/gi;
function titleClean(name) {
diff --git a/momentum-feed/price-backfill.mjs b/momentum-feed/price-backfill.mjs
index 746936c..2c74b1a 100644
--- a/momentum-feed/price-backfill.mjs
+++ b/momentum-feed/price-backfill.mjs
@@ -15,7 +15,7 @@ const HOST = 'https://ms-e886719d86e7-4256.sfo.meilisearch.io';
const KEY = process.env.MOMENTUM_MS_KEY || '95fe8376edc78d49e787db49edda68426b21649f6271f49e2f1412118612fbd6';
const MARKUP = 1.448;
const COMMIT = process.argv.includes('--commit');
-const pool = new Pool({ connectionString: 'postgresql://dw_admin:DW2024!@127.0.0.1:5432/dw_unified' });
+const pool = new Pool({ connectionString: (process.env.PGCONNSTRING || 'postgresql://dw_admin@127.0.0.1:5432/dw_unified') });
async function main() {
// 1. Build number → price map from the feed.
diff --git a/momentum-feed/refresh.mjs b/momentum-feed/refresh.mjs
index e3e652d..a1e8921 100644
--- a/momentum-feed/refresh.mjs
+++ b/momentum-feed/refresh.mjs
@@ -22,7 +22,7 @@ const KEY = process.env.MOMENTUM_MS_KEY || '95fe8376edc78d49e787db49edda68426b21
const INDEX = 'redesign-colors';
const KEEP = new Set(['Wallcovering', 'Acoustic']);
const COMMIT = process.argv.includes('--commit');
-const pool = new Pool({ connectionString: 'postgresql://dw_admin:DW2024!@127.0.0.1:5432/dw_unified' });
+const pool = new Pool({ connectionString: (process.env.PGCONNSTRING || 'postgresql://dw_admin@127.0.0.1:5432/dw_unified') });
async function fetchPage(offset, limit = 200) {
const r = await fetch(`${HOST}/indexes/${INDEX}/search`, {
← 38dc619 TK-11384: fail closed on ambiguous dw_sku in mark_shopify_pr
·
back to Hollywood Import
·
TK-11757: price>0 guard on RESUME path of danapoint-promote d248f23 →