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

CMP 2453 pci dss requirement 1 #11725

Merged
merged 5 commits into from
Mar 29, 2024

Conversation

rhmdnd
Copy link
Collaborator

@rhmdnd rhmdnd commented Mar 18, 2024

  • CMP-2453: Mark Requirement 1.1 as not applicable
  • CMP-2453: Update Requirement 1.2
  • CMP-2453: Update Requirement 1.3
  • CMP-2453: Update Requirement 1.4
  • CMP-2453: Update Requirement 1.5

These controls are documentation and process specific and there isn't a
way to enforce them using the Compliance Operator. Mark them as not
applicable.
Update each subsection of Requirement 1.2 based on its applicability to
OpenShift and potential rules we can write to improve alignment with
this requirement.
Add applicable rules that exist for these requirements, and add notes
for rules we can create to further assess OpenShift clusters against
these requirements.
Update each subsection of requirement 1.4. Some of these checks are
outside the scope of OpenShift, but additional coverage for ingress and
egress network configuration would be valuable. Documenting those gaps
with references to tickets for that work.
Update the status of the single requirement in section 1.5.
@rhmdnd rhmdnd added OpenShift OpenShift product related. pci-dss labels Mar 18, 2024
Copy link

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

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

# this in the OpenShift configuration:
# https://docs.openshift.com/container-platform/latest/networking/network_policy/default-network-policy.html
rules:
- configure_network_policies_namespaces
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Need to make sure these rules reference the new requirement/control ID (e.g., 1.2.6) since the requirement IDs from PCI-DSS 3.2.1 don't line up directly with version 4.0.0.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we need to inspect all services, and also to inspect any pod using hostnetwork?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think network_policies does not apply to pod using hostnetwork

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Interesting - good question.

It looks like we do have some PCI-DSS overlap with the SCC rules for requirement 2.

$ grep -R pci applications/openshift/scc
applications/openshift/scc/scc_drop_container_capabilities/rule.yml:    pcidss: Req-2.2
applications/openshift/scc/scc_limit_container_allowed_capabilities/rule.yml:    pcidss: Req-2.2
applications/openshift/scc/scc_limit_ipc_namespace/rule.yml:    pcidss: Req-2.2
applications/openshift/scc/scc_limit_net_raw_capability/rule.yml:    pcidss: Req-2.2
applications/openshift/scc/scc_limit_network_namespace/rule.yml:    pcidss: Req-2.2
applications/openshift/scc/scc_limit_privilege_escalation/rule.yml:    pcidss: Req-2.2
applications/openshift/scc/scc_limit_privileged_containers/rule.yml:    pcidss: Req-2.2
applications/openshift/scc/scc_limit_process_id_namespace/rule.yml:    pcidss: Req-2.2
applications/openshift/scc/scc_limit_root_containers/rule.yml:    pcidss: Req-2.2

I can make a note to go through those when we start parsing requirement 2.

Copy link

🤖 A k8s content image for this PR is available at:
ghcr.io/complianceascode/k8scontent:11725
This image was built from commit: 60195b8

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:11725

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

Copy link

codeclimate bot commented Mar 18, 2024

Code Climate has analyzed commit 60195b8 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.3% (0.0% change).

View more on Code Climate.

@xiaojiey
Copy link
Collaborator

/hold for test

@openshift-ci openshift-ci bot added the do-not-merge/hold Used by openshift-ci-robot bot. label Mar 25, 2024
@xiaojiey
Copy link
Collaborator

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Used by openshift-ci-robot bot. label Mar 27, 2024
@xiaojiey
Copy link
Collaborator

/lgtm

Copy link
Contributor

@Vincent056 Vincent056 left a comment

Choose a reason for hiding this comment

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

/lgtm
some just comments on adding on rule, we can do it in an another PR

@rhmdnd rhmdnd merged commit 3126c9f into ComplianceAsCode:master Mar 29, 2024
44 checks passed
@Mab879 Mab879 added the Update Profile Issues or pull requests related to Profiles updates. label May 16, 2024
@Mab879 Mab879 added this to 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
OpenShift OpenShift product related. pci-dss Update Profile Issues or pull requests related to Profiles updates.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants