-
Notifications
You must be signed in to change notification settings - Fork 89
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
doc: TRG 4.07: Read-Only Filesystem (DRAFT) #414
Conversation
…am. This commit introduces the read-only filesystem security topic as a new mandatory check for Tractus-X source code configuration.
Added line at the end
Created by the consortia security team. |
docs/release/trg-4/trg-4-07.md
Outdated
|
||
## Description | ||
|
||
Whether this container has a read-only root filesystem. Default is false. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description should explain potentially more than just a read-only filesystem. like implications, best practices (what to do with log files, what to do in other cases)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the input! I will add to that
Hi, Thanks |
Added better description as suggested and added release guideline suggestions.
Added the requested suggestions. |
Added trailing spaces
Removed spaces
removed space
changed directory to trg 0 as requested
Fixed typos, mandatory date and directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could add a hint how to nevertheless mount a (temporary) writable folder if the container executables need to spool something:
Temporary Folders (If needed)
In the case that an executable in your container should need a temporary folder for logging or spooling purposes, you can mount a writable emptydir volume as follows:
apiVersion: v1
kind: Pod
metadata:
name: temporary-folder
spec:
containers:
- name: sample-container-which-needs-temporary-folder
volumeMounts:
- name: tempfolder
mountPath: /tmp
readOnly: false
volumes:
- name: tempfolder
emptyDir: {}
@SSIRKC I appreciate the effort of improving the securityContext! I'd need to test the change. |
Co-authored-by: Florian Rusch (ZF Friedrichshafen AG) <[email protected]>
I will add this to the document :) |
added tmp mount insturctions by CJung
yaml edit
fixes
Hi Evelyn, yes this is absolutely correct. My source from OWASP also puts this topics together in "weak configurations". It would make sense to rename 4-03 to weak configurations and consolidate all topics. For now I set up a new sub-chapter to keep it a bit more simple and less overwhelming for now. But this is certainly a good idea to consolidate these at some point :) |
Added implementation samples by Florian
fixed urls
Update 10.10: All requested changes applied or checked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend reworking this whole TRG so that it doesn't just focus on the read-only file system. Instead, it should focus on setting the securityContext
in the right way and also give guidance on how to do that in relation to our helm charts, because we don't provide any simple k8s resources.
WDYT?
Co-authored-by: Florian Rusch (ZF Friedrichshafen AG) <[email protected]>
Hi Florian, we can have a more general TRG also as Evelyn stated there is 4.03 that contains also settings about the security context. However, I actually like that the TRGs are short reads and rather simple to understand. But I think this could be a democratic decision. |
Co-authored-by: Gábor Almádi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes applied. The consideration of merging was discussed in the office hours. The idea will wont be considered due to the mentioned reasons of keeping the articles smaller and simpler and fitting them better into the checklist format. Making them iteratively more efficient.
The pull request was held open for feedback and suggestions til the mentioned date. All feedback was considered and applied or further discussed. I request to merge these changes into 4.07 @Siegfriedk |
@SSIRKC Just already giving a heads up: depending on the base image a product uses there will be more enabling needed than just adding 'readOnlyRootFilesystem: true' to the securityContext. For instance, products using nginx-unprivileged will encounter the following error: Also for the dotnet base image, an additional tweak is necessary but that's not relevant for other teams. |
Added fixes to overwrite tmp
Hi @evegufy, thanks for the feedback. I added the settings to make tmp being able to be overwritten and mounted. Can you explain what issue is caused for dotnet containing setups? Thanks for your help! It is very important to iron out the issues with your feedback. |
added blanks
Hi @SSIRKC sure, I'm glab to help. Regarding the dotnet base image, I encountered the following error: |
@SSIRKC pls write to me on teams if it is ready to merge |
Description
This is a TRG docs addition as announced by the consortia security team. This commit introduces the read-only filesystem security context as a new recommended setting.
This pull only adresses the docs.
Pre-review checks
Please ensure to do as many of the following checks as possible, before asking for committer review:
-> No source code