英伟达收购Arm再有变数?高通总裁:若失败,愿接盘
Docker scan[1]本地扫描镜像漏洞
2020年年底,Docker hub推出镜像自动扫描的功能,同时Docker也支持了在本地通过Docker命令选项的方式支持镜像漏洞扫描,目前Docker Desktop for Mac以及window上的Docker都可以通过Docker scan子命令扫描本地镜像是否存在漏洞软件。
Docker Desktop For Mac
使用docker scan的时候需要登录Docker Hub的账号,同时docker scan支持一些不同的选项
Options: --accept-license 接受使用第三方扫描提供商 --dependency-tree 显示带有扫描结果的依赖树 --exclude-base 从漏洞扫描中排除基础镜像 (requires --file) -f, --file string 与image关联的Dockerfile,提供更详细的结果 --group-issues 聚合重复的漏洞并将其分组为1个漏洞 (requires --json) --json 以json格式输出结果 --login 使用可选令牌(带有--token)向扫描提供程序进行身份验证,如果为空则使用web base令牌 --reject-license 拒绝使用第三方扫描提供商 --severity string 只报告提供级别或更高的漏洞(low|medium|high) --token string 登录到第三方扫描提供程序的认证令牌 --version 显示扫描插件版本
指定Dockerfile
$ docker scan -f Dockerfile docker-scan:e2e Testing docker-scan:e2e ... High severity vulnerability found in perl Description: Integer Overflow or Wraparound Info: https://snyk.io/vuln/SNYK-DEBIAN10-PERL-570802 Introduced through: git@1:2.20.1-2+deb10u3, meta-common-packages@meta From: git@1:2.20.1-2+deb10u3 > [email protected] From: git@1:2.20.1-2+deb10u3 > [email protected] > [email protected] From: git@1:2.20.1-2+deb10u3 > [email protected] > perl/[email protected] and 3 more... Introduced by your base image (golang:1.14.6) Organization: docker-desktop-test Package manager: deb Target file: Dockerfile Project name: docker-image|99138c65ebc7 Docker image: 99138c65ebc7 Base image: golang:1.14.6 Licenses: enabled Tested 200 dependencies for known issues, found 157 issues. According to our scan, you are currently using the most secure version of the selected base image
不扫描该镜像的基础镜像
$ docker scan -f Dockerfile --exclude-base docker-scan:e2e Testing docker-scan:e2e ... Medium severity vulnerability found in libidn2/libidn2-0 Description: Improper Input Validation Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBIDN2-474100 Introduced through: iputils/iputils-ping@3:20180629-2+deb10u1, [email protected], [email protected]+deb10u1, git@1:2.20.1-2+deb10u3 From: iputils/iputils-ping@3:20180629-2+deb10u1 > libidn2/[email protected]+deb10u1 From: [email protected] > libidn2/[email protected]+deb10u1 From: [email protected]+deb10u1 > curl/[email protected]+deb10u1 > libidn2/[email protected]+deb10u1 and 3 more... Introduced in your Dockerfile by 'RUN apk add -U --no-cache wget tar' Organization: docker-desktop-test Package manager: deb Target file: Dockerfile Project name: docker-image|99138c65ebc7 Docker image: 99138c65ebc7 Base image: golang:1.14.6 Licenses: enabled Tested 200 dependencies for known issues, found 16 issues.
以json格式输出扫描结果
JSON格式显示镜像扫描结果
聚合分组显示扫描信息
$ docker scan --json --group-issues docker-scan:e2e { { "title": "Improper Check for Dropped Privileges", ... "packageName": "bash", "language": "linux", "packageManager": "debian:10", "description": "## Overview An issue was discovered in disable_priv_mode in shell.c in GNU Bash through 5.0 patch 11. By default, if Bash is run with its effective UID not equal to its real UID, it will drop privileges by setting its effective UID to its real UID. However, it does so incorrectly. On Linux and other systems that support "saved UID" functionality, the saved UID is not dropped. An attacker with command execution in the shell can use "enable -f" for runtime loading of a new builtin, which can be a shared object that calls setuid() and therefore regains privileges. However, binaries running with an effective UID of 0 are unaffected. ## References - [CONFIRM](https://security.netapp.com/advisory/ntap-20200430-0003/) - [Debian Security Tracker](https://security-tracker.debian.org/tracker/CVE-2019-18276) - [GitHub Commit](https://github.com/bminor/bash/commit/951bdaad7a18cc0dc1036bba86b18b90874d39ff) - [MISC](http://packetstormsecurity.com/files/155498/Bash-5.0-Patch-11-Privilege-Escalation.html) - [MISC](https://www.youtube.com/watch?v=-wGtxJ8opa8) - [Ubuntu CVE Tracker](http://people.ubuntu.com/~ubuntu-security/cve/CVE-2019-18276) ", "identifiers": { "ALTERNATIVE": [], "CVE": [ "CVE-2019-18276" ], "CWE": [ "CWE-273" ] }, "severity": "low", "severityWithCritical": "low", "cvssScore": 7.8, "CVSSv3": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:F", ... "from": [ "docker-image|docker-scan@e2e", "[email protected]" ], "upgradePath": [], "isUpgradable": false, "isPatchable": false, "name": "bash", "version": "5.0-4" }, ... "summary": "880 vulnerable dependency paths", "filesystemPolicy": false, "filtered": { "ignore": [], "patch": [] }, "uniqueCount": 158, "projectName": "docker-image|docker-scan", "platform": "linux/amd64", "path": "docker-scan:e2e" }
显示指定级别的漏洞,只有高于此级别的漏洞才会显示出来
$ docker scan --severity=medium docker-scan:e2e ./bin/docker-scan_darwin_amd64 scan --severity=medium docker-scan:e2e Testing docker-scan:e2e... Medium severity vulnerability found in sqlite3/libsqlite3-0 Description: Divide By Zero Info: https://snyk.io/vuln/SNYK-DEBIAN10-SQLITE3-466337 Introduced through: gnupg2/[email protected]+deb10u1, [email protected]+deb10u1, [email protected]+deb10u1 From: gnupg2/[email protected]+deb10u1 > gnupg2/[email protected]+deb10u1 > sqlite3/[email protected] From: [email protected]+deb10u1 > subversion/[email protected]+deb10u1 > sqlite3/[email protected] From: [email protected]+deb10u1 > python-defaults/[email protected] > [email protected]+deb10u1 > python2.7/[email protected]+deb10u1 > sqlite3/[email protected] Medium severity vulnerability found in sqlite3/libsqlite3-0 Description: Uncontrolled Recursion ... High severity vulnerability found in binutils/binutils-common Description: Missing Release of Resource after Effective Lifetime Info: https://snyk.io/vuln/SNYK-DEBIAN10-BINUTILS-403318 Introduced through: gcc-defaults/g++@4:8.3.0-1 From: gcc-defaults/g++@4:8.3.0-1 > gcc-defaults/gcc@4:8.3.0-1 > [email protected] > [email protected] > binutils/[email protected] From: gcc-defaults/g++@4:8.3.0-1 > gcc-defaults/gcc@4:8.3.0-1 > [email protected] > [email protected] > binutils/[email protected] > binutils/[email protected] From: gcc-defaults/g++@4:8.3.0-1 > gcc-defaults/gcc@4:8.3.0-1 > [email protected] > [email protected] > binutils/[email protected] > binutils/[email protected] and 4 more... Organization: docker-desktop-test Package manager: deb Project name: docker-image|docker-scan Docker image: docker-scan:e2e Platform: linux/amd64 Licenses: enabled Tested 200 dependencies for known issues, found 37 issues. Linux上安装scan-cli插件
目前Linux系统上的Docker Engine尚未支持scan命令,因此可以通过插件形式使用,可以参考scan-cli-plugin[2]的文档,此处我在Ubuntu上通过apt安装一下
> cat /etc/apt/sources.list.d/docker.list deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu xenial stable > apt-get update && apt-get install docker-scan-plugin
安装完成之后,登录Docker hub,然后同意访问Snyk即可。
参考资料
[1]docker scan:
https://docs.docker.com/engine/scan/
[2]scan-cli-plugin:
https://github.com/docker/scan-cli-plugin
(责任编辑:时事速递)
-
标签: Suno Lyria3Pro MurekaV9 腾讯音乐
撰文 | 程书书 编辑 | 李信马 题图 | 豆包AI Suno V5、Lyria 3 Pro、Mureka V9…… 从30秒片段到3分钟完整曲目,从简单旋律到精细化编曲,AI音乐大模型正在以肉眼可...[详细]
-
云安全日报210610:红帽OpenShift云应用平台发现符号链接攻击漏洞,需要尽快升级
Red Hat OpenShift Container Platform(红帽OpenShift容器平台)是美国红帽(Red Hat)公司的一套可帮助企业在物理、虚拟和公共云基础架构之间开发、部署和管...[详细]
-
据报道,美国国际商用机器公司(IBM)近日收购了加拿大的金融技术公司 Expertus Technologies,以增强其电子支付能力。这家金融技术公司每天帮助处理超过500亿美元的交易。 IBM在周...[详细]
-
撰文 | 曹双涛 编辑 | 杨博丞 题图 | IC Photo “优质周到的服务是一嗨租车的核心竞争力。我们始终认为,应当围绕用户的体验感,着力解决痛点、回应期待。”一嗨租车董事长兼CEO章瑞平曾在接...[详细]
-
消息称拜登政府将阻止中国用户使用美国云计算公司算力训练AI大模型
集微网消息,据报道,美国商务部长吉娜·雷蒙多本周五表示,拜登政府将提议要求美国云计算公司确定外国实体是否正在访问美国数据中心以训练人工智能模型。 据称,雷蒙多在接受媒体采访时表示:“我们不能允许非国家...[详细]
-
OpenAI 与甲骨文联合宣布将在美国密歇根州的萨林镇建设一座容量超过1吉瓦的数据中心园区。这个名为 “星际之门” 的项目预计将在2026年初动工,目标是为日益增长的 AI 算力需求提供支持。 据悉,...[详细]
-
腾讯推出具身多模态大模型 HY-Embodied-0.5-X,赋能机器人智能交互
近日,腾讯 Robotics X 实验室与混元团队共同发布并开源了 HY-Embodied-0.5-X,这是一款专为具身任务优化的多模态大模型,旨在提升机器人在真实环境中的智能交互能力。该模型基于 H...[详细]
-
标签: 大晓机器人 ACE研发范式 开悟世界模型3.0 具身超级大脑A1
云梦级2月10日云梦级消息,大晓机器人已于近期完成天使轮融资。本轮融资由蚂蚁集团领投,启明创投、金景资本、弘毅投资、联想创投、上海交大母基金菡源资产等机构跟投,老股东商汤国香资本持续增资。 本轮募资金...[详细]
-
查看最新行情 据报道,亚马逊宣布将把针对独立卖家的仓储和运输费用上涨计划推迟到明年6月,向对成本上涨感到不满的商家示好。 即将离任的亚马逊零售部门CEO杰夫·威尔克(Jeff Wilke)在发给卖家的...[详细]
-
蚂蚁百灵大模型团队开源Ring-flash-linear-2.0-128K,混合注意力+MoE架构重塑长文本编程效率
在AI大模型竞争白热化的当下,高效推理与长上下文处理已成为开发者痛点。近日,蚂蚁集团旗下百灵大模型团队正式开源Ring-flash-linear-2.0-128K,一款专为超长文本编程设计的创新模型。...[详细]
