Gitlab 之 SAST

1. 简介

Static Application Security Testing,静态应用程序安全测试,就是扫描一下你的源代码有没有已知的安全漏洞。

2. 接入要求

  1. 首先你得用了gitlab的cicd;
  2. gitlab runner 的executor得是docker 或者 k8s;
  3. 必须有 test 的 stage

3. 接入

# 扫描漏洞的镜像由于国内下载可能会有问题,最好提前放到自己的仓库里面去
variables:
  SECURE_ANALYZERS_PREFIX: "www.whyfate.com/analyzers/security-products"
sast:
  stage: test
  tags:
    - builder
# 直接将gitlab提供的模板包含进去即可
include:
- template: Security/SAST.gitlab-ci.yml

用到的镜像

registry.gitlab.com/security-products/brakeman:3
registry.gitlab.com/security-products/flawfinder:3
registry.gitlab.com/security-products/kubesec:3
registry.gitlab.com/security-products/nodejs-scan:3
registry.gitlab.com/security-products/phpcs-security-audit:3
registry.gitlab.com/security-products/pmd-apex:3
# .net 用到的镜像
registry.gitlab.com/security-products/security-code-scan:3
registry.gitlab.com/security-products/semgrep:3
registry.gitlab.com/security-products/sobelow:3
registry.gitlab.com/security-products/spotbugs:3

4. 使用体验

首先暂不支持.net7,其次全给我扫描一些CSRF漏洞,我真的栓Q,gitlab ce不支持在线查看,只能下载report.json,但是够用。
总的来说有用,但是不完全有用。

Gitlab SAST 官方文档

posted @   whyfate  阅读(618)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
历史上的今天:
2021-01-04 关于 keepalived+nginx 出现的问题的思考
2021-01-04 ubuntu 18.04 设置静态 ip 之 24
点击右上角即可分享
微信分享提示