AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Container Security

skill-medy-gribkov-arcana-container-security · by medy-gribkov

Container security from build to runtime. Image scanning, minimal base images, rootless execution, secrets management, supply chain verification, and runtime policies with concrete Dockerfile examples.

No reviews yet
0 installs
38 views
0.0% view→install

Install

$ agentstack add skill-medy-gribkov-arcana-container-security

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-medy-gribkov-arcana-container-security)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Container Security? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Image Scanning

Run Trivy before every push. Fail CI on HIGH or CRITICAL vulnerabilities.

trivy image myapp:latest --severity HIGH,CRITICAL --exit-code 1

Use Grype as a second scanner. Different scanners catch different CVEs.

grype myapp:latest --fail-on high

Store scan results as build artifacts for trending.

trivy image myapp:latest --format json --output scan-results.json

Minimal Base Images

Use distroless or scratch for runtime. Multi-stage builds separate build tools from runtime. See references/dockerfile-hardening.md for complete BAD/GOOD Dockerfile patterns for Go, Node.js, and static binaries.

Rootless Containers

Always create a non-root user and switch to it. For distroless, use the built-in nonroot user (UID 65532). See references/dockerfile-hardening.md for rootless patterns.

Secrets Management

BAD: Baking secrets into the image. They persist in layers even if deleted.

FROM node:24-alpine
ENV DATABASE_PASSWORD=supersecret
COPY . /app
CMD ["node", "server.js"]

GOOD: Inject secrets at runtime via environment variables or mounted files.

docker run -e DATABASE_PASSWORD="$(cat /secure/db-password)" myapp:latest

For Kubernetes, use Secrets mounted as volumes or environment variables.

env:
  - name: DATABASE_PASSWORD
    valueFrom:
      secretKeyRef:
        name: db-credentials
        key: password

Build-Time Secrets

Use BuildKit secrets for credentials needed during build (e.g., private registry tokens).

BAD: Copying .env file into the image.

COPY .env /build/.env
RUN npm install --registry=https://private.npm.com

GOOD: Mount secrets during build without persisting them.

# syntax=docker/dockerfile:1
RUN --mount=type=secret,id=npmrc,target=/root/.npmrc \
    npm install --registry=https://private.npm.com

Build with:

docker buildx build --secret id=npmrc,src=.npmrc .

Audit .dockerignore

Ensure secrets never enter the build context.

.env
.env.*
*.key
*.pem
secrets/
credentials.json

Scan committed Dockerfiles for hardcoded tokens.

gitleaks detect --source . --no-git

Supply Chain Security

Sign Images with Cosign

Sign after building. Verify before deploying.

cosign sign myregistry.com/myapp:v1.0.0

Verify signature before pull.

cosign verify --key cosign.pub myregistry.com/myapp:v1.0.0

Generate SBOM

Create a Software Bill of Materials for every release.

syft myapp:latest -o json > sbom.json
trivy image --format cyclonedx --output sbom.json myapp:latest

Attach SBOM to the image as an OCI artifact.

cosign attach sbom --sbom sbom.json myregistry.com/myapp:v1.0.0

Pin Dependencies by Digest

BAD: Using mutable tags. Tags can be overwritten.

FROM node:24-alpine

GOOD: Pin by digest. Digest is immutable.

FROM node:24-alpine@sha256:abc123...

Find digests with:

docker pull node:24-alpine
docker inspect node:24-alpine | jq -r '.[0].RepoDigests[0]'

Runtime Policies

Admission control (Gatekeeper, Kyverno), seccomp profiles, and Falco runtime monitoring. See references/runtime-security.md for policy YAML examples and Falco rules.

CI Checklist

  1. Lint Dockerfile with Hadolint.
hadolint Dockerfile
  1. Scan for secrets in build context.
gitleaks detect --source . --no-git
  1. Build and scan image.
docker build -t myapp:latest .
trivy image myapp:latest --exit-code 1 --severity HIGH,CRITICAL
  1. Sign image and generate SBOM.
cosign sign myregistry.com/myapp:v1.0.0
syft myapp:latest -o json > sbom.json
  1. Push to registry with immutable tag.
docker tag myapp:latest myregistry.com/myapp:v1.0.0
docker push myregistry.com/myapp:v1.0.0
  1. Verify signature before deploying.
cosign verify --key cosign.pub myregistry.com/myapp:v1.0.0

Dockerfile Best Practices

Complete BAD/GOOD Dockerfile comparisons and common mistakes. See references/dockerfile-hardening.md for full examples.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.