Hackfest 2024 - 16-bit Edition

Your locale preferences have been saved. We like to think that we have excellent support for English in pretalx, but if you encounter issues or errors, please contact us!

Optimize Container Security With Nix and Docker
10-11, 20:00–20:20 (America/New_York), Track 1 (206b)
Language: English

Securing containers is a priority in modern DevSecOps practices, especially when it comes to production environments. This session will show how combining Nix, a powerful package manager, with Docker can enhance container security with unparalleled granularity. By using Nix to define minimal and precise dependencies, you can build Docker images that are smaller, more efficient, and significantly reduce the attack surface. The talk will feature practical demonstrations and guidance on how to integrate Nix and Docker into your development pipeline, enabling you to safeguard your applications and infrastructure against modern cyber threats.


Outline:

  1. Introduction: The Need for Better Container Security (3 minutes)
    In this section, I will set the stage by discussing the current state of container security. While Docker has become the go-to tool for containerization, it introduces security concerns, such as bloated images and dependency vulnerabilities. The audience will learn why securing containerized environments is essential in today's landscape, especially as cloud adoption grows. I will briefly introduce Nix as a solution to address these issues, offering more control and reproducibility over dependency management and build processes.

  2. Overview of Nix: What It Is and Why It Matters for Security (4 minutes)
    This section will introduce Nix, a functional package manager that allows for reproducible builds and granular control over dependencies. I will explain why Nix's declarative nature is ideal for building minimal and secure environments. The audience will see how Nix complements Docker by creating images with only the necessary dependencies, reducing the attack surface and simplifying vulnerability management. This segment will emphasize the benefits of determinism, immutability, and the ability to trace every aspect of the build process—key advantages for security-conscious developers.

  3. Building Secure Docker Images with Nix: Step-by-Step Guide (5 minutes)
    In this section, I will walk the audience through the process of building a Docker image using Nix. I will demonstrate how Nix can define a minimal set of dependencies, leading to lightweight and efficient images. By comparing traditional Dockerfile-based images with Nix-built images, I will highlight the reduction in vulnerabilities and bloat. The focus will be on practical, actionable steps that developers can implement immediately in their workflows to enhance security. I will also touch on how Nix helps in locking down versions, preventing accidental updates that could introduce vulnerabilities.

  4. Demo: Building and Securing a Docker Image with Nix (6 minutes)
    This demo will showcase how to create a secure Docker image using Nix. I will build an example application and containerize it, explaining each step as I go along. The audience will see how the final Docker image is significantly smaller and more secure compared to a traditional Docker image. I will also demonstrate tools and techniques for verifying that the image only includes the dependencies explicitly defined by Nix, making it harder for attackers to exploit unused packages or libraries. This section will be highly interactive and focused on real-world application.

  5. Conclusion: Enhancing DevSecOps with Nix and Docker (2 minutes)
    In the final section, I will summarize the key takeaways from the session, reinforcing how Nix can be used to complement Docker in building more secure and efficient containers. I will encourage the audience to think about how Nix could fit into their broader DevSecOps practices, especially in automating security in CI/CD pipelines. The talk will end with a call to action: adopt Nix to enhance both security and reproducibility in Docker-based environments. Time permitting, I will also field a few questions from the audience.

Talk Type:
20-minute technical session.

What You Expect from Attendees?
Attendees should have a basic understanding of Docker and containerization. While prior experience with Nix is not required, a willingness to explore new tools for enhancing security practices will be beneficial. By the end of the talk, participants will gain practical insights into using Nix to optimize Docker security and efficiency, making it easier to adopt in their own DevSecOps workflows.


Are you releasing a tool? – no

Seasoned Full-Stack Software Developer, specialist in cybersecurity and DevOps, Jean-François is also CTO and Co-Founder of BrightOnLABS, a company which will soon market a range of agentless cybersecurity software powered by AI for Cloud infrastructures, and which also offers a cybersecurity audit service. At the same time, he is also in charge of the cybersecurity at Can-Explore, where he supervises and manages the implementation of the NIST framework on a major IoT project.