当前位置: 首页 > 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.gsyq.cn/news/28308.html

相关文章:

  • 2025 年工业 pH 计厂家最新推荐榜单:在线 / 污水 / 脱硫 / 发酵 / 化工 / 反应釜 / 防爆 / 纯水 / 双通道 pH 计优质品牌汇总,帮企业选靠谱设备
  • [LangChain] 07. 消息占位
  • 数据同步问题解析
  • 微算法科技(NASDAQ MLGO)基于区块链点阵加密算法的物联网轻量级方案:构建物联网安全基石
  • 鸿蒙电脑,给世界多一种选择!
  • 加速智能体开发:从 Serverless 运行时到 Serverless AI 运行时
  • WTAPI框架/微信个人号开发协议
  • AE/PR插件-Beauty Box v6.0.2 专业视频人像磨皮美颜润肤插件
  • 2025 年北京紧急 / 北京上门 / 北京防盗门 / 北京密码锁开锁公司推荐:北京锁王开锁有限公司 —— 安全锁具服务的可靠之选
  • 2025 年封口机厂家推荐:武汉吕工机械,以技术创新驱动包装行业新发展
  • 详细介绍:python-poppler - PDF文档处理Python绑定库
  • 火山引擎发布新产品用户研究Agent,并推出数据智能体评测体系
  • pycharm 2025.2.3 安装、授权、使用说明
  • 读书笔记:白话解读Oracle哈希分区
  • git ssh 已配置公钥,但仍然无法连接成功 - lay
  • 阅读笔记-待选中
  • 2025年10月国内北京黄金回收公司全景解析报告,基于专业测评的技术、性能及市场优势深度分析
  • 微软修复CVSS 10.0分高危Entra ID漏洞CVE-2025-55241 - 教程
  • 主流CI/CD工具选型指南:助力企业实现高效交付
  • 通过openwrt唤醒pc电脑
  • 2025年英国留学服务商排行榜:Top 10权威推荐与选择指南
  • 2025年轴流风机品牌排名前十:如何选择靠谱供应商及行业洞察
  • 2025年轴流风机品牌前十强排名及选购指南
  • 2025年市面上信号灯品牌口碑推荐榜单:十大优质厂家综合评测
  • 2025年高压电缆品牌哪家好?鑫佰亿线缆权威推荐与选择指南
  • 2025年高压电缆品牌哪家好:鑫佰亿线缆全面评测与权威推荐
  • 2025年市面上铝蜂窝板品牌排名前十权威推荐榜单
  • 2025年西安城北学区房十大排行榜:揭秘顶级选择与购买指南
  • 2025年家装石材品牌排名前十:口碑与质量双优推荐
  • 2025年市面上家装石材品牌排名前十推荐:权威指南与选购技巧