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

Add a refine-rule tailoring ability to autotailor #1877

Closed
wants to merge 18 commits into from

Commits on Oct 2, 2023

  1. Configuration menu
    Copy the full SHA
    93efdd6 View commit details
    Browse the repository at this point in the history
  2. Add autotailor unit test stub.

    matejak authored and jan-cerny committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    2aacfbd View commit details
    Browse the repository at this point in the history
  3. Use a single constant definition

    Instead of repeating the smae string all over the place, let's
    have a single constant defined and then used.
    jan-cerny committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    0f4c498 View commit details
    Browse the repository at this point in the history
  4. Append '_customized' to the customized profile ID

    If the `--new-profile-id` isn't provided by the user, we will
    create the ID of the customized profile ID by appending the
    `_customized` suffix to the base profile ID.
    
    This change makes the behavior according to the help text of the
    `--new-profile-id` option:
    > If left out, the new ID will be obtained by appending '_customized'
    > to the tailored profile ID.
    jan-cerny committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    52b77ac View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    48e4069 View commit details
    Browse the repository at this point in the history
  6. Add unit test for is_valid_xccdf_id

    and fix the failed asserts
    jan-cerny committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    c3e3210 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    fbc49d3 View commit details
    Browse the repository at this point in the history
  8. Move the logic to inside the Tailoring class

    We will move the condition that determines the ID of the customized
    profile into the `Tailoring` class. This move helps encapsulate
    code and also allows easier unit testing of this feature which
    we immediately use to write a unit test in this commit as well :)
    jan-cerny committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    b22b340 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2023

  1. Add ability to refine rule

    This patch adds two new command line options `--rule-role` and
    `--rule-severity` that will allow users to refine rule role and
    rule seveirty in their customized profile. Using these options
    will generate `refine-rule` elements within the output tailoring
    file.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2058168
    jan-cerny committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    4699f91 View commit details
    Browse the repository at this point in the history
  2. Fix PEP 8 problems

    jan-cerny committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    07b5ae7 View commit details
    Browse the repository at this point in the history
  3. Update man page

    jan-cerny committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    a8ce89a View commit details
    Browse the repository at this point in the history
  4. Move XCCDF Value assignment to Tailoring class

    This patch moves the logic for assigning the XCCDF Values for
    outer space inside the Tailoring class by defining a method.
    jan-cerny committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    4256956 View commit details
    Browse the repository at this point in the history
  5. Use a standard way of handling XML namespaces

    Explicitly setting namespaces of elements is the recommended way of using
    namespaces. It helps prevent namespace errors. Also, it simplifies unit
    testing of code that works with XML elements.
    jan-cerny committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    a46b771 View commit details
    Browse the repository at this point in the history
  6. Rename and merge a variable

    The new name of the variable better describes its actual contents.
    jan-cerny committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    ae3874e View commit details
    Browse the repository at this point in the history
  7. Add an integration test for the autotailor tool

    This commit adds an integration test for autotailor. The goal
    of the test is to verify if the tailoring produced by autotailor
    can be loaded and consumed by oscap and if the generated tailoring
    leads to the intended behavior of the profile evaluation.
    jan-cerny committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    ae87898 View commit details
    Browse the repository at this point in the history
  8. Add autotailor unit tests to CTest

    The result will be that the autotailor unit tests will be executed
    during the CTest which is run in our CI.
    jan-cerny committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    48c013b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4afcbae View commit details
    Browse the repository at this point in the history
  10. Remove unused imports

    jan-cerny committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    9596edb View commit details
    Browse the repository at this point in the history