-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
内网环境无法使用trivy扫描,发现 trivy_server 工作出现错误 #280
Comments
单独下载官方二进制执行文件
|
人工手动更新漏洞库后,人工命令行方式可以正常扫描,但是通过hummerrisk界面一直在“正在处理”状态 人工手动更新操作:(IP地址做了脱敏处理)
命令行远程可以使用hummerrisk的trivy_server进行漏洞扫描,但是在hummerrisk界面上一直停留在 |
在docker容器内容的操作:
|
代码中没有使用server参数 CommandUtils.commonExecCmdWithResult(TrivyConstants.TRIVY_RM + TrivyConstants.TRIVY_JSON, TrivyConstants.DEFAULT_BASE_DIR);
String command = _proxy + token + TrivyConstants.TRIVY_REPO + str + branch + " " + codeCredential.getUrl() + TrivyConstants.TRIVY_TYPE + TrivyConstants.DEFAULT_BASE_DIR + TrivyConstants.TRIVY_JSON;
LogUtil.info(code.getId() + " {code scan}[command]: " + code.getName() + " " + command);
String resultStr = CommandUtils.commonExecCmdWithResult(command, TrivyConstants.DEFAULT_BASE_DIR); |
The first run cannot skip downloading DB. |
手动更新漏洞库,然后使用server就是验证漏洞库是可用的,而且两个容器共用的同一个漏洞库,核心问题是在容器内执行 日志报的命令会卡着不动,不能完整运行,这个是主要原因 |
@paddy235 目前对 tirvy Server 做了问题修复,关于离线环境检测应该是正常的,等待 HummerRisk v0.9.1 发布后,可以更新看看是否解决你的问题。 |
找到问题原因了,由于docker的 如何解决?
[
{
"Type": "bind",
"Source": "/opt/hummerrisk/logs/hummerrisk",
"Destination": "/opt/hummerrisk/logs",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/opt/hummerrisk/data/trivy/cache",
"Destination": "/opt/hummerrisk/trivy",
"Mode": "rw,shared",
"RW": true,
"Propagation": "shared"
},
{
"Type": "bind",
"Source": "/opt/hummerrisk/conf/hummerrisk/aws-config",
"Destination": "/root/.aws",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/opt/hummerrisk/data/trivy/db",
"Destination": "/root/.cache/trivy/db",
"Mode": "rw,shared",
"RW": true,
"Propagation": "shared"
},
{
"Type": "bind",
"Source": "/opt/hummerrisk/conf/hummerrisk/hummerrisk.properties",
"Destination": "/opt/hummerrisk/conf/hummerrisk.properties",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "volume",
"Name": "681f630bfef02e4cabfa2ec06c5f671f3f5e9339dc775e045651cefce6a5ba56",
"Source": "/var/lib/docker/volumes/681f630bfef02e4cabfa2ec06c5f671f3f5e9339dc775e045651cefce6a5ba56/_data",
"Destination": "/home/custodian",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
},
{
"Type": "bind",
"Source": "/opt/hummerrisk/data/hummerrisk/file",
"Destination": "/opt/hummerrisk/file",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/opt/hummerrisk/data/hummerrisk/image",
"Destination": "/opt/hummerrisk/image",
"Mode": "rw",
"RW": true,
"Propagation": "rprivate"
}
]
使用安装包中的 |
HummerRisk 版本
0.9.0
运行方式(安装包运行 or 源码运行 ?)
下载离线包安装运行
浏览器版本
严重程度(高、中、低)
高
Bug 描述
内网环境无法使用trivy扫描,经过排查发现 trivy_server 工作出现错误日志如下:
Bug 重现步骤(有截图更好)
1.
2.
3.
The text was updated successfully, but these errors were encountered: