[Deployment] Development files are copied into the production image

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

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
docker
Domain
devops

Research direction

Start by reading the Dockerfile and existing .dockerignore to see what the build copies into /app and what the runtime needs. Add development and test files such as requirements-dev.txt, tests, .github/, and docs/ to the ignore list, adjusting it for runtime needs. Done when those files are absent from the published image while required application files remain available.

Written by the indexing model from the issue text.

Description

Labels: docker, security

Summary

COPY . . puts requirements-dev.txt, and any other development or test files, into /app in the published image. Vulnerability scanners read requirement files, so the image is reported as vulnerable to packages it doesn't actually install. For example, Amazon Inspector reports black 25.1.0 → 26.3.0 (CVE-2026-31900, CRITICAL) from requirements-dev.txt, even though pip list doesn't show black.

Suggested fix

Add the development files to .dockerignore:

requirements-dev.txt
**/tests/
.github/
docs/

Adjust the list to whatever the runtime doesn't need.

Dominant language
HTML
Stars
6
Forks
4
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from brainthee/CHAOTICA

All issues in brainthee/CHAOTICA

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.