Test a Slang Project
Updated Aug 30, 2023Test a Slang project
After a Slang project has been exported to SCAP (XML), the project can be tested by running an assessment against a live system.
Before you begin
- Complete Slang Quickstart guide.
- Open
project.slang
and check the platform you have selected. If the platform is:- Matching the system Slang is running on — Use
LOCALHOST
.Tip: Use the
--elevate
CLI parameter to skip theScan as Administrator
prompt. For details, runslangexport -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 about WinRM configuration, see Unable to sign in to a Windows device using Risk Scan Engine.
- MacOS, Linux, or Cisco — Scan a remote system that is running SSH using the IP or hostname and an SSH credential.
- Matching the system Slang is running on — Use
Steps
Step 1: Create a scan configuration
To create a Slang scan configuration, you need a target system to scan that matches the platform your project is written for. You can create multiple scan configurations by completing the steps and giving each configuration a unique name.
- In Visual Studio Code (VS Code), select File > Open Folder and navigate to the project.
- Run this command to export the project to SCAP as XML and run a scan configuration:
slang export <project_name> <project_name>.xml --scan_config <config_name>
- Follow the prompts to configure the scan.
Tip: To remove a scan configuration, delete the appropriate scan_configs
subfolder.
Step 2: Test the Slang project
-
Edit your Slang.
-
Run this command:
slang export <project_name> <project_name>.xml --scan_config <config_name>
Slang saves your configuration and will not prompt you to do it again.
Step 3: View the scan results
- In your project, locate and select the
scan_configs/<project_name>
file. - Open the HTML report
scan_configs/<project_name>
in your browser.Tip: The report can be opened from the Terminal. Run
start <filepath>.html
on Windows andopen <filepath>.html
on macOS.