Scan Your Source Code
The jf audit command enables developers to perform on-demand security scans of their source code directly from their terminal, ensuring early detection of CVEs, licenses, operational risk, SAST, misconfigurations, and exposed secrets. By integrating seamlessly into the developer workflow, it helps catch security risks before code reaches production—reducing remediation costs and enhancing software integrity. The scan results are displayed in the terminal for immediate feedback and are also available in the JFrog Platform’s On-Demand Scans pane, providing centralized visibility.
For SCA, the command automatically detects the package manager used by your project and uses it to construct the dependency graph.
If the project hasn’t been installed yet, the system will execute an install command to generate the dependency tree for scanning.
On-demand scan results are retained for seven days before being automatically deleted.
By default, the environment variable
ENABLE_CUSTOM_SECRETS_SCANNERis set totrue, enabling custom secrets scanning automatically as part of the audit.By default, the environment variable
JF_SAST_DEFAULT_SCAN_MODEis set tocodebase. Possible values arecodebase,directory, andfile. Usedirectoryorfileto improve SAST scan performance on large repositories.
Learn more about Configuration and Audit of Security Processes at JFrog Academy!
Command Options
Command: jf audit (alias: jf aud)
Working in Air-Gapped Environments?
Follow the Working in Air-Gapped Environments procedure.
Examples
A basic audit that shows all vulnerabilities, regardless of the policies set in Xray:
jf auditAudit for Maven & npm projects that shows all vulnerabilities, regardless of the policies set in Xray:
jf audit --mvn --npmAudit using a defined Watch in Xray:
jf audit --watches "watch1"Audit using numerous defined Watches in Xray:
jf audit --watches "watch1,watch2"Audit using defined policies in a specific project:
jf audit --project "project-1"Audit using defined policies in a specific Artifactory path:
jf audit --repo-path "libs-local/release-artifacts/"Excluding from audit all files inside a directory (node_modules) and files with a specific suffix (to_exclude):
jf audit --exclusions "*node_modules*;*to_exclude"Updated 20 days ago

