Command-line Parameters
| Parameter | Description | Example |
|---|---|---|
config |
Set the configuration file path | -config config.json |
path |
Set the target path. HTTP(S), FTP, and file paths are supported | -path ./foo |
out |
Set report output paths. File types are detected by suffix | -out out.json,out.html |
log |
Set the log file path | -log my_log.txt |
token |
Cloud service token | -token xxx |
proj |
SaaS project token | -proj xxx |
version |
Print version information | -version |
help |
Print help information | -help |
Configuration File
The configuration file uses JSON syntax and supports the following top-level fields:
path:Stringtarget path. HTTP(S), FTP, and file paths are supported.out:Stringreport output paths. Supported suffixes include html/json/xml/csv/sqlite/cdx/spdx/swid/dsdx.optional:Objectoptional scanning settings.ui:Booleanenable the interactive UI. Default:false.dedup:Booleandeduplicate identical components and merge paths. Default:false.dir:Booleanscan directories only and skip archives. Default:false.vuln:Booleankeep only vulnerable components. Default:false.progress:Booleanshow the progress bar. Default:true.dev:Booleankeep development dependencies. Default:true.tls:Booleanenable TLS certificate verification. Default:false.proxy:StringHTTP proxy address. Default: empty.ignore:Array<String>path rules ignored during scanning. Default: empty. OpenSCA only reads these rules from the current configuration file and does not automatically load the project's.gitignore. The syntax is compatible with common.gitignorerules, including directory matches, wildcards, and!negation.
repo:Objectcomponent repository settings for Maven, npm, and Composer.origin:Objectvulnerability database settings.
Ignore Path Configuration
Use optional.ignore to skip test dependencies, temporary directories, or specific archives:
{
"optional": {
"ignore": [
"JarCollection/",
"*.jar",
"!libs/keep.jar"
]
}
}
The example above skips JarCollection/ and all .jar files, but keeps libs/keep.jar. Ignore rules only affect OpenSCA scanning and do not modify project files.