SlideShare a Scribd company logo
1 of 48
Download to read offline
Deep dive into the
secure software supply chain
on Infrastructure as Code (IaC)
Paolo Mainardi
➔ Co-founder and CTO @Sparkfabrik
➔ Linux Foundation Europe Advisory Member
➔ Blog: paolomainardi.com
➔ Podcast: Continuous Delivery
➔ linkedin.com/in/paolomainardi
➔ continuousdelivery.social/@paolomainardi
➔ paolo.mainardi@sparkfabrik.com
@paolomainardi
➔ What is a Software Supply Chain
➔ IaC and OCI containers
➔ DEMO of Sigstore and Syft
THE
SESSION
“A supply chain is a network
of individuals and companies
who are involved in creating
a product and delivering it
to the consumer”
https://slsa.dev/spec/v0.1/#supply-chain-threats
2020
About 18,000 customers of SolarWinds installed the infected updates,
including firms like Microsoft (Cisco, Intel, Deloitte) and top government US agencies
like Pentagon, Homeland security, National Nuclear Security etc.
WHAT SOLARWINDS TAUGHT US
● Only install signed versions ❌
● Update your software to the latest version ❌
● Review source code ❌
● Closed source is more secure by design ❌
CONVENTIONAL SECURITY ADVICE
THAT DON’T APPLY HERE:
Log4j - Log4shell 2021 - CVE-2021-44228
https://www.lunasec.io/docs/blog/log4j-zero-day/
Timeline - Log4shell 2021 - CVE-2021-44228
➔ 24th November: Issue discovered by Chen Zhaojun of the Alibaba Cloud Security Team,
and reported to the Apache Software Foundation.
➔ 9th December: The RCE 0-day vulnerability was tweeted along with a POC posted on
GitHub - RCE can be fired just by passing a certain string
◆ Hours later hundreds of companies and governments confirmed to be
affected to Log4Shell attacks
➔ 10th December: Apache released an emergency security update and details on a critical
vulnerability in Log4j - assigning a CVSS score of 10.
➔ Patches introduced other critical vulnerabilities: CVE-2021–45046 - CVE-2021–45105 -
CVE-2021–4104
➔ All applications using directly or indirectly log4j are affected as a result of a supply
chain dependency
Source: Sonatype Log4j exploit update
https://www.sonatype.com/state-of-the-software-supply-chain/introduction
https://linuxfoundation.eu/cyber-resilience-act
Keynote: The Next Steps in Software Supply Chain Security - Brandon Lum, Software Engineer, Google
STATE OF THE
IaC
ECOSYSTEM
Infrastructure as code
➔ Declarative describe your infrastructure as code
◆ K8S, VMs, networks, storage, users, permissions…
➔ Examples:
◆ Terraform - OpenTofu (HCL)
◆ Pulumi (Typescript, Python, GO, C#, Java, YAML)
◆ Crossplane (Kubernetes) (YAML)
Extensible with dependencies
● Terraform registry
○ Providers
○ Modules
● Crossplane Contrib
○ Providers
○ Compositions (XRD)
● Pulumi registry
○ Packages
Terraform/OpenTofu
DEEP-DIVE
TERRAFORM: PROVIDERS AND MODULES
● Providers are API implementation (GCP, AWS, DO etc…) and Modules are
groups of resources.
● Terraform providers and modules used in your Terraform configuration
have full access to the variables and Terraform state within a workspace
● Modules don’t have any form of signature or checksum (tampering risk)
● Anyone can publish a module on public Terraform Registry from a Github
repository (typosquatting risk)
● Modules versions are based on git tags (tampering risk)
TERRAFORM: ANATOMY OF A MODULE AND SECURITY RISKS
What can a module do,
other than create cloud
resources?
TERRAFORM: MODULE MALICIOUS CODE
● Can run any form of custom code (local-exec, external)
● Can interact with the network using the http provider
Hey team, we have an urgency for a big marketing campaign
just confirmed by the customer.
We need to deploy a new static website on GCP
and give access to an external team
to let them update it when needed, can you help us?
Please 🥺
BUSINESS REQUEST ON THURSDAY, DEADLINE IS FRIDAY
TERRAFORM: Find a module on Google: “gcp static website terraform”
Step 1 - Found the module we need
��
TERRAFORM: Review the module’s code
Step 2 - Quickly review the code
TERRAFORM: Get hacked
Step 3 - Got hacked - Saturday morning call: we have been hacked, what happened ??
TERRAFORM: HOW TO DETECT A SERVICE ACCOUNT LEAK ?
TERRAFORM: DETECT SERVICE ACCOUNT LEAK WITH CHECKOV
https://github.com/bridgecrewio/checkov
TERRAFORM: DETECT SERVICE ACCOUNT LEAK WITH CHECKOV
TERRAFORM: DETECT SERVICE ACCOUNT LEAK WITH CHECKOV
LESSON LEARNED
TERRAFORM: MODULE MALICIOUS CODE
Do not blindly trust community modules
Always use a static security scan tool like
Checkhov or TFscan or Trivy
Not enough alone, write your own policies.
DOCKER OCI IMAGES DEEP-DIVE
OCI stands for Open Container Initiative.
OCI defines the specifications and standards
for container technologies
(Runtime, Image and Distribution spec).
Container registries can be also used to store
other kind of artifacts (like Helm charts)
or just any arbitrary files.
What is the trusting model behind a Container Image,
or in general, a digital artifact?
How can i be sure that what I’m running
is coming from a trusted source?
https://www.cs.cmu.edu/~rdriley/487/papers/Thompson_1984_ReflectionsonTrustingTrust.pdf
1984
SECURE SOFTWARE SUPPLY CHAIN CHECKLIST
✅ Who built it, when and how
(Signatures and Provenance Attestations)
✅ The list of things who made the artifact
(SBOM - Software Bill of Material)
DIGITAL SIGNATURES 101
Integrity
Ensure the data signed was
not altered.
Authenticity
Attest that the data was
sent by the signer.
Non-repudiation
Ensure that the signer
cannot deny the authenticity
of the signature.
Managing keys is hard
Distribution, Storage, Compromise
DIGITAL SIGNATURES - SIGSTORE
Sigstore is an OSS
project under the
umbrella of OpenSSF
foundation.
Fast growing
community and
mainstream adopted
Used in Kubernetes
and many other big
vendors
(Github, Rubygems, Arch Linux etc..)
DIGITAL SIGNATURES - SIGSTORE
Keyless signing of any
software artifact
Signatures metadata
are stored in a public
tamper-resistant log
Signatures are stored
alongside images in
OCI registry
SBOM:
SOFTWARE
BILL OF
MATERIALS
A list of “ingredients”
for a software artifact
Can be used for:
➔ Vulnerability scanning
➔ Software transparency
➔ License policy
➔ Find abandoned dependencies
SBOM
FOR
CONTAINERS
Creating a SBOM for an artifact is a
complex problem
Dependencies live at different levels:
➔ Operating system (Windows, Debian, Alpine
etc…)
➔ Operating system dependencies (RPM, DEB,
APK, PKG…)
➔ Application dependencies (Composer, NPM,
Rubygems, Pypi, etc…)
➔ Static binaries and their dependencies (Go,
Rust etc…)
SBOM - Tools
$ docker sbom
DEMO
Takeaways
➔ Software Supply Chain security must be taken
very seriously
➔ IaC suffers from the same issues of the software
projects
➔ Always use static analysis tools for like Checkov
| Trivy | TFSec
➔ Sign your artifacts, Sigstore is nice and easy!
➔ Generate SBOM and scan for vulnerabilities
Snyk | Grype | Trivy
➔ Automate your dependencies with DependaBot
or RenovateBot
THANKS

More Related Content

Similar to CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cloud.pdf

Cncf checkov and bridgecrew
Cncf checkov and bridgecrewCncf checkov and bridgecrew
Cncf checkov and bridgecrewLibbySchulze
 
Log Analytics for Distributed Microservices
Log Analytics for Distributed MicroservicesLog Analytics for Distributed Microservices
Log Analytics for Distributed MicroservicesKai Wähner
 
stackconf 2022: Minimum Viable Security for Cloud Native Stacks
stackconf 2022: Minimum Viable Security for Cloud Native Stacksstackconf 2022: Minimum Viable Security for Cloud Native Stacks
stackconf 2022: Minimum Viable Security for Cloud Native StacksNETWAYS
 
Top 10 Software to Detect & Prevent Security Vulnerabilities from BlackHat US...
Top 10 Software to Detect & Prevent Security Vulnerabilities from BlackHat US...Top 10 Software to Detect & Prevent Security Vulnerabilities from BlackHat US...
Top 10 Software to Detect & Prevent Security Vulnerabilities from BlackHat US...Mobodexter
 
Pursuing evasive custom command & control - GuideM
Pursuing evasive custom command & control - GuideMPursuing evasive custom command & control - GuideM
Pursuing evasive custom command & control - GuideMMark Secretario
 
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024Cloud Native NoVA
 
Intro to GitOps with Weave GitOps, Flagger and Linkerd
Intro to GitOps with Weave GitOps, Flagger and LinkerdIntro to GitOps with Weave GitOps, Flagger and Linkerd
Intro to GitOps with Weave GitOps, Flagger and LinkerdWeaveworks
 
TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...
TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...
TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...Priyanka Aash
 
KCD Munich - Cloud Native Platform Dilemma - Turning it into an Opportunity
KCD Munich - Cloud Native Platform Dilemma - Turning it into an OpportunityKCD Munich - Cloud Native Platform Dilemma - Turning it into an Opportunity
KCD Munich - Cloud Native Platform Dilemma - Turning it into an OpportunityAndreas Grabner
 
AWS live hack: Docker + Snyk Container on AWS
AWS live hack: Docker + Snyk Container on AWSAWS live hack: Docker + Snyk Container on AWS
AWS live hack: Docker + Snyk Container on AWSEric Smalling
 
OpenChain Monthly Meeting 2023-02-21 (North America and Asia)
OpenChain Monthly Meeting 2023-02-21 (North America and Asia)OpenChain Monthly Meeting 2023-02-21 (North America and Asia)
OpenChain Monthly Meeting 2023-02-21 (North America and Asia)Shane Coughlan
 
Vulnerability Alert Fatigue and Malicious Code Attacks Meetup 11012024.pdf
Vulnerability Alert Fatigue and Malicious Code Attacks Meetup 11012024.pdfVulnerability Alert Fatigue and Malicious Code Attacks Meetup 11012024.pdf
Vulnerability Alert Fatigue and Malicious Code Attacks Meetup 11012024.pdflior mazor
 
Secure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous DeliverySecure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous DeliveryBlack Duck by Synopsys
 
Secure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous DeliverySecure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous DeliveryTim Mackey
 
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...Agile Testing Alliance
 
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdf
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdfSoftware Bill of Materials - Accelerating Your Secure Embedded Development.pdf
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdfICS
 
The Art of Cloud Native Defense on Kubernetes
The Art of Cloud Native Defense on KubernetesThe Art of Cloud Native Defense on Kubernetes
The Art of Cloud Native Defense on KubernetesJacopo Nardiello
 
Secure Your DevOps Pipeline Best Practices Meetup 08022024.pptx
Secure Your DevOps Pipeline Best Practices Meetup 08022024.pptxSecure Your DevOps Pipeline Best Practices Meetup 08022024.pptx
Secure Your DevOps Pipeline Best Practices Meetup 08022024.pptxlior mazor
 
Using Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in TorontoUsing Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in TorontoDaniel Zivkovic
 
FIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE
 

Similar to CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cloud.pdf (20)

Cncf checkov and bridgecrew
Cncf checkov and bridgecrewCncf checkov and bridgecrew
Cncf checkov and bridgecrew
 
Log Analytics for Distributed Microservices
Log Analytics for Distributed MicroservicesLog Analytics for Distributed Microservices
Log Analytics for Distributed Microservices
 
stackconf 2022: Minimum Viable Security for Cloud Native Stacks
stackconf 2022: Minimum Viable Security for Cloud Native Stacksstackconf 2022: Minimum Viable Security for Cloud Native Stacks
stackconf 2022: Minimum Viable Security for Cloud Native Stacks
 
Top 10 Software to Detect & Prevent Security Vulnerabilities from BlackHat US...
Top 10 Software to Detect & Prevent Security Vulnerabilities from BlackHat US...Top 10 Software to Detect & Prevent Security Vulnerabilities from BlackHat US...
Top 10 Software to Detect & Prevent Security Vulnerabilities from BlackHat US...
 
Pursuing evasive custom command & control - GuideM
Pursuing evasive custom command & control - GuideMPursuing evasive custom command & control - GuideM
Pursuing evasive custom command & control - GuideM
 
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
 
Intro to GitOps with Weave GitOps, Flagger and Linkerd
Intro to GitOps with Weave GitOps, Flagger and LinkerdIntro to GitOps with Weave GitOps, Flagger and Linkerd
Intro to GitOps with Weave GitOps, Flagger and Linkerd
 
TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...
TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...
TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I...
 
KCD Munich - Cloud Native Platform Dilemma - Turning it into an Opportunity
KCD Munich - Cloud Native Platform Dilemma - Turning it into an OpportunityKCD Munich - Cloud Native Platform Dilemma - Turning it into an Opportunity
KCD Munich - Cloud Native Platform Dilemma - Turning it into an Opportunity
 
AWS live hack: Docker + Snyk Container on AWS
AWS live hack: Docker + Snyk Container on AWSAWS live hack: Docker + Snyk Container on AWS
AWS live hack: Docker + Snyk Container on AWS
 
OpenChain Monthly Meeting 2023-02-21 (North America and Asia)
OpenChain Monthly Meeting 2023-02-21 (North America and Asia)OpenChain Monthly Meeting 2023-02-21 (North America and Asia)
OpenChain Monthly Meeting 2023-02-21 (North America and Asia)
 
Vulnerability Alert Fatigue and Malicious Code Attacks Meetup 11012024.pdf
Vulnerability Alert Fatigue and Malicious Code Attacks Meetup 11012024.pdfVulnerability Alert Fatigue and Malicious Code Attacks Meetup 11012024.pdf
Vulnerability Alert Fatigue and Malicious Code Attacks Meetup 11012024.pdf
 
Secure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous DeliverySecure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous Delivery
 
Secure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous DeliverySecure Application Development in the Age of Continuous Delivery
Secure Application Development in the Age of Continuous Delivery
 
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
#Interactive Session by Kirti Ranjan Satapathy and Nandini K, "Elements of Qu...
 
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdf
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdfSoftware Bill of Materials - Accelerating Your Secure Embedded Development.pdf
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdf
 
The Art of Cloud Native Defense on Kubernetes
The Art of Cloud Native Defense on KubernetesThe Art of Cloud Native Defense on Kubernetes
The Art of Cloud Native Defense on Kubernetes
 
Secure Your DevOps Pipeline Best Practices Meetup 08022024.pptx
Secure Your DevOps Pipeline Best Practices Meetup 08022024.pptxSecure Your DevOps Pipeline Best Practices Meetup 08022024.pptx
Secure Your DevOps Pipeline Best Practices Meetup 08022024.pptx
 
Using Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in TorontoUsing Data Science & Serverless Python to find apartment in Toronto
Using Data Science & Serverless Python to find apartment in Toronto
 
FIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT Agents
 

More from sparkfabrik

20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...sparkfabrik
 
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirtIAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirtsparkfabrik
 
2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pagessparkfabrik
 
2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal fronte2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal frontesparkfabrik
 
UX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdfUX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdfsparkfabrik
 
KCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with CrossplaneKCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with Crossplanesparkfabrik
 
Come Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagineCome Drupal costruisce le tue pagine
Come Drupal costruisce le tue paginesparkfabrik
 
Drupal 10: un framework PHP di sviluppo Cloud Native moderno
Drupal 10: un framework PHP di sviluppo Cloud Native modernoDrupal 10: un framework PHP di sviluppo Cloud Native moderno
Drupal 10: un framework PHP di sviluppo Cloud Native modernosparkfabrik
 
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)sparkfabrik
 
Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!sparkfabrik
 
Progettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWSProgettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWSsparkfabrik
 
From React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedFrom React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedsparkfabrik
 
Headless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIsHeadless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIssparkfabrik
 
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guidesparkfabrik
 
Mobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web DevelopersMobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web Developerssparkfabrik
 
Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes sparkfabrik
 
Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes waysparkfabrik
 
Applicazioni Serverless con AWS
Applicazioni Serverless con AWSApplicazioni Serverless con AWS
Applicazioni Serverless con AWSsparkfabrik
 
GitOps: Git come unica fonte di verità per applicazioni e infrastruttura
GitOps: Git come unica fonte di verità per applicazioni e infrastrutturaGitOps: Git come unica fonte di verità per applicazioni e infrastruttura
GitOps: Git come unica fonte di verità per applicazioni e infrastrutturasparkfabrik
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetessparkfabrik
 

More from sparkfabrik (20)

20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
 
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirtIAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt
 
2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages
 
2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal fronte2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal fronte
 
UX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdfUX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdf
 
KCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with CrossplaneKCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with Crossplane
 
Come Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagineCome Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagine
 
Drupal 10: un framework PHP di sviluppo Cloud Native moderno
Drupal 10: un framework PHP di sviluppo Cloud Native modernoDrupal 10: un framework PHP di sviluppo Cloud Native moderno
Drupal 10: un framework PHP di sviluppo Cloud Native moderno
 
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022)
 
Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!Do you know what your Drupal is doing_ Observe it!
Do you know what your Drupal is doing_ Observe it!
 
Progettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWSProgettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWS
 
From React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I startedFrom React to React Native - Things I wish I knew when I started
From React to React Native - Things I wish I knew when I started
 
Headless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIsHeadless Drupal: A modern approach to (micro)services and APIs
Headless Drupal: A modern approach to (micro)services and APIs
 
Cloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guide
 
Mobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web DevelopersMobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web Developers
 
Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes
 
Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes way
 
Applicazioni Serverless con AWS
Applicazioni Serverless con AWSApplicazioni Serverless con AWS
Applicazioni Serverless con AWS
 
GitOps: Git come unica fonte di verità per applicazioni e infrastruttura
GitOps: Git come unica fonte di verità per applicazioni e infrastrutturaGitOps: Git come unica fonte di verità per applicazioni e infrastruttura
GitOps: Git come unica fonte di verità per applicazioni e infrastruttura
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
 

Recently uploaded

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cloud.pdf

  • 1. Deep dive into the secure software supply chain on Infrastructure as Code (IaC)
  • 2. Paolo Mainardi ➔ Co-founder and CTO @Sparkfabrik ➔ Linux Foundation Europe Advisory Member ➔ Blog: paolomainardi.com ➔ Podcast: Continuous Delivery ➔ linkedin.com/in/paolomainardi ➔ continuousdelivery.social/@paolomainardi ➔ paolo.mainardi@sparkfabrik.com @paolomainardi
  • 3. ➔ What is a Software Supply Chain ➔ IaC and OCI containers ➔ DEMO of Sigstore and Syft THE SESSION
  • 4. “A supply chain is a network of individuals and companies who are involved in creating a product and delivering it to the consumer”
  • 6. 2020 About 18,000 customers of SolarWinds installed the infected updates, including firms like Microsoft (Cisco, Intel, Deloitte) and top government US agencies like Pentagon, Homeland security, National Nuclear Security etc.
  • 7. WHAT SOLARWINDS TAUGHT US ● Only install signed versions ❌ ● Update your software to the latest version ❌ ● Review source code ❌ ● Closed source is more secure by design ❌ CONVENTIONAL SECURITY ADVICE THAT DON’T APPLY HERE:
  • 8. Log4j - Log4shell 2021 - CVE-2021-44228 https://www.lunasec.io/docs/blog/log4j-zero-day/
  • 9. Timeline - Log4shell 2021 - CVE-2021-44228 ➔ 24th November: Issue discovered by Chen Zhaojun of the Alibaba Cloud Security Team, and reported to the Apache Software Foundation. ➔ 9th December: The RCE 0-day vulnerability was tweeted along with a POC posted on GitHub - RCE can be fired just by passing a certain string ◆ Hours later hundreds of companies and governments confirmed to be affected to Log4Shell attacks ➔ 10th December: Apache released an emergency security update and details on a critical vulnerability in Log4j - assigning a CVSS score of 10. ➔ Patches introduced other critical vulnerabilities: CVE-2021–45046 - CVE-2021–45105 - CVE-2021–4104 ➔ All applications using directly or indirectly log4j are affected as a result of a supply chain dependency
  • 10.
  • 11. Source: Sonatype Log4j exploit update
  • 13.
  • 15. Keynote: The Next Steps in Software Supply Chain Security - Brandon Lum, Software Engineer, Google
  • 17. Infrastructure as code ➔ Declarative describe your infrastructure as code ◆ K8S, VMs, networks, storage, users, permissions… ➔ Examples: ◆ Terraform - OpenTofu (HCL) ◆ Pulumi (Typescript, Python, GO, C#, Java, YAML) ◆ Crossplane (Kubernetes) (YAML)
  • 18. Extensible with dependencies ● Terraform registry ○ Providers ○ Modules ● Crossplane Contrib ○ Providers ○ Compositions (XRD) ● Pulumi registry ○ Packages
  • 20. TERRAFORM: PROVIDERS AND MODULES ● Providers are API implementation (GCP, AWS, DO etc…) and Modules are groups of resources. ● Terraform providers and modules used in your Terraform configuration have full access to the variables and Terraform state within a workspace
  • 21. ● Modules don’t have any form of signature or checksum (tampering risk) ● Anyone can publish a module on public Terraform Registry from a Github repository (typosquatting risk) ● Modules versions are based on git tags (tampering risk) TERRAFORM: ANATOMY OF A MODULE AND SECURITY RISKS
  • 22. What can a module do, other than create cloud resources?
  • 23. TERRAFORM: MODULE MALICIOUS CODE ● Can run any form of custom code (local-exec, external) ● Can interact with the network using the http provider
  • 24. Hey team, we have an urgency for a big marketing campaign just confirmed by the customer. We need to deploy a new static website on GCP and give access to an external team to let them update it when needed, can you help us? Please 🥺 BUSINESS REQUEST ON THURSDAY, DEADLINE IS FRIDAY
  • 25. TERRAFORM: Find a module on Google: “gcp static website terraform” Step 1 - Found the module we need
  • 26. �� TERRAFORM: Review the module’s code Step 2 - Quickly review the code
  • 27. TERRAFORM: Get hacked Step 3 - Got hacked - Saturday morning call: we have been hacked, what happened ??
  • 28. TERRAFORM: HOW TO DETECT A SERVICE ACCOUNT LEAK ?
  • 29. TERRAFORM: DETECT SERVICE ACCOUNT LEAK WITH CHECKOV https://github.com/bridgecrewio/checkov
  • 30. TERRAFORM: DETECT SERVICE ACCOUNT LEAK WITH CHECKOV
  • 31. TERRAFORM: DETECT SERVICE ACCOUNT LEAK WITH CHECKOV
  • 33. TERRAFORM: MODULE MALICIOUS CODE Do not blindly trust community modules Always use a static security scan tool like Checkhov or TFscan or Trivy Not enough alone, write your own policies.
  • 34. DOCKER OCI IMAGES DEEP-DIVE
  • 35. OCI stands for Open Container Initiative. OCI defines the specifications and standards for container technologies (Runtime, Image and Distribution spec). Container registries can be also used to store other kind of artifacts (like Helm charts) or just any arbitrary files.
  • 36. What is the trusting model behind a Container Image, or in general, a digital artifact? How can i be sure that what I’m running is coming from a trusted source?
  • 38. SECURE SOFTWARE SUPPLY CHAIN CHECKLIST ✅ Who built it, when and how (Signatures and Provenance Attestations) ✅ The list of things who made the artifact (SBOM - Software Bill of Material)
  • 39. DIGITAL SIGNATURES 101 Integrity Ensure the data signed was not altered. Authenticity Attest that the data was sent by the signer. Non-repudiation Ensure that the signer cannot deny the authenticity of the signature.
  • 40. Managing keys is hard Distribution, Storage, Compromise
  • 41. DIGITAL SIGNATURES - SIGSTORE Sigstore is an OSS project under the umbrella of OpenSSF foundation. Fast growing community and mainstream adopted Used in Kubernetes and many other big vendors (Github, Rubygems, Arch Linux etc..)
  • 42. DIGITAL SIGNATURES - SIGSTORE Keyless signing of any software artifact Signatures metadata are stored in a public tamper-resistant log Signatures are stored alongside images in OCI registry
  • 43. SBOM: SOFTWARE BILL OF MATERIALS A list of “ingredients” for a software artifact Can be used for: ➔ Vulnerability scanning ➔ Software transparency ➔ License policy ➔ Find abandoned dependencies
  • 44. SBOM FOR CONTAINERS Creating a SBOM for an artifact is a complex problem Dependencies live at different levels: ➔ Operating system (Windows, Debian, Alpine etc…) ➔ Operating system dependencies (RPM, DEB, APK, PKG…) ➔ Application dependencies (Composer, NPM, Rubygems, Pypi, etc…) ➔ Static binaries and their dependencies (Go, Rust etc…)
  • 45. SBOM - Tools $ docker sbom
  • 46. DEMO
  • 47. Takeaways ➔ Software Supply Chain security must be taken very seriously ➔ IaC suffers from the same issues of the software projects ➔ Always use static analysis tools for like Checkov | Trivy | TFSec ➔ Sign your artifacts, Sigstore is nice and easy! ➔ Generate SBOM and scan for vulnerabilities Snyk | Grype | Trivy ➔ Automate your dependencies with DependaBot or RenovateBot