Token导航 LogoToken导航

Agent Skill · 研究检索

container-security(container 安全)

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

container-security 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 56,981。

总安装 442周安装 19GitHub Stars 29下载 155核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:container-security(container 安全)
来源仓库:https://github.com/snyk/studio-recipes
仓库路径:skills/container-security
安装命令:
npx skills add https://github.com/snyk/studio-recipes --skill container-security
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/snyk/studio-recipes --skill container-security

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

container-security 用于辅助安全审计、权限检查和凭据风险排查,适合处理敏感配置和依赖风险。它能帮助 Agent 梳理安全配置、分析鉴权逻辑,提升安全性。

安装命令为 npx skills add https://github.com/snyk/studio-recipes --skill container-security,建议结合原始 README 核验具体用法。使用时不能把工具输出直接当最终结论,涉及密钥、令牌时应先确认最小权限和操作边界。

该技能适用于研究检索类任务,需配合宿主环境使用。

来源仓库内路径:skills/container-security

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/snyk/studio-recipes --skill container-security;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

container-security 怎么安装?

在终端执行 npx skills add https://github.com/snyk/studio-recipes --skill container-security。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

container-security 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

container-security 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/snyk/studio-recipes --skill container-security 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

container-security 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

container-security 用的人多吗?

公开数据是累计安装 442 次,近一周安装 19 次,下载 155 次,GitHub 29 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

container-security 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
container-security

container 安全 · 本页

44229执行命令未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Container Security Scanner

Guide for comprehensive container image security analysis, covering OS vulnerabilities, application dependencies, and Dockerfile best practices.

Core Principle: Secure containers from the base up - secure base image, minimal packages, no vulnerabilities.


Quick Start

1. Identify image to scan (local, registry, or archive)
2. Run snyk_container_scan with image name
3. Analyze results: OS packages + application deps
4. Provide remediation guidance
5. Optionally fix Dockerfile issues

Phase 1: Image Identification

Step 1.1: Parse User Input

Extract the image reference from the user's request (e.g., myapp:latest, nginx:1.25, gcr.io/project/app:v1, sha256:abc123..., or ./image.tar).

Step 1.2: Determine Scan Scope

Ask or infer:

  • App vulns: Include application dependencies? (default: yes for v1.1090.0+)
  • Base image: Separate base image vulns? (useful for understanding what you control)
  • Platform: For multi-arch images, which platform? (linux/amd64, linux/arm64)

Phase 2: Execute Scan

Step 2.1: Basic Scan

Invoke mcp_snyk_snyk_container_scan with:

  • image: the image name or path

Step 2.2: Advanced Scan Options

For more comprehensive analysis, invoke mcp_snyk_snyk_container_scan with:

  • image: the image name
  • file: path to Dockerfile (enables better remediation advice)
  • app_vulns: true (scan app dependencies)
  • severity_threshold: "high" (filter to high/critical only)

Step 2.3: Base Image Analysis

To isolate inherited vs. added vulnerabilities:

  1. Invoke mcp_snyk_snyk_container_scan with image and exclude_base_image_vulns: true — shows only vulnerabilities your layers added.
  2. Invoke again without that flag — shows the full picture including base OS.

Phase 3: Analyze Results

Step 3.1: Categorize Findings

SourceDescriptionYour Control
Base OS packagesInstalled by base imageChange base image
Additional OS packagesInstalled via apt/yumUpdate or remove
App dependenciesNode modules, Python packagesUpdate versions
Dockerfile issuesMisconfigurationsDirect fix

Step 3.2: Generate Summary

## Container Scan Results: [image:tag]

### Overview
| Category | Critical | High | Medium | Low |
|----------|----------|------|--------|-----|
| OS Packages | X | Y | Z | W |
| App Dependencies | A | B | C | D |
| **Total** | X+A | Y+B | Z+C | W+D |

### Base Image Analysis
- **Base**: [base image detected]
- **Vulnerabilities from base**: [count]
- **Vulnerabilities you added**: [count]

### Top Priority Issues

| Severity | Package | Vulnerability | Fix Available |
|----------|---------|---------------|---------------|
| Critical | openssl | CVE-2024-XXXX | Yes - 3.0.12 |
| High | libcurl | CVE-2024-YYYY | Yes - 8.5.0 |

Step 3.3: Identify Fix Strategies

OS Packages: Update package in Dockerfile, upgrade base image, or use distroless/minimal base.

App Dependencies: Update in source manifest and rebuild image with updated dependencies.

No Fix Available: Document accepted risk, consider alternative package, or wait for upstream fix.


Phase 4: Remediation Guidance

Step 4.1: Base Image Upgrades

If base image has vulnerabilities:

## Base Image Recommendation

**Current**: node:16-alpine
**Vulnerabilities**: 15 (3 Critical, 5 High)

**Recommended**: node:20-alpine
**Vulnerabilities**: 2 (0 Critical, 1 High)

### Dockerfile Change

Before

FROM node:16-alpine

After

FROM node:20-alpine


### Migration Notes

- Node 20 has breaking changes in [list]
- Test thoroughly before deploying

Step 4.2: Package Updates

For individual package vulnerabilities:


## Package Fix: openssl

**Current**: 3.0.8 **Vulnerable to**: CVE-2024-XXXX (Critical) **Fix Version**: 3.0.12

### Dockerfile Addition

Add before your application layer

RUN apk update && apk upgrade openssl

Step 4.3: Application Dependency Fixes


## Application Dependency Fix

**Package**: lodash (via npm) **Current**: 4.17.15 **Fix Version**: 4.17.21

### Steps

1. Update package.json: "lodash": "^4.17.21"
2. Rebuild image: docker build -t myapp:fixed.
3. Verify fix: snyk container test myapp:fixed

Step 4.4: Dockerfile Best Practices

Key improvements to recommend:

# 1. Pin specific tags (not latest)
FROM node:20.10.0-alpine3.19

# 2. Run as non-root
RUN addgroup -g 1001 appgroup && \
    adduser -u 1001 -G appgroup -D appuser
USER appuser

# 3. Multi-stage builds (smaller image, fewer vulns)
FROM node:20 AS builder
WORKDIR /app
COPY . .
RUN npm ci && npm run build

FROM node:20-alpine
COPY --from=builder /app/dist /app
CMD ["node", "/app/index.js"]

# 4. Minimize packages
RUN apt-get install -y --no-install-recommends curl

Phase 5: Verification

Step 5.1: Rebuild Image

# Rebuild with no cache to ensure fresh packages
docker build --no-cache -t myapp:fixed .

Step 5.2: Re-scan

Invoke mcp_snyk_snyk_container_scan with:

  • image: myapp:fixed
  • file: ./Dockerfile

Step 5.3: Compare Results

## Fix Verification

| Metric | Before | After | Change |
|--------|--------|-------|--------|
| Critical | 3 | 0 | -3 ✅ |
| High | 5 | 1 | -4 ✅ |
| Medium | 12 | 8 | -4 ✅ |
| Total | 20 | 9 | -11 ✅ |

### Remaining Issues
- 1 High: No fix available upstream (document risk)
- 8 Medium: Low priority (schedule for next sprint)

End-to-End Example

User: "Scan my app:latest image and help me fix it."

Step 1 — Run the scan:

mcp_snyk_snyk_container_scan(image="app:latest", app_vulns=true)

Step 2 — Tool returns (example output):

{
  "summary": "Found 18 vulnerabilities (2 Critical, 6 High, 10 Medium)",
  "baseImage": "node:16-alpine",
  "vulnerabilities": [
    { "severity": "critical", "pkgName": "openssl", "version": "3.0.8",
      "fixedIn": "3.0.12", "id": "CVE-2024-0001" },
    { "severity": "high", "pkgName": "lodash", "version": "4.17.15",
      "fixedIn": "4.17.21", "id": "CVE-2021-23337" }
  ]
}

Step 3 — Deliver structured response:

## Scan Results: app:latest
Base image: node:16-alpine | 2 Critical · 6 High · 10 Medium

### Immediate Actions
1. Upgrade base image → node:20-alpine (eliminates ~14 vulns)
2. Pin openssl ≥ 3.0.12 in Dockerfile (CVE-2024-0001, Critical)
3. Update lodash to ^4.17.21 in package.json (CVE-2021-23337, High)

### Dockerfile patch
FROM node:20-alpine        # was node:16-alpine
RUN apk add --no-cache openssl>=3.0.12

Step 4 — After applying fixes, rebuild and re-scan to confirm resolution.


Common Scenarios

Scenario 1: "Scan my Docker image"

1. Invoke snyk_container_scan(image="app:latest")
2. Summarize findings by category
3. Recommend highest-priority fixes
4. Provide Dockerfile changes

Scenario 2: "Secure my Dockerfile"

1. Review Dockerfile for best practices
2. Build image if not already built
3. Invoke snyk_container_scan(image=..., file="./Dockerfile")
4. Combine scan results with Dockerfile review
5. Provide unified remediation

Scenario 3: "Find a more secure base image"

1. Identify current base image and vulnerabilities
2. Scan alternative base images
3. Compare vulnerability counts
4. Recommend best option with migration notes

Base Image Quick Reference

RuntimeRecommended BaseNotes
Node.jsnode:20-alpineSmallest, may lack some libs
Node.jsnode:20-slimDebian-based, more compatible
Pythonpython:3.12-slimGood balance
Pythonpython:3.12-alpineSmallest
Javaeclipse-temurin:21-jre-alpineJRE only
Gogcr.io/distroless/staticNo shell, minimal attack surface
.NETmcr.microsoft.com/dotnet/aspnet:8.0-alpineRuntime only

Distroless options (gcr.io/distroless/): static (Go/Rust), base (most languages), java, nodejs — all offer minimal attack surface with no shell.


Error Handling

ErrorSolutions
Image not found locallydocker pull <image> · check name spelling · verify registry access
Registry authentication requireddocker login <registry> · verify credentials and permissions
Scan timed outRetry · pull image locally first · scan a .tar archive instead

Constraints

  1. Scan before deploy: Never deploy unscanned images
  2. Pin versions: Use specific image tags, not latest
  3. Document exceptions: If vulnerabilities can't be fixed, document why
  4. Regular rescans: Images should be rescanned weekly for new CVEs
  5. Multi-stage builds: Prefer smaller production images

平台分布

Codex

35.14%
按下载量换算54

Claude

31.37%
按下载量换算49

Cursor

20.24%
按下载量换算31

Gemini CLI

9.8%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/snyk/studio-recipes --skill container-security 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills