惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MyScale Blog
MyScale Blog
爱范儿
爱范儿
The Register - Security
The Register - Security
小众软件
小众软件
D
DataBreaches.Net
雷峰网
雷峰网
S
Secure Thoughts
L
LINUX DO - 最新话题
M
MIT News - Artificial intelligence
Application and Cybersecurity Blog
Application and Cybersecurity Blog
罗磊的独立博客
F
Fortinet All Blogs
博客园 - 叶小钗
TaoSecurity Blog
TaoSecurity Blog
博客园 - Franky
aimingoo的专栏
aimingoo的专栏
S
SegmentFault 最新的问题
Hacker News: Ask HN
Hacker News: Ask HN
Help Net Security
Help Net Security
N
News and Events Feed by Topic
S
Security Affairs
The Last Watchdog
The Last Watchdog
Forbes - Security
Forbes - Security
S
Security @ Cisco Blogs
Latest news
Latest news
O
OpenAI News
N
Netflix TechBlog - Medium
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
Google Online Security Blog
Google Online Security Blog
S
Securelist
博客园 - 司徒正美
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
T
Threat Research - Cisco Blogs
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Palo Alto Networks Blog
T
The Blog of Author Tim Ferriss
Stack Overflow Blog
Stack Overflow Blog
I
InfoQ
阮一峰的网络日志
阮一峰的网络日志
AI
AI
SecWiki News
SecWiki News
G
GRAHAM CLULEY
Cloudbric
Cloudbric
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
L
LINUX DO - 热门话题
C
Cybersecurity and Infrastructure Security Agency CISA
B
Blog RSS Feed

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
The 20-Minute Compromise: CI/CD Audit Guide for the TanStack Supply Chain Attack
Narnaiezzssh · 2026-05-13 · via DEV Community

OIDC authentication worked correctly throughout the TanStack attack. The build cache is the substrate participant that wasn't governed. Here's the full audit checklist and the governance analysis that explains why OIDC alone can't prevent this attack class.


The TanStack NPM supply chain attack compromised 84 package versions across 42 packages in approximately 20 minutes. The attack chain:

pull_request_target misconfiguration
  → build cache poisoning
    → OIDC token extraction from runner memory
      → authenticated publication of malicious packages

Enter fullscreen mode Exit fullscreen mode

Before the audit checklist, one framing point that changes how you think about this attack class:

OIDC authentication worked correctly throughout. The token was valid. The workload was authenticated. The authorization was granted. Everything Workload Identity Federation was designed to protect was functioning as intended.

The attack lived in the layer below authentication—the build cache. The cache receives artifacts from trusted processes and feeds them back into subsequent builds without re-verification. When the cache is poisoned, every downstream build inherits the compromise invisibly. OIDC proves who is acting. It cannot prove that what is being acted upon has maintained lineage integrity from its authorized formation.

That distinction matters for everything that follows.


Part I—Audit Your CI/CD for This Exact Attack Chain

A. Audit Surface 1—pull_request_target Misconfiguration

Goal: Ensure untrusted PR code can never execute with repository-level authority.

What to verify:

Search all workflows for these triggers:

on:
  pull_request_target:   # ← high risk
  workflow_run:          # ← if triggered by PR workflows, also high risk

Enter fullscreen mode Exit fullscreen mode

Confirm checkout behavior:

  • actions/checkout@v4 pinned by SHA (not by tag)
  • ref explicitly set to base repo, not PR head

Confirm permissions block:

permissions:
  contents: read    # ← not write
  packages: read    # ← not write
  id-token: none    # ← never write in PR workflows
  actions: read     # ← not write

Enter fullscreen mode Exit fullscreen mode

🚨 Red flags:

  • Any workflow running tests/builds on PR code using pull_request_target
  • pull_request_target without a repo-owner approval gate
  • id-token: write inside PR workflows

B. Audit Surface 2—GitHub Actions Cache Poisoning

Goal: Ensure untrusted PR workflows cannot write to caches used by release pipelines.

What to verify:

PR workflows must use different cache keys than release workflows. No shared keys like:

node-modules-{{ hashFiles('**/package-lock.json') }}
build-cache-{{ runner.os }}

Enter fullscreen mode Exit fullscreen mode

Cache restore/write separation:

  • ✅ PR workflows may restore caches
  • ❌ PR workflows must never save caches
# In PR workflow — WRONG
- uses: actions/cache@v3
  with:
    path: ~/.npm
    key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
    # Missing: restore-only: true

# In PR workflow — CORRECT
- uses: actions/cache/restore@v3
  with:
    path: ~/.npm
    key: pr-${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

Enter fullscreen mode Exit fullscreen mode

🚨 Red flags:

  • save-cache steps inside PR workflows
  • Shared cache keys between main branch builds, PR builds, and release workflows
  • No explicit cache key namespace separation between trusted and untrusted contexts

C. Audit Surface 3—OIDC Token Exposure

Goal: Ensure OIDC tokens cannot be harvested from runner memory and used to impersonate release workflows.

What to verify:

Only release workflows should have id-token: write.

Cloud provider trust policies must validate all of these claims, not just sub:

repository
workflow (name)
ref_type
environment
actor

Enter fullscreen mode Exit fullscreen mode

Runner isolation:

  • No self-hosted runners for release pipelines
  • No long-lived runners shared across contexts
  • No shared workspaces between PR and release workflows

🚨 Red flags:

  • OIDC trust policies that only validate sub—insufficient claim scope
  • Runners reused across PR and release workflows
  • id-token: write granted by default to all workflows

Part II—Harden OIDC Trust Boundaries

A. Enforce Strict Claim Validation

Cloud providers must reject OIDC tokens unless all of these match:

Claim Prevents
repository Tokens from other repos being replayed
workflow PR runner tokens being used by release workflows
ref_type Branch tokens used in tag-gated deployments
environment Dev tokens used in production
actor Fork tokens used by maintainer-level workflows

Validating only sub is insufficient. sub encodes repository and ref but not workflow name or environment.

AWS example—strict claim validation:

{
  "Condition": {
    "StringEquals": {
      "token.actions.githubusercontent.com:sub": "repo:org/repo:environment:production",
      "token.actions.githubusercontent.com:aud": "sts.amazonaws.com",
      "token.actions.githubusercontent.com:job_workflow_ref": "org/repo/.github/workflows/release.yml@refs/tags/*"
    }
  }
}

Enter fullscreen mode Exit fullscreen mode

B. Enforce Environment-Scoped OIDC

Each environment needs separate:

  • OIDC trust relationships
  • IAM roles
  • Workload identities

A token valid in dev must be structurally incapable of assuming a prod role, regardless of how it was obtained.

C. Enforce Ephemeral, Task-Scoped Credentials

  • TTL ≤ 5 minutes
  • Bound to: workflow name + job name + environment + commit SHA

Token replay from memory extraction becomes nearly impossible when the token has expired and bound claims no longer match the current execution context.


Part III—Detect Whether Your Environment Pulled a Poisoned Cache

This is the section most teams never run. If TanStack packages are in your dependency tree, run these checks now.

A. Look for Cache-Restore Events in PR Workflows

Search GitHub Actions logs for:

Restored cache key: ...
Cache hit occurred on the primary key

Enter fullscreen mode Exit fullscreen mode

If PR workflows restored a cache key that was subsequently used by release workflows, you have exposure.

B. Look for Unexpected File Modifications in Build Artifacts

Check node_modules for:

  • New files not in package-lock.json
  • Modified .js files with obfuscated code or large base64 blobs

Search for unexpected network call patterns in build output:

grep -r "fetch(" node_modules --include="*.js" | grep -v node_modules/.bin
grep -r "Buffer.from(" node_modules --include="*.js"
grep -r "crypto.subtle" node_modules --include="*.js"

Enter fullscreen mode Exit fullscreen mode

C. Look for Anomalous OIDC Token Usage

Check cloud provider logs (CloudTrail, GCP Audit Logs) for:

  • OIDC tokens used outside expected workflow names
  • Tokens used from unexpected IP ranges
  • Tokens used outside expected CI/CD time windows
  • Tokens assuming roles not associated with the claiming workflow

The TanStack attack used valid tokens. The anomaly is in the context of use, not the token itself.

D. Look for Runner-Level Persistence (Self-Hosted Only)

ls -la /home/runner/work/_temp
ls -la /home/runner/.cache
ps aux | grep node   # look for processes running post-workflow

Enter fullscreen mode Exit fullscreen mode


Why OIDC Alone Cannot Prevent This Attack Class

The audit checklist above addresses immediate hardening. But the substrate governance gap explains why this attack class will recur.

The build cache is a substrate participant: it sits inside the authority chain of your build pipeline, receives artifacts from trusted processes, and feeds them back into subsequent builds. It is not a passive storage layer. It is an active participant in the lineage chain of every build that uses it.

Five governance invariants are missing from current CI/CD build cache architecture:

Authority: Who authorized the cache to contain these specific artifacts? The cache has no mechanism to verify that what it contains was authorized by the same authority chain that will consume it.

Lineage: Can every artifact in the cache be traced to its formation and authorization? Cache poisoning exploits the absence of artifact lineage—poisoned artifacts are indistinguishable from legitimate ones without a lineage chain.

Reversibility: Once poisoned artifacts are published via authenticated OIDC tokens, 84 malicious versions cannot be automatically unwound. The state change is irreversible without manual intervention across every downstream consumer.

Boundary Integrity: The cache should enforce boundary integrity between PR and release contexts. Cache key namespacing is a configuration control, not a structural governance invariant.

Drift Control: The build environment drifted from its authorized state when the cache was poisoned. No instrument detected that drift before malicious artifacts were published.

OIDC proves who is acting. It cannot prove that what is being acted upon has maintained lineage integrity from its authorized formation. Until build pipelines enforce artifact lineage as a first-class governance primitive, the next variation of this attack will find a path through whatever configuration controls are in place.


Summary Checklist

Audit immediately:

  • [ ] Search for pull_request_target and workflow_run triggers
  • [ ] Verify no id-token: write in PR workflows
  • [ ] Confirm cache keys are namespaced between PR and release contexts
  • [ ] Confirm PR workflows cannot save to shared cache keys
  • [ ] Verify OIDC trust policies validate workflow, environment, actor, not just sub

Harden:

  • [ ] Enforce environment-scoped OIDC with separate IAM roles per environment
  • [ ] Set token TTL ≤ 5 minutes bound to workflow + job + environment + commit SHA
  • [ ] Switch release pipelines to ephemeral runners

Detect (run now if TanStack is in your dependency tree):

  • [ ] Search Actions logs for cache-restore events in PR workflows
  • [ ] Scan node_modules for unexpected files and network call patterns
  • [ ] Check cloud provider logs for anomalous OIDC token usage

Soft Armor Labs publishes governance research at the intersection of AI, security, and institutional risk. Technical note DOI: 10.5281/zenodo.20146739. ORCID: 0009-0000-1964-6440. CC BY-NC-ND 4.0.