Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Astral 14 min read Case study mediumAdept

Open source security at Astral

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.

Assumes: GitHub Actions workflowspackage registriesGitHub Apps

Related posts

  • Defending Your Software Supply Chain: What Every Engineering Team Should Do Now

    Docker mediumAdept

    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. The recommended defenses start with pinning Actions to commit SHAs and images to digests, using lock files with npm ci, and applying 3-day cooldowns on new dependency versions, since most malicious releases live only hours. Further layers are short-lived scoped CI credentials, avoiding pull_request_target, artifact proxies and build-time SBOMs, plus canary tokens and credential cleanup on developer machines. AI coding agents should run in microVM sandboxes and MCP servers should be governed. Many recommendations are paired with Docker products such as Hardened Images, Scout, Sandboxes and MCP Gateway.

  • Securing Python projects from supply-chain attacks

    Astral mediumAdept

    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. Concrete hardening steps for Python projects on GitHub: pin Actions by commit SHA (via pinact, Dependabot or Renovate), verify SHA-256 hashes of downloaded binaries in Bash, Python or TypeScript, use PyPI Trusted Publishing over OIDC, require approvals on release environments, and lint workflows with zizmor. With uv, add dependency cooldowns via exclude-newer, lock CI tools as dependency groups and run them with UV_LOCKED, lock PEP 723 scripts, and set no-build to avoid executing source-distribution build backends.

  • The Journey to Secure the Software Supply Chain at Microsoft

    Engineering@Microsoft easyNovice

    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. Builds use secure-booted, ephemeral, network-isolated agents and SBOMs are validated at release. On the open-source consumption side, the S2C2F framework routes packages through Azure Artifacts for caching and dependency-confusion protection, flags vulnerabilities in PRs, and gates ingestion on typosquatting and malware checks without imposing an approved-package list. Access is hardened with phish-resistant MFA, just-in-time admin access and replacing PATs with managed identities, while a detection coverage matrix based on MITRE ATT&CK monitors source, build and release systems.

  • Our response to the Axios developer tool compromise

    OpenAI mediumAdept

    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. OpenAI judged exfiltration unlikely because of payload timing and job sequencing, but is treating the certificate as compromised: it is rotating it, blocking new notarizations with Apple, and fully revoking it on May 8, 2026 after a 30-day update window. The root cause was a workflow that used a floating tag instead of a pinned commit hash and had no minimumReleaseAge for new packages. Both settings are concrete mitigations for CI pipelines that handle signing secrets.

  • Dependency prefixes are a supply chain risk: let's fix them

    Sourcegraph mediumAdept

    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. The recommended controls are to commit lockfiles and install with npm ci, pnpm --frozen-lockfile or yarn --immutable, pin exact versions for high-blast-radius packages such as build tools, auth libraries and native-binding deps, set save-exact defaults, disable install scripts with an allowlist for exceptions, and run audits against the locked tree. To roll this out across hundreds of repositories, a Sourcegraph Batch Changes spec with a Node script rewrites React dependency ranges to approved exact versions and refreshes lockfiles without running scripts.

The quest for software engineering knowledge.

Look:
Layout: