unicodeveloper / unicodeveloper/globalthreatmap

Docker image runs as root; no non-root user defined

Open Beginner friendly
#42 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.8k
Forks
300
PR merge metrics
No merged PRs in 30d

Description

  • Context: Cloud
  • Category: Vulnerability (Container Privilege Escalation)
  • Severity: Medium

Evidence

# Dockerfile
FROM node:20-alpine
RUN corepack enable && ...
WORKDIR /app
COPY ...
RUN pnpm run build
EXPOSE 3000
CMD ["pnpm", "start"]

No USER directive is present. The Node.js process runs as root (UID 0) inside the container. If the application is compromised (e.g., via RCE through a dependency vulnerability), the attacker has full root access to the container filesystem, including all environment variables, mounted secrets (dot_env), and potentially the container runtime socket if it is mounted.

Affected files: Dockerfile

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open Dockerfile and review the image setup, working directory, build commands, and runtime command around the missing USER directive. Build and run the image, then verify that the Node.js process no longer runs with UID 0 and that the application still starts successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, node.js
Domain
devops, security
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.