DevSecOps - Background, Status
and Future Challenges
F. Ozgur Catak
University of Stavanger
https://github.com/ocatak/devsecops-tutorial
DevOps
A philosophy, aims at building up a
culture of collaboration between
originally isolated teams.
Departments
โ€ขSoftware development
โ€ขdeployment operations
Improving the efficiency by eliminating the boundaries between
these two phases of development.
Includes
Continuous integration, where the coding, building, integration, and testing
processes are carried out.
Continuous delivery, which includes continuous integration but mainly focuses on
product delivery.
Continuous deployment, which aims at automating project deliveries.
Development
IT
Operations
Quality
Assurance
Defining DevOps: C-A-M-S
CULTURE AUTOMATION MEASUREMENT SHARING
Culture
INTERACTION TARGET TEAMS
DEVELOPMENT - OPERATION
โ€ข Primary charactheristics of DevOps culture: Increased collaborations
โ€ข Dev-Ops interact for a single target: to break down the barries
Automation
FEEDBACK PROCESS TOOLS FOR
COLLABORAION
โ€ข Keyword: automation
โ€ข Speed-up feedback between teams
โ€ข The app will be delivered to the customers easily and successfully.
โ€ข DevOps pipeline: flow of information
โ€ข New functionality in the app.
โ€ข New library, New attack surface, SQLi?
Measurement
PERFORMANCE MEASUREMENT BOTTLENECKS
โ€ข Track improvement
โ€ข See bottlenecks/problems easily
โ€ข Performance of the production system
โ€ข Production system didnโ€™t degraded anything like response time,
Sharing
IDEA SHARING TALK
โ€ข Sharing ideas, problems, and solutions between various teams
โ€ข By transfering the knowledge, the collective intelligence increases and
benefits for everyone.
DevOps Lifecycle
โ€ข 8 stages in the
โ€ข Planing
โ€ข Development
โ€ข Operation
DevOps Tools
and
Technologies
Version control systems: Git, SVN,
Mercurial, etc.
Continuous integration (CI): Jenkins and
TeamCity
Containers: Docker or Vagrant.
Framework automation tools: Python,
Shell, or Bash.
Cloud services: Microsoft Azure, Google
Cloud, Amazon Web Services
Traditional Security Perspective: Penetration testing
A pentest or ethical hacking, is an authorized
simulated cyberattack on a computer system,
performed to evaluate the security of the system;
The test is performed to identify weaknesses (or
vulnerabilities), including the potential for
unauthorized parties to gain access to the system's
features and data
Carrying out an ethical hack involves duplicating
strategies and actions of malicious attackers.
Ethical hacking = Penetration testing
DevSecOps: whatโ€™s and differences from DevOps?
โ€ข It is a philosophy of integrating security methods into a DevOps process.
โ€ข From the very start of a SDLC, DevSecOps works to make the application secure by introducing a variety of
security techniques.
โ€ข DevOps heavily relies on automation. The same is true for DevSecOps, which aims at automating every
aspect, including security audit.
DevOps
Dev
IT Op
Qua.
Assur
DevSecOps
Dev
IT Op
Qua.
Assu
r
Sec
Why DevSecOps
Companies implementing DevSecOps address vulnerabilities faster
than others
Higher speed and agility: security teams
Quality and compliance assurance
Implement, Educate & Follow best practices for secure coding and
infrastructure provisioning/ deployment / configuration.
DevSecOps: Securing CI/CD
Integrating security in the CI/CD pipeline which helps
minimizing threats/vulnerabilities with every code check in.
Automation of security part.
โ€ข Minimize the manual Pentest effort.
To bridge the gap between Dev. Sec and Ops teams
DevSecOps:
Upcoming
hot buzz
As DevOps & agile enables speed, it comes
with risk as well.
Frequent code changes, expanding attack
surfaces, day by day growing number of
hacks is building the market for DevSecOps
80% of threats & vulnerabilities can be
tackled if we enable DevSecOps (20%
effort). Famous 80/20 rules or โ€œPareto
principleโ€
Cloud Security Alliance: The Six Pillars of DevSecOps:
Automation
COLLECTIVE
RESPONSIBILITY
COLLABORATION AND
INTEGRATION
PRAGMATIC
IMPLEMENTATION
BRIDGING
COMPLIANCE AND
DEVELOPMENT
AUTOMATION
MEASURE, MONITOR,
REPORT AND ACTION
https://cloudsecurityalliance.org/press-releases/2020/07/07/cloud-security-alliance-publishes-new-paper-the-six-pillars-of-
devsecops-automation/
The Cloud Security Alliance (CSA) is the world's leading organization dedicated to defining and raising awareness of best
practices to help ensure a secure cloud computing environment.
Why do we need DevSecOps
MAINTAIN COMPLIANCE /
REGULATORY REQUIREMENT
SECURITY AUTOMATION /
MINIMIZE SECURITY
BOTTLENECKS
Gartner Report: 10 Things to Get Right for Successful DevSecOps
โ€ข implement and maintain the compliance reqirements
โ€ข minimize security bottlenecks also automate the
security checks
โ€ข collaborate with Information security team in the
upcoming future by 2021
Practical Transitioning from DevOps to DevSecOps
Static Application Security Testing (SAST)
โ€ข White-box security testing
โ€ข Access to the underlying framework,
design, and implementation
โ€ข The app is tested from the inside out
โ€ข It is developer approach
โ€ข Finds vulnerabilities earlier in the SDLC
โ€ข Less expensive to fix vulnerabilities
โ€ข Canโ€™t discover run-time and environment
related issues (like configuration
vulnerabilities)
Dynamic Application Security Testing (DAST)
โ€ข Black-box security testing
โ€ข The tester doesnโ€™t know the
technologies or frameworks of the app
โ€ข The app is tested from the outside in
โ€ข It is hacker approach
โ€ข Finds vulnerabilities toward the end of the
SDLC
โ€ข More expensive to fix vulnerabilities
โ€ข Can discover run-time and environment
related issues (like configuration
vulnerabilities)
DevOps vs DevSecOps
โ€ข Traditional Build Phases โ€ข Future Build Phases
DevSecOps Practical
Implementation
https://github.com/ocatak/devsecops-tutorial
http://www.ozgurcatak.org/devsecops-tutorial/
Example Web Application: DevSecOps
SAST
Static application
security testing
DAST
Dynamic application
security testing
Container
Security
Deployment
Development
Push
Pipeline
https://github.com/ocatak/devsecops-tutorial
GitHub repository for the lecture at University of Stavanger
Jenkins: Pipeline Creation
Source Code Security (GitHub)
โ€ข Browsing security vulnerability in the GitHub
Advisory DB
โ€ข https://github.com/advisories : It allows you to
browse or search for vulnerabilities which affect
open source projects on GitHub
โ€ข Below sources are used for vulnerabilities by
GitHub
โ€ข The National Vulnerability Database
โ€ข A combination of machine learning and human
review to detect vulnerabilities in public commits on
GitHub
โ€ข Security advisories on GitHub
โ€ข FriendsOfPHP
โ€ข Security alerts for vulnerable dependencies
โ€ข Automated security updates
โ€ข Update vulnerable dependencies in repository
โ€ข Managing alerts for vulnerable dependencies
in your organization
Example Web Application: DevSecOps
SAST
Static application
security testing
DAST
Dynamic application
security testing
Container
Security
Deployment
Development
Push
Pipeline
https://github.com/ocatak/devsecops-tutorial
GitHub repository for the lecture at University of Stavanger
DevSecOps: SAST - SonarQube
It is an open-source tool used for continuous inspection of code quality, static analysis of code to
detect bugs, code smells and security vulnerabilities on 20+ programming languages.
It provides reports on duplicated lines of code, coding standards, unit tests, coverage, code
complexity, comments, bugs etc.
Benefits of SonarQube
Reduces risks in software development within a short span of time, detects bugs in the code and automatically alerts
developers.
Receives all files as input , stores them in a database, analyses them with barriers and displays it in a dashboard.
It increases the productivity of Dev team by detecting duplicated & redundant code.
Dev Team receive regular feedback on quality issues and it helps them increase their programming skills.
Code quality becomes part of CI/CD & Development team.
Security flaws detection & remediation.
DevSecOps: SAST - SonarQube
1. git clone https://github.com/ocatak/SonarQube.git
2. sudo npm install sonarqube-scanner
3. Run SonarQube Docker image: docker-compose up โ€“d
4. GitHub: sonar-project.js
DevSecOps: SAST - SonarQube
In Jenkins, add a new item โ€œExecute Shellโ€
npm run sonar
DevSecOps: SAST - SNYK
โ€ข Lots of Multi-Ntional Companies are
protected by SNYK
โ€ข Google
โ€ข Microsoft
โ€ข Salesforce
โ€ข You can integrate it to your DevSecOps
pipeline
โ€ข Install snyk jenkins pluggin
โ€ข Create an account in snyk
โ€ข Create a token in snyk
โ€ข create a synk job and input the git
url for scanning,
โ€ข add it to build step.
โ€ข npm install -g snyk
โ€ข synk auth
DevSecOps: SAST - SNYK
DevSecOps: SAST - SNYK
Example Web Application: DevSecOps
SAST
Static application
security testing
DAST
Dynamic application
security testing
Container
Security
Deployment
Development
Push
Pipeline
https://github.com/ocatak/devsecops-tutorial
GitHub repository for the lecture at University of Stavanger
DevSecOps: DAST - ARACHNI
โ€ข Arachni is a feature-full, modular, high performance Ruby
framework aimed towards helping PenTesters and
administrators evaluate the security of modern web
applications.
โ€ข It is free, with its source code public and available for review.
โ€ข https://github.com/Arachni/arachni
DevSecOps: DAST - ARACHNI
https://github.com/Arachni/arachni/releases/download/v1.5.1/arachni-1.5.1-0.5.12-linux-x86_64.tar.gz
DevSecOps: DAST - ARACHNI
DevSecOps: DAST โ€“ OWASP ZAP
โ€ข Owasp-zap is one of the world's most popular free security tool and is
actively maintained by hundreds of international volunteers.
โ€ข It helps to find vulnerabilities automatically with every ci/cd build.
โ€ข One of the best free tool for experienced PenTesters to be used for
manual security testing.
DevSecOps: DAST โ€“ OWASP ZAP
Example Web Application: DevSecOps
SAST
Static application
security testing
DAST
Dynamic application
security testing
Container
Security
Deployment
Development
Push
Pipeline
https://github.com/ocatak/devsecops-tutorial
GitHub repository for the lecture at University of Stavanger
DevSecOps: Container Security - Anchore
โ€ข Anchore allows us to perform detailed
analysis on container images, run
queries, produce reports. Also we can
define our own policies that can be used
with CI/CD pipelines
DevSecOps: Container Security - Anchore
Example Web Application: DevSecOps
SAST
Static application
security testing
DAST
Dynamic application
security testing
Container
Security
Deployment
Development
Push
Pipeline
https://github.com/ocatak/devsecops-tutorial
GitHub repository for the lecture at University of Stavanger
What We Learned?
โ€ข Paradigm-shifting from time consuming Penetration testing Activities
to DevSecOps
โ€ข PenTesters use same/similar tools (Kali, Sqlmap, Arachni, Nmap,
Metasplot etc) to perform a security testing to find the vulnerabilities
โ€ข We can integrate them into our CI/CD Pipelines
โ€ข Speed-Up security checks
Future Challenges
โ€ข Complex Tool Integrations
โ€ข come from various vendors.
โ€ข Adding security tools makes things even more complex.
โ€ข time-consuming, labor-intensive approach is incompatible with DevOpsโ€™ high-
speed,
โ€ข Shifting security left in the SDLC
โ€ข Security principles apply to overall organization and not just to security
engineering teams.
โ€ข End-of-cycle security testing results in delays and vulnerabilities left in
production
Thank You
F. Ozgur Catak
f.ozgur.catak@gmail.com
https://www.ozgurcatak.org

DevSecOps - Background, Status and Future Challenges

  • 1.
    DevSecOps - Background,Status and Future Challenges F. Ozgur Catak University of Stavanger https://github.com/ocatak/devsecops-tutorial
  • 2.
    DevOps A philosophy, aimsat building up a culture of collaboration between originally isolated teams. Departments โ€ขSoftware development โ€ขdeployment operations Improving the efficiency by eliminating the boundaries between these two phases of development. Includes Continuous integration, where the coding, building, integration, and testing processes are carried out. Continuous delivery, which includes continuous integration but mainly focuses on product delivery. Continuous deployment, which aims at automating project deliveries. Development IT Operations Quality Assurance
  • 3.
    Defining DevOps: C-A-M-S CULTUREAUTOMATION MEASUREMENT SHARING
  • 4.
    Culture INTERACTION TARGET TEAMS DEVELOPMENT- OPERATION โ€ข Primary charactheristics of DevOps culture: Increased collaborations โ€ข Dev-Ops interact for a single target: to break down the barries
  • 5.
    Automation FEEDBACK PROCESS TOOLSFOR COLLABORAION โ€ข Keyword: automation โ€ข Speed-up feedback between teams โ€ข The app will be delivered to the customers easily and successfully. โ€ข DevOps pipeline: flow of information โ€ข New functionality in the app. โ€ข New library, New attack surface, SQLi?
  • 6.
    Measurement PERFORMANCE MEASUREMENT BOTTLENECKS โ€ขTrack improvement โ€ข See bottlenecks/problems easily โ€ข Performance of the production system โ€ข Production system didnโ€™t degraded anything like response time,
  • 7.
    Sharing IDEA SHARING TALK โ€ขSharing ideas, problems, and solutions between various teams โ€ข By transfering the knowledge, the collective intelligence increases and benefits for everyone.
  • 8.
    DevOps Lifecycle โ€ข 8stages in the โ€ข Planing โ€ข Development โ€ข Operation
  • 9.
    DevOps Tools and Technologies Version controlsystems: Git, SVN, Mercurial, etc. Continuous integration (CI): Jenkins and TeamCity Containers: Docker or Vagrant. Framework automation tools: Python, Shell, or Bash. Cloud services: Microsoft Azure, Google Cloud, Amazon Web Services
  • 10.
    Traditional Security Perspective:Penetration testing A pentest or ethical hacking, is an authorized simulated cyberattack on a computer system, performed to evaluate the security of the system; The test is performed to identify weaknesses (or vulnerabilities), including the potential for unauthorized parties to gain access to the system's features and data Carrying out an ethical hack involves duplicating strategies and actions of malicious attackers. Ethical hacking = Penetration testing
  • 11.
    DevSecOps: whatโ€™s anddifferences from DevOps? โ€ข It is a philosophy of integrating security methods into a DevOps process. โ€ข From the very start of a SDLC, DevSecOps works to make the application secure by introducing a variety of security techniques. โ€ข DevOps heavily relies on automation. The same is true for DevSecOps, which aims at automating every aspect, including security audit. DevOps Dev IT Op Qua. Assur DevSecOps Dev IT Op Qua. Assu r Sec
  • 12.
    Why DevSecOps Companies implementingDevSecOps address vulnerabilities faster than others Higher speed and agility: security teams Quality and compliance assurance Implement, Educate & Follow best practices for secure coding and infrastructure provisioning/ deployment / configuration.
  • 13.
    DevSecOps: Securing CI/CD Integratingsecurity in the CI/CD pipeline which helps minimizing threats/vulnerabilities with every code check in. Automation of security part. โ€ข Minimize the manual Pentest effort. To bridge the gap between Dev. Sec and Ops teams
  • 14.
    DevSecOps: Upcoming hot buzz As DevOps& agile enables speed, it comes with risk as well. Frequent code changes, expanding attack surfaces, day by day growing number of hacks is building the market for DevSecOps 80% of threats & vulnerabilities can be tackled if we enable DevSecOps (20% effort). Famous 80/20 rules or โ€œPareto principleโ€
  • 15.
    Cloud Security Alliance:The Six Pillars of DevSecOps: Automation COLLECTIVE RESPONSIBILITY COLLABORATION AND INTEGRATION PRAGMATIC IMPLEMENTATION BRIDGING COMPLIANCE AND DEVELOPMENT AUTOMATION MEASURE, MONITOR, REPORT AND ACTION https://cloudsecurityalliance.org/press-releases/2020/07/07/cloud-security-alliance-publishes-new-paper-the-six-pillars-of- devsecops-automation/ The Cloud Security Alliance (CSA) is the world's leading organization dedicated to defining and raising awareness of best practices to help ensure a secure cloud computing environment.
  • 16.
    Why do weneed DevSecOps MAINTAIN COMPLIANCE / REGULATORY REQUIREMENT SECURITY AUTOMATION / MINIMIZE SECURITY BOTTLENECKS Gartner Report: 10 Things to Get Right for Successful DevSecOps โ€ข implement and maintain the compliance reqirements โ€ข minimize security bottlenecks also automate the security checks โ€ข collaborate with Information security team in the upcoming future by 2021
  • 17.
    Practical Transitioning fromDevOps to DevSecOps Static Application Security Testing (SAST) โ€ข White-box security testing โ€ข Access to the underlying framework, design, and implementation โ€ข The app is tested from the inside out โ€ข It is developer approach โ€ข Finds vulnerabilities earlier in the SDLC โ€ข Less expensive to fix vulnerabilities โ€ข Canโ€™t discover run-time and environment related issues (like configuration vulnerabilities) Dynamic Application Security Testing (DAST) โ€ข Black-box security testing โ€ข The tester doesnโ€™t know the technologies or frameworks of the app โ€ข The app is tested from the outside in โ€ข It is hacker approach โ€ข Finds vulnerabilities toward the end of the SDLC โ€ข More expensive to fix vulnerabilities โ€ข Can discover run-time and environment related issues (like configuration vulnerabilities)
  • 18.
    DevOps vs DevSecOps โ€ขTraditional Build Phases โ€ข Future Build Phases
  • 19.
  • 20.
    Example Web Application:DevSecOps SAST Static application security testing DAST Dynamic application security testing Container Security Deployment Development Push Pipeline https://github.com/ocatak/devsecops-tutorial GitHub repository for the lecture at University of Stavanger
  • 21.
  • 22.
    Source Code Security(GitHub) โ€ข Browsing security vulnerability in the GitHub Advisory DB โ€ข https://github.com/advisories : It allows you to browse or search for vulnerabilities which affect open source projects on GitHub โ€ข Below sources are used for vulnerabilities by GitHub โ€ข The National Vulnerability Database โ€ข A combination of machine learning and human review to detect vulnerabilities in public commits on GitHub โ€ข Security advisories on GitHub โ€ข FriendsOfPHP โ€ข Security alerts for vulnerable dependencies โ€ข Automated security updates โ€ข Update vulnerable dependencies in repository โ€ข Managing alerts for vulnerable dependencies in your organization
  • 23.
    Example Web Application:DevSecOps SAST Static application security testing DAST Dynamic application security testing Container Security Deployment Development Push Pipeline https://github.com/ocatak/devsecops-tutorial GitHub repository for the lecture at University of Stavanger
  • 24.
    DevSecOps: SAST -SonarQube It is an open-source tool used for continuous inspection of code quality, static analysis of code to detect bugs, code smells and security vulnerabilities on 20+ programming languages. It provides reports on duplicated lines of code, coding standards, unit tests, coverage, code complexity, comments, bugs etc. Benefits of SonarQube Reduces risks in software development within a short span of time, detects bugs in the code and automatically alerts developers. Receives all files as input , stores them in a database, analyses them with barriers and displays it in a dashboard. It increases the productivity of Dev team by detecting duplicated & redundant code. Dev Team receive regular feedback on quality issues and it helps them increase their programming skills. Code quality becomes part of CI/CD & Development team. Security flaws detection & remediation.
  • 25.
    DevSecOps: SAST -SonarQube 1. git clone https://github.com/ocatak/SonarQube.git 2. sudo npm install sonarqube-scanner 3. Run SonarQube Docker image: docker-compose up โ€“d 4. GitHub: sonar-project.js
  • 26.
    DevSecOps: SAST -SonarQube In Jenkins, add a new item โ€œExecute Shellโ€ npm run sonar
  • 27.
    DevSecOps: SAST -SNYK โ€ข Lots of Multi-Ntional Companies are protected by SNYK โ€ข Google โ€ข Microsoft โ€ข Salesforce โ€ข You can integrate it to your DevSecOps pipeline โ€ข Install snyk jenkins pluggin โ€ข Create an account in snyk โ€ข Create a token in snyk โ€ข create a synk job and input the git url for scanning, โ€ข add it to build step. โ€ข npm install -g snyk โ€ข synk auth
  • 28.
  • 29.
  • 30.
    Example Web Application:DevSecOps SAST Static application security testing DAST Dynamic application security testing Container Security Deployment Development Push Pipeline https://github.com/ocatak/devsecops-tutorial GitHub repository for the lecture at University of Stavanger
  • 31.
    DevSecOps: DAST -ARACHNI โ€ข Arachni is a feature-full, modular, high performance Ruby framework aimed towards helping PenTesters and administrators evaluate the security of modern web applications. โ€ข It is free, with its source code public and available for review. โ€ข https://github.com/Arachni/arachni
  • 32.
    DevSecOps: DAST -ARACHNI https://github.com/Arachni/arachni/releases/download/v1.5.1/arachni-1.5.1-0.5.12-linux-x86_64.tar.gz
  • 33.
  • 34.
    DevSecOps: DAST โ€“OWASP ZAP โ€ข Owasp-zap is one of the world's most popular free security tool and is actively maintained by hundreds of international volunteers. โ€ข It helps to find vulnerabilities automatically with every ci/cd build. โ€ข One of the best free tool for experienced PenTesters to be used for manual security testing.
  • 35.
  • 36.
    Example Web Application:DevSecOps SAST Static application security testing DAST Dynamic application security testing Container Security Deployment Development Push Pipeline https://github.com/ocatak/devsecops-tutorial GitHub repository for the lecture at University of Stavanger
  • 37.
    DevSecOps: Container Security- Anchore โ€ข Anchore allows us to perform detailed analysis on container images, run queries, produce reports. Also we can define our own policies that can be used with CI/CD pipelines
  • 38.
  • 39.
    Example Web Application:DevSecOps SAST Static application security testing DAST Dynamic application security testing Container Security Deployment Development Push Pipeline https://github.com/ocatak/devsecops-tutorial GitHub repository for the lecture at University of Stavanger
  • 40.
    What We Learned? โ€ขParadigm-shifting from time consuming Penetration testing Activities to DevSecOps โ€ข PenTesters use same/similar tools (Kali, Sqlmap, Arachni, Nmap, Metasplot etc) to perform a security testing to find the vulnerabilities โ€ข We can integrate them into our CI/CD Pipelines โ€ข Speed-Up security checks
  • 41.
    Future Challenges โ€ข ComplexTool Integrations โ€ข come from various vendors. โ€ข Adding security tools makes things even more complex. โ€ข time-consuming, labor-intensive approach is incompatible with DevOpsโ€™ high- speed, โ€ข Shifting security left in the SDLC โ€ข Security principles apply to overall organization and not just to security engineering teams. โ€ข End-of-cycle security testing results in delays and vulnerabilities left in production
  • 42.
    Thank You F. OzgurCatak f.ozgur.catak@gmail.com https://www.ozgurcatak.org