Gitlab 之 SAST
1. 简介
Static Application Security Testing,静态应用程序安全测试,就是扫描一下你的源代码有没有已知的安全漏洞。
2. 接入要求
- 首先你得用了gitlab的cicd;
- gitlab runner 的executor得是docker 或者 k8s;
- 必须有 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,但是够用。
总的来说有用,但是不完全有用。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
2021-01-04 关于 keepalived+nginx 出现的问题的思考
2021-01-04 ubuntu 18.04 设置静态 ip 之 24