scanning-container-security
Execute use when you need to work with security and compliance. This skill provides security scanning and vulnerability detection with comprehensive guidance and automation. Trigger with phrases like "scan for vulnerabilities", "implement security controls", or "audit security".
- License 许可
- MIT
- 最近更新
- 2026-05-26
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- scanning-container-security
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Execute use when you need to work with security and compliance. This skill provides security scanning and vulnerability detection with comprehensive guidance and automation. Trigger with phrases like "scan for vulnerabilities", "implement security controls", or "audit security".
- allowed-tools
- Read, Write, Edit, Grep, Glob, Bash(docker:*), Bash(kubectl:*)
- compatible-with
- claude-code, codex, openclaw
02 资源文件 5
- 资产文件assets/README.md66 B
- 参考文档references/README.md70 B
- 脚本scripts/README.md460 B
- 脚本scripts/snyk_scan.sh2.8 KB
- 脚本scripts/trivy_scan.sh2.8 KB
03 SKILL.md 正文
Scanning Container Security
Overview
Scan container images and Dockerfiles for vulnerabilities, misconfigurations, and compliance violations using Trivy, Grype, Snyk Container, and Hadolint. Analyze base images, OS packages, application dependencies, and runtime configurations to produce actionable security reports with remediation guidance.
Prerequisites
- Container scanning tool installed:
trivy,grype,snyk, ordocker scout - Dockerfile linter:
hadolintfor Dockerfile best practice validation - Docker daemon running for local image scanning
- Access to the container images to scan (local, registry, or tar archive)
jqfor parsing JSON scan results
Instructions
- Identify target images for scanning: production images, base images, and CI-built images
- Lint Dockerfiles with
hadolint Dockerfileto catch misconfigurations before build (privileged instructions, pinned versions, shell best practices) - Scan built images for OS-level vulnerabilities:
trivy image <image:tag>orgrype <image:tag> - Scan for application dependency vulnerabilities: check language-specific packages (npm, pip, Maven, Go modules) embedded in the image
- Check for secrets accidentally baked into image layers:
trivy image --scanners secret <image:tag> - Evaluate image against CIS Docker Benchmark: verify non-root user, read-only filesystem capability, health checks defined
- Generate a security report with severity classification (Critical, High, Medium, Low) and CVE identifiers
- Produce remediation steps: upgrade base image, pin package versions, replace vulnerable dependencies
- Integrate scanning into CI/CD pipeline: fail builds on Critical/High vulnerabilities, generate SARIF output for GitHub Security tab
Output
- Vulnerability scan report in JSON, table, or SARIF format
- Hadolint report with Dockerfile improvement recommendations
- Remediation Dockerfile patches (updated base image, pinned package versions)
- CI/CD pipeline step configuration for automated image scanning
- Security policy document defining acceptable risk thresholds
Error Handling
| Error | Cause | Solution |
|---|---|---|
trivy: unable to pull image |
Image not found locally or registry auth failure | Pull image first with docker pull or configure registry credentials |
CRITICAL vulnerability found but no fix available |
Upstream package has no patch yet | Document as accepted risk, use --ignore-unfixed flag, or switch to an alternative base image |
hadolint: DL3008 pin versions in apt-get install |
Packages installed without version pinning | Add version pins (e.g., apt-get install nginx=1.24.0-1) or use --no-install-recommends |
Scan timeout on large image |
Image has many layers or large filesystem | Use --timeout 15m flag; scan a specific layer or use --skip-dirs to exclude test data |
False positive CVE |
Scanner database maps CVE to a package not actually exploitable | Add to .trivyignore or Grype ignore file with justification comment |
Examples
- "Scan all production Docker images for Critical and High CVEs, generate a report, and create Jira tickets for each finding."
- "Lint the Dockerfile for best practices: ensure multi-stage build, non-root USER, no ADD for remote URLs, and pinned base image digest."
- "Set up a GitHub Actions step that runs Trivy on every PR, fails on Critical vulnerabilities, and uploads results to the Security tab via SARIF."
Resources
- Trivy: https://aquasecurity.github.io/trivy/
- Grype: https://github.com/anchore/grype
- Hadolint: https://github.com/hadolint/hadolint
- Docker Scout: https://docs.docker.com/scout/
- CIS Docker Benchmark: https://www.cisecurity.org/benchmark/docker
04 同仓库更多 Skills
zustand-store-ts
Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.
zustand-store-creator
Zustand Store Creator - Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category.
zero-trust-config-helper
Zero Trust Config Helper - Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category.
zapier-integration-helper
Zapier Integration Helper - Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category.
zai-cli
Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP. Use when user needs image/video analysis, OCR, UI-to-code conversion, error diagnosis, real-time web search, web page to markdown extraction, or GitHub code exploration. Trigger with phrases like "analyze this image", "search the web for", "read this page", "explore this repo", or "use zai". Requires Z_AI_API_KEY.
yt-research
Research competitor YouTube channels, niches, and trending topics for your content strategy. Use this skill whenever the user says "research channels", "analyze competitors", "find trending topics", "niche analysis", "competitive research", "what are other creators doing", "scrape YouTube channels", or wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.