-
Notifications
You must be signed in to change notification settings - Fork 739
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
Harden tmp #523
Harden tmp #523
Conversation
90d4b52
to
a02c61d
Compare
Hey @lbayerlein, great to see you again! :) And I very much like this PR. I'd also like to extend it to other mountpoints. Especially the ones we defined in our linux-baseline (https://github.com/dev-sec/linux-baseline/pull/164/files):
I'm thinking about how to do this in the best way. We could probably duplicate the variables from this PR for all other mountpoints.. Or maybe some kind of list?
I don't know what the best way is. What do you think? All mounts should be opt-in with secure values pre-defined (as above). |
Hey @rndmh3ro , proud to commit to this project and work with you 👍 Is it ok for you to do this in a new PR? There is more logic to implement and I would like to give tmp file hardening upstream. Afterwards I will extend it with iteration over multiple directories. Can you tell, whats wrong with these checks? What I am doing wrong? Thanks, |
The checks fail because of other reasons. We need to thix those some time. :) The PR itself looks good to me. @schurzi, can you take a look, too? |
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.
Looks good to me, just need to fix the minor wording issues and the mount task.
At first I was thinking about detecting if /tmp
is a mountpoint and then do our stuff., but I also like your solution.
The alternative is using the Ansible supplied facts to detect if a /tmp
mountpoint is present and then set the options from our hardening and get the device from Ansible facts.
This should be all we need (data from facter):
mountpoints => {
...
/tmp => {
...
device => "/dev/mapper/vg_system-lv_tmp",
filesystem => "xfs",
...
},
@rndmh3ro what do you think? This might be a bit more complicated but it would work automatically and we would need some fewer variables. But it could also interfere with other things trying to manage mountpoints.
I like it the way it currently is. No need to do any magic. |
055e106
to
2c6f7d6
Compare
5baf923
to
349104c
Compare
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'm almost good now. Sorry ;)
When the task order is fixed this can be merged from my point of view.
@rndmh3ro Is there something I can do? Can we merge? |
@lbayerlein I'll take a look tomorrow! |
@lbayerlein could you reverse the order of the mount tasks? The way it is now, we write |
@schurzi Sure I changed the order and moved remounting before managing |
Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Co-authored-by: schurzi <github@drachen-server.de> Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Co-authored-by: schurzi <github@drachen-server.de> Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Co-authored-by: schurzi <github@drachen-server.de> Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Co-authored-by: schurzi <github@drachen-server.de> Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com> Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com> Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Co-authored-by: schurzi <github@drachen-server.de> Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
@lbayerlein now there are 3 mount tasks, I think that is one to many :) |
Signed-off-by: Ludwig Bayerlein <bayerlein@bayerlein-networks.com>
@schurzi oh sorry copy paste error. Now there is one for remounting, one for permissions and one for managing fstab. I think this should work? :D |
Add option to manage handling with /tmp directory. Its possible to mount a device to /tmp with hardened options. If there is no need to mount a disk, this function ensures permissions on /tmp directory.
If you need changes, tell me, please.