Skip to content

Conversation

@cgoncalves
Copy link

@cgoncalves cgoncalves commented Oct 15, 2025

readOnlyRootFilesystem prevents containers from writing to the root filesystem, reducing attack surface and improving security posture by limiting potential malicious file modifications and ensuring immutable container runtime.

allowPrivilegeEscalation=false prevents containers from gaining additional privileges beyond those initially granted, further hardening the security posture by blocking privilege escalation attacks.

- name: linuxptp-daemon-container
securityContext:
privileged: true
readOnlyRootFilesystem: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do write files

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where? If in volumes, that is fine.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/var/run and /etc/linuxptp/ at least.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good feedback. I will wait for the AWS deploy-ec2 CI to get fixed (currently broken). Then, I will handle directories needing write access. I expect CI to be able to validate my PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, those two /var/run and /etc/linuxptp are already volumes. Those are not impacted by the read-only filesystem.

josephdrichard
josephdrichard previously approved these changes Nov 6, 2025
@josephdrichard
Copy link
Collaborator

/retest

1 similar comment
@josephdrichard
Copy link
Collaborator

/retest

@josephdrichard
Copy link
Collaborator

Can you fix merge conflicts? Not sure why tests are failing though

josephdrichard
josephdrichard previously approved these changes Nov 24, 2025
@josephdrichard
Copy link
Collaborator

Can you see why tests are failing? This can't merge until tests are passing

readOnlyRootFilesystem prevents containers from writing to the root filesystem,
reducing attack surface and improving security posture by limiting potential
malicious file modifications and ensuring immutable container runtime.

allowPrivilegeEscalation=false prevents containers from gaining additional
privileges beyond those initially granted, further hardening the security
posture by blocking privilege escalation attacks.

Signed-off-by: Carlos Goncalves <[email protected]>
@cgoncalves
Copy link
Author

If only CI was stable to run the tests.

@josephdrichard
Copy link
Collaborator

@edcdavid Can you tell what the error is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants