当前位置: 首页 > news >正文

Securing Your DevOps Pipelines - 2

Securing Your DevOps Pipelines

DevSecOps Tools

3.1 Learn about SAST

Static Application Security Testing

image-20251022174305714

Also known as source code analysis.

The program doesn't have to be running.

Detect issues during software development.

Highlights bad code, by filename, location, line number.

White box testing method that lets you test before code runs.

SAST can used at any stage of the pipeline.

There are a number of questions you need to ask:

  • How do I manage false positives?
  • How do I triage the results?
  • What happens to new issues come up?
  • What do I do if the scan takes hours?

The first few test runs will throw a ton of errors.

Can't use this to test on staging or in production.

3.2 Use SAST tools

  • Horusec

  • HuskyCI

    image-20251022180547560

  • Snyk

  • Semgrep

  • SonarCloud

  • Insider

  • LGTM

You need to set the rules for what the tools will check for

  • Determine if dangerous APIs are in the code
  • Scan config files for potential security credentials
  • Check for different authentication patterns
  • Look for all exposed routes

Example of SAST implementation with HuskyCI

image-20251022180917699

image-20251022181206357

image-20251022181241672

3.3 Learn about DAST

image-20251022181350176

Black box testing method that lets you test code as it runs.

Applied on staging or in production.

Finds ways attackers could break into your system.

Tests all HTTP/HTTPS requests going into the application.

Find risks like cross-site scripting and SQL injections.

Commonly paired with a bug tracking system.

Running tests can take a long time.

Security experience is needed to understand the results.

It doesn't report where in the source code the issue is coming from.

Can be run in any environment that the app is in

3.4 Use DAST tools

  • Veracode
  • PortSwigger
  • Burp Suite
  • Tenable.io
  • HCL AppScan
  • Nuclei

image-20251022183922758

  • OWASP ZAP

Example of DAST implementation with Nuclei

image-20251022184125995

image-20251023095914070

3.5 Learn about IAST

Interactive Application Security Testing

image-20251023100746285

2 types of IAST

Passive

Passive IAST is like an extension of SAST.

Dynamic

Active IAST is like DAST in your code.

Operates as an gent inside the application.

Continually analyzes a running application.

Can slow down the operation of the application.

Analyzes the complied code, any requests, third party interactions.

Advantage over DAST by running in CI/CD

Great for API testing

Eliminates almost all false-positive results.

Only runs on the code you want it to.

3.6 Use IAST tools

  • Veracode
  • Acunetix
  • Synopsys
  • Snyk
  • Hdiv Detection
  • Debricked

Best of both SAST and DAST

Example of IAST implementation with Debricked.

image-20251023102258731

image-20251023102331336

3.7 Learn about OAST

Expansion on top of DAST.

Vulnerabilities that can't be detected by regular HTTP request-response interaction.

image-20251023103538104

Improves on async responses.

Detects blind SQL injections, blind XSS attacks.

Response isn't returned directly to the request.

A different server handles the response.

Helps find security risks like the Log4j incident.

Injects data through an email and read through a web interface.

DNS is commonly used.

3.8 Use OAST tools

  • Portswigger

  • OWASP ZAP

Another layer on top of DAST.

image-20251023104633496

Example of OAST implementation with OWASP ZAP.

image-20251023104927987

image-20251023105259945

Setting up a DevSecOps Pipeline

4.1 Set up the project

Clone the repo

image-20251023111951344

Install dependencies

yarn

image-20251023112448897

Run the app

yarn redwood dev

image-20251023112937842

4.2 Set up CircleCI

Got to circleci.com

Connect with GitHub

Authorize repo

image-20251023114040981

4.3 Write the CircleCI config

Go back to app

Add CircleCI yaml

4.4 Break down the pipeline steps

Walk through each part of the pipeline and run it

4.5 Add security to each step

Edit yaml file to have new security tests.

Walk through each security test and run.

The following config.yml is just for reference. Need adjustment for real CI/CD environment.

version: 2.1
jobs:unit-tests:docker:- image: cimg/node:14.20.0steps:- checkout- run:name: "install dependencies"command: yarn- run:name: "run project unit tests"command: yarn redwood testsast:docker:- image: cimg/node:14.20.0steps:- checkout- run:name: "install dependencies"command: yarn- run:name: "execute retire.js"command: cd web; retire --path webbuild-app:docker:- image: cimg/node:14.20.0steps:- checkout- run:name: "install dependencies"command: yarn- run:name: "build deploy artifact"command: yarn redwood builddeploy-feature:docker:- image: cimg/node:17.1.0steps:- checkout- run:name: "deploy to feature env"command: echo "Deployed to feature environment with AWS S3 bucket magic or Azure container magic"dast:docker:- image: cimg/go:1.19.0steps:- checkout- run: go version- run:name: "install nuclei-cli"command: go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest- run:name: "Nuclei scan on QA"command: nuclei -u https://flippedcoding.comworkflows:deploy-to-qa:jobs:- unit-tests- sast- build-app- deploy-feature- dast

Final Security Checks

5.1 Learn how pen-testing works

An ethical hacker attempts to find any vulnerabilities.

External Network Penetration Testing

​ Try to use public and private data gathered from leaked data breaches.

Internal Network Penetration Testing

​ Someone pretending to be a staff member attempts a hack from the inside.

Application Penetration Testing

​ Look for flaws in an application's security measure.

Social Engineering Testing

​ See how susceptible employees are to exposing confidential information.

Stages of pen-testing

image-20251023135341772

Gives feedback on how an app could be improved.

5.2 Use Kali Linux tools

Linux distro specifically made for ethical hacking.

Tools in Kali Linux: https://www.kali.org/tools/

  • WIRESHAEK

  • Burp Suite

  • SQLMAP

  • NIKTO

  • JOHN

5.3 Use bug bounties

A way to crowd-source your pen-testing.

Companies post challenges and offer a payout for successful reports.

Gives more realistic feedback on what attackers can do.

https://www.bugcrowd.com/bug-bounty-list/

https://www.hackerone.com/product/bug-bounty-platform

https://security.apple.com/bounty/

5.4 Perform compliance audits

Full review to see if an organization meets regulatory guidelines.

  • HIPPA

Implement a means of access control.

Introduce activity logs and audit controls.

Implement tools for encryption and decryption.

Conducting regular risk assessments.

  • PCI

Appropriate password protection.

Encryption of transmitted cardholder data.

Create and monitor access logs.

Implement firewalls to protect data.

  • GDPR

Encrypt data wherever possible.

Customers can easily request and receive the data you have about them.

Customers can request to have all of their data deleted.

Conduct an audit to see who has access to your data.

Specialty tools exist for compliance audits in different industries.

Securing Your DevOps Pipelines Summary

  • Background on DevOps
  • Security in DevOps or DevSecOps
  • DevSecOps Tools
  • Setting up a DevSecOps Pipeline
  • Final Security Checks
http://www.jsqmd.com/news/20315/

相关文章:

  • 设计模式2-结构型模式
  • 2025 年工业 pH 计厂家最新推荐榜单:在线 / 污水 / 脱硫 / 发酵 / 化工 / 反应釜 / 防爆 / 纯水 / 双通道 pH 计优质品牌汇总,帮企业选靠谱设备
  • 设计模式1-创建型模式
  • [LangChain] 07. 消息占位
  • 2025 年洗碗机源头厂家最新推荐榜:聚焦实力企业,为餐饮及企事业单位选购提供权威参考通道式/链条式/流水线/酒店/学校/工厂/全自动洗碗机公司推荐
  • 数据同步问题解析
  • 微算法科技(NASDAQ MLGO)基于区块链点阵加密算法的物联网轻量级方案:构建物联网安全基石
  • Kubernetes 在企业级场景下的全流程落地实践 - 教程
  • 鸿蒙电脑,给世界多一种选择!
  • RFSOC学习记录(一)RF data converter总览
  • git ssh 已配置公钥,但仍然报错: Permission denied (publickey) - lay
  • 2025 年最新外呼系统厂家最新推荐排行榜:深度解析技术实力、服务体系及行业适配方案解决方案 / 电话营销 / 智能 / 电销卡 / 平台搭建 / 电销卡 / 线路公司推荐
  • 加速智能体开发:从 Serverless 运行时到 Serverless AI 运行时
  • RFSOC学习记录(三)LMK04828时钟配置
  • 设计原则-教程
  • Failed to start nginx.service: Unit nginx.service not found.
  • WTAPI框架/微信个人号开发协议
  • AE/PR插件-Beauty Box v6.0.2 专业视频人像磨皮美颜润肤插件
  • 2025 年北京紧急 / 北京上门 / 北京防盗门 / 北京密码锁开锁公司推荐:北京锁王开锁有限公司 —— 安全锁具服务的可靠之选
  • 2025 年封口机厂家推荐:武汉吕工机械,以技术创新驱动包装行业新发展
  • 详细介绍:python-poppler - PDF文档处理Python绑定库
  • pycharm 2025.2.3 安装、授权、使用说明
  • 开发微信机器人/个微/WTAPI框架
  • 读书笔记:白话解读Oracle哈希分区
  • GIT DUBUG 变量设置
  • 九种类图归纳总结
  • git ssh 已配置公钥,但仍然无法连接成功 - lay
  • 阅读笔记-待选中
  • 2025年10月国内北京黄金回收公司全景解析报告,基于专业测评的技术、性能及市场优势深度分析
  • 2025年10月国内防水耳机生产厂家全景解析报告,基于专业测评的技术、性能及市场优势深度分析