and so it begins... #2
Merged
NShiftKey / NShiftKey - Dockerfile & IaC misconfiguration
required action
Aug 5, 2024 in 1m 0s
Summary
- 3 security issue(s)
- High : 1
- Medium : 1
- Low : 1
Details
NShiftKey
-
Image user should not be 'root'
- Description : Running containers with 'root' user can lead to a container escape situation. It is a best practice to run containers as non-root users, which can be done by adding a 'USER' statement to the Dockerfile.
- Countermeasure : Specify at least 1 USER command in Dockerfile with non-root user as argument
- Target Code : darpa-i2o-synapse/Dockerfile [view change history] [ignore this]
https://github.com/2lambda123/darpa-i2o-synapse/blob/021428b5277853d8d4edd166c5915c8b2d8aef0e/Dockerfile#L0-L1
- Target Code : darpa-i2o-synapse/Dockerfile [view change history] [ignore this]
-
'RUN cd ...' to change directory
- Description : Use WORKDIR instead of proliferating instructions like 'RUN cd … && do-something', which are hard to read, troubleshoot, and maintain.
- Countermeasure : RUN should not be used to change directory: 'mkdir /syndata && cd /root/git/synapse && python setup.py install && cp synapse/docker/cortex/ram_dmon.json /syndata/dmon.json'. Use 'WORKDIR' statement instead.
- Target Code : darpa-i2o-synapse/Dockerfile [view change history] [ignore this]
Lines 6 to 10 in 021428b
- Target Code : darpa-i2o-synapse/Dockerfile [view change history] [ignore this]
-
No HEALTHCHECK defined
- Description : You should add HEALTHCHECK instruction in your docker container images to perform the health check on running containers.
- Countermeasure : Add HEALTHCHECK instruction in your Dockerfile
- Target Code : darpa-i2o-synapse/Dockerfile [view change history] [ignore this]
https://github.com/2lambda123/darpa-i2o-synapse/blob/021428b5277853d8d4edd166c5915c8b2d8aef0e/Dockerfile#L0-L1
- Target Code : darpa-i2o-synapse/Dockerfile [view change history] [ignore this]
Loading