How Danggeun Protects Its Internal PyPI Proxy from Supply Chain Attacks
Key point
Danggeun blocked a Supply Chain Attack by applying a cooldown to its internal PyPI Proxy.
Details
Triggered by the Supply Chain Attack that occurred in LiteLLM on March 24, 2026, Danggeun introduced a cooldown policy for its internal PyPI Proxy. The core goal was to reduce the brief exposure window between when a malicious package is uploaded to PyPI and when it gets detected and quarantined.
Previously, using AWS CodeArtifact directly meant separately configuring AWS credentials and token issuance procedures for local environments, CI, and Dockerfiles. Danggeun simplified this by placing a thin proxy in front, so users only needed to set a single index in pip or uv; the proxy attached CodeArtifact authentication headers when forwarding requests and streamed large wheel files in 8KB chunks.
The cooldown filter addressed the limitation that PEP 503 HTML responses alone don't reveal upload timing, by supplementing this with PEP 691 JSON. It fetched both the HTML and JSON for the same package simultaneously, removed links to recently uploaded files from the HTML based on the upload-time field in the JSON, and returned the filtered result to the client.
- Tokens were issued with the shortest lifespan boto3 allows, 900 seconds (15 minutes), and automatically renewed 300 seconds before expiration.
- ±60 second jitter was added to renewal timing to avoid a surge of simultaneous renewals across multiple instances.
/healthchecked not just process liveness but also the validity of the current token.- Policies were managed via Central Dogma, allowing activation status, duration, and the
excludelist to be changed in real time.
This structure consolidated internal Python package traffic into a single entry point, and download status could also be monitored at a glance via Prometheus. A subsequent attack targeting PyTorch Lightning (2.6.2, 2.6.3) on April 30, 2026 was also blocked by this proxy. However, cooldown alone cannot fully prevent patch deployment delays or all pre-existing malicious packages, so it must be operated alongside emergency exception handling and dependency audits.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.