SlideShare a Scribd company logo
1 of 57
Download to read offline
Snyk’s
Developer Security Essentials
Liran Tal
Snyk
Liran Tal
@liran_tal
Developer Advocate @Snyk
Node.js Foundation
ecosystem security working group
Reach out on Twitter and say hi 👋
OWASP Project Lead
GitHub Star
@liran_tal
Introduction to Open Source Security
Meet Snyk:
Practical Developer-first Security Tooling
Key
Learning
Objectives Play the Hacker 🎩
@liran_tal
Developer-first Security
because that’s the only sustainable path to
application security
@liran_tal
Application’s Security Risks
Open Source
Libraries
Containers
App Code
IaC
Relying on open source software.
What’s your security and compliance strategy?
100s of Linux packages, and their
vulnerabilities, inherited with base images
#1 cloud vulnerability is misconfiguration [NSA]
Deployed daily - waterfall approach doesn’t
scale. Scans can’t take hours.
10-20% of
codebase
80-90% of
codebase
Snyk Code Snyk Open Source Snyk Container Snyk IaC
Empowerment Extensibility Governance
Application intelligence Security intelligence
Developer Experience
Developer Security Platform
Snyk
Code
@liran_tal
App Code
exports.admin = function (req, res, next) {
User.find(
{
username: req.body.username,
password: req.body.password
},
function (err, users) {}
);
@liran_tal
App Code
exports.admin = function (req, res, next) {
User.find(
{
username: req.body.username,
password: req.body.password
},
function (err, users) {}
);
Security issues in this code?
Snyk
Open
Source
@liran_tal
Open Source Code
source: https://snyk.io/open-source-security
@liran_tal
Open Source Code
source: https://snyk.io/open-source-security
@liran_tal
Open Source Code
@liran_tal
Open Source Code
80-90% of code-base is open-source
80% of vulnerabilities found in transitive
dependencies
@liran_tal
Open Source Code
dust.escapeHtml = function(s) {
if (typeof s === "string" {
if (!HCHARS.test(s)) {
return s;
}
return s.replace(QUOT,'"').replace(SQUOT, ''');
}
return s;
};
@liran_tal
Your App
Your Code
const marked = require('marked');
app.locals.marked = marked;
Open Source Code
@liran_tal
Open-Source Supply Chain Security
event-stream
💀 flatmap-stream
//2018
Open Source Code
@liran_tal
Snyk app
Open Source Code
Snyk
Container
@liran_tal
FROM node
RUN apt-get update
RUN apt-get install -y imagemagick
COPY . /usr/src/goof
WORKDIR /usr/src/goof
RUN npm install
CMD ["npm", "start"]
Big image, many
(vulnerable) libraries?
Containers
@liran_tal
source: https://snyk.io/open-source-security
@liran_tal
FROM node
RUN apt-get update
RUN apt-get install -y imagemagick
COPY . /usr/src/goof
WORKDIR /usr/src/goof
RUN npm install
CMD ["npm", "start"]
Common software
vulnerable?
Containers
@liran_tal
Your Node.js App Attack Surface
Just Got Bigger
@liran_tal
https://app.snyk.io
Open Source Code
@liran_tal
https://app.snyk.io
App repository
continuously scanned
Open Source Code
@liran_tal
https://app.snyk.io
???
Open Source Code
@liran_tal
https://app.snyk.io
???
Containers
@liran_tal
https://app.snyk.io
Containers
Snyk
Infrastructure
as Code
@liran_tal
Containers, FaaS
& Static Sites
@liran_tal
Open-Source Supply Chain Security
💀 electron-native-notify
2019
Open Source Code
@liran_tal
Open-Source Supply Chain Security
💀 electron-native-notify
2019
Open Source Code
@liran_tal
Open-Source Supply Chain Security
Open Source Code
source: https://snyk.io/advisor/npm-package/marked
@liran_tal
Breakout 1:
Let’s hack a Node.js application!
@liran_tal
An Open Source Library
const marked = require('marked');
app.locals.marked = marked;
<div class="item">
<a href="/edit/<%= todo._id %>">
<%- marked(new String(todo.content)) %>
</a>
</div>
we will exploit:
Let’s hack a Node.js application!
@liran_tal
Container Common
Software
RUN apt-get update
RUN apt-get install -y imagemagick
we will exploit:
An Open Source Library
Let’s hack a Node.js application!
@liran_tal
Container Node.js runtime
FROM node
we will exploit:
Container Common
Software
An Open Source Library
Let’s hack a Node.js application!
@liran_tal
Woohoo
That was fun!
What can I do about it… ?
@liran_tal
From DevOps To DevSecOps
CI/CD
Git repository
Traditional/PaaS
Serverless
Production
DevSecOps:
Continuous Security, Integrated
throughout DevOps
Registry
deploy
Security
gate
Code
Test & fix
Test, fix,
monitor
Kubernetes
Monitor & more...
build
submit
Test, fix,
monitor
@liran_tal
Snyk
Open Source ejs-locals@1.1.0
@liran_tal
Scanning projects
Filtering vulnerabilities
Snyk
Open Source
How to prioritize the noise?
Grouped fixes
Visualizing a Dependency Tree
Self exploration: GitHub Settings & Dep Upgrades
@liran_tal
Snyk CLI
@liran_tal
Filters the noise, “take home” with --json
Agnostic
Snyk CLI Use it as a linter
Tip: can run code and container scans too
Tip: can scan many ecosystem manifests
Tip: ad-hoc scan an npm package@version
@liran_tal
Filters the noise, “take home” with --json
Agnostic
Snyk CLI Use it as a linter
Tip: can run code and container scans too
Tip: can scan many ecosystem manifests
Tip: ad-hoc scan an npm package@version
@liran_tal
Snyk Code
@liran_tal
SAST Real-time code security
Find hard-coded secrets
Snyk Code
Recommended fixes knowledge-base
@liran_tal
Security Resources ctd’
How do you assess a dependency?
@liran_tal source: https://snyk.io/advisor/npm-package/moment
@liran_tal source: https://deps.dev
What is a CTF?
Capture the Flag (CTF) is a competition where
teams and individuals compete to solve
security challenges.
● You win by solving the most challenges the
fastest.
CTFs gamify security education, making it fun
and hands-on.
● Participants often exploit vulnerabilities in
webpages or servers to uncover flags.
Nov 2:
CTF 101 Workshop
—
Nov 9:
Fetch the Flag CTF
Let’s Hack!
Develop fast.
Stay secure.
Fix vulns, score points, get
the high score
Supported Languages:
● C#
● Go
● Java
● JavaScript
● PHP
● Python
● Ruby
● TypeScript
Ground Rules:
● Must be GitHub
● Must be Public
● Let’s make a REAL difference
The Developer Challenge
https://nodeconf.snykchallenge.io/
@liran_tal
Takeaways
Your infrastructure is just as vulnerable,
take measures to monitor and fix it
@liran_tal
Code Securely!
Security cheatsheets and more resources:
https://snyk.io/blog
Thank you
Snyk
liran_tal

More Related Content

What's hot

What's hot (20)

Slide DevSecOps Microservices
Slide DevSecOps Microservices Slide DevSecOps Microservices
Slide DevSecOps Microservices
 
Practical DevSecOps Course - Part 1
Practical DevSecOps Course - Part 1Practical DevSecOps Course - Part 1
Practical DevSecOps Course - Part 1
 
DevSecOps Jenkins Pipeline -Security
DevSecOps Jenkins Pipeline -SecurityDevSecOps Jenkins Pipeline -Security
DevSecOps Jenkins Pipeline -Security
 
Static Analysis Security Testing for Dummies... and You
Static Analysis Security Testing for Dummies... and YouStatic Analysis Security Testing for Dummies... and You
Static Analysis Security Testing for Dummies... and You
 
2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures2019 DevSecOps Reference Architectures
2019 DevSecOps Reference Architectures
 
DevSecOps: What Why and How : Blackhat 2019
DevSecOps: What Why and How : Blackhat 2019DevSecOps: What Why and How : Blackhat 2019
DevSecOps: What Why and How : Blackhat 2019
 
Software Composition Analysis Deep Dive
Software Composition Analysis Deep DiveSoftware Composition Analysis Deep Dive
Software Composition Analysis Deep Dive
 
Introduction to DevSecOps
Introduction to DevSecOpsIntroduction to DevSecOps
Introduction to DevSecOps
 
Implementing an Application Security Pipeline in Jenkins
Implementing an Application Security Pipeline in JenkinsImplementing an Application Security Pipeline in Jenkins
Implementing an Application Security Pipeline in Jenkins
 
DevSecOps in Baby Steps
DevSecOps in Baby StepsDevSecOps in Baby Steps
DevSecOps in Baby Steps
 
SAST (Static Application Security Testing) vs. SCA (Software Composition Anal...
SAST (Static Application Security Testing) vs. SCA (Software Composition Anal...SAST (Static Application Security Testing) vs. SCA (Software Composition Anal...
SAST (Static Application Security Testing) vs. SCA (Software Composition Anal...
 
DevSecOps
DevSecOpsDevSecOps
DevSecOps
 
[DevSecOps Live] DevSecOps: Challenges and Opportunities
[DevSecOps Live] DevSecOps: Challenges and Opportunities[DevSecOps Live] DevSecOps: Challenges and Opportunities
[DevSecOps Live] DevSecOps: Challenges and Opportunities
 
Benefits of DevSecOps
Benefits of DevSecOpsBenefits of DevSecOps
Benefits of DevSecOps
 
DevSecOps 101
DevSecOps 101DevSecOps 101
DevSecOps 101
 
DevSecOps and the CI/CD Pipeline
 DevSecOps and the CI/CD Pipeline DevSecOps and the CI/CD Pipeline
DevSecOps and the CI/CD Pipeline
 
Security Process in DevSecOps
Security Process in DevSecOpsSecurity Process in DevSecOps
Security Process in DevSecOps
 
DevSecOps Beginners Guide : How to secure process in DevOps with OpenSource
DevSecOps Beginners Guide : How to secure process in DevOps with OpenSourceDevSecOps Beginners Guide : How to secure process in DevOps with OpenSource
DevSecOps Beginners Guide : How to secure process in DevOps with OpenSource
 
IBM AppScan - the total software security solution
IBM AppScan - the total software security solutionIBM AppScan - the total software security solution
IBM AppScan - the total software security solution
 
DevSecOps What Why and How
DevSecOps What Why and HowDevSecOps What Why and How
DevSecOps What Why and How
 

Similar to Snyk Intro - Developer Security Essentials 2022

михаил дударев
михаил дударевмихаил дударев
михаил дударев
apps4allru
 
EMBA Firmware analysis - TROOPERS22
EMBA Firmware analysis - TROOPERS22EMBA Firmware analysis - TROOPERS22
EMBA Firmware analysis - TROOPERS22
MichaelM85042
 

Similar to Snyk Intro - Developer Security Essentials 2022 (20)

stackconf 2021 | Continuous Security – integrating security into your pipelines
stackconf 2021 | Continuous Security – integrating security into your pipelinesstackconf 2021 | Continuous Security – integrating security into your pipelines
stackconf 2021 | Continuous Security – integrating security into your pipelines
 
Stranger Danger: Securing Third Party Components (Tech2020)
Stranger Danger: Securing Third Party Components (Tech2020)Stranger Danger: Securing Third Party Components (Tech2020)
Stranger Danger: Securing Third Party Components (Tech2020)
 
The Hacking Games - Operation System Vulnerabilities Meetup 29112022
The Hacking Games - Operation System Vulnerabilities Meetup 29112022The Hacking Games - Operation System Vulnerabilities Meetup 29112022
The Hacking Games - Operation System Vulnerabilities Meetup 29112022
 
михаил дударев
михаил дударевмихаил дударев
михаил дударев
 
Securing containers by Breaking In - Liran Tal - DevSecCon Tel Aviv 2019
Securing containers by Breaking In - Liran Tal - DevSecCon Tel Aviv 2019Securing containers by Breaking In - Liran Tal - DevSecCon Tel Aviv 2019
Securing containers by Breaking In - Liran Tal - DevSecCon Tel Aviv 2019
 
Demystify Information Security & Threats for Data-Driven Platforms With Cheta...
Demystify Information Security & Threats for Data-Driven Platforms With Cheta...Demystify Information Security & Threats for Data-Driven Platforms With Cheta...
Demystify Information Security & Threats for Data-Driven Platforms With Cheta...
 
OWASP Workshop: Docker Image Security Best Practices by Liran Tal - January 2020
OWASP Workshop: Docker Image Security Best Practices by Liran Tal - January 2020OWASP Workshop: Docker Image Security Best Practices by Liran Tal - January 2020
OWASP Workshop: Docker Image Security Best Practices by Liran Tal - January 2020
 
Pragmatic Pipeline Security
Pragmatic Pipeline SecurityPragmatic Pipeline Security
Pragmatic Pipeline Security
 
Next Generation Vulnerability Assessment Using Datadog and Snyk
Next Generation Vulnerability Assessment Using Datadog and SnykNext Generation Vulnerability Assessment Using Datadog and Snyk
Next Generation Vulnerability Assessment Using Datadog and Snyk
 
AWS live hack: Atlassian + Snyk OSS on AWS
AWS live hack: Atlassian + Snyk OSS on AWSAWS live hack: Atlassian + Snyk OSS on AWS
AWS live hack: Atlassian + Snyk OSS on AWS
 
The Emergent Cloud Security Toolchain for CI/CD
The Emergent Cloud Security Toolchain for CI/CDThe Emergent Cloud Security Toolchain for CI/CD
The Emergent Cloud Security Toolchain for CI/CD
 
AWS live hack: Docker + Snyk Container on AWS
AWS live hack: Docker + Snyk Container on AWSAWS live hack: Docker + Snyk Container on AWS
AWS live hack: Docker + Snyk Container on AWS
 
EMBA Firmware analysis - TROOPERS22
EMBA Firmware analysis - TROOPERS22EMBA Firmware analysis - TROOPERS22
EMBA Firmware analysis - TROOPERS22
 
The DevSecOps Builder’s Guide to the CI/CD Pipeline
The DevSecOps Builder’s Guide to the CI/CD PipelineThe DevSecOps Builder’s Guide to the CI/CD Pipeline
The DevSecOps Builder’s Guide to the CI/CD Pipeline
 
Maturing DevSecOps: From Easy to High Impact
Maturing DevSecOps: From Easy to High ImpactMaturing DevSecOps: From Easy to High Impact
Maturing DevSecOps: From Easy to High Impact
 
Making Security Agile
Making Security AgileMaking Security Agile
Making Security Agile
 
Deep dive nella supply chain della nostra infrastruttura cloud
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 cloud
 
Droidcon it-2014-marco-grassi-viaforensics
Droidcon it-2014-marco-grassi-viaforensicsDroidcon it-2014-marco-grassi-viaforensics
Droidcon it-2014-marco-grassi-viaforensics
 
How to Use Open Source Tools to Improve Network Security
How to Use Open Source Tools to Improve Network SecurityHow to Use Open Source Tools to Improve Network Security
How to Use Open Source Tools to Improve Network Security
 
All You need to Know about Secure Coding with Open Source Software
All You need to Know about Secure Coding with Open Source SoftwareAll You need to Know about Secure Coding with Open Source Software
All You need to Know about Secure Coding with Open Source Software
 

Recently uploaded

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 

Recently uploaded (20)

WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in UgandaWSO2CON 2024 - Building a Digital Government in Uganda
WSO2CON 2024 - Building a Digital Government in Uganda
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million PeopleWSO2Con2024 - Unleashing the Financial Potential of 13 Million People
WSO2Con2024 - Unleashing the Financial Potential of 13 Million People
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid EnvironmentsWSO2Con2024 - Software Delivery in Hybrid Environments
WSO2Con2024 - Software Delivery in Hybrid Environments
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - Kanchana
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration ToolingWSO2Con2024 - Low-Code Integration Tooling
WSO2Con2024 - Low-Code Integration Tooling
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 

Snyk Intro - Developer Security Essentials 2022