-
Notifications
You must be signed in to change notification settings - Fork 741
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
add modprobe template, control os-10 #138
Conversation
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 think you are on to something. Disabling probing of unused filesystem when mounting a filesystem without specifiying the filesystem sounds like a good idea. Do you have any refs to documentation where this is also done?
That's actually a CIS recommendation, see here: https://www.cisecurity.org/wp-content/uploads/2017/04/CIS_Oracle_Linux_6_Benchmark_v1.0.0.pdf, search for "1.1.1 Disable unused filesystems". I updated the readme. |
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.
LGTM. One minor detail in the comments.
tasks/modprobe.yml
Outdated
dest: "/etc/modprobe.d/dev-sec.conf" | ||
owner: "root" | ||
group: "root" | ||
mode: "0640" |
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.
Seems your editor did not add a \n
automatically. You can check with a hexeditor. Can you add one just to be safe :) ?
check for modprobe use apt and yum instead of package Revert "use apt and yum instead of package" This reverts commit 215a97b. use latest to install kmod run apt-get update
@ypid, I added some tasks to install modprobe and squashed the commits. Can you do one last review? :) |
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.
Two things could be addressed. Other than that, it should be fine.
tasks/modprobe.yml
Outdated
command: 'modprobe -V' | ||
register: modprobe_installed | ||
ignore_errors: True | ||
changed_when: 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.
I would drop this check task. The next task can just ensure that kmod
is present.
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.
Yeah, I don't really know why I did this. There wa a problem with installing kmod on ubuntu 16.04 but I fixed this with the apt-task in default.yml.
Anyway, I removed it.
tasks/modprobe.yml
Outdated
package: | ||
name: 'kmod' | ||
state: 'installed' | ||
when: modprobe_installed and modprobe_installed.rc != 0 |
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 change the state from installed
to present
. According to the docs installed
should not work.
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.
Done.
rsync was erroneously added to `os_security_packages_list` variable, meaning it was uninstalled as a "package with known issues". Fixes #141
check for modprobe use apt and yum instead of package Revert "use apt and yum instead of package" This reverts commit 215a97b. use latest to install kmod run apt-get update
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.
LGTM.
Issue #137: Indent sshd_config's "Match Group sftponly"
add modprobe template, control os-10
Issue dev-sec#137: Indent sshd_config's "Match Group sftponly"
I'm not sure if we should also run theses commands in addition to adding them to the
modprobe.d
-directory.Currently I'd say yes so there's no restart required.
What do you think, @chris-rock @atomic111 @ypid ?