Skip to content

Business operating system for Claude Code — 57 skills, 21 agents, smart daemon. Unified inbox (WhatsApp/Email/Slack/Telegram), autonomous PR merge, full-AWS monitoring, revenue (Stripe+RevenueCat), e-commerce (Shopify), marketing (Klaviyo/Meta/GA4), voice (Bland/ElevenLabs), APM (Datadog/NewRelic/OTEL), YOLO mode.

fix(security): purge personal namespace from marketing prewarm + telegram-server (F-008, F-009) (#269)

Aurora Capital43975fe7533d
diff --git a/claude-ops/scripts/ops-marketing-auth-prewarm.sh b/claude-ops/scripts/ops-marketing-auth-prewarm.sh
index de5cd0e3..8daffa07 100755
--- a/claude-ops/scripts/ops-marketing-auth-prewarm.sh
+++ b/claude-ops/scripts/ops-marketing-auth-prewarm.sh
@@ -10,6 +10,7 @@ set -euo pipefail
# OPS_PREWARM_DRY_RUN - if set to 1, print output to stderr only (no file write)
DATA_DIR="${OPS_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}"
+PREFS_PATH="${PREFS_PATH:-${CLAUDE_PLUGIN_DATA_DIR:-$DATA_DIR}/preferences.json}"
OUTPUT_FILE="$DATA_DIR/marketing-auth-prewarm.json"
GENERATED_AT="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
@@ -83,24 +84,15 @@ extract_project_hint() {
# look for product name embedded in the key itself
# e.g. META_MY-PROJECT_ACCESS_TOKEN → my-project, STRIPE_SAMPLE-PROJECT_SECRET_KEY → sample-project
- # First try projects already defined in prefs (highest signal — these are
- # the projects /ops:marketing knows about). Then fall back to a static
- # known list for projects that exist in Doppler but aren't yet in prefs.
- local prefs_path="${OPS_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}/preferences.json"
- local prefs_projects=()
- if [ -f "$prefs_path" ]; then
- while IFS= read -r p; do
- [ -n "$p" ] && prefs_projects+=("$p")
- done < <(jq -r '.marketing.projects | keys[]?' "$prefs_path" 2>/dev/null)
- fi
+ # Same slugs as CONFIGURED_SLUGS (loaded once from $PREFS_PATH:
+ # .marketing.projects keys and .marketing.account_slugs[]).
+ # No hardcoded project names — those are user PII and must live in config.
+ local known_products=("${CONFIGURED_SLUGS[@]}")
- local known_products=(
- "${prefs_projects[@]}"
- "my-project" "alwaysbright" "example-project" "inboxassist" "fiberinternet" "sample-project"
- "shannon" "talktoyourhouse" "claude-ops" "claudeops" "flowrider" "hueman"
- "upres" "whoopgo" "aurora" "bondmcp" "payfwd" "messo" "manus"
- "user" "homey" "carrier" "anna" "mango" "hypest" "maitre"
- )
+ # No configured projects → no hint extraction possible; fall back to the
+ # doppler project base name. Caller-level guard already handles the
+ # zero-config case at script entry, so reaching here with an empty list
+ # is harmless.
# Dedupe + sort by length descending so longer matches win (e.g. "sample-project" before "fiber")
local sorted_products
sorted_products=$(printf '%s\n' "${known_products[@]}" | awk 'NF' | sort -u | awk '{ print length, $0 }' | sort -rn | cut -d" " -f2-)
@@ -130,6 +122,26 @@ extract_project_hint() {
echo "$base_project"
}
+# ── precondition: at least one marketing project must be configured ──────────
+# Load slugs from the partner registry (preferences.json). If empty, exit 0
+# as a graceful no-op so this script can be safely chained in setup flows.
+CONFIGURED_SLUGS=()
+if [ -f "$PREFS_PATH" ]; then
+ while IFS= read -r p; do
+ [ -n "$p" ] && CONFIGURED_SLUGS+=("$p")
+ done < <(jq -r '
+ [
+ (.marketing.projects // {} | keys[]?),
+ (.marketing.account_slugs[]?)
+ ] | unique | .[]
+ ' "$PREFS_PATH" 2>/dev/null)
+fi
+
+if [ "${#CONFIGURED_SLUGS[@]}" -eq 0 ]; then
+ echo "no marketing accounts configured — run /ops:setup marketing"
+ exit 0
+fi
+
# ── accumulate entries into a temp JSON lines file ────────────────────────────
TMP_ENTRIES="$(mktemp)"
trap 'rm -f "$TMP_ENTRIES"' EXIT
diff --git a/claude-ops/skills/setup/channels/marketing.md b/claude-ops/skills/setup/channels/marketing.md
index 6144a5b0..667c9656 100644
--- a/claude-ops/skills/setup/channels/marketing.md
+++ b/claude-ops/skills/setup/channels/marketing.md
@@ -1,5 +1,7 @@
### 3j — Marketing (Klaviyo, Meta Ads, GA4, Search Console)
+> **Project slugs are the entry gate.** Every sub-step below writes under `marketing.projects.<slug>` in `$PREFS_PATH`. Those slugs (plus an optional flat `marketing.account_slugs[]` array) are the canonical source consumed by `ops-marketing-auth-prewarm.sh` for product-hint extraction. The prewarm script no longer ships a hardcoded slug list — if no projects/slugs exist in prefs it prints `no marketing accounts configured — run /ops:setup marketing` and exits 0. Make sure the user has at least one project slug picked before continuing.
+
**Before showing the service selector**, run the Universal Credential Auto-Scan for all marketing vars simultaneously:
```bash
diff --git a/claude-ops/telegram-server/package.json b/claude-ops/telegram-server/package.json
index fdfbe6a5..af506064 100644
--- a/claude-ops/telegram-server/package.json
+++ b/claude-ops/telegram-server/package.json
@@ -1,7 +1,7 @@
{
"name": "claude-ops-telegram-server",
"version": "0.2.1",
- "mcpName": "io.github.example/claude-ops-telegram-server",
+ "mcpName": "io.github.lifecycle-innovations-limited/claude-ops-telegram-server",
"description": "Telegram user-auth MCP server for claude-ops plugin (personal account via MTProto, not bots)",
"license": "MIT",
"repository": {
diff --git a/claude-ops/telegram-server/server.json b/claude-ops/telegram-server/server.json
index 9f145dfd..c5ac0557 100644
--- a/claude-ops/telegram-server/server.json
+++ b/claude-ops/telegram-server/server.json
@@ -1,6 +1,6 @@
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
- "name": "io.github.example/claude-ops-telegram-server",
+ "name": "io.github.lifecycle-innovations-limited/claude-ops-telegram-server",
"description": "Telegram personal-account MCP (MTProto user-auth). Read DMs, send messages, search across chats.",
"repository": {
"url": "https://github.com/Lifecycle-Innovations-Limited/claude-ops",