Palestra sobre desenvolvimento seguro de imagens e containers para a DockerCon 2021 sala Brasil

Overview

Segurança de imagens e containers direto na pipeline

Palestra sobre desenvolvimento seguro de imagens e containers para a DockerCon 2021 sala Brasil.

Índice

Ferramentas de segurança

Existem várias ferramentas de segurança e seus objetivos podem ser diferentes, seja especificas para linguagens ou frameworks ou seja especificas para quem esta utilizando, desenvolvedores, analistas de segurança, auditores de segurança e por ai vai.

Lembrando que estas ferramentas não excluem as ações manuais de cada um destes atores, algumas vulnerabilidades podem ser encontradas com ferramentas, enquanto outras necessitam de ações manuais, secure code review dos desenvolvedores e pentestes dos analistas de segurança e times de red team com mais contexto da aplicação e experiencia em segurança. Segue um grafico do OWASP Code Review Guide que mostra a importancia de cada tipo de analise: Screen Shot 2021-05-26 at 17 22 33

SCA

Software Composition Analysis, em português, analise de composição de software, provavelmente hoje você já trabalha com um sem saber! Este tipo de ferramenta faz uma analise em cima das bibliotecas e frameworks que são utilizados para construir um software, utilizando bancos de dados de vulnerabilidades como CVEs do MITRE e NVD, esta ferramentas conferem nestes bancos se as versões utilizadas das bibliotecas possuem vulnerabilidades conhecidas, que no caso é uma das vulnerabilidades que mais ocorrem na internet, segundo o ranking OWASP Top 10, que você deveria conhecer.

Hoje alguns provedores de serviços na web já utilizam esta ferramenta como padrão de projetos, como o Github, que verifica todo o seu projeto e traz alertas com o DependaBot sobre vulnerabilidades conhecidas que seu projeto esteja utilizando e também, muito conhecido o NPM, que verifica o package.json e traz informações sempre que você roda o npm deixando uma opção de resolver as vulnerabilidades automaticamente com o npm audit fix.

SAST

Static Application Security Testing, em portugês, teste de segurança em aplicações estaticas, o que quer dizer que as ferramentas analisam a sua aplicação para, que ainda não esta rodando, em resumo, olhando apenas o código de seus projetos. Estas ferramentas possuem padrões de código e conseguem identificar se o desenvolvedor escreveu algum código que possa ter vulnerabilidades quando estiver rodando, podemos comparar ele com as ferramentas de lint, porém no lugar de analisar o padrão de escrita do código, ele procura padrões que vão trazer problemas de segurança.

Existem várias ferramentas SAST, porque cada linguagem tem vulnerabilidades que podem acontecer mais do que outras, por exemplo em C podem ocorrer mais vulnerabilidades relacionadas a alocação de memoria do que projetos em Go, enquanto o projetos em Go são mais sucetiveis a Race Condition. A exemplos destas ferramentas temos GoSec(Golang), Bandit(Python) e Security Guard(C#). Segue um link com uma lista da OWASP com varios outras ferramentas: Lista de ferramentas SAST

Neste lista você também encontrara ferramentas como Horusec e Husky, que são automatizadores de ferramentas SAST, que rodam mais de um tipo de ferramentaa para projetos que tem mais de uma linguagem diferentes.

DAST

Dinamic Application Security Testing, em portugês, teste de segurança em aplicações dinamicas, basicamente só acontecem quando a aplicação já esta em funcionamento, visto que é mais facil testar algumas vulnerabilidades quando a aplicação esta realizando as operações. Muito usadas em pentest e por analistas de segurança, estas ferramentas facilitam alguns testes e ataques automatizados para provar que a aplicação é insegura. Lista da OWASP de ferramentas DASTs.

Estas ferramentas ainda não são muito utilizadas diretamente no pipeline devido sua complexidade e tempo de execução, mas recomendo conhecer e ir aplicando aos poucos na pipeline para fazer valer o slogan DevSecOps, onde os Devs podem aprender um pouco mais sobre as ferramentas utilizadas pelos analistas de segurança.

Ferramentas mais conhecidas Butp Suite, OWASP ZAP e Nuclei.

Show me the code

...

Owner
Fernando Guisso
By learning will teach; By teaching will learn.
Fernando Guisso
Covid-19-Trends - A project that me and my friends created as the CSC110 Final Project at UofT

Covid-19-Trends Introduction The COVID-19 pandemic has caused severe financial s

1 Jan 07, 2022
An example of python package

An example of python package Why use packages? It is a good practice to not code the same function twice, and to reuse common code from one python scr

10 Oct 18, 2022
Home Assistant integration for spanish electrical data providers (e.g., datadis)

homeassistant-edata Esta integración para Home Assistant te permite seguir de un vistazo tus consumos y máximas potencias alcanzadas. Para ello, se ap

VMG 163 Jan 05, 2023
Programming labs for 6.S060 (Foundations of Computer Security).

6.S060 Labs This git repository contains the code for the labs in 6.S060. In these labs, you will add a series of security features to a photo-sharing

MIT PDOS 10 Nov 02, 2022
Dyson Sphere Program Blueprint Toolkit

dspbptk This is dspbptk, the Dyson Sphere Program Blueprint toolkit. Dyson Sphere Program is an amazing factory-building game by the incredibly talent

Johannes Bauer 22 Nov 15, 2022
A brainfuck-based game oriented language written in python.

GF.py STILL WIP Gamefuck.py is a programming language based off brainfuck. It is oriented towards game development, and as such has many commands spec

Xenon 1 Feb 23, 2022
MiniJVM is simple java virtual machine written by python language, it can load class file from file system and run it.

MiniJVM MiniJVM是一款使用python编写的简易JVM,能够从本地加载class文件并且执行绝大多数指令。 支持的功能 1.从本地磁盘加载class并解析 2.支持绝大多数指令集的执行 3.支持虚拟机内存分区以及对象的创建 4.支持方法的调用和参数传递 5.支持静态代码块的初始化 不支

keguoyu 60 Apr 01, 2022
Battle-Ship - Python-console battle ship

Battle-Ship this SHOULD work in lenux(if i spelled it wrong spam issues till I fix it) the thing that maby wont work is where it clears the screen the

pl608 2 Jan 06, 2022
Senator Stock Trading Tester

Senator Stock Trading Tester Program to compare stock performance of Senator's transactions vs when the sale is disclosed. Using to find if tracking S

Cole Cestaro 1 Dec 07, 2021
A collection of daily usage utility scripts in python. Helps in automation of day to day repetitive tasks.

Kush's Utils Tool is my personal collection of scripts which is used to automated daily tasks. It is a evergrowing collection of scripts and will continue to evolve till the day I program. This is al

Kushagra 10 Jan 16, 2022
A self contained invitation management system for gatekeeping.

Invitease Description A self contained invitation management system for gatekeeping. Purpose Serves as a focal point for inviting guests to a venue pr

מעגן מיכאל 7 Jul 19, 2022
dta Convert Dict To Attributes!

dta (Dict to Attributes) dta is very small dict (or json) to attributes converter. It is only have 1 files and applied to every python versions.

Rukchad Wongprayoon 0 Dec 31, 2021
Scraper pour les offres de stage Tesla et les notes sur Oasis (Polytech Paris-Saclay) sous forme de bot Discord

Scraper pour les offres de stage Tesla et les notes sur Oasis (Polytech Paris-Saclay) sous forme de bot Discord

Alexandre Malfreyt 1 Jan 21, 2022
Blender addons - A collection of Blender tools I've written for myself over the years.

gret A collection of Blender tools I've written for myself over the years. I use these daily so they should be bug-free, mostly. Feel free to take and

217 Jan 08, 2023
A script to generate NFT art living on the Solana blockchain.

NFT Generator This script generates NFT art based on its desired traits with their specific rarities. It has been used to generate the full collection

Rude Golems 24 Oct 08, 2022
Slimbook Battery 4 is the new version with new features that improves battery control and increases battery duration in laptops.

Slimbookbattery Slimbook Battery 4 is the new version with new features that improves battery control and increases battery duration in laptops. This

SLIMBOOK TEAM 128 Dec 28, 2022
Sentiment Based Product Recommendation System

Sentiment Based Product Recommendation System The e-commerce business is quite p

Sumit Sahay 2 Jan 15, 2022
Python screenshot library, replacement for the Pillow ImageGrab module on Linux.

tldr: Use Pillow The pyscreenshot module is obsolete in most cases. It was created because PIL ImageGrab module worked on Windows only, but now Linux

455 Dec 24, 2022
Python package for reference counting native pointers

refcount master: testing: This package is primarily for managing resources in native libraries, written for instance in C++, from Python. While it boi

CSIRO Hydroinformatics 2 Nov 03, 2022
Simple but maybe too simple config management through python data classes. We use it for machine learning.

👩‍✈️ Coqpit Simple, light-weight and no dependency config handling through python data classes with to/from JSON serialization/deserialization. Curre

coqui 67 Nov 29, 2022