![DR Technology Logo DR Technology Logo](https://eu-images.contentstack.com/v3/assets/blt6d90778a997de1cd/blt4c091cd3ac9935ea/653a71456ad0f6040a6f71bd/Dark_Reading_Logo_Technology_0.png?width=700&auto=webp&quality=80&disable=upscale)
News, news analysis, and commentary on the latest trends in cybersecurity technology.
New Bazel Ruleset Helps Developers Build Secure Container Images
A new ruleset from Bazel, an open source build and test tool from Google, allows developers to create Docker images and generate software bills of materials about what is inside the containers.
![A pile of lego bricks. A pile of lego bricks.](https://eu-images.contentstack.com/v3/assets/blt6d90778a997de1cd/blt50e5833f53b816ee/64f155fe96efc9d5572f8e87/building-lego-Steven-Morris-Alamy.jpg?width=1280&auto=webp&quality=95&format=jpg&disable=upscale)
Google has made it simpler and more secure to build container images using the Bazel build system.
Bazel, an open source build and test tool similar to Make and Maven, supports projects in multiple languages and builds for multiple platforms. Developers use Starlark, a human-readable, high-level build language, to create rules instructing Bazel on what to do. A rule specifies the input files and the type of output that would be generated as a result, such as an executable or a library file. Related rules are combined into a ruleset, such as rules for creating binaries and running tests.
Bazel can be used to create Distroless builds, or minimal base images where what is in the runtime container is restricted to only the components necessary for the application. Minimal base images reduce the burden of managing risks associated with security vulnerabilities in the components and address governance issues in the software supply chain.
The new rules_oci ruleset “modernizes” the process for creating Distroless builds by adding supply chain security metadata to the container images, wrote Google Open Source Security Team’s Appu Goundan in the post announcing the general availability of rules_oci. Because Bazel supports managing and caching dependencies by their integrity hash, it can make assurances about the supply chain. Developers can get a software bill of materials showing what went into the container, allowing organizations to make informed decisions about the images they are using.
While the new ruleset doesn't automatically generate a software bill of materials, it can attach the bill of materials generated by other rulesets (such as rules_license and one for Distroless), says Sahin Yort, a software engineer at Bazel consultancy Aspect Development.
The new rules_oci ruleset allows developers using Bazel to create Docker containers instead of the older rules_docker ruleset, which is now in maintenance mode. The advantage? The new ruleset allows developers to create Docker containers even if a docker daemon is not already installed on the machine. Yort also notes that rules_oci is runtime agnostic in terms of where it looks for config files for registry authorization, unlike rules_docker which works with standard Docker paths for configuration.
Aspect created a migration guide to help organizations make the transition from rules_docker to rules_oci.
Code signing, another new capability available with rules_oci, allows users to verify that the container image was not modified by someone else after it was created by the developer who signed it. The previous rules_docker did not have the code signing capability, Yort says.
About the Author
You May Also Like
Catch the Threat Before it Catches you: Proactive Ransomware Defense
September 5, 2024How to Evaluate Hybrid-Cloud Network Policies and Enhance Security
September 18, 2024DORA and PCI DSS 4.0: Scale Your Mainframe Security Strategy Among Evolving Regulations
September 26, 2024Harnessing the Power of Automation to Boost Enterprise Cybersecurity
October 3, 2024
[Virtual Event] The Essential Guide to Cloud Management
October 17, 2024Black Hat Europe - December 9-12 - Learn More
December 10, 2024SecTor - Canada's IT Security Conference Oct 22-24 - Learn More
October 22, 2024