当前位置:网站首页>如何在构建阶段保护镜像安全
如何在构建阶段保护镜像安全
2022-07-28 16:13:00 【Trc0g】
首先,可以参考以下这篇文章,在构建命令的时候多加注意,避免触及安全边界:云原生时代下的容器镜像安全(上)
接下来,我们可以通过已有的镜像安全检测工具,对早已存在的镜像进行安全扫描,并对当前正在构建的镜像设置阻断规则,将安全防护前移至 CI/CD 阶段,当前市面上已知的镜像检测工具有:trivy、anchor、veinmind等,我只试用了veinmind,所以详细描述一下veinmind的试用过程:
首先 veinmind 支持检测镜像内的恶意文件、敏感信息、弱口令、后门、异常历史命令,支持镜像资产清点,支持集成到 CI/CD 进行检测,支持镜像阻断,支持使用 helm 安装部署。
详细记录一下 docker 镜像阻断功能:
# first./veinmind-runner authz -c config.toml # seconddockerd --authorization-plugin=veinmind-broker其中config.toml,包含如下字段
| 字段名 | 字段属性 | 含义 | |
|---|---|---|---|
| policy | action | string | 需要监控的行为 |
| enabled_plugins | []string | 使用哪些插件 | |
| plugin_params | []string | 各个插件的参数 | |
| risk_level_filter | []string | 风险等级 | |
| block | bool | 是否阻断 | |
| alert | bool | 是否报警 | |
| log | report_log_path | string | 插件扫描日志 |
| authz_log_path | string | 阻断服务日志 |
action 原则上支持 DockerAPI 所提供的操作接口 如下的配置表示:当 创建容器或推送镜像 时,使用 veinmind-weakpass 插件扫描ssh服务,如果发现有弱密码存在,并且风险等级为 High 则阻止此操作,并发出警告。最终将扫描结果存放至plugin.log,将风险结果存放至auth.log。
[log]plugin_log_path = "plugin.log"auth_log_path = "auth.log"[listener]listener_addr = "/run/docker/plugins/veinmind-broker.sock"[[policies]]action = "container_create"enabled_plugins = ["veinmind-weakpass"]plugin_paramas = ["veinmind-weakpass:scan.serviceName=ssh"]risk_level_filter = ["High"]block = truealert = true[[policies]]action = "image_push"enabled_plugins = ["veinmind-weakpass"]plugin_params = ["veinmind-weakpass:scan.serviceName=ssh"]risk_level_filter = ["High"]block = truealert = true项目地址:https://github.com/chaitin/veinmind-tools
使用文档:https://veinmind.chaitin.com/docs/
集成到 Jenkins:

集成到 Gitlab:

边栏推荐
- MySQL 5.7 and sqlyogv12 installation and use cracking and common commands
- parseJson
- Microsoft: edge browser has built-in disk cache compression technology, which can save space and not reduce system performance
- Some opinions on bug handling
- 华为Mate 40系列曝光:大曲率双曲面屏,5nm麒麟1020处理器!还将有天玑1000+的版本
- Unity3d simple implementation of water surface shader
- 浏览器解码过程分析
- 2020Q2全球平板市场出货大涨26.1%:华为排名第三,联想增幅最大!
- Unity shader transparent effect
- 【深度学习】:《PyTorch入门到项目实战》第六天:多层感知机(含代码)
猜你喜欢

PostgreSQL每周新闻—2022年7月20日

Unity shader realizes mirror effect with rendered texture

【深度学习】:《PyTorch入门到项目实战》第五天:从0到1实现Softmax回归(含源码)

Brother Ali teaches you how to correctly understand the problem of standard IO buffer

MySQL 5.7 and sqlyogv12 installation and use cracking and common commands

Jsonarray traversal

Microsoft: edge browser has built-in disk cache compression technology, which can save space and not reduce system performance

Re11: read EPM legal judgment prediction via event extraction with constraints

在AD中添加差分对及连线
![[deep learning]: day 6 of pytorch introduction to project practice: multi-layer perceptron (including code)](/img/19/18d6e94a1e0fa4a75b66cf8cd99595.png)
[deep learning]: day 6 of pytorch introduction to project practice: multi-layer perceptron (including code)
随机推荐
给定正整数N、M,均介于1~10 ^ 9之间,N <= M,找出两者之间(含N、M)的位数为偶数的数有多少个
【深度学习】:《PyTorch入门到项目实战》第四天:从0到1实现logistic回归(附源码)
【深度学习】:《PyTorch入门到项目实战》第七天之模型评估和选择(上):欠拟合和过拟合(含源码)
Time complexity
Do you really understand CMS garbage collector?
综合设计一个OPPE主页--页面的售后服务
【深度学习】:《PyTorch入门到项目实战》第八天:权重衰退(含源码)
Huawei mate 40 series exposure: large curvature hyperboloid screen, 5nm kylin 1020 processor! There will also be a version of Tianji 1000+
Ugui learning notes (II) Scrollview related
Oracle table partition
Easypoi --- excel file export
Detailed steps for setting up SUSE storage6 environment – win10 + VMware Workstation
Facet experience -- the development side of dragon game client
Realize the reset function of steering wheel UI with touch rotation and finger departure in unity
Alibaba cloud MSE supports go language traffic protection
Call DLL file without source code
PostgreSQL每周新闻—2022年7月20日
阿里大哥教你如何正确认识关于标准IO缓冲区的问题
How should I understand craft
在AD中添加差分对及连线