---
title: "Open source security at Astral"
description: "Astral secures Ruff, uv and ty against supply chain attacks with layered controls across CI/CD, repository settings, releases and dependencies."
url: "https://swe.quest/articles/open-source-security-at-astral-4e24d0de3a4c872a"
canonical: "https://astral.sh/blog/open-source-security-at-astral"
source: "Astral"
published: "2026-04-08"
difficulty: "medium"
kind: "Case study"
reading_minutes: 14
tags: ["supply-chain-security","ci-cd","security","open-source"]
---

# Open source security at Astral

A post on [Astral](https://swe.quest/sources/astral.md), published 2026-04-08, 14 min read, Case study. Original: [https://astral.sh/blog/open-source-security-at-astral](https://astral.sh/blog/open-source-security-at-astral)

## Summary

Astral secures Ruff, uv and ty against supply chain attacks with layered controls across CI/CD, repository settings, releases and dependencies. In GitHub Actions they ban \`pull\_request\_target\` and \`workflow\_run\` org-wide, pin all actions (including nested ones) to verified commit SHAs using zizmor and GitHub policy, default to empty permissions, and isolate secrets in deployment environments. Releases use Trusted Publishing, Sigstore attestations, immutable releases, no caching, two-person approval gates and tag protection rulesets. Privileged automations like commenting on PRs move into a separate GitHub App, and dependency updates go through Renovate/Dependabot with cooldowns.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Supply chain security](https://swe.quest/tags/supply-chain-security.md) (Security)
- [CI/CD](https://swe.quest/tags/ci-cd.md) (Reliability & operations)
- [Security](https://swe.quest/tags/security.md) (Security)
- [Open source](https://swe.quest/tags/open-source.md) (Engineering practices)

## Prerequisites

- GitHub Actions workflows ([easy posts on CI/CD](https://swe.quest/tags/ci-cd.md?difficulty=easy))
- package registries
- GitHub Apps

## Keywords

GitHub Actions, zizmor, Trusted Publishing, Sigstore, uv, Ruff, Renovate, pinact

## Related posts

- [Defending Your Software Supply Chain: What Every Engineering Team Should Do Now](https://swe.quest/articles/defending-your-software-supply-chain-what-every-engineering-team-should-do-now-434c4d75b0885a00.md): Docker · 2026-04-02 · Medium · 9 min read · Supply chain security, CI/CD, Containers, AI agents
  Recent supply chain compromises (the axios npm hijack attributed to Lazarus Group, the TeamPCP campaign via Trivy's GitHub Action, Shai-Hulud, GlassWorm) share one root cause: implicit trust in mutable tags, broad long-lived tokens and unsandboxed runners.
- [Securing Python projects from supply-chain attacks](https://swe.quest/articles/securing-python-projects-from-supply-chain-attacks-9ecc242dbcff9bf0.md): Astral · 2026-11-23 · Medium · 7 min read · Supply chain security, Python, CI/CD, Build systems
  Hash-pinning is the core defense against compromised maintainer accounts or hacked distribution servers, because version pins alone fail when PyPI files can be added post-release and GitHub Action tags can be force-pushed.
- [The Journey to Secure the Software Supply Chain at Microsoft](https://swe.quest/articles/the-journey-to-secure-the-software-supply-chain-at-microsoft-71490198d2cc7870.md): Engineering@Microsoft · 2023-05-22 · Easy · 6 min read · Supply chain security, CI/CD, Identity & auth, Open source
  Microsoft secures its software supply chain by threat-modeling its CI/CD platform, identities and developer devices, risk-scoring each threat, and folding supply chain requirements into the Security Development Lifecycle with policy enforcement such as blocked pushes, broken builds and gated releases.
- [Our response to the Axios developer tool compromise](https://swe.quest/articles/our-response-to-the-axios-developer-tool-compromise-1553cdb638ce1a6b.md): OpenAI · 2026-04-10 · Medium · 5 min read · Supply chain security, CI/CD, Incidents & postmortems, JavaScript
  A GitHub Actions workflow in OpenAI's macOS app-signing pipeline downloaded and executed a malicious Axios 1.14.1 during the March 31, 2026 npm supply chain attack, exposing the code-signing certificate and notarization material for ChatGPT Desktop, Codex, Codex CLI and Atlas.
- [Dependency prefixes are a supply chain risk: let's fix them](https://swe.quest/articles/dependency-prefixes-are-a-supply-chain-risk-let-s-fix-them-9228bb37d2c90199.md): Sourcegraph · 2026-05-22 · Medium · 5 min read · Supply chain security, JavaScript, Build systems, Refactoring & migrations
  SemVer range prefixes like ^, ~ and wildcards in package.json act as a trust policy that lets compromised or hijacked packages flow into CI and production on the next install.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
