container-hardening
Multi-stage Dockerfiles, distroless final images, non-root USER, read-only root filesystem, health checks, no :latest tags, vulnerability scanning, and ECS…
Skill by Cloud-Byte-Consulting
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/cloud-byte-consulting-container-hardening
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security, writing, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/container-hardening
What's inside
- Skill name
container-hardening- Description
- Multi-stage Dockerfiles, distroless final images, non-root USER, read-only root filesystem, health checks, no :latest tags, vulnerability scanning, and ECS task definition security settings. Use when writing Dockerfiles or configuring container security.
- License
- BSD-3-Clause
- Instructions
- 140 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
<!-- Vendored from: platform-catalyst/skills/container-hardening/SKILL.md (BittahCriminal/platform-catalyst, BSD-3-Clause). Adapted for Catalyst: PLAN.md/CLAUDE.md/DECISIONS.md scrubbed; ADR-008->ADR-001, ADR-009->ADR-002. -->
## Role
Container security specialist for the Catalyst IDP. You ensure every container
image is minimal, immutable, non-root, and scanned before deployment. You
enforce the Docker Container Book (Schenker, Packt 2026) best practices and
the AGENTS.md container conventions.
## Instructions
### Multi-stage build pattern
Every Dockerfile uses at minimum two stages:
1. **Builder stage** — Based on a full SDK/toolchain image (e.g.,
`python:3.14.5-slim` or `node:20-slim`). Install dependencies, compile
assets, run unit tests. This stage is never shipped.
2. **Final stage** — Based on a distroless image (e.g.,
`gcr.io/distroless/python3-debian12` or `gcr.io/distroless/static-debian12`).
Copy only the built artifacts from the builder stage. No shell, no package
manager, no unnecessary binaries.
```dockerfile
# Builder
FROM python:3.14.5-slim AS builder
WORKDIR /build
COPY requirements.txt .
RUN pip install --no-cache-dir --target=/deps -r requirements.txt
COPY src/ ./src/
# Final
FROM gcr.io/distroless/python3-debian12
COPY --from=builder /deps /deps
COPY --from=builder /build/src /app/src
ENV PYTHONPATH=/deps
WORKDIR /app
USER 65534
ENTRYPOINT ["python", "-m", "src.main"]
```
### Non-root user
- Set `USER 65534` (the `nobody` user) in the final stage.
- Never run as root in production. If a process needs to bind to a privileged
port, use capabilities (`NET_BIND_SERVICE`) instead of root.
- In ECS task definitions, set `user: "65534"` at the container level.
### Read-only root filesystem
- Set `readonlyRootFilesystem: true` in the ECS task definition's
`linuxParameters`.
- If the application needs to write temporary files, mount a tmpfs volume at
the specific path (e.g., `/tmp`). Do not make the entire filesystem writable.
```json
{
"linuxParameters": {
"readonlyRootFilesystem": true
},
"mountPoints": [
{
"sourceVolume": "tmp",
"containerPath": "/tmp",
"readOnly": false
}
]
}
```
### Health checks
- Define a `HEALTHCHECK` in the Dockerfile or a health check in the ECS task
definition.
- For distroless images without `curl`, use the application's built-in health
endpoint and configure the ECS health check to use it via the ALB target
group.
### Image tagging
- Tag images with the git commit SHA: `${ECR_REPO}:${GIT_SHA}`.
- Never use `:latest`. Every deployment references an immutable, traceable tag.
- The CI pipeline builds, tags, scans, and pushes in a single atomic workflow.
### Vulnerability scanning
- Enable ECR image scanning on push (`scan_on_push = true`).
- CI pipeline fails if any CRITICAL or HIGH severity vulnerability is found.
- Review scan results before promoting an image to a higher environment.
### ECS task definition security
```hcl
container_definitions = jsonencode([{
name = "catalyst-api"
image = "${aws_ecr_repository.api.repository_url}:${var.git_sha}"
user = "65534"
readonlyRootFilesystem = true
linuxParameters = {
readonlyRootFilesystem = true
capabilities = {
drop = ["ALL"]
}
}
logConfiguration = {
logDriver = "awslogs"
options = {
"awslogs-group" = "/ecs/catalyst-api"
"awslogs-region" = var.aws_region
"awslogs-stream-prefix" = "api"
}
}
secrets = [
{
name = "DB_PASSWORD"
valueFrom = aws_secretsmanager_secret.db.arn
}
]
}])From Cloud-Byte-Consulting/Catalyst, BSD-3-Clause.
More from Cloud-Byte-Consulting/Catalyst
- 0.474score
bedrock-converse-client
Cloud-Byte-Consulting
Bedrock runtime Converse/ConverseStream API patterns: message structure, model ID selection, token limits, system prompts, retry with tenacity, error…
SkillCFreshness: CClaude Code +9 - 0.474score
ai-observability
Cloud-Byte-Consulting
Observability for Bedrock AI calls: EMF metrics (BedrockTokensIn, BedrockTokensOut, BedrockLatencyMs), X-Ray subsegments per model call, cost dimension…
SkillCFreshness: CClaude Code +9 - 0.474score
ai-output-validation
Cloud-Byte-Consulting
Pydantic v2 schemas for AI model responses: FindingsReport, StyleReport, SynthesisReport, the parse-retry-drop pattern, confidence scoring, and structured…
SkillCFreshness: CClaude Code +9 - 0.474score
bedrock-binding
Cloud-Byte-Consulting
Bedrock model binding for the Catalyst PR reviewer pipeline, surfaced as a thin stdio MCP server with two tools: bedrock_invoke_converse and…
SkillCFreshness: CClaude Code +9 - 0.474score
fastapi-control-plane
Cloud-Byte-Consulting
FastAPI service patterns for catalyst-api: router organization, pydantic v2 request/response models, construct-scoped path design, IAM auth middleware…
SkillCFreshness: CClaude Code +9 - 0.474score
git-commit-practices
Cloud-Byte-Consulting
Git commit and branch practices for Catalyst that satisfy the challenge's "good Git practices" requirement and the 10% docs/commit-history evaluation…
SkillCFreshness: CClaude Code +9 - 0.474score
async-orchestration
Cloud-Byte-Consulting
Event-driven orchestration patterns for Catalyst: SQS FIFO with dedup, EventBridge rules and schedules, DLQ strategies, Step Functions state machines, retry…
SkillCFreshness: CClaude Code +9 - 0.474score
adr-writer
Cloud-Byte-Consulting
MADR-format Architectural Decision Records: context, decision drivers, considered options with pros/cons, decision outcome, consequences, and the supersedes…
SkillCFreshness: CClaude Code +9 - 0.474score
checkov-cloud-image-static-analysis
Cloud-Byte-Consulting
Designs Checkov-based static analysis for Terraform/OpenTofu IaC and Dockerfile/container hardening in Catalyst.
SkillCFreshness: CClaude Code +9 - 0.474score
clean-python-code
Cloud-Byte-Consulting
Maintainable Python for Catalyst: tooling discipline, idiomatic patterns, separation of concerns, SOLID boundaries, thin decorators, pragmatic use of advanced…
SkillCFreshness: CClaude Code +9 - 0.474score
deployment-strategies
Cloud-Byte-Consulting
Blue/green ECS via CodeDeploy, Lambda weighted alias shifting (canary), rollback triggers (alarm-based), pre/post traffic hooks, bake periods, and the…
SkillCFreshness: CClaude Code +9 - 0.474score
devsecops-integration
Cloud-Byte-Consulting
Shift-left security in Catalyst's CI/CD pipelines: SBOM generation, dependency scanning (pip-audit, npm audit, govulncheck), secret scanning (gitleaks…
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 57
- Last commit (this folder)
- May 21, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- BSD-3-Clause
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Cloud-Byte-Consulting
- 0.474score
adr-writer
Cloud-Byte-Consulting
MADR-format Architectural Decision Records: context, decision drivers, considered options with pros/cons, decision outcome, consequences, and the supersedes…
SkillCFreshness: CClaude Code +9 - 0.474score
checkov-cloud-image-static-analysis
Cloud-Byte-Consulting
Designs Checkov-based static analysis for Terraform/OpenTofu IaC and Dockerfile/container hardening in Catalyst.
SkillCFreshness: CClaude Code +9 - 0.474score
bedrock-binding
Cloud-Byte-Consulting
Bedrock model binding for the Catalyst PR reviewer pipeline, surfaced as a thin stdio MCP server with two tools: bedrock_invoke_converse and…
SkillCFreshness: CClaude Code +9 - 0.474score
ai-observability
Cloud-Byte-Consulting
Observability for Bedrock AI calls: EMF metrics (BedrockTokensIn, BedrockTokensOut, BedrockLatencyMs), X-Ray subsegments per model call, cost dimension…
SkillCFreshness: CClaude Code +9 - 0.474score
ai-output-validation
Cloud-Byte-Consulting
Pydantic v2 schemas for AI model responses: FindingsReport, StyleReport, SynthesisReport, the parse-retry-drop pattern, confidence scoring, and structured…
SkillCFreshness: CClaude Code +9 - 0.474score
clean-python-code
Cloud-Byte-Consulting
Maintainable Python for Catalyst: tooling discipline, idiomatic patterns, separation of concerns, SOLID boundaries, thin decorators, pragmatic use of advanced…
SkillCFreshness: CClaude Code +9
Cite this page
container-hardening skill. Agent Mart. https://agentmart.dev/skills/cloud-byte-consulting-container-hardening (last updated 2026-10-24)