当前位置:网站首页>如何在构建阶段保护镜像安全
如何在构建阶段保护镜像安全
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:

边栏推荐
- 3D modeling tool Archicad 26 newly released
- 深入理解 DeepSea 和 Salt 部署工具 – Storage6
- 记录开发问题
- 在AD中添加差分对及连线
- PostgreSQL每周新闻—2022年7月20日
- 做题笔记3(二分查找)
- Unity editor learning (I) using features to change the display of fields in components
- Text filtering skills
- epoll水平出发何边沿触发
- A total of 13billion flash and 400million MCU were shipped! In depth analysis of the three product lines of Zhaoyi innovation
猜你喜欢

PostgreSQL weekly news - July 20, 2022

TCP handshake, waving, time wait connection reset and other records

Re10: are we really making much progress? Revisiting, benchmarking, and refining heterogeneous gr

【深度学习】:《PyTorch入门到项目实战》第二天:从零实现线性回归(含详细代码)

Ugui learning notes (II) Scrollview related

Probability theory and mathematical statistics Chapter 1

Outline and principle of structured design -- modularization
![[deep learning]: day 1 of pytorch introduction to project practice: data operation and automatic derivation](/img/4e/a41eee56fc0e8d3089f105bcb63155.png)
[deep learning]: day 1 of pytorch introduction to project practice: data operation and automatic derivation
![[deep learning]: model evaluation and selection on the seventh day of pytorch introduction to project practice (Part 1): under fitting and over fitting (including source code)](/img/19/18d6e94a1e0fa4a75b66cf8cd99595.png)
[deep learning]: model evaluation and selection on the seventh day of pytorch introduction to project practice (Part 1): under fitting and over fitting (including source code)

总数据量超万亿行,玉溪卷烟厂通过正确选择时序数据库轻松应对
随机推荐
Ugui learning notes (VI) get the information of the clicked UI
技术分享 | MySQL Shell 定制化部署 MySQL 实例
结构化设计的概要与原理--模块化
关于Bug处理的一些看法
Semtech launched Lora edge, a geolocation solution for the Internet of things, and the first chip lr1110 is now on the market
Some notes on how unity objects move
Re10:读论文 Are we really making much progress? Revisiting, benchmarking, and refining heterogeneous gr
Re11: read EPM legal judgment prediction via event extraction with constraints
parseJson
Technology sharing | MySQL shell customized deployment MySQL instance
Re12: read these3 semantic self segmentation for abstract summary of long legal documents in low
Call DLL file without source code
Leetcode70 suppose you are climbing stairs. You need n steps to reach the roof. You can climb one or two steps at a time. How many different ways can you climb to the roof?
NoSQL introduction practice notes I
Comprehensively design an oppe homepage -- page service part
Using MVC in the UI of unity
Easypoi --- excel file export
PostgreSQL weekly news - July 20, 2022
【深度学习】:《PyTorch入门到项目实战》第六天:多层感知机(含代码)
阿里云 MSE 支持 Go 语言流量防护