Container Security Scanner Skill
Purpose
Automated container image and Kubernetes security scanning to identify vulnerabilities, misconfigurations, secrets, and compliance issues in containerized environments.
Capabilities
Image Vulnerability Scanning
- Scan container images for known CVEs using Trivy, Grype, or Anchore
- Detect vulnerabilities in OS packages and application dependencies
- Generate SBOM (Software Bill of Materials) in CycloneDX or SPDX format
- Track vulnerability severity (Critical, High, Medium, Low)
Dockerfile Security Analysis
- Check Dockerfile best practices and security issues
- Identify privileged container configurations
- Detect hardcoded secrets in Dockerfiles
- Verify base image security and freshness
Kubernetes Security Scanning
- Run Kubernetes CIS benchmark checks using kube-bench
- Analyze pod security policies and standards
- Check RBAC configurations for over-permissive access
- Detect insecure network policies
Secrets Detection
- Scan images for embedded secrets and credentials
- Identify API keys, tokens, and passwords in layers
- Check environment variable configurations
Image Signature Verification
- Verify container image signatures using cosign
- Validate image provenance and attestations
- Check image registry security configurations
Compliance Reporting
- Generate compliance reports (CIS, NIST, PCI-DSS)
- Map findings to compliance controls
- Track remediation status and timelines
Integrations
- Trivy: Comprehensive vulnerability scanner for containers
- Grype: Container image vulnerability scanner
- Syft: SBOM generation tool
- kube-bench: Kubernetes CIS benchmark checker
- Falco: Runtime security monitoring
- Anchore: Enterprise container security platform
- cosign: Container image signing and verification
Target Processes
- Container Security Scanning Process
- DevSecOps Pipeline Integration
- IaC Security Scanning
- Kubernetes Security Hardening
- Container Image Build Pipeline
Input Schema
{
"type": "object",
"properties": {
"imageName": {
"type": "string",
"description": "Container image name with tag"
},
"registry": {
"type": "string",
"description": "Container registry URL"
},
"dockerfilePath": {
"type": "string",
"description": "Path to Dockerfile for static analysis"
},
"kubeManifestPath": {
"type": "string",
"description": "Path to Kubernetes manifests"
},
"scanType": {
"type": "array",
"items": {
"type": "string",
"enum": ["vulnerability", "config", "secrets", "compliance", "sbom"]
}
},
"severityThreshold": {
"type": "string",
"enum": ["CRITICAL", "HIGH", "MEDIUM", "LOW"]
}
},
"required": ["imageName"]
}
Output Schema
{
"type": "object",
"properties": {
"scanId": {
"type": "string"
},
"imageName": {
"type": "string"
},
"scanTimestamp": {
"type": "string",
"format": "date-time"
},
"vulnerabilities": {
"type": "object",
"properties": {
"critical": { "type": "integer" },
"high": { "type": "integer" },
"medium": { "type": "integer" },
"low": { "type": "integer" },
"findings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"cveId": { "type": "string" },
"severity": { "type": "string" },
"package": { "type": "string" },
"fixedVersion": { "type": "string" },
"description": { "type": "string" }
}
}
}
}
},
"misconfigurations": {
"type": "array"
},
"secrets": {
"type": "array"
},
"complianceStatus": {
"type": "object"
},
"recommendations": {
"type": "array",
"items": { "type": "string" }
}
}
}
Usage Example
skill: {
name: 'container-security-scanner',
context: {
imageName: 'myapp:v1.2.3',
registry: 'registry.example.com',
scanType: ['vulnerability', 'config', 'secrets'],
severityThreshold: 'HIGH'
}
}
1---
2name: container-security-scanner
3description: Container image and Kubernetes security scanning for CVEs, misconfigurations, and compliance
4allowed-tools:
5 - Bash
6 - Read
7 - Write
8 - Glob
9 - Grep
10 - WebFetch
11graph:
12 domains: [domain:security]
13 specializations: [specialization:security-compliance]
14 skillAreas: [skill-area:container-security, skill-area:vulnerability-scanning-remediation]
15 roles: [role:security-engineer, role:devops-engineer]
16 workflows: [workflow:vulnerability-management, workflow:security-audit]
17 topics: [topic:zero-trust-architecture]
18
19metadata:
20 source: https://skillmd.com/skills/a5c-ai/container-security-scanner
21---
22
23# Container Security Scanner Skill
24
25## Purpose
26
27Automated container image and Kubernetes security scanning to identify vulnerabilities, misconfigurations, secrets, and compliance issues in containerized environments.
28
29## Capabilities
30
31### Image Vulnerability Scanning
32- Scan container images for known CVEs using Trivy, Grype, or Anchore
33- Detect vulnerabilities in OS packages and application dependencies
34- Generate SBOM (Software Bill of Materials) in CycloneDX or SPDX format
35- Track vulnerability severity (Critical, High, Medium, Low)
36
37### Dockerfile Security Analysis
38- Check Dockerfile best practices and security issues
39- Identify privileged container configurations
40- Detect hardcoded secrets in Dockerfiles
41- Verify base image security and freshness
42
43### Kubernetes Security Scanning
44- Run Kubernetes CIS benchmark checks using kube-bench
45- Analyze pod security policies and standards
46- Check RBAC configurations for over-permissive access
47- Detect insecure network policies
48
49### Secrets Detection
50- Scan images for embedded secrets and credentials
51- Identify API keys, tokens, and passwords in layers
52- Check environment variable configurations
53
54### Image Signature Verification
55- Verify container image signatures using cosign
56- Validate image provenance and attestations
57- Check image registry security configurations
58
59### Compliance Reporting
60- Generate compliance reports (CIS, NIST, PCI-DSS)
61- Map findings to compliance controls
62- Track remediation status and timelines
63
64## Integrations
65
66- **Trivy**: Comprehensive vulnerability scanner for containers
67- **Grype**: Container image vulnerability scanner
68- **Syft**: SBOM generation tool
69- **kube-bench**: Kubernetes CIS benchmark checker
70- **Falco**: Runtime security monitoring
71- **Anchore**: Enterprise container security platform
72- **cosign**: Container image signing and verification
73
74## Target Processes
75
76- Container Security Scanning Process
77- DevSecOps Pipeline Integration
78- IaC Security Scanning
79- Kubernetes Security Hardening
80- Container Image Build Pipeline
81
82## Input Schema
83
84```json
85{
86 "type": "object",
87 "properties": {
88 "imageName": {
89 "type": "string",
90 "description": "Container image name with tag"
91 },
92 "registry": {
93 "type": "string",
94 "description": "Container registry URL"
95 },
96 "dockerfilePath": {
97 "type": "string",
98 "description": "Path to Dockerfile for static analysis"
99 },
100 "kubeManifestPath": {
101 "type": "string",
102 "description": "Path to Kubernetes manifests"
103 },
104 "scanType": {
105 "type": "array",
106 "items": {
107 "type": "string",
108 "enum": ["vulnerability", "config", "secrets", "compliance", "sbom"]
109 }
110 },
111 "severityThreshold": {
112 "type": "string",
113 "enum": ["CRITICAL", "HIGH", "MEDIUM", "LOW"]
114 }
115 },
116 "required": ["imageName"]
117}
118```
119
120## Output Schema
121
122```json
123{
124 "type": "object",
125 "properties": {
126 "scanId": {
127 "type": "string"
128 },
129 "imageName": {
130 "type": "string"
131 },
132 "scanTimestamp": {
133 "type": "string",
134 "format": "date-time"
135 },
136 "vulnerabilities": {
137 "type": "object",
138 "properties": {
139 "critical": { "type": "integer" },
140 "high": { "type": "integer" },
141 "medium": { "type": "integer" },
142 "low": { "type": "integer" },
143 "findings": {
144 "type": "array",
145 "items": {
146 "type": "object",
147 "properties": {
148 "cveId": { "type": "string" },
149 "severity": { "type": "string" },
150 "package": { "type": "string" },
151 "fixedVersion": { "type": "string" },
152 "description": { "type": "string" }
153 }
154 }
155 }
156 }
157 },
158 "misconfigurations": {
159 "type": "array"
160 },
161 "secrets": {
162 "type": "array"
163 },
164 "complianceStatus": {
165 "type": "object"
166 },
167 "recommendations": {
168 "type": "array",
169 "items": { "type": "string" }
170 }
171 }
172}
173```
174
175## Usage Example
176
177```javascript
178skill: {
179 name: 'container-security-scanner',
180 context: {
181 imageName: 'myapp:v1.2.3',
182 registry: 'registry.example.com',
183 scanType: ['vulnerability', 'config', 'secrets'],
184 severityThreshold: 'HIGH'
185 }
186}
187```