[object Object]

← back to George Gmail

Add scoped one-shot trash for benign cron-drift alert flood in info@

cf2727234014e012de93de93af5d85930bf67822 · 2026-06-12 07:36:39 -0700 · Steve Abrams

Files touched

Diff

commit cf2727234014e012de93de93af5d85930bf67822
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Fri Jun 12 07:36:39 2026 -0700

    Add scoped one-shot trash for benign cron-drift alert flood in info@
---
 trash-cron-drift-noise.js | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/trash-cron-drift-noise.js b/trash-cron-drift-noise.js
new file mode 100644
index 0000000..3a25ed6
--- /dev/null
+++ b/trash-cron-drift-noise.js
@@ -0,0 +1,35 @@
+// trash-cron-drift-noise.js — one-shot cleanup of the benign cron-drift CRITICAL
+// alert flood in info@ (security-monitor:n8nserver1, Jun 12 2026). Re-baselined at
+// 14:23 UTC so no new ones fire; this just clears the ~20 already-sent copies.
+// Scoped: info account ONLY, subject must match the cron-drift alert. Dry-run unless --go.
+const fs = require("fs");
+const { google } = require("googleapis");
+const ENV = "/Users/stevestudio2/Projects/Designer-Wallcoverings/DW-MCP/.env";
+const env = {};
+fs.readFileSync(ENV, "utf8").split("\n").forEach(l => { const m = l.match(/^([^#=]+)=(.+)/); if (m) env[m[1].trim()] = m[2].trim(); });
+
+const GO = process.argv.includes("--go");
+const QUERY = 'subject:"cron file drift" from:steve@designerwallcoverings.com newer_than:3d';
+
+(async () => {
+  const oc = new google.auth.OAuth2(env.GMAIL_CLIENT_ID, env.GMAIL_CLIENT_SECRET, "http://localhost:9850/oauth2callback");
+  oc.setCredentials({ refresh_token: env.INFO_REFRESH_TOKEN });
+  const gm = google.gmail({ version: "v1", auth: oc });
+
+  const ids = []; let pageToken = null;
+  do {
+    const r = await gm.users.messages.list({ userId: "me", q: QUERY, maxResults: 500, pageToken: pageToken || undefined });
+    (r.data.messages || []).forEach(m => ids.push(m.id));
+    pageToken = r.data.nextPageToken || null;
+  } while (pageToken);
+
+  console.log(`info@ — matched ${ids.length} cron-drift alert message(s) for query: ${QUERY}`);
+  if (ids.length === 0) { console.log("nothing to trash"); return; }
+  if (!GO) { console.log("DRY RUN — re-run with --go to trash. Sample IDs:", ids.slice(0, 5).join(", ")); return; }
+
+  await gm.users.messages.batchModify({
+    userId: "me",
+    requestBody: { ids, addLabelIds: ["TRASH"], removeLabelIds: ["INBOX", "UNREAD"] }
+  });
+  console.log(`✓ trashed ${ids.length} cron-drift alert(s) from info@`);
+})().catch(e => { console.error("ERR", e.message); process.exit(1); });

← 8599fb2 Link favicon.svg in head (use branded SVG, not .ico fallback  ·  back to George Gmail  ·  secret-strip george-gmail: env-first the hardcoded George ba 8c22e56 →