Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security issue - Docker-compose persisted volumes #7114

Open
Josh-XT opened this issue Apr 30, 2024 · 1 comment
Open

Security issue - Docker-compose persisted volumes #7114

Josh-XT opened this issue Apr 30, 2024 · 1 comment

Comments

@Josh-XT
Copy link
Contributor

Josh-XT commented Apr 30, 2024

I was just looking at the security tab and saw this warning. GHSA-x5gj-2chr-4ch6

I'm not sure if there is a reason but I noticed that the docker-compose.yml and Dockerfile as well as the rest of the whole directory is persisted in the docker-compose.yml file. You should pick and choose what directories need to be persisted locally. The whole folder should not be persisted. For example, if things in data and logs folders are the important things to save, persist those instead of the whole folder. If things are saving in the root of the project, I would consider a refactor.

volumes:
- ./:/app
- ./docker-compose.yml:/app/docker-compose.yml:ro
- ./Dockerfile:/app/Dockerfile:ro

@Albiere1
Copy link

Replace this (persists everything)

  • ./:/app

With this (persists only data and logs)

  • ./data:/app/data
  • ./logs:/app/logs

this should solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants