Test a Slang project

After a Slang project is exported to the Security Content Automation Protocol (SCAP) (XML), you can test the project by running an assessment against a live system.

These actions are required:

  • Complete Slang Authoring Toolkit quickstart configuration.
  • Open project.slang, and then check the Platform: setting. If the platform setting is:
    • The same as the system that Slang is running on — Enter LOCALHOST.
      Tip:

      In a terminal, use the --elevate option to skip the Scan as Administrator prompt. For details, run slangexport -h.

    • Windows — Scan a remote system for Windows Remote Management (WinRM), using the IP or hostname and an administrator username and password.

      For more information, see Troubleshoot Arctic Wolf Scan Engine.

    • MacOS, Linux, or Cisco — Scan a remote system that is running SSH using the IP or hostname and an SSH credential.

Create a scan configuration

To create a Slang scan configuration, you need to scan a target system that matches the platform your project is written for.

For each scan configuration you want to create, complete these steps, using a unique name for each configuration:

  1. In Visual Studio Code (VS Code), select File > Open Folder, and then navigate to your project.
  2. In a terminal, run this command to export the project to SCAP as XML and run a scan configuration:
    SHELL
    slang export <project_name> <project_name>.xml --scan_config <config_name>
    Where:
    • project_name is the name of your Slang project.
    • config_name is the name of your scan configuration.
  3. Follow the prompts to configure the scan.
  4. Optional: To remove a scan configuration, delete the appropriate scan_configs subfolder.

Test the Slang project

  1. Edit your Slang.
  2. Run this command:
    SHELL
    slang export <project_name> <project_name>.xml --scan_config <config_name>
    Where:
    • project_name is the name of your Slang project.
    • config_name is the name of your scan configuration.
    Slang saves your configuration and will not prompt you to do it again.

View the scan results

  1. In your project, locate and select the scan_configs/project_name file, where project_name is the name of your Slang project.
  2. Navigate to scan_configs/config_name, where config_name is the name of your scan configuration.
  3. Open the HTML report in a web browser.
    Tip: The report can be opened from a terminal. Based on your operating system, do one of these actions:
    • On Windows, run this command:
      SHELL
      start <filepath>.html
    • On macOS, run this command:
      SHELL
      open <filepath>.html