Import and Update SCAP (XML)
You can import an existing SCAP (XML) Benchmark into Slang with the Slang Authoring Toolkit.
For example, you can:
- Create new rules.
- Customize check logic.
- Change the embedded remediation guidance.
These sample procedures use Windows 10 STIG as the sample SCAP. You can import your own SCAP as well.
These actions are required:
- Complete Install Slang Authoring Toolkit.
- Complete Create a Slang project.
Download and import SCAP
Update the project-wide settings
Adjust the project rules
Do one or more of these actions:
Add a rule to a project
Remove a rule from a project
There are two ways that you can remove a rule from a project. Based on your needs, do one of these actions:
- Delete the file.
- Remove the rule through a slang profile.
Customize a rule
- In VS Code, open the rule_id.slang file, where rule_id is the ID of the rule that you want to customize.
- Edit
Titleas applicable. - Delete any irrelevant tags.
- Edit the description.
- Edit the check:
- Remove the imported OVAL check from common.oval.
- Enter
windows.to see a list of suggested checks. - Select an option.
- Edit the audit policy:
- Select
windows.audit_policy.subcategory. - Press Ctrl+Space to see suggestions.
- Select an option.
- Select
- Edit the validation:
- Save the file.
Export Slang to SCAP (XML)
In a terminal, press Ctrl+`, and then run this command to export your Slang project to SCAP (XML):
Where:
SHELL
slang export <project_name> <project_name>.xml
- project_name is the name of your Slang project.
A new folder named exported_scap appears in your project appears at the base of your project directory. For example, ~/Slang/example_project/exported_scap. The folder contains the XML file.
Tip: If you have access to a Windows 10 scan target and have completed Test a Slang project, run this command to export and test your project using the profile created:
When you review the results, look for your
SHELL
slang export <project_name> <project_name>.xml --scan_config <config_name> --profile profile.<profile_name>.slang
DPAPI rule. Filter to NOT SELECTED and the rule that was removed in Remove a rule from a project appears.