Skip to content
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

New Rule: tftpd_uses_secure_mode_systemd #11310

Closed

Conversation

Mab879
Copy link
Member

@Mab879 Mab879 commented Nov 28, 2023

Description:

Adds new rule tftpd_uses_secure_mode_systemd

Rationale:

  • Coverage for RHEL 9 STIG

Review Hints:

This PR is having issues with the Regex on ExecStart. I can't see to figure out what is going on, this

See RHEL-09-252055

@Mab879 Mab879 added this to the 0.1.72 milestone Nov 28, 2023
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Used by openshift-ci bot. label Nov 28, 2023
Copy link

openshift-ci bot commented Nov 28, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@Mab879 Mab879 changed the title New Rule: New Rule: tftpd_uses_secure_mode_systemd Nov 28, 2023
Copy link

Start a new ephemeral environment with changes proposed in this pull request:

rhel8 (from CTF) Environment (using Fedora as testing environment)
Open in Gitpod

Fedora Testing Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

Copy link

This datastream diff is auto generated by the check Compare DS/Generate Diff

Click here to see the full diff
ansible remediation for rule 'xccdf_org.ssgproject.content_rule_tftpd_uses_secure_mode' differs.
--- xccdf_org.ssgproject.content_rule_tftpd_uses_secure_mode
+++ xccdf_org.ssgproject.content_rule_tftpd_uses_secure_mode
@@ -20,7 +20,7 @@
     - always
 
 - name: Find out if the file exists and contains the line configuring server arguments
-  find:
+  ansible.builtin.find:
     path: /etc/xinetd.d
     patterns: tftp
     contains: ^[\s]+server_args.*$
@@ -40,7 +40,7 @@
   - tftpd_uses_secure_mode
 
 - name: Ensure that TFTP server is configured to start with secure directory
-  lineinfile:
+  ansible.builtin.lineinfile:
     path: /etc/xinetd.d/tftp
     regexp: ^[\s]*(server_args[\s]+=[\s]+.*?)(-s[\s]+[/\.\w]+)*(.*)$
     line: \1 -s {{ var_tftpd_secure_directory }} \3
@@ -63,7 +63,7 @@
   - tftpd_uses_secure_mode
 
 - name: Insert correct config line to start TFTP server with secure directory
-  lineinfile:
+  ansible.builtin.lineinfile:
     path: /etc/xinetd.d/tftp
     line: server_args = -s {{ var_tftpd_secure_directory }}
     state: present

@Mab879 Mab879 force-pushed the fix_tftpd_uses_secure_mode branch from 2a6b133 to 2fbd859 Compare January 8, 2024 13:35
@marcusburghardt marcusburghardt modified the milestones: 0.1.72, 0.1.73 Jan 29, 2024
@Mab879
Copy link
Member Author

Mab879 commented Apr 23, 2024

Closing this PR at this time as no work is planned on this time.

@Mab879 Mab879 closed this Apr 23, 2024
@Mab879 Mab879 removed this from the 0.1.73 milestone May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Used by openshift-ci bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants