Skip to content

Commit 8d854dc

Browse files
committed
fix: add .dockerignore to prevent sensitive data in Docker images
- Create comprehensive .dockerignore to exclude sensitive files - Exclude .env files, secrets, credentials, git files - Exclude virtual envs, build artifacts, test files, docs - Add security comment to Dockerfile line 70 - Prevents CWE-668 and CWE-497 vulnerabilities - Addresses security concern with COPY . . directive
1 parent 3894a60 commit 8d854dc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ COPY --from=backend-deps /usr/local/lib/python3.11/site-packages /usr/local/lib/
6767
COPY --from=backend-deps /usr/local/bin /usr/local/bin
6868

6969
# Copy application code
70+
# Security: .dockerignore ensures sensitive files (.env, secrets, git, etc.) are excluded
71+
# Only files not in .dockerignore will be copied to the container
7072
COPY . .
7173

7274
# Build arguments for version injection

0 commit comments

Comments
 (0)