content icon indicating copy to clipboard operation
content copied to clipboard

Align sshd_use_approved_macs_ordered_stig with Ubuntu STIG

Open mpurg opened this issue 1 year ago • 6 comments

Description:

  • Modify sshd_use_approved_macs_ordered_stig rule to better align with Ubuntu STIG (UBTU-20-010043, UBTU-22-255055)
  • Switch to using sshd_approved_macs variable
  • Switch to checking the whole set of algorithms instead of just a subset
  • Extend OVAL check to allow distributed configs

Rationale:

  • Checking just for a subset does not meet the requirement of having the algorithms in the exact same order (as specified in the STIG), because it is possible to specify only the last algorithm, which is effectively the same as specifying them in the wrong order

mpurg avatar Apr 18 '24 14:04 mpurg

Hi @mpurg. Thanks for your PR.

I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

openshift-ci[bot] avatar Apr 18 '24 14:04 openshift-ci[bot]

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

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

Fedora Testing Environment Open in Gitpod

Oracle Linux 8 Environment Open in Gitpod

github-actions[bot] avatar Apr 18 '24 14:04 github-actions[bot]

:robot: A k8s content image for this PR is available at: ghcr.io/complianceascode/k8scontent:11853 This image was built from commit: 9f849e54945458b2268705cf473cdcdd469cfc6b

Click here to see how to deploy it

If you alread have Compliance Operator deployed: utils/build_ds_container.py -i ghcr.io/complianceascode/k8scontent:11853

Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and: CONTENT_IMAGE=ghcr.io/complianceascode/k8scontent:11853 make deploy-local

github-actions[bot] avatar Apr 18 '24 14:04 github-actions[bot]

@marcusburghardt @Mab879 @teacup-on-rockingchair do you think it would be worth to make the ubuntu.xml oval the default instead of the current shared.xml, as it seems this is allowing partial matches, and iirc disa is pretty strict on having all the approved algorithms in a specific order, that way a partial match shouldn't be allowed.

dodys avatar Apr 30 '24 14:04 dodys

@marcusburghardt @Mab879 @teacup-on-rockingchair do you think it would be worth to make the ubuntu.xml oval the default instead of the current shared.xml, as it seems this is allowing partial matches, and iirc disa is pretty strict on having all the approved algorithms in a specific order, that way a partial match shouldn't be allowed.

@marcusburghardt @Mab879 @teacup-on-rockingchair tagging you again to bring attention to this

dodys avatar May 07 '24 06:05 dodys

Code Climate has analyzed commit 9f849e54 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 59.4% (0.0% change).

View more on Code Climate.

qlty-cloud-legacy[bot] avatar May 09 '24 15:05 qlty-cloud-legacy[bot]

because of the lack of reply, I will merge this as is, and my comment could be done in a separate PR if other vendors are interested.

dodys avatar May 10 '24 08:05 dodys