RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1472379 - [RFE] Remediate container images so that they are compliant with a security policy
Summary: [RFE] Remediate container images so that they are compliant with a security p...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: atomic
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lokesh Mandvekar
QA Contact: atomic-bugs@redhat.com
Mirek Jahoda
URL:
Whiteboard:
Depends On: 1471672
Blocks: 1469954 1477926
TreeView+ depends on / blocked
 
Reported: 2017-07-18 15:19 UTC by Jan Černý
Modified: 2023-09-14 04:01 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-26 07:47:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Černý 2017-07-18 15:19:11 UTC
Description of problem:

We don't have any automated way to create container images that are compliant with a security policy (eg. STIG, OSPP, PCI-DSS, ..) That means users have to change the images manually to make them security compliant. That's very complicated and time-consuming, especially in large container environments.

Instead, we need to enable users to build hardened images directly. That should be achieved by involving OpenSCAP, SCAP Security Guide and Docker Build together. The idea is based on adding a hardening layer on the top of the image.

Atomic scan should be extended in a way that it doesn't only scan, but also fixes the failing rules, so that the new image passes the scan.



Version-Release number of selected component (if applicable):
n/a

How reproducible:
never

Steps to Reproduce:
1. atomic scan --harden

Actual results:
none, not implemented yet

Expected results:
An image that is compliant with a security policy is built.

Additional info:
none

Comment 1 Daniel Walsh 2017-07-18 16:09:34 UTC
I guess instead of mounting the image in as ReadOnly it would be mounted in as ReadWrite and we would need to make sure that the atomic scan container can write to the image.

Comment 2 Jan Černý 2017-07-25 13:51:04 UTC
That isn't necessary. Instead of mounting the image as ReadWrite, we can generate a fix script based on scan results, and then build a new image from the scanned image. During the build process the fix script will be invoked. We can think of it as adding new layer on the original image. This layer will contain all the changes needed to comply with a SCAP profile.

Comment 5 Martin Preisler 2017-10-16 17:32:00 UTC
The referenced PR has been reworked in https://github.com/projectatomic/atomic/pull/1090 and merged. Setting to POST.

Comment 10 Edward Shen 2018-09-10 11:36:24 UTC
I tested this on atomic-1.22.1-25.git5a342e3.el7.x86_64.
I can't figure out how this flag "--remediate" works in a short time, but I think below behavior is not the correct one:
1. atomic pull docker.io/busybox
2. atomic scan --remediate docker.io/busybox

result:
openscap has no remediation script.

Comment 12 Edward Shen 2018-09-12 06:24:18 UTC
Thank you, Matus. This is exactly I want to know.
Verified this on atomic-1.22.1-25.git5a342e3.el7.x86_64, it works fine.

Comment 14 errata-xmlrpc 2018-09-26 07:47:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:2795

Comment 15 Red Hat Bugzilla 2023-09-14 04:01:22 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


Note You need to log in before you can comment on or make changes to this bug.