liuxinye23/qingfenglanyue/container-security-testing
Claude Code and agent skill by liuxinye23/qingfenglanyue
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install liuxinye23/qingfenglanyue/container-security-testingSKILL.md
The same SKILL.md was published earlier as ac1d1c-a1fa1fa/cyberstruck/container-security-testing.
容器安全测试
概述
容器安全测试是确保容器化应用安全性的重要环节。本技能提供容器安全测试的方法、工具和最佳实践,涵盖Docker、Kubernetes等容器技术。
测试范围
1. 镜像安全
检查项目:
- 基础镜像漏洞
- 依赖包漏洞
- 镜像配置
- 敏感信息
2. 运行时安全
检查项目:
- 容器权限
- 资源限制
- 网络隔离
- 文件系统
3. 编排安全
检查项目:
- Kubernetes配置
- 服务账户
- RBAC
- 网络策略
Docker安全测试
镜像扫描
使用Trivy:
使用Clair:
使用Docker Bench:
容器配置检查
检查Dockerfile:
安全最佳实践:
运行时检查
检查容器权限:
检查资源限制:
Kubernetes安全测试
配置检查
使用kube-bench:
使用kube-hunter:
Pod安全
检查Pod安全策略:
安全配置:
RBAC检查
检查角色权限:
常见问题:
- 过度权限
- 未使用的角色
- 未使用的服务账户
网络策略
检查网络策略:
网络策略示例:
工具使用
Falco
运行时安全监控:
Aqua Security
Snyk
测试清单
镜像安全
- [ ] 扫描基础镜像漏洞
- [ ] 扫描依赖包漏洞
- [ ] 检查Dockerfile配置
- [ ] 检查敏感信息泄露
运行时安全
- [ ] 检查容器权限
- [ ] 检查资源限制
- [ ] 检查网络隔离
- [ ] 检查文件系统挂载
编排安全
- [ ] 检查Kubernetes配置
- [ ] 检查RBAC配置
- [ ] 检查网络策略
- [ ] 检查Pod安全策略
常见安全问题
1. 镜像漏洞
问题:
- 基础镜像包含漏洞
- 依赖包包含漏洞
- 未及时更新
修复:
- 定期扫描镜像
- 及时更新基础镜像
- 使用最小化镜像
2. 过度权限
问题:
- 容器以root运行
- 特权模式
- 挂载敏感目录
修复:
- 使用非root用户
- 禁用特权模式
- 限制文件系统访问
3. 配置错误
问题:
- 默认配置不安全
- 网络策略缺失
- RBAC配置错误
修复:
- 遵循安全最佳实践
- 实施网络策略
- 正确配置RBAC
4. 敏感信息泄露
问题:
- 镜像包含密钥
- 环境变量暴露
- 配置文件泄露
修复:
- 使用密钥管理
- 避免硬编码
- 使用Secret对象
最佳实践
1. 镜像安全
- 使用官方基础镜像
- 定期更新镜像
- 扫描镜像漏洞
- 最小化镜像大小
2. 运行时安全
- 使用非root用户
- 限制容器权限
- 实施资源限制
- 启用安全上下文
3. 编排安全
- 配置网络策略
- 实施RBAC
- 使用Pod安全策略
- 启用审计日志
注意事项
- 仅在授权环境中进行测试
- 避免对生产环境造成影响
- 注意不同容器平台的差异
- 定期进行安全扫描
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/container-security-testing/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/liuxinye23/qingfenglanyue/container-security-testing)