./run.sh scan image 如果添加多个target
colinsarah opened this issue · comments
colinsarah commented
请问扫描镜像如何添加多个target
DVK commented
./run.sh scan image IMG1 IMG2 ....
args通过空格分割即可。
colinsarah commented
之前这样尝试过,发现最后一个镜像id跑2次
执行命令 ./run.sh scan image --format json ad986774810f 8c7e00e786b8
下面是json的报告
[
{
"id": "sha256:8c7e00e786b8c3afe268c02b54e5a218f2dfd4f466dfa7baa00c97109a07e994",
"time": "2023-02-23T09:18:05.149515671Z",
"source": "",
"level": "None",
"object": {
"id": "sha256:8c7e00e786b8c3afe268c02b54e5a218f2dfd4f466dfa7baa00c97109a07e994",
"type": "Image",
"runtime_type": "docker"
},
"event_type": "Info",
"detect_type": "Image",
"alert_type": "BasicImage",
"alert_detail": {
"references": [
"docker.io/bitnami/etcd:3.4.15"
],
"created_time": 1620928704,
"env": [
"PATH=/opt/bitnami/common/bin:/opt/bitnami/etcd/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"HOME=/",
"OS_ARCH=amd64",
"OS_FLAVOUR=debian-10",
"OS_NAME=linux",
"BITNAMI_APP_NAME=etcd",
"BITNAMI_IMAGE_VERSION=3.4.15-debian-10-r69",
"ETCDCTL_API=3"
],
"entrypoint": [
"/opt/bitnami/scripts/etcd/entrypoint.sh"
],
"cmd": [
"/opt/bitnami/scripts/etcd/run.sh"
],
"working_dir": "/opt/bitnami/etcd",
"author": ""
}
},
{
"id": "sha256:8c7e00e786b8c3afe268c02b54e5a218f2dfd4f466dfa7baa00c97109a07e994",
"time": "2023-02-23T09:18:05.156416711Z",
"source": "",
"level": "None",
"object": {
"id": "sha256:8c7e00e786b8c3afe268c02b54e5a218f2dfd4f466dfa7baa00c97109a07e994",
"type": "Image",
"runtime_type": "docker"
},
"event_type": "Info",
"detect_type": "Image",
"alert_type": "BasicImage",
"alert_detail": {
"references": [
"docker.io/bitnami/etcd:3.4.15"
],
"created_time": 1620928704,
"env": [
"PATH=/opt/bitnami/common/bin:/opt/bitnami/etcd/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"HOME=/",
"OS_ARCH=amd64",
"OS_FLAVOUR=debian-10",
"OS_NAME=linux",
"BITNAMI_APP_NAME=etcd",
"BITNAMI_IMAGE_VERSION=3.4.15-debian-10-r69",
"ETCDCTL_API=3"
],
"entrypoint": [
"/opt/bitnami/scripts/etcd/entrypoint.sh"
],
"cmd": [
"/opt/bitnami/scripts/etcd/run.sh"
],
"working_dir": "/opt/bitnami/etcd",
"author": ""
}
}
]
DVK commented
这的确是一个bug, @d1nfinite 我们将很快修复一下。
DVK commented
v2.0.5 版本已修复, @colinsarah 感谢提交。