CtrlK
BlogDocsLog inGet started
Tessl Logo

endor-container

Scan container images and analyze Dockerfiles for security issues. Use when the user says "scan my Docker image", "Dockerfile security", "container scan", "endor container", "docker compose security", or is creating/modifying Dockerfiles and docker-compose files. Checks for root user, latest tags, exposed ports, secrets in build args, and missing health checks. Do NOT use for application code scanning (/endor-sast).

92

Quality

89%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

SKILL.md
Quality
Evals
Security

Endor Labs Container Security Scanner

Scan container images and analyze Dockerfiles for security issues.

Workflow

Dockerfile Analysis

Step 1: Find Dockerfiles

Search for Dockerfile, Dockerfile.*, docker/Dockerfile, *.dockerfile.

Step 2: Check for Security Issues

Critical:

IssuePatternFix
Running as rootNo USER directiveAdd USER nonroot
Using :latest tagFROM image:latestUse specific version tag
Secrets in build argsARG PASSWORD=...Use runtime secrets
Sensitive data in COPYCopying .env, keysUse .dockerignore

High:

IssuePatternFix
No health checkMissing HEALTHCHECKAdd health check directive
Exposed sensitive portsEXPOSE 22 (SSH)Remove unnecessary ports
Using ADD for URLsADD http://...Use COPY + curl

Medium:

IssuePatternFix
Package cache not cleanedapt-get without cleanupAdd rm -rf /var/lib/apt/lists/*
Multiple RUN commandsMany separate RUN linesCombine with &&
No .dockerignoreMissing fileCreate .dockerignore
Using ADD instead of COPYADD for local filesUse COPY

Step 3: Present Analysis

Report issues by severity with line numbers, then provide a secured Dockerfile version:

FROM node:20-alpine
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
WORKDIR /app
COPY --chown=appuser:appgroup package*.json ./
RUN npm ci --only=production && npm cache clean --force
COPY --chown=appuser:appgroup . .
USER appuser
HEALTHCHECK --interval=30s --timeout=3s \
  CMD wget -q --spider http://localhost:3000/health || exit 1
EXPOSE 3000
CMD ["node", "server.js"]

Include checklist: specific base image tag, non-root user, health check, clean package cache, multi-stage build, .dockerignore, COPY over ADD, no secrets in build args/env.

Docker Compose Analysis

Step 1: Find Compose Files

Search for docker-compose.yml, docker-compose.*.yml, compose.yml, compose.*.yml.

Step 2: Check for Issues

IssuePatternFix
Privileged modeprivileged: trueRemove or use specific capabilities
Host networknetwork_mode: hostUse bridge network
Docker socket mount/var/run/docker.sockRemove unless required
Sensitive env varsPASSWORD=xxx in envUse Docker secrets
No resource limitsMissing deploy.resourcesAdd CPU/memory limits
Ports on 0.0.0.0ports: "3000:3000"Use 127.0.0.1:3000:3000

Step 3: Present Analysis

Report issues per service, then provide secured compose example:

version: '3.8'
services:
  app:
    image: app:1.0.0
    read_only: true
    tmpfs:
      - /tmp
    cap_drop:
      - ALL
    cap_add:
      - NET_BIND_SERVICE
    deploy:
      resources:
        limits:
          cpus: '0.5'
          memory: 512M
    secrets:
      - db_password
    ports:
      - "127.0.0.1:3000:3000"

secrets:
  db_password:
    external: true

Image Scanning

The MCP scan tool accepts a repository path only; it does not accept a container image reference. For images, use the CLI:

npx -y endorctl container scan --image {image_name}:{tag} --output-type summary

Present results similar to /endor-scan output.

Next Steps

  1. /endor-scan for application-level vulnerabilities
  2. /endor-cicd for automated container scanning in CI
  3. /endor-policy to enforce container security standards

For data source policy, read references/data-sources.md.

Error Handling

ErrorAction
No Dockerfile foundAsk for path or offer to create one
Docker not installedAnalyze Dockerfiles statically
Auth errorRun /endor-setup
Repository
endorlabs/skills-ideas
Last updated
Created

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.