-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(sonarcloud): Dockerfile docker:S6504 security hotspots
Fixes the following SonarCloud security hotspots in Dockerfile: "Make sure no write permissions are assigned to the copied resource. Allowing non-root users to modify resources copied to an image is security-sensitive" i.e. SonarCloud rule docker:S6504 i.e. https://rules.sonarsource.com/docker/RSPEC-6504/ Also: - Update `.dockerignore` file to be more general - Add comments to `Dockerfile` related to SonarCloud security hotspot docker:S6470 i.e. "Recursively copying context directories is security-sensitive" https://rules.sonarsource.com/docker/RSPEC-6470/ refs KK-1417
- Loading branch information
1 parent
3b8b0aa
commit 19d8ba2
Showing
2 changed files
with
70 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,59 @@ | ||
node_modules | ||
Dockerfile* | ||
docker-compose* | ||
compose.* | ||
.dockerignore | ||
.git | ||
.gitignore | ||
README.md | ||
LICENSE | ||
.vscode | ||
build | ||
# Using "**/" prefix to make ignores work in root and in subdirectories at any level. | ||
# | ||
# From https://docs.docker.com/build/concepts/context/#dockerignore-files | ||
# "Docker also supports a special wildcard string ** that matches any | ||
# number of directories (including zero). For example, **/*.go excludes | ||
# all files that end with .go found anywhere in the build context." | ||
# | ||
# NOTE: | ||
# You can add an exception for a specific file by prefixing the line with an ! | ||
# if you need to include a file that would otherwise be ignored. | ||
|
||
# Environment variable files | ||
**/*.env | ||
**/*.env.example | ||
**/.env | ||
**/.env.* | ||
|
||
# Certificate/keystore/key files | ||
**/*.ca-bundle | ||
**/*.cer | ||
**/*.cert | ||
**/*.crt | ||
**/*.jks | ||
**/*.key | ||
**/*.keystore | ||
**/*.p7b | ||
**/*.p7c | ||
**/*.p7s | ||
**/*.p12 | ||
**/*.pem | ||
**/*.pfx | ||
**/*.ppk | ||
**/*.pvk | ||
|
||
# Build files | ||
**/build | ||
**/dist | ||
**/target | ||
|
||
# Miscellaneous | ||
**/*.lock | ||
**/*.log | ||
**/*.temp | ||
**/*.tmp | ||
**/.DS_Store | ||
**/.git | ||
**/.gitignore | ||
**/.idea | ||
**/.pytest_cache | ||
**/.ruff_cache | ||
**/.ssh | ||
**/.venv | ||
**/.vscode | ||
**/__pycache__ | ||
**/compose.* | ||
**/node_modules | ||
**/temp | ||
**/tmp | ||
**/venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters