SAST项目篇&CodeQL审计&SCA插件&语言应用&开源商业&自动工具
#SAST-IDEA插件SCA-依赖组件漏洞-JAVA
1、IDEA插件:(专业针对项目依赖组件审计插件)
-CodeArts Check
https://blog.csdn.net/hwxiaozhi/article/details/133674492
-MurphySec Code Scan
https://github.com/murphysecurity/murphysec-jetbrains-plugin
-OpenSCA-intellij-plugin
https://opensca.xmirror.cn/docs/v1/
2、商业平台:(综合SDL项目,不单是漏洞审计等)
TCA,OpenSCA,MurphySec,Huwei,Aliyun等
#SAST-Fortify&CheckMarx&CodeQL-各语言
优点:大部分主流语言都支持,使用简单
缺点:部分语言组件审计不支持,针对性差
因此诞生CodeQL项目,可玩性强,研究颇多
0、安装环境
-安装命令行codeql-cli(执行文件)添加到path目录,设置为全局变量。
https://github.com/github/codeql-cli-binaries/releases
-安装codeql查询引擎(SDK引擎)
https://github.com/github/codeql/releases
codeql-cli同目录下(因为codeql-cli把同层目录作为查找路径)
1、创建数据库
codeql database create tmall --language="java" --command="mvn clean install --file pom.xml -Dmaven.test.skip=true" --source-root=E:/code/java/129/Tmall_demo-master --overwrite
2、执行扫描规则
codeql database analyze tmall E:\code\java\129\codeql-codeql-cli-v2.15.4\java\ql\src\codeql-suites\java-code-scanning.qls --format=csv --output=result.csv
#SAST-Bandit&NodeJsScan-Python&NodeJS
1、Bandit(专业Python语言应用审计项目)
https://github.com/PyCQA/bandit
参考:https://bandit.readthedocs.io/
安装:pip install bandit
linux:
安装后会在当前Python目录下bin
使用:bandit -r 需要审计的源码目录
windows:
安装后会在当前Python目录下script
使用:bandit -r 需要审计的源码目录
2、NodeJsScan(专业NodeJs语言应用审计项目)
https://github.com/ajinabraham/NodeJsScan
docker pull opensecurity/nodejsscan:latest
docker run -it -p 9090:9090 opensecurity/nodejsscan:latest
https://github.com/github/codeql 神器
https://github.com/PyCQA/bandit Python
https://github.com/securego/gosec Go
https://github.com/LoRexxar/Kunlun-M PHP&JS
https://github.com/presidentbeef/brakeman Ruby
https://github.com/ajinabraham/NodeJsScan JS框架