mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-27 20:25:48 +00:00
Remove blank lines after code block markers
This commit is contained in:
@@ -26,7 +26,6 @@ Docker 默认启用了 Seccomp 并利用预置的 [默认配置文件](https://g
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
在启动时告诉 Docker 载入这套过滤配置:
|
||||
|
||||
```bash
|
||||
@@ -54,7 +53,6 @@ $ docker run --rm -it \
|
||||
--security-opt apparmor=custom-nginx-profile \
|
||||
nginx
|
||||
```
|
||||
|
||||
### 18.5.3 容器镜像漏洞静态扫描
|
||||
|
||||
现代防护的防御已经不仅仅在运行阶段,而向“左”延伸至了构建与分发时期控制。很多安全隐患并不是用户代码中的直接逻辑异常,而是打包环境或者引入库的基础 `APT` 安装层面潜伏了开源界众所周知的历史漏洞。
|
||||
@@ -64,7 +62,6 @@ $ docker run --rm -it \
|
||||
[Trivy](https://github.com/aquasecurity/trivy) 是由 Aqua Security 发行的一款针对容器技术的快速镜像漏洞扫描利器。在分发应用前通过它的扫描可以规避绝大多数风险。
|
||||
|
||||
```bash
|
||||
|
||||
## 如果使用本地命令行扫描容器镜像
|
||||
$ trivy image alpine:3.10
|
||||
|
||||
@@ -81,7 +78,6 @@ Total: 2 (UNKNOWN: 0, LOW: 0, MEDIUM: 1, HIGH: 1, CRITICAL: 0)
|
||||
| busybox | CVE-2022-28391 | HIGH | 1.30.1-r3 | 1.30.1-r4 | busybox: out-of-bounds read in... |
|
||||
...
|
||||
```
|
||||
|
||||
只要确保所有上传给私有或公共仓库分发服务的产物先被引入至 CI/CD 流水线,如果出现 `HIGH` 及 `CRITICAL` 严重的报错记录强行阻拦部署,这本身便是构建环节极其有力的自动化安全大门保障。除 Trivy 外,最新的 Docker 版本也已内置支持官方扫描利刃 **Docker Scout**。
|
||||
|
||||
### 18.5.4 容器核心层基石结语
|
||||
|
||||
Reference in New Issue
Block a user