Skip to Content

Securing CICD Workflows: Lessons from Astral's Approach

10 April 2026 by
Suraj Barman
Advertisement

Addressing the Threat of Supply Chain Attacks

With the increasing prevalence of supply chain attacks, developers are raising serious concerns about the trustworthiness of their tools. Recent examples, such as the Trivy and LiteLLM breaches, have highlighted vulnerabilities in widely used systems. These incidents underscore the critical need for robust security measures in the development and release processes of software tools. Astral, recognizing its responsibility to its community of millions of developers, emphasizes the importance of maintaining a secure and trustworthy infrastructure. This not only protects its tools but also serves as a potential model for other organizations grappling with similar challenges.

By sharing their techniques, Astral aims to benefit three key groups: its users, who need assurance about the security of their systems other maintainers and companies, who might adopt similar strategies and developers of CICD systems, who must navigate the complexities of balancing functionality and security. This proactive approach reflects a commitment to fostering a culture of security-first development.

The Role of CICD in Development Velocity and Security

Astral heavily relies on CICD workflows powered by GitHub Actions to sustain its development velocity and ensure stringent quality standards. These workflows enable the team to efficiently review, test, and release tools within a controlled and observable environment, minimizing the risks associated with local machine-based operations. The integration of GitHub Actions with GitHub provides a seamless platform for contributors to validate their pull requests, ensuring consistency across all development processes.

However, the security defaults of GitHub Actions present inherent challenges. Many security compromises, including those affecting Ultralytics, tj-actions, and Nx, stemmed from well-documented vulnerabilities. Astral mitigates these risks by implementing strict controls and avoiding insecure triggers.

Eliminating Dangerous Triggers in GitHub Actions

One of Astral's key security measures is the prohibition of insecure triggers such as `pull_request_target` and `workflow_run` across its GitHub organization. These triggers are notoriously difficult to secure and have been exploited in several high-profile attacks. By completely disallowing their use, Astral eliminates a significant vector for potential exploitation.

The decision to disable these triggers is informed by the organization's extensive experience, which has shown that most use cases for these triggers can be addressed more securely through alternative methods. This approach reflects a proactive stance on security, prioritizing the prevention of known vulnerabilities over convenience.

Controlled Environments for Development and Release

Astral's CICD workflows are designed to keep critical development and release processes within controlled environments. By avoiding local developer machines, the organization reduces the risk of unauthorized access and ensures that all activities are observable and auditable. This controlled setup is a cornerstone of Astral's security posture, enabling the team to maintain high levels of confidence in their processes.

The use of GitHub Actions as a primary platform reinforces this controlled environment. Its integration with GitHub simplifies contributor workflows while allowing the application of uniform security policies. This balance between accessibility and security is crucial for scaling development efforts without compromising trust.

Insights for Developers of CICD Systems

Astral's experiences offer valuable lessons for developers of CICD systems. By prioritizing security over convenience, the organization demonstrates that it is possible to maintain secure and efficient workflows without resorting to risky practices. This requires a deep understanding of the potential vulnerabilities within the system and a commitment to implementing stringent controls.

For example, Astral's decision to disable insecure triggers serves as a reminder of the importance of risk assessment in workflow design. Developers must evaluate the trade-offs between functionality and security, opting for solutions that minimize exposure to potential threats.

Concluding Reflections on Secure Development

In a world where supply chain attacks are becoming increasingly sophisticated, organizations like Astral highlight the importance of adopting rigorous security measures. Their approach to CICD security, grounded in practical experience and a commitment to transparency, offers a blueprint for others to follow. By sharing their strategies, Astral not only protects its own tools but also contributes to a safer development ecosystem for all.

For developers and maintainers, the key takeaway is clear: security is an ongoing process that requires vigilance, adaptability, and a willingness to challenge conventional practices. By embracing these principles, it is possible to build systems that inspire trust and resilience in the face of emerging threats.