Scan Published Builds

JFrog Security User Guide

ft:sourceType
Ftml

JFrog CLI is integrated with JFrog Xray and JFrog Artifactory, allowing you to have your build artifacts and dependencies scanned for vulnerabilities and license violations.

Command: build-scan, bs

The build-scan command scans published builds for security vulnerabilities and license compliance issues.

Commands Parameters

ParameterOptional/DefaultDescription
--server-idOptionalServer ID configured by the jf c add command. If not specified, the default configured server is used.
--vulnOptionalSet if you'd like to receive all vulnerabilities, regardless of the policy configured in Xray.
--failDefault: trueWhen using --watches, --project, or --repo-path and a Fail build rule is matched, returns exit code 3. Set to false to see violations with exit code 0.
--formatDefault: tableDefines the output format of the command. Accepted values: table and json.
--projectOptionalJFrog project key.
--rescanDefault: falseSet to true when scanning an already successfully scanned build, e.g., after adding an ignore rule.

Arguments

Build NameBuild name to be scanned.
Build NumberBuild number to be scanned.

Examples

Scan a specific build:
Scans build number 18, corresponding to the build name my-build-name.

jf bs my-build-name 18

Scan with project policies:
Scans build 18 of my-build-name using policies defined for project-1.

jf bs my-build-name 18 --project project-1

Scan showing all vulnerabilities:
Displays all vulnerabilities for build 18.

jf bs my-build-name 18 --vuln

Scan with license information:
Scans and displays license compliance details.

jf bs my-build-name 18 --licenses