Scanning Code Manually with OX CLI
Manual scans let you analyze your code on demand from the command line. Use the scan command to scan modified files, a specific directory, or selected security categories.
By default, the OX CLI scans only modified files in the current directory and displays Critical, High, and Medium severity findings.
Modified files
ox-cli scan
None
Scans only modified files in the current directory. This is the default behavior.
Scan the changes you're currently working on.
Specific directory
ox-cli scan <targetDir>
<targetDir>
Scans the specified directory. If no directory is specified, the current directory is scanned.
Scan a repository or project located outside the current directory.
Scan by category
ox-cli scan --category <categories>
--category <categories>
Scans only the specified security categories. Specify multiple categories as a comma-separated list.
Focus on specific security checks.
Compare against a Git remote
ox-cli scan --git-remote-name <remote>
--git-remote-name <remote>
Uses the specified Git remote when determining which files have changed.
Compare changes against a remote other than the default.
Use VibeSec authentication
ox-cli scan --use-vibesec-auth
--use-vibesec-auth
Uses the authentication token stored by a supported VibeSec IDE integration for the current scan.
Run a scan using your existing VibeSec authentication.
Display findings by severity
ox-cli scan --severity <severities>
--severity <severities>
Displays findings for the specified severities. Use all to display Critical, High, Medium, Low, and Info findings. By default, the CLI displays Critical, High, and Medium findings.
Control which findings are included in the scan results.
Set output format
ox-cli scan --format <format>
--format <format>
Sets the scan results format. Supported values are text, json, and sarif. The default is text.
Display results in the terminal or generate output for automated processing or other tools.
Supported scan categories
Use the --category option with one or more of the following values:
Code Security
code
Open Source Security
oss
Secrets and PII
secrets
Infrastructure as Code
iac
Software Bill of Materials
sbom
To scan multiple categories, specify a comma-separated list.
Example:
ox-cli scan --category code,secretsLast updated