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

OCPBUGS-3344: fetchraw: Lock down the PVCExtractorPod #223

Merged
merged 1 commit into from Sep 11, 2023

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Feb 2, 2023

This would comply with security policies, although it's mostly academical, because the openshift-compliance namespace must be privileged in order for scans to run. Still, better lock down all we can..

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 2, 2023
@jhrozek jhrozek changed the title fetchraw: Lock down the PVCExtractorPod OCPBUGS-3344: fetchraw: Lock down the PVCExtractorPod Feb 2, 2023
@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Feb 2, 2023
@openshift-ci-robot
Copy link

@jhrozek: This pull request references Jira Issue OCPBUGS-3344, which is invalid:

  • expected the bug to target the "4.13.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This would comply with security policies, although it's mostly academical, because the openshift-compliance namespace must be privileged in order for scans to run. Still, better lock down all we can..

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.

@jhrozek
Copy link
Contributor Author

jhrozek commented Feb 2, 2023

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Feb 2, 2023
@openshift-ci-robot
Copy link

@jhrozek: This pull request references Jira Issue OCPBUGS-3344, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.13.0) matches configured target version for branch (4.13.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @xiaojiey

In response to this:

/jira refresh

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-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Feb 2, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 3, 2023

@JAORMX: changing LGTM is restricted to collaborators

In response to this:

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.

@BhargaviGudi
Copy link

/hold for QE review

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 6, 2023
@BhargaviGudi
Copy link

BhargaviGudi commented Feb 6, 2023

Verification PASS with OpenShift 4.13.0-0.nightly-2023-02-03-145213
Compliance operator bundle v0.1.60

[bgudi@bgudi openshift]$ oc create -f createComplianceOperator.yaml 
catalogsource.operators.coreos.com/compliance-operator created
namespace/openshift-compliance created
operatorgroup.operators.coreos.com/openshift-compliance-abcd created
subscription.operators.coreos.com/openshift-compliance-operator created
[bgudi@bgudi oc-compliance]$ ./bin/oc-compliance bind -N test -S default profile/ocp4-cis
Creating ScanSettingBinding test
[bgudi@bgudi oc-compliance]$ oc get ssb -n openshift-compliance 
NAME   AGE
test   99s
[bgudi@bgudi oc-compliance]$ oc get suite -n openshift-compliance 
NAME   PHASE   RESULT
test   DONE    NON-COMPLIANT
[bgudi@bgudi oc-compliance]$ oc get scan -n openshift-compliance 
NAME       PHASE   RESULT
ocp4-cis   DONE    NON-COMPLIANT
[bgudi@bgudi oc-compliance]$ oc get pods -n openshift-compliance 
NAME                                              READY   STATUS    RESTARTS      AGE
compliance-operator-fb7bb6f5f-wxdrz               1/1     Running   1 (86m ago)   86m
ocp4-openshift-compliance-pp-86c767b5b8-87bmj     1/1     Running   0             86m
rhcos4-openshift-compliance-pp-844989b8c4-dz878   1/1     Running   0             86m

[bgudi@bgudi oc-compliance]$ ./bin/oc-compliance fetch-raw scansettingbinding test -o /tmp/
Fetching results for test scans: ocp4-cis
W0206 18:55:29.854684  571616 warnings.go:70] would violate PodSecurity "restricted:latest": runAsNonRoot != true (container "pv-extract-pod" must not set securityContext.runAsNonRoot=false)
Fetching raw compliance results for pod 'raw-result-extractor-7sxdw'.Fetching raw compliance results for scan 'ocp4-cis'........
The raw compliance results are avaliable in the following directory: /tmp/ocp4-cis
[bgudi@bgudi oc-compliance]$ ls /tmp/ocp4-cis
ocp4-cis-api-checks-pod.xml.bzip2
[bgudi@bgudi ocp4-cis]$ bunzip2 ocp4-cis-api-checks-pod.xml.bzip2
bunzip2: Can't guess original name for ocp4-cis-api-checks-pod.xml.bzip2 -- using ocp4-cis-api-checks-pod.xml.bzip2.out
[bgudi@bgudi ocp4-cis]$ ls -ltr
total 6608
-rw-rw-r--. 1 bgudi bgudi 6500898 Feb  6 18:55 ocp4-cis-api-checks-pod.xml.bzip2.out
-rw-rw-r--. 1 bgudi bgudi  260412 Feb  6 19:20 ocp4-cis-api-checks-pod.xml
[bgudi@bgudi ocp4-cis]$ head ocp4-cis-api-checks-pod.xml.bzip2.out
<?xml version="1.0" encoding="UTF-8"?>
<arf:asset-report-collection xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1" xmlns:core="http://scap.nist.gov/schema/reporting-core/1.1" xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1">
  <core:relationships xmlns:arfvocab="http://scap.nist.gov/specifications/arf/vocabulary/relationships/1.0#">
    <core:relationship type="arfvocab:createdFor" subject="xccdf1">
      <core:ref>collection1</core:ref>
    </core:relationship>
    <core:relationship type="arfvocab:isAbout" subject="xccdf1">
      <core:ref>asset0</core:ref>
    </core:relationship>
  </core:relationships>

@BhargaviGudi
Copy link

BhargaviGudi commented Feb 6, 2023

/label qe-approved

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 6, 2023
@BhargaviGudi
Copy link

/unhold

@jhrozek
Copy link
Contributor Author

jhrozek commented Feb 9, 2023

This should now pass CI since we bumped the deps

@openshift-bot
Copy link

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 11, 2023
@openshift-bot
Copy link

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten
/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 10, 2023
@openshift-ci openshift-ci bot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jun 10, 2023
@jhrozek
Copy link
Contributor Author

jhrozek commented Jun 13, 2023

/remove-lifecycle rotten

@openshift-ci openshift-ci bot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jun 13, 2023
This would comply with security policies.
@jhrozek jhrozek force-pushed the lock-raw-results-extractor branch from ef3fbdf to a571527 Compare June 15, 2023 12:28
@Vincent056
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 11, 2023
@Vincent056 Vincent056 merged commit de62cfd into openshift:master Sep 11, 2023
3 checks passed
@openshift-ci-robot
Copy link

@jhrozek: Jira Issue OCPBUGS-3344: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-3344 has been moved to the MODIFIED state.

In response to this:

This would comply with security policies, although it's mostly academical, because the openshift-compliance namespace must be privileged in order for scans to run. Still, better lock down all we can..

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
Copy link
Contributor

openshift-ci bot commented Sep 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JAORMX, jhrozek, Vincent056

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 11, 2023

@jhrozek: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e a571527 link true /test e2e

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants