Customizing compliance results
You can customize compliance results if you have the Comply Report Content Administrator role.
You must have the Comply Report Content Administrator role to customize compliance results. For more information, see User role requirements.
Custom profiles
Custom profiles define a tailored set of compliance checks and parameters, allowing you to create or upload profiles that implement only the rules you need.
A profile defines a set of rules to be evaluated and the parameters for those rules. Custom profiles allow you to specify just a subset of the checks available in a standard to be deployed.
From the Main menu, go to .
You can either create a custom profile or upload one from a tailoring file.
Create a new custom profile
Create a custom profile by selecting rules from a standard, configuring selectors and values, and saving the profile for use in assessments.
You can also modify some rule values within your custom profile. If a rule value is customizable, a value of true displays in the Can Customize column along with the default value for the rule in the Default Values column.
-
Select the rule and click Modify Rule Value.
-
In the Modify Custom Profile Value window, enter a Custom Rule Title and change the Custom value field.
Note: Rule titles occasionally include the value used in the rule. Customize the title of rules for which values have been changed. The customized rule titles will then show up in report results, question answers, and report exports. For example, If you provide a new value for the rule (L1) Ensure 'Enforce password history' is set to '24 or more password(s)', you can change 24 to match the custom value. -
Click Save. The new value will appear in the User-defined Values column. You can return to the Default Value of a rule by clicking Use Default.
On the Custom Profiles page, click a custom profile to view its details.
You will see the rules included in the custom profile as well as those for which the values have been modified.
Import a new custom profile
Import a new custom profile by selecting a standard, adding a description, and uploading the tailoring file.
Cloning custom profiles
Clone an existing custom profile, update its title, description, and rules, and then create the new profile.
- Select a custom profile and click Clone.
- Provide a new Title and Description for the duplicate custom profile.
- Make any necessary changes to the rules included in the custom profile.
- Click Create.
Editing custom profiles
Edit an existing custom profile, update its details and rules, and confirm any changes to associated assessments.
Custom checks
Create and manage custom checks in Comply by uploading or writing scripts for supported platforms, configuring check criteria, and interpreting case-sensitive results.
You can create custom checks in Comply to check a condition on endpoints that might not be included in any standard. For custom checks, rather than running the scan engine on downloaded content, Comply CX directly executes a user-provided script.
The following scripts are supported for each platform:
Windows:
-
VBScript (.vbs)
executed with cmd.exe /d /c cscript custom_script.vbs
-
PowerShell (.ps1) executed with powershell -NonInteractive -ExecutionPolicy bypass -File custom_script.ps1
Linux/Unix/MacOS:
-
Bourne / Posix shell (.sh) executed with /bin/sh custom_script.sh
For more information, see Reference: Troubleshoot custom script issues.
-
From the Main menu, go to .
-
On the Custom Checks tab, click the Create button.
-
In the New Custom Check window, enter a Name and Description.
-
In the Check Criteria section, enter and identifier, ID, for this check.
-
Select the appropriate Severity and Platform.
-
Add the custom check script using one of the following methods:
-
Upload a file: Click Select File and locate the script file on your computer. The maximum file size of a custom check is 1 MB.
-
Write inline: Enter or paste the script directly in the script editor field. This method does not require a separate file.
Both methods support the same script types for each platform.
-
-
Enter a Rationale for the check in the edit field.
-
In the Fix Text field, enter information for remediating the check.
-
Click Create. Your custom check will now show under Custom Checks and be available in the Custom Checks section of the page when you create a new compliance report.
The result of a custom check is indicated by the last line of output from the custom check. This value should appear on a line by itself after all other output and should return one of the following results:
|
Result |
Description |
|---|---|
|
pass |
All conditions are satisfied. |
|
fail |
All conditions are not satisfied. |
|
error |
Compliance evaluation could not be completed; therefore, the status of the endpoint(s) compliance has not been confirmed. |
|
unknown |
The result is unknown. |
Reference: Troubleshoot custom script issues
Troubleshoot common issues with custom shell scripts in Comply CX, including environment differences, invalid /bin/sh syntax, and how to locate runtime error output.
- Issue: There are errors when the script is run by CX, but it runs without errors when tested elsewhere.
-
This could be due to the shell script being written with enhanced bash script syntax that is not valid for /bin/sh. This occurs because the shebang line in any custom check script will be ignored. The shebang line is only evaluated when a script is run directly from the command line (
./custom_script.sh). Comply CX invokes the script with /bin/sh and will ignore the shebang. - Issue: The shell script works fine on some machines, but does not work on others.
-
This issue may occur if the shell script is written for bash and some endpoints have /bin/sh redirected to /usr/bin/bash, while others do not. Comply CX will always run /bin/sh.
- Issue: How to check for runtime execution errors
-
You cannot use Debug mode to check for custom shell script errors. Debug mode only applies to scan engine output, not custom checks.
To check for custom script errors, do the following:
-
Go to the Comply results directory, <Tanium Client>/extensions/comply/data/results.
-
Locate the sub folder for the assessment in the results folder
. Result files are located there and sequentially numbered ( 0-results.xml, 1-results.xml). The custom check shell script output and STDERR output are in the relevant result file.
-
Custom ID mappings
Use custom ID mappings to associate compliance checks and rules with your own identifiers and display them in assessment results.
Use custom ID mappings to create a custom column on results that associates a specific tag with a custom check or rule identifier.
-
From the Main menu, go to .
-
On the Custom ID Mappings tab, click the Import button.
-
In the New Custom ID window, enter a Name and Description.
-
Click Browse and locate the custom ID mapping file.
-
Click Import. Your custom ID will now show under Custom ID Mappings and be available in the Advanced Settings section when you create a new Compliance assessment.
Use the following file format for a custom ID mapping: Rule id|custom id
Example: xccdf_org.cisecurity.standards_rule_1.1.1_Create_Separate_Partition_for_tmp|company_policy_rule_42
View ID Mappings and Score Mappings in Interact
Use the custom ID hash from a Comply assessment in Interact to view the corresponding ID and score mappings in the results grid.
Export custom check or ID mapping
Export a custom check or ID mapping from one Tanium Console and import it into another to reuse the same configuration.
To view, edit, or reuse a custom check or ID mapping, you can export it by doing the following:
- From the Main menu, go to . Click the Custom Checks tab.
- Select a custom check and click Export
. You will select this exported file from the other Tanium console.
- Sign in to Tanium Console where you want to import the custom check and navigate to the Custom Checks tab.
- Click the Create button and select Custom Check.
- In the New Custom Check window, fill out the fields using the same information you entered for the exported file in the first Tanium console.
- Click Browse and choose the file you exported in the second step.
- Click Create.
If you have custom IDs to go along with the custom check, export and import them using the previous steps, but from the Custom ID Mappings tab.