Engineering & Technical

The Engineer

The Signal

Two coordinated npm campaigns hit 253 packages this week

The prepare-hook vector is not new. It is just better tooled now. Any CI that ran `npm install` against an affected package since May 11 handed over every secret on that runner, GitHub PATs and cloud credentials and npm tokens included; audit lockfiles against the published list before the next deploy.

In Play

  1. npm Supply Chain Escalation: 253 Packages, Two Attack Vectors

    Two campaigns hit npm simultaneously. TanStack: 84 malicious versions across 42 packages via GitHub Actions credential theft. Bun worm: 169 packages via optionalDependencies prepare hooks exfiltrating CI tokens and cloud secrets. Trusted publishing provides zero protection — the attack compromises the workflow that mints publishing tokens.

    Ask Clarity
  2. The 30x Agent Cost Gap: Harness Architecture Dominates Model Choice

    Artificial Analysis Coding Agent Index reveals >30x cost variance and >7x latency variance across model+harness combinations performing identical tasks. Cache hit rate spread is 80-96%. Speculative decoding adds 2-3x throughput with identical outputs. The optimization budget is on the wrong layer for most teams.

    Ask Clarity
  3. Figma CDC: The Reference Architecture for WAL→Kafka→Snowflake

    Figma cut analytics lag from 30 hours to 3 hours by replacing full-table cron dumps with WAL-based CDC through Kafka. Vendor solutions cost 5-10x and couldn't use RDS snapshot-to-S3 APIs. Cell-by-cell validation caught a production outage scenario that row-count checks would have missed.

    Ask Clarity
  4. Ollama Heap Leak + Semantic Kernel RCE: Local Inference Attack Surface

    CVE-2026-7482: three unauthenticated API calls leak Ollama's full process heap — API keys, prompts, env vars. 300K instances exposed on the internet. Separately, Semantic Kernel shipped prompt-injection-to-RCE because framework over-trusts model output. Both are exploitable today.

    Ask Clarity
  5. AI Zero-Day Exploitation Confirmed at Mass Scale

    Google confirmed criminal hackers used AI to discover and weaponize a previously unknown vulnerability in a sysadmin tool, aimed at mass exploitation. OpenAI and Anthropic are withholding their most capable models from general release on these grounds. The window between bug existing and exploitation is now measured in hours, not weeks.

    Ask Clarity

Deep Dives

npm Under Siege: Two Coordinated Supply Chain Campaigns Demand Immediate Response

The Attack Surface

Two supply chain campaigns hit npm this week. Combined reach: 253 package names across two vectors. Both go after CI/CD secrets.

Campaign 1: TanStack ("Mini Shai-Hulud") — the attacker chained GitHub Actions vulnerabilities to exfiltrate npm publish credentials, then shipped 84 malicious versions across 42 packages. TanStack Query, Router, and Table sit in the dependency tree of most React and Vue frontends. Weekly downloads across the affected set exceed 12 million.

Campaign 2: Bun Worm — a separate Bun-based worm exploiting optionalDependencies with prepare hooks. 169 package names, 373 versions, including packages in the Mistral AI and Tanstack ecosystems. The payload runs during npm install without showing up in the primary dependency tree. It ships GitHub tokens, npm tokens, CI secrets, and cloud credentials out.

Trusted publishing provides zero protection because compromised workflows can mint legitimate tokens. Your lockfile hash will match. Your provenance check will pass. The package is 'trusted.'

Why This Is Different

The TanStack vector is GitHub Actions itself, not a maintainer credential. 2FA and key rotation do nothing here. The Bun worm uses optionalDependencies, so the malicious code runs without appearing in any direct dependency. Naive package.json audits will not see it.

Both campaigns want the same thing: every environment variable readable by the install process. In CI, that is everything. NPM_TOKEN, AWS_*, GITHUB_TOKEN, OIDC credentials, mounted .env files. The payload needs no sophistication. It needs one green build.

Cross-Source Consensus on Response

Five independent sources converge on the same response order:

  1. Grep lockfiles for TanStack entries and the 169 Bun worm package names. Diff against pre-May-11 resolutions.
  2. Rotate all secrets accessible to any CI runner that resolved during the compromise window. Start with tokens that can push packages or deploy.
  3. Pin affected packages to known-good versions by SHA, not range.
  4. Invalidate every npm cache and reinstall from pinned versions.
  5. Audit build logs for the window the bad versions were resolvable.

Structural Fixes This Sprint

The ecosystem fix is npm provenance with OIDC. The repo-level fix today:

  • Pin all GitHub Actions to commit SHAs, not tags
  • Declare permissions: {} at workflow level, grant minimum per job
  • Run npm install with --ignore-scripts where possible, or in network-isolated CI
  • Maintain a strict allowlist of packages permitted to run install scripts
  • Split the CI identity that installs dependencies from the one that holds production secrets

One source notes: "the next post-mortem will read exactly like this one, with a different name in the headline." This is a registry trust-model failure, not a TanStack failure of craft.

What to do

  1. Audit all lockfiles for TanStack and Bun worm package names today — cross-reference against published IOC list from Aikido report

  2. Rotate ALL secrets accessible to CI runners that resolved dependencies since May 11

  3. Pin all GitHub Actions to commit SHAs and add permissions: {} at workflow level this sprint

  4. Implement install-time network isolation for npm in CI (block egress except to your registry)

The 30x Harness Gap: Why Your Agent Optimization Budget Is on the Wrong Layer

The Data

The Artificial Analysis Coding Agent Index dropped this week and confirmed what anyone running these systems in production has been logging: the harness matters more than the model. Across identical coding tasks:

MetricVarianceImplication
Cost per task>30xToken routing and caching dominate unit economics
Time per task>7xOrchestration overhead exceeds model latency
Cache hit rate80-96%Prompt design determines compute spend

Opus 4.7 in Cursor CLI sits at 61 on the leaderboard. The leaderboard is not the interesting artifact. The Pareto frontier is. A smaller model in a well-built harness beats a frontier model in a naive one. Consistently.

Speculative Decoding: The Free 2.3x

The benchmark result that surprises people: Llama 3.2 1B as a drafter gets 2.31x speedup. Llama 3.1 8B gets 2.08x, despite higher acceptance rate. Here's what actually happens: the 8B's forward pass cost eats the time the accepted tokens save. Google runs speculative decoding in AI Overviews for over a billion users. If you are serving LLMs without it, you are paying for 50-66% of your GPU budget and not using it.

vLLM supports it natively. HuggingFace exposes it via assistant_model in generate(). The operational complexity is real. It is also manageable in the Llama ecosystem, where 1B/8B/70B give you natural drafter-target pairs.

Swap Claude for GPT-4o inside a well-built harness and the eval delta is single digits. Swap a ReAct loop for a planner-executor with typed tool schemas and retries, keep the model fixed, and the delta is an order of magnitude.

Three Patterns Shipping This Week

Push-based orchestration (Parallel AI Monitor API GA): agents register interest in state changes and receive push notifications instead of polling. Pub/sub, applied to agents. Not new. Still correct.

Fork-isolate-merge (Replit Parallel Agents): decompose the work, run each agent in an isolated copy, merge after review. Git for agents. Fault isolation falls out for free.

Domain-specific RL (Ramp via Prime Intellect): a small RL model for spreadsheet Q&A beats Opus by 4% on exact match at Haiku latency. Better accuracy and 10-50x lower latency on a narrow task.

The Harness Debt Warning

Multiple teams are reporting the same failure mode. The orchestration layer you wrote in a weekend is 4,000 lines nobody wants to touch by month four. The test is simple: pick a file in your harness, ask whether you could delete it and rewrite it from provider docs in an afternoon. If not, it is debt. The k10s Kubernetes dashboard, vibe-coded, full of god objects and data races, was cheaper to delete than to refactor. The rewrite is in Rust, where the type system enforces the invariants the model could not reason about.


The investment split is thin harness, thick evals. Evals outlive models. A well-curated set of 200 graded examples with deterministic scoring survives three model upgrades. The harness around it will not.

What to do

  1. Benchmark your agent workloads across model+harness combinations measuring cost/task, tokens/task, cache hit rate, and time/task using Artificial Analysis methodology

  2. Implement speculative decoding with smallest available same-family drafter on vLLM for production serving

  3. Audit your agent harness for disposability — can one engineer rewrite it in an afternoon? If not, refactor to thin orchestration + separate retries/dispatch/prompt modules

  4. Evaluate domain-specific RL training (Prime Intellect Fast Ask) for any task exceeding 5-10K daily requests

Figma's CDC Pipeline: The Build-vs-Buy Math and Three Patterns to Steal

The Problem They Actually Solved

Figma retired a daily cron. Full table scans, dedicated RDS replicas at millions per year, data landing in Snowflake 30+ hours late. The replacement reads the WAL, ships changes through Kafka, merges into Snowflake on a configurable cadence. Same destination. Different mechanism. Lag dropped to 3 hours.

The Build-vs-Buy Decision

Debezium, Fivetran, and Airbyte were disqualified on three axes:

  • Cost: 5-10x more expensive at Figma's scale
  • Capability: none could use RDS's native snapshot-to-S3 export API, the one API that makes bootstrapping a multi-terabyte table tractable without melting the primary
  • Reliability: could not hold their volume

The RDS snapshot API is the load-bearing architectural advantage. It exports a point-in-time consistent snapshot straight to S3 with no read replica in the loop. Off-the-shelf tools do the initial snapshot by querying the source. That either needs a replica or hammers the primary.

Three Patterns Worth Stealing

1. The Bootstrap Correctness Invariant

Snapshot a table and start streaming changes at the same time. The CDC stream's start offset must precede the snapshot timestamp. Otherwise writes during the snapshot window vanish. No error. No crash. Silent data loss. The bug hides in small-table tests and surfaces in production when snapshots take hours.

2. Configurable Merge Frequency as a Knob

Merge frequency is a dial, not a constant. Default 3 hours, billing-critical tables at 30 minutes. Snowflake compute cost becomes a freshness knob instead of a binary real-time-or-batch choice. Teams that merge on every micro-batch and then wonder why the bill tripled are getting this wrong.

3. Cell-by-Cell Validation

Weekly checks: clone the live table, run an independent bootstrap into a temp schema, align both to the same point in time using CDC data, compare every cell. In the first week this caught a failure mode that would have produced a 20-minute production outage. Row counts would have missed it. Partition checksums would have missed it. CDC pipelines fail silently by design. Wrong rows, not crashes.

If you cannot reproduce a build from the lockfile alone, you cannot audit it. If you cannot reproduce a data pipeline from its checkpoint alone, you cannot trust it.

4. Zero-Downtime Re-Bootstrap

Schema changes, bugs, and corruption all eventually force a re-bootstrap. Figma versions every bootstrap artifact except the user-facing view, then atomically swaps the view to the new version. Consumers never see a half-written state. Blue-green for data tables. They re-bootstrapped 47 tables in a month with nobody noticing.

What to do

  1. Audit current analytics pipelines for full-table-scan patterns — any SELECT * without WHERE on growing tables is a cost bomb

  2. Evaluate RDS native snapshot-to-S3 export as bootstrap mechanism if maintaining read replicas solely for analytics

  3. Prototype cell-by-cell validation for existing CDC pipelines by running parallel bootstrap and comparing at aligned timestamps

  4. Implement atomic view promotion pattern for any data pipeline that requires re-bootstrapping more than once per quarter

The bottom line

253 npm packages were compromised this week through GitHub Actions credential theft and install-hook exploitation — audit your lockfiles and rotate CI secrets today. Meanwhile, the Artificial Analysis Coding Agent Index proved what production teams suspected: harness architecture produces 30x cost variance while model swaps produce single-digit eval differences. Your optimization budget is almost certainly on the wrong layer. Fix the supply chain breach this morning, then benchmark your agent orchestration this sprint.