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

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
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cloud.pdf
Source: Sonatype Log4j exploit update
https://www.sonatype.com/state-of-the-software-supply-chain/introduction
CodeMotion 2023 - Deep dive nella supply chain della nostra infrastruttura cloud.pdf
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
1 of 48

Recommended

Deep dive nella supply chain della nostra infrastruttura cloud by
Deep dive nella supply chain della nostra infrastruttura cloudDeep dive nella supply chain della nostra infrastruttura cloud
Deep dive nella supply chain della nostra infrastruttura cloudsparkfabrik
20 views46 slides
What is the Secure Supply Chain and the Current State of the PHP Ecosystem by
What is the Secure Supply Chain and the Current State of the PHP EcosystemWhat is the Secure Supply Chain and the Current State of the PHP Ecosystem
What is the Secure Supply Chain and the Current State of the PHP Ecosystemsparkfabrik
4 views44 slides
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th... by
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...
Drupal Dev Days Vienna 2023 - What is the secure software supply chain and th...sparkfabrik
15 views42 slides
Application security meetup k8_s security with zero trust_29072021 by
Application security meetup k8_s security with zero trust_29072021Application security meetup k8_s security with zero trust_29072021
Application security meetup k8_s security with zero trust_29072021lior mazor
83 views85 slides
Pragmatic Pipeline Security by
Pragmatic Pipeline SecurityPragmatic Pipeline Security
Pragmatic Pipeline SecurityJames Wickett
286 views80 slides
2011 NASA Open Source Summit - Forge.mil by
2011 NASA Open Source Summit - Forge.mil2011 NASA Open Source Summit - Forge.mil
2011 NASA Open Source Summit - Forge.milNASA Open Government Initiative
2K views21 slides

More Related Content

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

Log Analytics for Distributed Microservices by
Log Analytics for Distributed MicroservicesLog Analytics for Distributed Microservices
Log Analytics for Distributed MicroservicesKai Wähner
6.1K views54 slides
stackconf 2022: Minimum Viable Security for Cloud Native Stacks by
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
7 views33 slides
Top 10 Software to Detect & Prevent Security Vulnerabilities from BlackHat US... by
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
719 views14 slides
Pursuing evasive custom command & control - GuideM by
Pursuing evasive custom command & control - GuideMPursuing evasive custom command & control - GuideM
Pursuing evasive custom command & control - GuideMMark Secretario
431 views78 slides
Intro to GitOps with Weave GitOps, Flagger and Linkerd by
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
85 views36 slides
TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I... by
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
702 views59 slides

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

Log Analytics for Distributed Microservices by Kai Wähner
Log Analytics for Distributed MicroservicesLog Analytics for Distributed Microservices
Log Analytics for Distributed Microservices
Kai Wähner6.1K views
stackconf 2022: Minimum Viable Security for Cloud Native Stacks by NETWAYS
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
NETWAYS7 views
Top 10 Software to Detect & Prevent Security Vulnerabilities from BlackHat US... by Mobodexter
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...
Mobodexter719 views
Pursuing evasive custom command & control - GuideM by Mark Secretario
Pursuing evasive custom command & control - GuideMPursuing evasive custom command & control - GuideM
Pursuing evasive custom command & control - GuideM
Mark Secretario431 views
Intro to GitOps with Weave GitOps, Flagger and Linkerd by Weaveworks
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
Weaveworks85 views
TRITON: How it Disrupted Safety Systems and Changed the Threat Landscape of I... by Priyanka Aash
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 Aash702 views
KCD Munich - Cloud Native Platform Dilemma - Turning it into an Opportunity by Andreas Grabner
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
Andreas Grabner154 views
AWS live hack: Docker + Snyk Container on AWS by Eric Smalling
AWS live hack: Docker + Snyk Container on AWSAWS live hack: Docker + Snyk Container on AWS
AWS live hack: Docker + Snyk Container on AWS
Eric Smalling231 views
OpenChain Monthly Meeting 2023-02-21 (North America and Asia) by Shane Coughlan
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 Coughlan62 views
Secure Application Development in the Age of Continuous Delivery by Tim Mackey
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
Tim Mackey484 views
Secure Application Development in the Age of Continuous Delivery by Black Duck by Synopsys
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
Software Bill of Materials - Accelerating Your Secure Embedded Development.pdf by ICS
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
ICS781 views
Using Data Science & Serverless Python to find apartment in Toronto by Daniel Zivkovic
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
Daniel Zivkovic220 views
FIWARE Wednesday Webinars - How to Debug IoT Agents by FIWARE
FIWARE Wednesday Webinars - How to Debug IoT AgentsFIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE Wednesday Webinars - How to Debug IoT Agents
FIWARE821 views
Safeguarding artifact integrity in your Software Supply Chain by Giovanni Galloro
Safeguarding artifact integrity in your Software Supply ChainSafeguarding artifact integrity in your Software Supply Chain
Safeguarding artifact integrity in your Software Supply Chain
Giovanni Galloro52 views
OpenChain Monthly Meeting North America - Europe - 2023-02-07 by Shane Coughlan
OpenChain Monthly Meeting North America - Europe - 2023-02-07OpenChain Monthly Meeting North America - Europe - 2023-02-07
OpenChain Monthly Meeting North America - Europe - 2023-02-07
Shane Coughlan100 views
AzureDay Kyiv 2016 Release Management by Sergii Kryshtop
AzureDay Kyiv 2016 Release ManagementAzureDay Kyiv 2016 Release Management
AzureDay Kyiv 2016 Release Management
Sergii Kryshtop840 views
Oh The Places You'll Sign.pdf by LibbySchulze
Oh The Places You'll Sign.pdfOh The Places You'll Sign.pdf
Oh The Places You'll Sign.pdf
LibbySchulze113 views
Microsegmentation from strategy to execution by AlgoSec
Microsegmentation from strategy to executionMicrosegmentation from strategy to execution
Microsegmentation from strategy to execution
AlgoSec1.2K views
PKI in DevOps: How to Deploy Certificate Automation within CI/CD by DevOps.com
PKI in DevOps: How to Deploy Certificate Automation within CI/CDPKI in DevOps: How to Deploy Certificate Automation within CI/CD
PKI in DevOps: How to Deploy Certificate Automation within CI/CD
DevOps.com465 views

More from sparkfabrik

20231129 - Platform @ localhost 2023 - Application-driven infrastructure with... by
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
8 views46 slides
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt by
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
3 views61 slides
2023 - Drupalcon - How Drupal builds your pages by
2023 - Drupalcon - How Drupal builds your pages2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pagessparkfabrik
5 views54 slides
2023 - TAC23 - Agile HR - Racconti dal fronte by
2023 - TAC23 - Agile HR - Racconti dal fronte2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal frontesparkfabrik
8 views78 slides
UX e Web sostenibile (UXday 2023).pdf by
UX e Web sostenibile (UXday 2023).pdfUX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdfsparkfabrik
10 views24 slides
KCD Italy 2022 - Application driven infrastructure with Crossplane by
KCD Italy 2022 - Application driven infrastructure with CrossplaneKCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with Crossplanesparkfabrik
86 views43 slides

More from sparkfabrik(20)

20231129 - Platform @ localhost 2023 - Application-driven infrastructure with... by 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...
sparkfabrik8 views
IAD 2023 - 22 Years of Agile and all I got is this lousy t-shirt by sparkfabrik
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
sparkfabrik3 views
2023 - Drupalcon - How Drupal builds your pages by sparkfabrik
2023 - Drupalcon - How Drupal builds your pages2023 - Drupalcon - How Drupal builds your pages
2023 - Drupalcon - How Drupal builds your pages
sparkfabrik5 views
2023 - TAC23 - Agile HR - Racconti dal fronte by sparkfabrik
2023 - TAC23 - Agile HR - Racconti dal fronte2023 - TAC23 - Agile HR - Racconti dal fronte
2023 - TAC23 - Agile HR - Racconti dal fronte
sparkfabrik8 views
UX e Web sostenibile (UXday 2023).pdf by sparkfabrik
UX e Web sostenibile (UXday 2023).pdfUX e Web sostenibile (UXday 2023).pdf
UX e Web sostenibile (UXday 2023).pdf
sparkfabrik10 views
KCD Italy 2022 - Application driven infrastructure with Crossplane by sparkfabrik
KCD Italy 2022 - Application driven infrastructure with CrossplaneKCD Italy 2022 - Application driven infrastructure with Crossplane
KCD Italy 2022 - Application driven infrastructure with Crossplane
sparkfabrik86 views
Come Drupal costruisce le tue pagine by sparkfabrik
Come Drupal costruisce le tue pagineCome Drupal costruisce le tue pagine
Come Drupal costruisce le tue pagine
sparkfabrik42 views
Drupal 10: un framework PHP di sviluppo Cloud Native moderno by sparkfabrik
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
sparkfabrik27 views
Do you know what your Drupal is doing Observe it! (DrupalCon Prague 2022) by sparkfabrik
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)
sparkfabrik55 views
Do you know what your Drupal is doing_ Observe it! by 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!
sparkfabrik1K views
Progettare e sviluppare soluzioni serverless con AWS by sparkfabrik
Progettare e sviluppare soluzioni serverless con AWSProgettare e sviluppare soluzioni serverless con AWS
Progettare e sviluppare soluzioni serverless con AWS
sparkfabrik54 views
From React to React Native - Things I wish I knew when I started by sparkfabrik
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
sparkfabrik143 views
Headless Drupal: A modern approach to (micro)services and APIs by sparkfabrik
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
sparkfabrik251 views
Cloud-Native Drupal: a survival guide by sparkfabrik
Cloud-Native Drupal: a survival guideCloud-Native Drupal: a survival guide
Cloud-Native Drupal: a survival guide
sparkfabrik119 views
Mobile Development: una introduzione per Web Developers by sparkfabrik
Mobile Development: una introduzione per Web DevelopersMobile Development: una introduzione per Web Developers
Mobile Development: una introduzione per Web Developers
sparkfabrik90 views
Retro gaming machine made with Javascript and Kubernetes by sparkfabrik
Retro gaming machine made with Javascript and Kubernetes Retro gaming machine made with Javascript and Kubernetes
Retro gaming machine made with Javascript and Kubernetes
sparkfabrik229 views
Gitops: the kubernetes way by sparkfabrik
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes way
sparkfabrik2.1K views
Applicazioni Serverless con AWS by sparkfabrik
Applicazioni Serverless con AWSApplicazioni Serverless con AWS
Applicazioni Serverless con AWS
sparkfabrik136 views
GitOps: Git come unica fonte di verità per applicazioni e infrastruttura by sparkfabrik
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
sparkfabrik533 views
The path to a serverless-native era with Kubernetes by sparkfabrik
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
sparkfabrik945 views

Recently uploaded

Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITShapeBlue
166 views8 slides
Uni Systems for Power Platform.pptx by
Uni Systems for Power Platform.pptxUni Systems for Power Platform.pptx
Uni Systems for Power Platform.pptxUni Systems S.M.S.A.
61 views21 slides
State of the Union - Rohit Yadav - Apache CloudStack by
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStackShapeBlue
253 views53 slides
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... by
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...ShapeBlue
79 views17 slides
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueShapeBlue
179 views7 slides
Microsoft Power Platform.pptx by
Microsoft Power Platform.pptxMicrosoft Power Platform.pptx
Microsoft Power Platform.pptxUni Systems S.M.S.A.
80 views38 slides

Recently uploaded(20)

Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue166 views
State of the Union - Rohit Yadav - Apache CloudStack by ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue253 views
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ... by ShapeBlue
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
Import Export Virtual Machine for KVM Hypervisor - Ayush Pandey - University ...
ShapeBlue79 views
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue by ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue179 views
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by ShapeBlue
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystems
ShapeBlue197 views
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by ShapeBlue
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TCloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
ShapeBlue112 views
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue123 views
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue158 views
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool by ShapeBlue
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool
ShapeBlue84 views
Digital Personal Data Protection (DPDP) Practical Approach For CISOs by Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash153 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays53 views
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue85 views
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... by ShapeBlue
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
ShapeBlue132 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc160 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue222 views

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
  • 11. Source: Sonatype Log4j exploit update
  • 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