Slang Authoring Toolkit Quickstart Configuration

Updated Dec 21, 2023

Slang Authoring Toolkit quickstart configuration

You can use this configuration workflow to get started with Slang Authoring Toolkit. During these steps, you will create and edit Slang files using Visual Studio Code (VS Code).


Before you begin


  1. Install Slang Authoring Toolkit.
  2. Create a Slang project.
  3. Customize the Slang project.
  4. Add rules to the project.
  5. Test the project syntax.
  6. Export Slang to SCAP as XML.

Step 1: Install Slang Authoring Toolkit

  1. Run the Slang Authoring Toolkit installer.

  2. Open VS Code. If VS Code was open before beginning the installation, close the application and then open it again.

  3. Run this command to confirm that the Slang Authoring Toolkit is installed:

    slang -h

    Note: If you do not see the Slang version and CLI, create a support ticket in the Customer Support Portal.

Step 2: Create a Slang project

  1. Run this command:
    slang scaffold
  2. When prompted, enter the path to your Slang license XML file.
  3. When prompted, enter a domain name. For example, your organization name.
  4. Name your project.
  5. Run this command to verify that the Slang folder was added to your home folder:
    ls ~/Slang
    Example of expected output:
       QuickStart/           : your new project
       schema/               : files used by VS Code Help
       license.xml           : your Slang license file
       Slang.dictionary.html : Slang file format documentation

Step 3: Customize the Slang project

The project.slang file contains general and default settings for your project.

  1. In the VS Code menu, click File > Open Folder, and then navigate to your project folder.

    Note: For Windows users, use this path to find your project folder: \Users\<username>\Slang.

  2. Open project.slang, and then edit the title and description fields.

  3. In the Explorer pane, enter Platform:.

    The project.slang file turns red.

  4. Click to the right of Platform:, and then press Ctrl+Space to view the platform list.

  5. In the list, select a platform.

  6. Click Save.

Step 4: Add rules to the project

  1. In VS Code, in the Explorer window, open group_1/rule_1.slang.
  2. Right-click the file name, and then rename it <rule_id>.slang.
  3. Edit the title.
  4. Edit the description as needed.
  5. Delete Add checks here, and then enter windows. to see a list of suggested checks.
  6. Select checks as needed.
  7. Click to the right of account :, and then press Ctrl+Space to view the suggested accounts.
  8. Select rules as needed.
  9. Save the file.
  10. Click the group_1 folder.
  11. Click New File.
  12. Name the file. For example: password_policies.slang.
  13. Add rule content to the file:
    1. Copy this content, and then add it to the new slang file:
         title: Password Policies 
         description: Password policies for QuickStart.
            - ALL:
               - windows.account.lockout_policy:
                  threshold: 5
                  duration: 5 minutes
                  observation_window: 1 hour
               - windows.account.password_policy:
                  maximum_password_age: 30 days
                  minimum_passwords_remembered: 100
                  require_password_complexity: true


      • Hover over threshold to see a parameter description.
      • Checks in ALL: can be grouped under ANY, NONE, NOT_ALL, ONE, and XOR.
    2. For the windows.account.password_policy option, add a line that is indented to align with maximum_password_age.

      Tip: Press Ctrl+Space to view additional password policy options.

    3. Click allow_reversible_encryption.
    4. Press Ctrl+Space to select true or false.
  14. Save the file.
  15. Rename the group_1 folder. For example: Account_Policies.

    Tip: Add and nest multiple folders to organize your rules.

Step 5: Test the project syntax

After you create the project, review your Slang syntax for problems.

Step 6: Export Slang to SCAP as XML

Next steps

See also