<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/from-cheese-shop-to-fortress-building-secure-production-ready-python-wheels-sponsor-chainguard--yvcwtcyt6" -->

---
title: From Cheese Shop to Fortress: Building Secure,...
description: A Chainguard engineer's PyCon talk covers the rising wave of open-source supply chain attacks, walking through recent incidents including the Trivy GitHub...
canonical: https://daily.dev/posts/from-cheese-shop-to-fortress-building-secure-production-ready-python-wheels-sponsor-chainguard--yvcwtcyt6
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: From Cheese Shop to Fortress: Building Secure, Production-Ready Python Wheels (Sponsor: Chainguard) | daily.dev
og:description: A Chainguard engineer's PyCon talk covers the rising wave of open-source supply chain attacks, walking through recent incidents including the Trivy GitHub...
og:url: https://daily.dev/posts/from-cheese-shop-to-fortress-building-secure-production-ready-python-wheels-sponsor-chainguard--yvcwtcyt6
og:image: https://api.daily.dev/og/posts/YvcWtcyt6.png
og:image:alt: From Cheese Shop to Fortress: Building Secure, Production-Ready Python Wheels (Sponsor: Chainguard)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# From Cheese Shop to Fortress: Building Secure, Production-Ready Python Wheels (Sponsor: Chainguard)

**[PyCon US](https://daily.dev/sources/pyconus)** · 53 min read · 0 upvotes · 0 comments

## Summary

A Chainguard engineer's PyCon talk covers the rising wave of open-source supply chain attacks, walking through recent incidents including the Trivy GitHub Action compromise, a malicious LiteLLM package live on PyPI for only 40 minutes but downloaded 3.4 million times daily, and a tj-actions-style worm that hit both NPM and Python by stealing signing keys. It details attack vectors like typosquatting, dependency confusion, tag hijacking, account takeovers, and AI-driven slopsquatting, then offers concrete defenses: malware scanning, cooldown periods (2-3 days) before pulling new package versions, trusted publishing, short-lived tokens, and artifact signing. The talk closes with a deep technical walkthrough of Chainguard's own Python wheel-building pipeline for PyTorch, covering static vs dynamic linking pitfalls, libstdc++ symbol conflicts, duplicate OpenBLAS libraries causing crashes, and runtime parity testing against upstream wheels, plus a demo of SBOMs and SLSA provenance embedded in their wheels.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=NmBm7MeZ0aY>

## Questions this post answers

### How long was the malicious LiteLLM package available on PyPI before it was removed?

The compromised LiteLLM package remained live on PyPI for only about 40 minutes before it was pulled. Despite that short window, it posed serious risk because LiteLLM is downloaded roughly 3.4 million times a day, meaning many installs could have occurred before detection. The payload included a credential harvester targeting over 50 secret categories, a Kubernetes lateral movement toolkit, and a persistent backdoor.

_Teams tracking supply chain incidents like this one can follow security updates on daily.dev._

### How many days should I wait before pulling a newly published package version to avoid malware?

A cooldown of about 2 to 3 days before pulling a newly published package version is a reasonable guard against malware, based on research showing malicious uploads are typically detected within 1 to 2 days and PyPI publishing roughly 3 days as a reference point. Combine this with active CVE tracking so critical security patches are not delayed by the same cooldown window.

_Developers weighing dependency update policies can track supply chain security practices on daily.dev._

### Why did statically linking libstdc++ into Python wheels cause crashes in a PyTorch build?

Statically linking libstdc++ caused crashes because libstdc++ maintains a global set of structures, and if one statically linked copy and another dynamically linked host copy both try to manage that global state, conflicts occur. The fix mirrors what reference manylinux container images do: strip symbols newer than a target glibc baseline (like glibc 2.28) and statically link only those, while dynamically linking everything with global dependencies against the host's libstdc++ and glibc.

_Engineers debugging native library linking issues in Python packaging can find similar deep dives on daily.dev._

## Similar posts on daily.dev

- [Chainguard Expands Repository to Add More Secure Open Source Libraries](https://daily.dev/posts/chainguard-expands-repository-to-add-more-secure-open-source-libraries-6ys47rbar) · DevOps.com · 0 upvotes · 0 comments
- [Chainguard has a fix for the open source packages your AI agents keep grabbing](https://daily.dev/posts/chainguard-has-a-fix-for-the-open-source-packages-your-ai-agents-keep-grabbing-5olbm79br) · The New Stack · 1 upvotes · 0 comments
- [Python's binary wheels and supply chain attacks](https://daily.dev/posts/python-s-binary-wheels-and-supply-chain-attacks-ly1jpokdl) · Planet Python · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#malware](https://daily.dev/tags/malware), [#supply-chain](https://daily.dev/tags/supply-chain)

[View this post on daily.dev](https://daily.dev/posts/from-cheese-shop-to-fortress-building-secure-production-ready-python-wheels-sponsor-chainguard--yvcwtcyt6)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"From Cheese Shop to Fortress: Building Secure, Production-Ready Python Wheels (Sponsor: Chainguard)","url":"https://daily.dev/posts/from-cheese-shop-to-fortress-building-secure-production-ready-python-wheels-sponsor-chainguard--yvcwtcyt6","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/from-cheese-shop-to-fortress-building-secure-production-ready-python-wheels-sponsor-chainguard--yvcwtcyt6"},"datePublished":"2026-09-18T22:13:57.825Z","dateModified":"2026-09-18T22:14:27.914Z","description":"A Chainguard engineer's PyCon talk covers the rising wave of open-source supply chain attacks, walking through recent incidents including the Trivy GitHub...","image":"https://i.ytimg.com/vi/NmBm7MeZ0aY/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/NmBm7MeZ0aY/sddefault.jpg","isAccessibleForFree":true,"articleSection":"PyCon US","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"PyCon US","logo":"https://media.daily.dev/image/upload/s--DLedNxG1--/f_auto,q_auto/v1777800767/logos/pyconus?_a=BAMAMiWQ0","url":"https://daily.dev/sources/pyconus"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/from-cheese-shop-to-fortress-building-secure-production-ready-python-wheels-sponsor-chainguard--yvcwtcyt6","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,malware,supply-chain","timeRequired":"PT53M","video":{"@type":"VideoObject","name":"From Cheese Shop to Fortress: Building Secure, Production-Ready Python Wheels (Sponsor: Chainguard)","description":"A Chainguard engineer's PyCon talk covers the rising wave of open-source supply chain attacks, walking through recent incidents including the Trivy GitHub...","thumbnailUrl":"https://i.ytimg.com/vi/NmBm7MeZ0aY/sddefault.jpg","uploadDate":"2026-09-18T22:13:57.825Z","duration":"PT53M","url":"https://api.daily.dev/r/YvcWtcyt6","embedUrl":"https://www.youtube.com/embed/NmBm7MeZ0aY"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"PyCon US","item":"https://daily.dev/sources/pyconus"},{"@type":"ListItem","position":3,"name":"From Cheese Shop to Fortress: Building Secure, Production-Ready Python Wheels (Sponsor: Chainguard)"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/from-cheese-shop-to-fortress-building-secure-production-ready-python-wheels-sponsor-chainguard--yvcwtcyt6#faq","mainEntity":[{"@type":"Question","name":"How long was the malicious LiteLLM package available on PyPI before it was removed?","acceptedAnswer":{"@type":"Answer","text":"The compromised LiteLLM package remained live on PyPI for only about 40 minutes before it was pulled. Despite that short window, it posed serious risk because LiteLLM is downloaded roughly 3.4 million times a day, meaning many installs could have occurred before detection. The payload included a credential harvester targeting over 50 secret categories, a Kubernetes lateral movement toolkit, and a persistent backdoor. Teams tracking supply chain incidents like this one can follow security updates on daily.dev."}},{"@type":"Question","name":"How many days should I wait before pulling a newly published package version to avoid malware?","acceptedAnswer":{"@type":"Answer","text":"A cooldown of about 2 to 3 days before pulling a newly published package version is a reasonable guard against malware, based on research showing malicious uploads are typically detected within 1 to 2 days and PyPI publishing roughly 3 days as a reference point. Combine this with active CVE tracking so critical security patches are not delayed by the same cooldown window. Developers weighing dependency update policies can track supply chain security practices on daily.dev."}},{"@type":"Question","name":"Why did statically linking libstdc++ into Python wheels cause crashes in a PyTorch build?","acceptedAnswer":{"@type":"Answer","text":"Statically linking libstdc++ caused crashes because libstdc++ maintains a global set of structures, and if one statically linked copy and another dynamically linked host copy both try to manage that global state, conflicts occur. The fix mirrors what reference manylinux container images do: strip symbols newer than a target glibc baseline (like glibc 2.28) and statically link only those, while dynamically linking everything with global dependencies against the host's libstdc++ and glibc. Engineers debugging native library linking issues in Python packaging can find similar deep dives on daily.dev."}}]}
```

