SlideShare a Scribd company logo
Trusting the Unknown -
Ensuring Safe & Secure Extension Use in CI/CD Workflows
Of extensions contain some vulnerability
Of extensions owned by Microsoft
With a ⭐ rating
Of extensions updated in the last 3 months
Of Node based Azure Pipelines tasks
Of PowerShell Azure Pipeline Tasks…
That’s unfair
But it’s also a bit true…
Jesse Houwing
Chief Trainer & Tinkerer
xpirit.com/jesse
jessehouwing
jessehouwing
jessehouwing
hachyderm.io/jessehouwing
+31 6 41 81 333 8
Extensions in the context of Azure Pipelines
Manifests
Marketplace pritties
Tasks
And potentially tabs and context menu actions…
So what is a task?
Loads of dependencies
At least azure-pipelines-task-lib
Frozen at time of publish
Another Manifest
The actual custom code
More pretties
Or… using PowerShell
A lot fewer dependencies
at least VstsTaskSdk
Another Manifest
The actual custom code
More pretties
An extension can contain more than 1 tasks
Task A
Task A
v1
Where do these tasks come from?
• They’re “built-in” tasks
• Automatically updated by Microsoft in Azure DevOps
• Manually updated through Microsoft Update packs in Azure DevOps Server
• Manually updated by administrator through sideloading (see below)
• They’re from an extension from the public marketplace
• Installed through marketplace.visualstudio.com
• Automatically updated in Azure DevOps and Azure DevOps Server
• They’re from an extension from the private marketplace
• Manually uploaded to Azure DevOps Server
• They’re sideloaded directly
• Manually uploaded to Azure DevOps or Azure DevOps Server
2 problems with task updates
By default, the agent:
1. Pins the major version to the one you selected
2. Updates to the latest minor version available
Where do these tasks come from?
So how do we know we can trust these tasks?
You don’t.
How do you know?
Well…
I downloaded 700GB of vsix files from the Azure DevOps marketplace
Extracted them and scanned them
So how do we know we can trust them?
Trusted publisher?
Verification?
Rating?
Number of issues and pull-requests?
Metadata provided by the author?
Recently updated?
Looks nice?
Is it really that bad?
Maybe not…
All of these potential security issues
Do not mean there is a known exploit chain
But it’s not pretty!
It’s not just the updates you should worry
about
So what’s the risk we’re running
• Some of these extensions turn off TLS security
• Some might overwrite arbitrary files
• Some might be used to send data to the outside world
• Some install things directly from npmjs.
• Others download 100’s of MB, extract it and execute without
verification
• Often on a host with admin permissions
There is a lot of potential
Why is PowerShell so much better?
It might not be but…
• Many of the dependencies are automatically updated through
Windows Update
• PowerShell relies on the .NET framework for most functionality
• There are a lot fewer dependencies to worry about
What is Microsoft doing?
• They’ve introduced a new Node 16 handler for Azure Pipelines
• They’re deprecating Node 6 and Node 10 for Azure Pipelines tasks.
• They’re updating all the built-in tasks for Azure DevOps.
• They’re updating all the built-in tasks for Azure DevOps Server 2022?
• They’ve added the ability to turn off Node 6 on the Pipelines Agent.
• They’re adding warnings to every workflow that runs uses Node 6
(and later 10).
What am I doing / have I done
• I actively update all my extensions regularly
• I automatically update my dependencies using Snyk, Dependabot and
RenovateBot
• I scan my code for vulnerabilities using Snyk Code and GitHub
advanced Security
• I maintain the Azure DevOps Extension Tasks to implement CI / CD for
Azure DevOps extensions
• I recently contributed to RenovateBot to add support for the Azure
Pipeline Marketplace. Now doing the same for dependabot-core.
Guidance for deprecating an extension
• Add a warning to all versions of your tasks
• Timebomb the task to fail after today+X
• Mark all tasks deprecated:true in the task.json
• Add [DEPRECATED] to your task friendly name in the task.json
• Add [DEPRECATED] to your extension name in the vss-extension.json
• Publish this last version
• Unpublish the extension
• Archive the GitHub repository
Guidance for deprecating task version
• Add both the old and the new version of the task to your extension
• Update the old version’s friendlyName and add [DEPRECATED] in
task.json
• Add a warning / error to the implementation to warn you users
What should Extension authors do?
• Employ secure password practices and use 2FA
• Deprecate extensions you’re no longer maintaining
• Update your existing extensions to Node 16 and latest dependencies
• Enable DependaBot to automatically keep your dependencies up-to-
date
• Enable GitHub Advanced Security to detect issues in *your* code
• Implement CI / CD to ship new versions with ease
• Add repo metadata to their extension manifests
What should Azure DevOps admins do
• Disable insecure extensions
• Implement RenovateBot to automatically
suggest updates to installed Azure
Pipelines tasks
• Disable Node 6 support on the Azure
Pipelines Agent
• Do not install every extension in the
marketplace without thought
• Provide Hosted Agents or ephemeral Scale-
set agents
What should Azure DevOps admins do
• Run Endpoint Security on your Azure Pipelines Agents
• For DevOps Server
• Upgrade to Azure DevOps Server 2022 and stay current
• Migrate to Azure DevOps Service
• Manually upgrade “built-in” tasks
• Be careful with internal marketplace
Overwrite a built-in task
npm install -g tfx-cli
tfx build tasks upload --task-zip-path Task.guid-version.zip
--service-url https://yourtfs.com/tfs/DefaultCollection
. ./script/install-task.ps1 -CollectionUrl https://yourtfs.com/tfs/DefaultCollection
-TaskZip Task.guid-version.zip
Delete all versions of a task
npm install -g tfx-cli
tfx build tasks delete --task-id ad884ca2-732e-4b85-b2d3-ed71bcbd2788
--service-url https://yourtfs.com/tfs/DefaultCollection
What should Azure Pipelines authors do?
• Consider whether you actually need an extension.
• Keep your pipelines current. Update your major task versions and
resolve any issues.
• Use Azure Pipelines YAML
• Pin the exact version of your tasks
• Use RenovateBot to automatically keep your pipelines up to date
• Use Hosted Agents / Ephemeral Scale-set agents whenever possible
What should the community do?
• Sponsor the authors of extensions you rely on.
• Submit pull requests to improve extensions.
• Submit pull requests to upgrade extensions to Node 16.
• Leave reviews on the marketplace and update them.
Useful resources
Useful Resources
• Azure DevOps Marketplace Scan
https://github.com/jessehouwing/azure-devops-marketplace-scan
https://jessehouwing.net/security-state-of-the-azure-devops-
marketplace/
• Hardening guidelines for Azure Pipelines
https://learn.microsoft.com/en-
us/azure/devops/organizations/security/security-best-
practices?view=azure-devops#secure-azure-pipelines
Useful resources
• Azure Pipelines Tasks Zips
https://github.com/jessehouwing/azure-pipelines-tasks-zips
• RenovateBot for Azure Pipelines
https://jessehouwing.net/azure-pipelines-enable-renovatebot/
• Azure DevOps Extension tasks
https://marketplace.visualstudio.com/items?itemName=ms-
devlabs.vsts-developer-tools-build-tasks

More Related Content

Similar to Trusting the Unknown

DevOps Delivery Pipeline
DevOps Delivery PipelineDevOps Delivery Pipeline
DevOps Delivery Pipeline
Denis Korchuganov
 
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer ToolsDevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
Amazon Web Services
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
Bhargav Amin
 
DevOps & DevEx
DevOps & DevExDevOps & DevEx
DevOps & DevEx
Ifunga Ndana
 
DevOps Days Boston 2017: Developer first workflows for Kubernetes
DevOps Days Boston 2017: Developer first workflows for KubernetesDevOps Days Boston 2017: Developer first workflows for Kubernetes
DevOps Days Boston 2017: Developer first workflows for Kubernetes
Ambassador Labs
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWSContinuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS
Amazon Web Services
 
10 tips for Cloud Native Security
10 tips for Cloud Native Security10 tips for Cloud Native Security
10 tips for Cloud Native Security
Karthik Gaekwad
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
Eklove Mohan
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
Giacomo Vacca
 
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
Sencha
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?
AFUP_Limoges
 
Versioning for Developers
Versioning for DevelopersVersioning for Developers
Versioning for Developers
Michelangelo van Dam
 
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
Amazon Web Services
 
DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...
DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...
DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...
DevSecCon
 
Continuous Integration & Development with Gitlab
Continuous Integration & Development with GitlabContinuous Integration & Development with Gitlab
Continuous Integration & Development with Gitlab
Ayush Sharma
 
Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life
DevOps.com
 
Zure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training dayZure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training day
Okko Oulasvirta
 
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Peter Leschev
 
What DevOps Isn't
What DevOps Isn'tWhat DevOps Isn't
What DevOps Isn't
Frank Lamantia
 
Security as Code: DOES15
Security as Code: DOES15Security as Code: DOES15
Security as Code: DOES15
Ed Bellis
 

Similar to Trusting the Unknown (20)

DevOps Delivery Pipeline
DevOps Delivery PipelineDevOps Delivery Pipeline
DevOps Delivery Pipeline
 
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer ToolsDevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
DevOps on AWS: Accelerating Software Delivery with the AWS Developer Tools
 
CI/CD on AWS
CI/CD on AWSCI/CD on AWS
CI/CD on AWS
 
DevOps & DevEx
DevOps & DevExDevOps & DevEx
DevOps & DevEx
 
DevOps Days Boston 2017: Developer first workflows for Kubernetes
DevOps Days Boston 2017: Developer first workflows for KubernetesDevOps Days Boston 2017: Developer first workflows for Kubernetes
DevOps Days Boston 2017: Developer first workflows for Kubernetes
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWSContinuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS
 
10 tips for Cloud Native Security
10 tips for Cloud Native Security10 tips for Cloud Native Security
10 tips for Cloud Native Security
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
 
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?
 
Versioning for Developers
Versioning for DevelopersVersioning for Developers
Versioning for Developers
 
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
AWS re:Invent 2016: DevOps on AWS: Accelerating Software Delivery with the AW...
 
DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...
DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...
DevSecCon London 2017: Permitting agility whilst enforcing security by Alina ...
 
Continuous Integration & Development with Gitlab
Continuous Integration & Development with GitlabContinuous Integration & Development with Gitlab
Continuous Integration & Development with Gitlab
 
Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life
 
Zure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training dayZure Azure PaaS Zero to Hero - DevOps training day
Zure Azure PaaS Zero to Hero - DevOps training day
 
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
 
What DevOps Isn't
What DevOps Isn'tWhat DevOps Isn't
What DevOps Isn't
 
Security as Code: DOES15
Security as Code: DOES15Security as Code: DOES15
Security as Code: DOES15
 

More from Jesse Houwing

Azure DevOps Extension Tools
Azure DevOps Extension ToolsAzure DevOps Extension Tools
Azure DevOps Extension Tools
Jesse Houwing
 
Ohh shit git
Ohh shit gitOhh shit git
Ohh shit git
Jesse Houwing
 
Ohh sh*t git
Ohh sh*t gitOhh sh*t git
Ohh sh*t git
Jesse Houwing
 
Dress up my VSTS
Dress up my VSTSDress up my VSTS
Dress up my VSTS
Jesse Houwing
 
The new way to extend VSTS Build and Release
The new way to extend VSTS Build and ReleaseThe new way to extend VSTS Build and Release
The new way to extend VSTS Build and Release
Jesse Houwing
 
When scrum goes bad
When scrum goes badWhen scrum goes bad
When scrum goes bad
Jesse Houwing
 
Scrum workshop for Project Managers
Scrum workshop for Project ManagersScrum workshop for Project Managers
Scrum workshop for Project Managers
Jesse Houwing
 
Let's get agile: An Agile Talk About Agile
Let's get agile: An Agile Talk About AgileLet's get agile: An Agile Talk About Agile
Let's get agile: An Agile Talk About Agile
Jesse Houwing
 
Techdays 2012 - Better code through reviews and tools
Techdays 2012 - Better code through reviews and toolsTechdays 2012 - Better code through reviews and tools
Techdays 2012 - Better code through reviews and tools
Jesse Houwing
 
Techdaysnl - code review features in tfs vnext
Techdaysnl - code review features in tfs vnextTechdaysnl - code review features in tfs vnext
Techdaysnl - code review features in tfs vnext
Jesse Houwing
 
Growing great (agile) teams
Growing great (agile) teams Growing great (agile) teams
Growing great (agile) teams
Jesse Houwing
 

More from Jesse Houwing (11)

Azure DevOps Extension Tools
Azure DevOps Extension ToolsAzure DevOps Extension Tools
Azure DevOps Extension Tools
 
Ohh shit git
Ohh shit gitOhh shit git
Ohh shit git
 
Ohh sh*t git
Ohh sh*t gitOhh sh*t git
Ohh sh*t git
 
Dress up my VSTS
Dress up my VSTSDress up my VSTS
Dress up my VSTS
 
The new way to extend VSTS Build and Release
The new way to extend VSTS Build and ReleaseThe new way to extend VSTS Build and Release
The new way to extend VSTS Build and Release
 
When scrum goes bad
When scrum goes badWhen scrum goes bad
When scrum goes bad
 
Scrum workshop for Project Managers
Scrum workshop for Project ManagersScrum workshop for Project Managers
Scrum workshop for Project Managers
 
Let's get agile: An Agile Talk About Agile
Let's get agile: An Agile Talk About AgileLet's get agile: An Agile Talk About Agile
Let's get agile: An Agile Talk About Agile
 
Techdays 2012 - Better code through reviews and tools
Techdays 2012 - Better code through reviews and toolsTechdays 2012 - Better code through reviews and tools
Techdays 2012 - Better code through reviews and tools
 
Techdaysnl - code review features in tfs vnext
Techdaysnl - code review features in tfs vnextTechdaysnl - code review features in tfs vnext
Techdaysnl - code review features in tfs vnext
 
Growing great (agile) teams
Growing great (agile) teams Growing great (agile) teams
Growing great (agile) teams
 

Recently uploaded

Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
Techgropse Pvt.Ltd.
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 

Recently uploaded (20)

Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 

Trusting the Unknown

  • 1. Trusting the Unknown - Ensuring Safe & Secure Extension Use in CI/CD Workflows
  • 2. Of extensions contain some vulnerability
  • 3. Of extensions owned by Microsoft
  • 4. With a ⭐ rating
  • 5. Of extensions updated in the last 3 months
  • 6. Of Node based Azure Pipelines tasks
  • 7. Of PowerShell Azure Pipeline Tasks…
  • 8. That’s unfair But it’s also a bit true…
  • 9.
  • 10. Jesse Houwing Chief Trainer & Tinkerer xpirit.com/jesse jessehouwing jessehouwing jessehouwing hachyderm.io/jessehouwing +31 6 41 81 333 8
  • 11.
  • 12.
  • 13. Extensions in the context of Azure Pipelines Manifests Marketplace pritties Tasks And potentially tabs and context menu actions…
  • 14. So what is a task? Loads of dependencies At least azure-pipelines-task-lib Frozen at time of publish Another Manifest The actual custom code More pretties
  • 15. Or… using PowerShell A lot fewer dependencies at least VstsTaskSdk Another Manifest The actual custom code More pretties
  • 16. An extension can contain more than 1 tasks Task A Task A v1
  • 17. Where do these tasks come from? • They’re “built-in” tasks • Automatically updated by Microsoft in Azure DevOps • Manually updated through Microsoft Update packs in Azure DevOps Server • Manually updated by administrator through sideloading (see below) • They’re from an extension from the public marketplace • Installed through marketplace.visualstudio.com • Automatically updated in Azure DevOps and Azure DevOps Server • They’re from an extension from the private marketplace • Manually uploaded to Azure DevOps Server • They’re sideloaded directly • Manually uploaded to Azure DevOps or Azure DevOps Server
  • 18. 2 problems with task updates By default, the agent: 1. Pins the major version to the one you selected 2. Updates to the latest minor version available
  • 19. Where do these tasks come from?
  • 20. So how do we know we can trust these tasks? You don’t.
  • 21. How do you know? Well… I downloaded 700GB of vsix files from the Azure DevOps marketplace Extracted them and scanned them
  • 22. So how do we know we can trust them? Trusted publisher? Verification? Rating? Number of issues and pull-requests? Metadata provided by the author? Recently updated? Looks nice?
  • 23. Is it really that bad? Maybe not…
  • 24. All of these potential security issues Do not mean there is a known exploit chain
  • 25. But it’s not pretty!
  • 26. It’s not just the updates you should worry about
  • 27. So what’s the risk we’re running • Some of these extensions turn off TLS security • Some might overwrite arbitrary files • Some might be used to send data to the outside world • Some install things directly from npmjs. • Others download 100’s of MB, extract it and execute without verification • Often on a host with admin permissions There is a lot of potential
  • 28.
  • 29. Why is PowerShell so much better? It might not be but… • Many of the dependencies are automatically updated through Windows Update • PowerShell relies on the .NET framework for most functionality • There are a lot fewer dependencies to worry about
  • 30. What is Microsoft doing? • They’ve introduced a new Node 16 handler for Azure Pipelines • They’re deprecating Node 6 and Node 10 for Azure Pipelines tasks. • They’re updating all the built-in tasks for Azure DevOps. • They’re updating all the built-in tasks for Azure DevOps Server 2022? • They’ve added the ability to turn off Node 6 on the Pipelines Agent. • They’re adding warnings to every workflow that runs uses Node 6 (and later 10).
  • 31. What am I doing / have I done • I actively update all my extensions regularly • I automatically update my dependencies using Snyk, Dependabot and RenovateBot • I scan my code for vulnerabilities using Snyk Code and GitHub advanced Security • I maintain the Azure DevOps Extension Tasks to implement CI / CD for Azure DevOps extensions • I recently contributed to RenovateBot to add support for the Azure Pipeline Marketplace. Now doing the same for dependabot-core.
  • 32. Guidance for deprecating an extension • Add a warning to all versions of your tasks • Timebomb the task to fail after today+X • Mark all tasks deprecated:true in the task.json • Add [DEPRECATED] to your task friendly name in the task.json • Add [DEPRECATED] to your extension name in the vss-extension.json • Publish this last version • Unpublish the extension • Archive the GitHub repository
  • 33. Guidance for deprecating task version • Add both the old and the new version of the task to your extension • Update the old version’s friendlyName and add [DEPRECATED] in task.json • Add a warning / error to the implementation to warn you users
  • 34. What should Extension authors do? • Employ secure password practices and use 2FA • Deprecate extensions you’re no longer maintaining • Update your existing extensions to Node 16 and latest dependencies • Enable DependaBot to automatically keep your dependencies up-to- date • Enable GitHub Advanced Security to detect issues in *your* code • Implement CI / CD to ship new versions with ease • Add repo metadata to their extension manifests
  • 35. What should Azure DevOps admins do • Disable insecure extensions • Implement RenovateBot to automatically suggest updates to installed Azure Pipelines tasks • Disable Node 6 support on the Azure Pipelines Agent • Do not install every extension in the marketplace without thought • Provide Hosted Agents or ephemeral Scale- set agents
  • 36. What should Azure DevOps admins do • Run Endpoint Security on your Azure Pipelines Agents • For DevOps Server • Upgrade to Azure DevOps Server 2022 and stay current • Migrate to Azure DevOps Service • Manually upgrade “built-in” tasks • Be careful with internal marketplace
  • 37. Overwrite a built-in task npm install -g tfx-cli tfx build tasks upload --task-zip-path Task.guid-version.zip --service-url https://yourtfs.com/tfs/DefaultCollection . ./script/install-task.ps1 -CollectionUrl https://yourtfs.com/tfs/DefaultCollection -TaskZip Task.guid-version.zip Delete all versions of a task npm install -g tfx-cli tfx build tasks delete --task-id ad884ca2-732e-4b85-b2d3-ed71bcbd2788 --service-url https://yourtfs.com/tfs/DefaultCollection
  • 38.
  • 39. What should Azure Pipelines authors do? • Consider whether you actually need an extension. • Keep your pipelines current. Update your major task versions and resolve any issues. • Use Azure Pipelines YAML • Pin the exact version of your tasks • Use RenovateBot to automatically keep your pipelines up to date • Use Hosted Agents / Ephemeral Scale-set agents whenever possible
  • 40. What should the community do? • Sponsor the authors of extensions you rely on. • Submit pull requests to improve extensions. • Submit pull requests to upgrade extensions to Node 16. • Leave reviews on the marketplace and update them.
  • 42. Useful Resources • Azure DevOps Marketplace Scan https://github.com/jessehouwing/azure-devops-marketplace-scan https://jessehouwing.net/security-state-of-the-azure-devops- marketplace/ • Hardening guidelines for Azure Pipelines https://learn.microsoft.com/en- us/azure/devops/organizations/security/security-best- practices?view=azure-devops#secure-azure-pipelines
  • 43. Useful resources • Azure Pipelines Tasks Zips https://github.com/jessehouwing/azure-pipelines-tasks-zips • RenovateBot for Azure Pipelines https://jessehouwing.net/azure-pipelines-enable-renovatebot/ • Azure DevOps Extension tasks https://marketplace.visualstudio.com/items?itemName=ms- devlabs.vsts-developer-tools-build-tasks