Installation
Prerequisites
Before installing ORT, ensure the following are available in your environment:- Java: JDK 21 or later
- Git: Required for cloning the ORT repository
- SCANOSS API key: Obtainable from the SCANOSS platform
- Shell environment:
- Windows: PowerShell, Command Prompt, or Git Bash
- macOS/Linux: Terminal (Bash or Zsh)
- Text editor: VS Code, Notepad++, nano, vim, or any editor of your choice
Windows Installation
Open PowerShell and run the following commands:Configure Java Memory (Windows)
To set the Java heap size permanently, add the following via System Properties > Environment Variables:- Variable name:
JAVA_OPTS - Variable value:
-Xmx8g
macOS/Linux Installation
Open a terminal and run the following commands. If you use Zsh (the default shell on macOS), replace~/.bashrc with ~/.zshrc throughout.
SCANOSS Configuration
Create the Configuration Directory
ORT stores scanner settings, policy rules, and other configuration files in a dedicated configuration directory. Windows:Configure the SCANOSS Scanner
Add the following content toconfig.yml:
your-scanoss-api-key-here with your actual SCANOSS API key.
Configuration Options
API URL
TheapiUrl option specifies the SCANOSS API endpoint:
https://api.scanoss.com— SCANOSS cloud service- Custom URL — For self-hosted SCANOSS instances
API Key
TheapiKey is required for authenticated access to the SCANOSS knowledge
base. To obtain an API key:
- Visit SCANOSS Platform
- Sign up or log in
- Navigate to the API Keys section
- Generate a new API key
Additional Options
The following additional scanner options are available:timeout: Maximum time in seconds to wait for a scan responseretries: Number of retry attempts on transient failures
Policy Configuration
Create the Policy Rules File
ORT uses Kotlin Script (.kts) files to define policy rules using the Kotlin
DSL. Create a rules.kts file in your configuration directory.
Windows:
Basic Policy Rules
Add the following content torules.kts:
Advanced Policy Rules
Block Copyleft Licences
Flag High-Severity Vulnerabilities
Enforce Component Age Policies
Configuration File Structure
Complete Configuration Example
The following is a comprehensiveconfig.yml example covering scanner,
analyser, and reporter settings:
Environment Variables
ORT can also be configured using environment variables. These take effect at runtime and do not require changes toconfig.yml:
Note: If both environment variables and config.yml are present, confirm
which takes precedence in your version of ORT, as override behaviour may vary.
Verification
Verify the Installation
Confirm that ORT is correctly installed and accessible on your PATH:Verify the SCANOSS Configuration
Confirm that your configuration file is present and readable:Troubleshooting
Common Issues
Java Memory Errors
If ORT throws anOutOfMemoryError, increase the Java heap size:
API Connection Errors
If ORT cannot connect to the SCANOSS API:- Verify that the API key in
config.ymlis correct and has not expired - Confirm network connectivity to
api.scanoss.com - Verify that the
apiUrlvalue inconfig.ymlis correct - Check that firewall or proxy rules are not blocking outbound HTTPS traffic
Configuration File Not Found
If ORT cannot locate the configuration file:Debug Mode
To enable verbose debug logging, pass the--debug flag:
Next Steps
Once ORT is configured with SCANOSS, proceed with the following:- Run your first scan — See the Usage Examples section
- Define custom policies — Extend
rules.ktswith rules specific to your organisation - Integrate with CI/CD — Automate scanning as part of your development pipeline
- Generate reports — Produce compliance artefacts for your projects