-
Notifications
You must be signed in to change notification settings - Fork 696
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 Variable-based CPE and UFW rules for Ubuntu 20.04 STIG #7635
Commits on Feb 10, 2022
-
Add macro for shared variable<->value checks
This allows us to easily create shared checks for whether or not a (string) variable presently takes on a given value. This will be used as part of applicability checks based around variables. Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 638e1be - Browse repository at this point
Copy the full SHA 638e1beView commit details -
Add applicability checks against variables
Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d995d24 - Browse repository at this point
Copy the full SHA d995d24View commit details -
Add removed form to complete_ocil_entry_package
Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bfe6cac - Browse repository at this point
Copy the full SHA bfe6cacView commit details -
Start tracking var_applicability separately
Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 93007f4 - Browse repository at this point
Copy the full SHA 93007f4View commit details -
Update remediation to understand variable-based applicability
Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9c8da6f - Browse repository at this point
Copy the full SHA 9c8da6fView commit details -
Prevent generation of var_ based CPEs
These are pseudo-CPEs that don't actually land in the CPE list, but need to be known by portions of the build system that expect CPEs. Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6139f93 - Browse repository at this point
Copy the full SHA 6139f93View commit details -
Add variable-based CPEs into hand-written OVALs
This adds variable-based "CPEs" (where the check passes if the variable is not of the correct value) into the definition of hand-written elements. We use an extend_definition for this purpose. Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1bb6428 - Browse repository at this point
Copy the full SHA 1bb6428View commit details -
Update templated OVALs to obey variable-based CPE checks
Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f091c67 - Browse repository at this point
Copy the full SHA f091c67View commit details -
Support variable-based CPE platforms
When we generate pseudo-CPEs based off of variables, we load (and then re-write) the XML of OVAL checks. The rewriting (via ElementTree) causes an oval: namespace prefix to be added into all platform elements. This causes later steps (which operate strictly on strings and not on parsed element trees) to fail. Update them to use the correct namespace. Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f088275 - Browse repository at this point
Copy the full SHA f088275View commit details -
Add sub-namespaces to oval parsing
This fixes a bug whereby the proper namespaces (and sub-namespaces) weren't added into the OVAL parsing. This resulted in namespaces such as linux not being detected correctly (thus becoming ns1), breaking XML parsing later. Additionally, the oval definition namespace must be empty (default namespace) rather than being explicitly referenced. Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7be752e - Browse repository at this point
Copy the full SHA 7be752eView commit details -
Add pseudo variable-based CPEs land to templates
When build remediations, all content--both templated and rule directory based--is processed by ssg/build_remediations.py, allowing us to add pseudo variable-based CPEs there. However, when building OVALs (in ssg/build_oval.py), we only process shared and rule directory OVALs; templated OVALs are written directly by the template system and not processed as a group afterwards. Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f4934bc - Browse repository at this point
Copy the full SHA f4934bcView commit details -
Correctly handle negation for pseudo-CPEs
When negating the variable pseudo-CPEs, we need to ensure the variable has taken a value and is non-empty. Otherwise, we run into the situation that all negations conflictingly activate when the variable is left empty. This occurs when scap-workbench generates a remediation to apply from a given profile. Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1aeda0b - Browse repository at this point
Copy the full SHA 1aeda0bView commit details -
When using a variable-based pseudo-CPE, we need to source the shared remediation functions. Otherwise, the variable substitution will not occur and our variables will not be populated. Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 41da952 - Browse repository at this point
Copy the full SHA 41da952View commit details -
Add var_firewall_package for selecting which firewall to use
Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0635ed0 - Browse repository at this point
Copy the full SHA 0635ed0View commit details -
Add firewall-based CPE variables
Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 10d57dc - Browse repository at this point
Copy the full SHA 10d57dcView commit details -
Add OVAL checks for all variable CPEs
Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dc2b376 - Browse repository at this point
Copy the full SHA dc2b376View commit details -
Add Uncomplicated Firewall (ufw) group
Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b25f410 - Browse repository at this point
Copy the full SHA b25f410View commit details -
Add package_ufw_installed for CIS 3.5.1.1
Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8c76e05 - Browse repository at this point
Copy the full SHA 8c76e05View commit details -
Add platforms for package_ufw_installed
Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6665385 - Browse repository at this point
Copy the full SHA 6665385View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e88930 - Browse repository at this point
Copy the full SHA 3e88930View commit details -
Configuration menu - View commit details
-
Copy full SHA for d7c1e69 - Browse repository at this point
Copy the full SHA d7c1e69View commit details -
Add service_ufw_enabled for CIS 3.5.1.3
Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d9545da - Browse repository at this point
Copy the full SHA d9545daView commit details -
Add platforms for service_ufw_enabled
Signed-off-by: Alexander Scheel <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8eb3392 - Browse repository at this point
Copy the full SHA 8eb3392View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f0a9c1 - Browse repository at this point
Copy the full SHA 6f0a9c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for a67154f - Browse repository at this point
Copy the full SHA a67154fView commit details -
Configuration menu - View commit details
-
Copy full SHA for f95387d - Browse repository at this point
Copy the full SHA f95387dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b2a420 - Browse repository at this point
Copy the full SHA 2b2a420View commit details -
Configuration menu - View commit details
-
Copy full SHA for f7327c5 - Browse repository at this point
Copy the full SHA f7327c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 33871dc - Browse repository at this point
Copy the full SHA 33871dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for db29da6 - Browse repository at this point
Copy the full SHA db29da6View commit details -
Configuration menu - View commit details
-
Copy full SHA for fa91678 - Browse repository at this point
Copy the full SHA fa91678View commit details -
Configuration menu - View commit details
-
Copy full SHA for c5b263f - Browse repository at this point
Copy the full SHA c5b263fView commit details