SlideShare a Scribd company logo
1 of 42
Download to read offline
What is the secure software
supply chain and
the current state of the PHP
ecosystem
Who we are
Paolo Mainardi
@paolomainardi
➔ Co-founder and CTO @Sparkfabrik
➔ Drupal.org profile - Webprofiler module (@lussoluca)
➔ Linux Foundation Europe Advisory Member
➔ Blog: paolomainardi.com
➔ linkedin.com/in/paolomainardi
continuousdelivery.social/@paolomainardi
➔ paolo.mainardi@sparkfabrik.com
The session
● What is a (Software) Supply Chain
● State of the PHP ecosystem
● Threats and mitigations with digital
signatures, attestations and SBOM
● DEMO
(a prayer to the Demo Gods 󰚥)
“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
Application
A modern Drupal application
Application Dependencies
A modern Drupal application
Application Dependencies
Operating system
A modern Drupal application
A modern Drupal application
CI/CD Pipeline
internal
Operating system
Application Dependencies
Operating system
Application Dependencies
A modern Drupal application
CI/CD Pipeline
external
internal
Operating system
Application Dependencies
A modern Drupal application
Cloud platform
CI/CD Pipeline
external
internal
A modern Drupal application
Local or cloud development environment
Cloud platform
Operating system
Application Dependencies
CI/CD Pipeline
internal
external
Operating system
Application Dependencies
Threats in the supply chain
Local or cloud development environment
Cloud platform
CI/CD Pipeline
internal
external
= attack vector
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.
2020
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 PHP ecosystem
PHP Package management history
2009
PHP 5.3 and PHP-FIG group
Namespaces and PSR-0 autoloading standard
2012
Composer
A modern and easy to use package manager,
based on top of recent language
improvements and ecosystem evolutions.
1999
PEAR - PHP Extension and
Application Repository
Created by Stig Bakken, with the goal to
“provide reusable components, lead innovation
in PHP, provide best practices for PHP
development and educate developers.”
Included in the PHP runtime.
2010
2004 2008
2005
Composer stats: >300K packages and +3.5M versions
Composer stats: >2B installed packages per month
How composer works when you install a package
composer require drupal / core-recommended : 10.1.0
Namespace Library name
Only vendor-namespaced
packages allowed
(eg: NPM allows root packages)
Code is always hosted on a git
repository, only metadata goes
on packagist.org
(eg: NPM hosts the code)
Version
Public
packagist.org
Custom
repositories
Composer Repositories are
Canonical by default.
(no dependency confusion)
1
2
https://blog.packagist.com/preventing-dependency-hijacking
The latest supply chain attacks on PHP
● April 29, 2021: PHP Supply Chain Attack on Composer
○ “A critical vulnerability in the source code of Composer which is used by Packagist. It allowed us to
execute arbitrary system commands on the Packagist.org server”
● October 4, 2022: Securing Developer Tools: A New Supply Chain Attack on PHP
○ “A new critical vulnerability in similar components. It allowed taking control of the server
distributing information about existing PHP software packages, and ultimately compromising
every organization that uses them”
● March 29, 2022: PHP Supply Chain Attack on PEAR
○ “In this article we present two bugs, both exploitable for more than 15 years. An attacker exploiting
the first one could take over any developer account and publish malicious releases, while the
second bug would allow the attacker to gain persistent access to the central PEAR server.”
● May 3, 2023: Packagist.org maintainer account takeover
○ “An attacker accessed an inactive account on Packagist.org for a period of time but still had
access to a total of 14 packages. The attacker forked each of the packages and replaced the
package description in composer.json with their own message but did not otherwise make any
malicious changes”
And counting: https://www.sonatype.com/resources/vulnerability-timeline
So what ? Where should we start ?
Application Dependencies
Operating system
Application Dependencies
Operating system
OCI Image - https://opencontainers.org
Dev environments
● A way to define application
and system dependencies in
a reproducible way with
Dockerfile
● A standard and agnostic
artifact to deploy on
Kubernetes, Lambda, Cloud
Run etc…
● Cloud native tooling (SBOM,
Signatures etc..)
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.
Digital signatures 101
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 public 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
● OCI Containers as a single unit of deployment
● Sign your artifacts - Sigstore is nice and easy.
● Generate SBOM and scan for vulnerabilities
○ Snyk
○ Grype
○ Trivy
● + Automate your dependencies management with Github
DependaBot or RenovateBot for all other platforms
● + Add Drupal Security Advisories for Composer to your composer.json
THANKS

More Related Content

Similar to Drupal Dev Days Vienna 2023 - What is the secure software supply chain and the current state of the PHP ecosystem.pdf

The DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkitThe DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkitMarco Ferrigno
 
The DevOps Paradigm
The DevOps ParadigmThe DevOps Paradigm
The DevOps ParadigmNaLUG
 
Getting More Out of the Node.js, PHP, and Python Agents - AppSphere16
Getting More Out of the Node.js, PHP, and Python Agents - AppSphere16Getting More Out of the Node.js, PHP, and Python Agents - AppSphere16
Getting More Out of the Node.js, PHP, and Python Agents - AppSphere16AppDynamics
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017Patrick Chanezon
 
Machine learning in cybersecutiry
Machine learning in cybersecutiryMachine learning in cybersecutiry
Machine learning in cybersecutiryVishwas N
 
What HPC can learn from DevOps?
What HPC can learn from DevOps?What HPC can learn from DevOps?
What HPC can learn from DevOps?Walid Shaari
 
OWASP Dependency-Track Introduction
OWASP Dependency-Track IntroductionOWASP Dependency-Track Introduction
OWASP Dependency-Track IntroductionSergey Sotnikov
 
Open source technology
Open source technologyOpen source technology
Open source technologyaparnaz1
 
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxDeploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxJamie Coleman
 
(DVO311) Containers, Red Hat & AWS For Extreme IT Agility
(DVO311) Containers, Red Hat & AWS For Extreme IT Agility(DVO311) Containers, Red Hat & AWS For Extreme IT Agility
(DVO311) Containers, Red Hat & AWS For Extreme IT AgilityAmazon Web Services
 
Coscup2018 itri android-in-cloud
Coscup2018 itri android-in-cloudCoscup2018 itri android-in-cloud
Coscup2018 itri android-in-cloudTian-Jian Wu
 
IoTWorld 2016 OSS Keynote Param Singh, Ian Skerrett
IoTWorld 2016 OSS Keynote Param Singh, Ian SkerrettIoTWorld 2016 OSS Keynote Param Singh, Ian Skerrett
IoTWorld 2016 OSS Keynote Param Singh, Ian SkerrettParam Singh
 
Demystifying Containerization Principles for Data Scientists
Demystifying Containerization Principles for Data ScientistsDemystifying Containerization Principles for Data Scientists
Demystifying Containerization Principles for Data ScientistsDr Ganesh Iyer
 
DockerCon SF 2015: Keynote Day 1
DockerCon SF 2015: Keynote Day 1DockerCon SF 2015: Keynote Day 1
DockerCon SF 2015: Keynote Day 1Docker, Inc.
 
Oscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby projectOscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby projectPatrick Chanezon
 
CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018Krishna-Kumar
 
Slide DevSecOps Microservices
Slide DevSecOps Microservices Slide DevSecOps Microservices
Slide DevSecOps Microservices Hendri Karisma
 
The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...dmgerman
 
Zephyr Introduction - Nordic Webinar - Sept. 24.pdf
Zephyr Introduction - Nordic Webinar - Sept. 24.pdfZephyr Introduction - Nordic Webinar - Sept. 24.pdf
Zephyr Introduction - Nordic Webinar - Sept. 24.pdfAswathRangaraj1
 
Applied Security for Containers, OW2con'18, June 7-8, 2018, Paris
Applied Security for Containers, OW2con'18, June 7-8, 2018, ParisApplied Security for Containers, OW2con'18, June 7-8, 2018, Paris
Applied Security for Containers, OW2con'18, June 7-8, 2018, ParisOW2
 

Similar to Drupal Dev Days Vienna 2023 - What is the secure software supply chain and the current state of the PHP ecosystem.pdf (20)

The DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkitThe DevOps paradigm - the evolution of IT professionals and opensource toolkit
The DevOps paradigm - the evolution of IT professionals and opensource toolkit
 
The DevOps Paradigm
The DevOps ParadigmThe DevOps Paradigm
The DevOps Paradigm
 
Getting More Out of the Node.js, PHP, and Python Agents - AppSphere16
Getting More Out of the Node.js, PHP, and Python Agents - AppSphere16Getting More Out of the Node.js, PHP, and Python Agents - AppSphere16
Getting More Out of the Node.js, PHP, and Python Agents - AppSphere16
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
Machine learning in cybersecutiry
Machine learning in cybersecutiryMachine learning in cybersecutiry
Machine learning in cybersecutiry
 
What HPC can learn from DevOps?
What HPC can learn from DevOps?What HPC can learn from DevOps?
What HPC can learn from DevOps?
 
OWASP Dependency-Track Introduction
OWASP Dependency-Track IntroductionOWASP Dependency-Track Introduction
OWASP Dependency-Track Introduction
 
Open source technology
Open source technologyOpen source technology
Open source technology
 
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxDeploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
 
(DVO311) Containers, Red Hat & AWS For Extreme IT Agility
(DVO311) Containers, Red Hat & AWS For Extreme IT Agility(DVO311) Containers, Red Hat & AWS For Extreme IT Agility
(DVO311) Containers, Red Hat & AWS For Extreme IT Agility
 
Coscup2018 itri android-in-cloud
Coscup2018 itri android-in-cloudCoscup2018 itri android-in-cloud
Coscup2018 itri android-in-cloud
 
IoTWorld 2016 OSS Keynote Param Singh, Ian Skerrett
IoTWorld 2016 OSS Keynote Param Singh, Ian SkerrettIoTWorld 2016 OSS Keynote Param Singh, Ian Skerrett
IoTWorld 2016 OSS Keynote Param Singh, Ian Skerrett
 
Demystifying Containerization Principles for Data Scientists
Demystifying Containerization Principles for Data ScientistsDemystifying Containerization Principles for Data Scientists
Demystifying Containerization Principles for Data Scientists
 
DockerCon SF 2015: Keynote Day 1
DockerCon SF 2015: Keynote Day 1DockerCon SF 2015: Keynote Day 1
DockerCon SF 2015: Keynote Day 1
 
Oscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby projectOscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby project
 
CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018
 
Slide DevSecOps Microservices
Slide DevSecOps Microservices Slide DevSecOps Microservices
Slide DevSecOps Microservices
 
The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...
 
Zephyr Introduction - Nordic Webinar - Sept. 24.pdf
Zephyr Introduction - Nordic Webinar - Sept. 24.pdfZephyr Introduction - Nordic Webinar - Sept. 24.pdf
Zephyr Introduction - Nordic Webinar - Sept. 24.pdf
 
Applied Security for Containers, OW2con'18, June 7-8, 2018, Paris
Applied Security for Containers, OW2con'18, June 7-8, 2018, ParisApplied Security for Containers, OW2con'18, June 7-8, 2018, Paris
Applied Security for Containers, OW2con'18, June 7-8, 2018, Paris
 

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

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
 
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
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 

Recently uploaded (20)

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
 
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
 
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...
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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
 

Drupal Dev Days Vienna 2023 - What is the secure software supply chain and the current state of the PHP ecosystem.pdf

  • 1. What is the secure software supply chain and the current state of the PHP ecosystem
  • 2. Who we are Paolo Mainardi @paolomainardi ➔ Co-founder and CTO @Sparkfabrik ➔ Drupal.org profile - Webprofiler module (@lussoluca) ➔ Linux Foundation Europe Advisory Member ➔ Blog: paolomainardi.com ➔ linkedin.com/in/paolomainardi continuousdelivery.social/@paolomainardi ➔ paolo.mainardi@sparkfabrik.com
  • 3. The session ● What is a (Software) Supply Chain ● State of the PHP ecosystem ● Threats and mitigations with digital signatures, attestations and SBOM ● DEMO (a prayer to the Demo Gods 󰚥)
  • 4. “A supply chain is a network of individuals and companies who are involved in creating a product and delivering it to the consumer”
  • 9. A modern Drupal application CI/CD Pipeline internal Operating system Application Dependencies
  • 10. Operating system Application Dependencies A modern Drupal application CI/CD Pipeline external internal
  • 11. Operating system Application Dependencies A modern Drupal application Cloud platform CI/CD Pipeline external internal
  • 12. A modern Drupal application Local or cloud development environment Cloud platform Operating system Application Dependencies CI/CD Pipeline internal external
  • 13. Operating system Application Dependencies Threats in the supply chain Local or cloud development environment Cloud platform CI/CD Pipeline internal external = attack vector
  • 14. 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. 2020
  • 16.
  • 18. Keynote: The Next Steps in Software Supply Chain Security - Brandon Lum, Software Engineer, Google
  • 19. State of the PHP ecosystem
  • 20. PHP Package management history 2009 PHP 5.3 and PHP-FIG group Namespaces and PSR-0 autoloading standard 2012 Composer A modern and easy to use package manager, based on top of recent language improvements and ecosystem evolutions. 1999 PEAR - PHP Extension and Application Repository Created by Stig Bakken, with the goal to “provide reusable components, lead innovation in PHP, provide best practices for PHP development and educate developers.” Included in the PHP runtime. 2010 2004 2008 2005
  • 21. Composer stats: >300K packages and +3.5M versions
  • 22. Composer stats: >2B installed packages per month
  • 23. How composer works when you install a package composer require drupal / core-recommended : 10.1.0 Namespace Library name Only vendor-namespaced packages allowed (eg: NPM allows root packages) Code is always hosted on a git repository, only metadata goes on packagist.org (eg: NPM hosts the code) Version Public packagist.org Custom repositories Composer Repositories are Canonical by default. (no dependency confusion) 1 2 https://blog.packagist.com/preventing-dependency-hijacking
  • 24. The latest supply chain attacks on PHP ● April 29, 2021: PHP Supply Chain Attack on Composer ○ “A critical vulnerability in the source code of Composer which is used by Packagist. It allowed us to execute arbitrary system commands on the Packagist.org server” ● October 4, 2022: Securing Developer Tools: A New Supply Chain Attack on PHP ○ “A new critical vulnerability in similar components. It allowed taking control of the server distributing information about existing PHP software packages, and ultimately compromising every organization that uses them” ● March 29, 2022: PHP Supply Chain Attack on PEAR ○ “In this article we present two bugs, both exploitable for more than 15 years. An attacker exploiting the first one could take over any developer account and publish malicious releases, while the second bug would allow the attacker to gain persistent access to the central PEAR server.” ● May 3, 2023: Packagist.org maintainer account takeover ○ “An attacker accessed an inactive account on Packagist.org for a period of time but still had access to a total of 14 packages. The attacker forked each of the packages and replaced the package description in composer.json with their own message but did not otherwise make any malicious changes” And counting: https://www.sonatype.com/resources/vulnerability-timeline
  • 25. So what ? Where should we start ?
  • 27. Application Dependencies Operating system OCI Image - https://opencontainers.org Dev environments ● A way to define application and system dependencies in a reproducible way with Dockerfile ● A standard and agnostic artifact to deploy on Kubernetes, Lambda, Cloud Run etc… ● Cloud native tooling (SBOM, Signatures etc..)
  • 29. 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.
  • 30. 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 ?
  • 32. 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 )
  • 33. 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.
  • 34. Digital signatures 101 Managing keys is hard Distribution, Storage, Compromise
  • 35. 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..)
  • 36. Digital signatures - Sigstore ● Keyless signing of any software artifact ● Signatures metadata are stored in a public tamper-resistant public log, ● Signatures are stored alongside images in OCI registry
  • 37. 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
  • 38. 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…)
  • 39. SBOM - Tools $ docker sbom
  • 40. DEMO
  • 41. Takeaways ● OCI Containers as a single unit of deployment ● Sign your artifacts - Sigstore is nice and easy. ● Generate SBOM and scan for vulnerabilities ○ Snyk ○ Grype ○ Trivy ● + Automate your dependencies management with Github DependaBot or RenovateBot for all other platforms ● + Add Drupal Security Advisories for Composer to your composer.json