Slang QuickStart ~ 15 Minutes

Install the Slang Authoring Toolkit

  1. Download the appropriate Slang Authoring Toolkit installer and run it!
  2. Open VS Code (if already open, quit and re-open)
  3. Open the Terminal ([CTRL]+`) and run slang -h to confirm installation.
    If you don’t see the Slang version and CLI help, let us know… you’ve got a problem!

Create Your First Slang Project

  1. From the Terminal, run slang scaffold to create a new project
    • Enter the path to your license file when prompted
    • for Project name, enter: QuickStart
  2. Run ls ~/Slang to see the Slang folder that was added to your home folder including:
        QuickStart/           : your new project
        schema/               : files used by VS Code Help
        license.xml           : your Slang license file
        Slang.dictionary.html : Slang file format documentation

Customize Your Project

  1. Open the ~/Slang/QuickStart folder in VS Code (File, Open Folder)
    On Windows, find the QuickStart folder under \Users\<your username>\Slang
  2. The project.slang file contains your project’s general settings and defaults. Open it and:
    • Improve the title and description!
    • Notice that the platform: is red… you must provide a valid platform. The project.slang file in Explorer pane should be red for the same reason.
    • Click your cursor to the right of platform: and then press [CTRL]+[space] to view the platform list and select one.
    • Save!

Create Rules

Open group_1/rule_1.slang in VS Code and:

  1. Rename the file to local_admin_disabled.slang (right-click in the Explorer pane and select rename).
  2. Change the title to Local Administrator Account Disabled and improve the description.
  3. Delete Add checks here and start typing windows. to see a list of suggested checks
    • Choose windows.account.disabled
    • Click next to account:, [CTRL]+[space] to see suggestions, select Local Administrator
    • Save!
  4. Create a new file in the group_1 folder (right-click group_1, New File) called password_policies.slang with the following content:
      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
    • Tip: Place your mouse over threshold to see a popup description of that parameter.
    • Tip: See that ALL: on line 5? You can also group checks under ANY, NONE, NOT_ALL, ONE and XOR.
  5. Add a new line under windows.account.password_policy (your cursor should be indented to left-align with maximimum_password_age). [CTRL]+[space] to see additional password_policy options. Select allow_reversible_encryption, click [CTRL]+[space] again and select true or false.
  6. Save password_policies.slang
  7. Rename the group_1 folder to Account_Policies
    • Tip: use folders to organize your rules. You can add as many as you like and nest them.

Export Slang to SCAP (XML)

  1. Check for any Problems (View, Problems) with your Slang. If you don’t see any (and you shouldn’t), change title: to tattle:. You should see Problems now! Fix all Problems and save before continuing.
  2. From the Terminal ([CTRL]+`), run slang export QuickStart quickstart.xml to export your Slang project to SCAP (XML).
  3. Now, you should see a new folder in your project, exported_scap containing quickstart.xml.

Congratulations! Now you have an SCAP (XML) file you can run using any standards-compliant assessment engine.

Next Steps

  • Test Your Slang Project.
  • Run quickstart.xml in Joval or another SCAP engine.
  • Review the slang CLI help by running slang -h, slang export -h, and slang import -h.

Questions? Feedback?

Please contact your account executive or reach out here!