Description: Invokes JAS Exposures and Contextual Analysis scanning of a repository.
Note: Only artifacts which are already scanned by Xray (for SCA - ‘regular’ scan) can be scanned for JAS .
Since: 3.73.x
Security: Requires a valid user with the "Manage Xray Metadata" permission.
Usage: POST /api/v1/repository/advancedScan/scan
Required Parameters:
Parameter | Type | Description |
---|---|---|
repository | string | The name of the repository to scan |
filters | object <filters> | The filters to determine which artifacts to scan |
contextual_analysis | boolean | Perform Contextual Analysis |
exposures.categories | object <categories> | The Exposures categories to scan |
Filters
Parameter | Type | Description |
---|---|---|
date_range.type | string | The type of date filter.Can be one of: 1. ‘artifact_deployment_date’ - select artifacts by the time of their deployment to Artifactory.2. ‘artifact_download_date’ - select artifacts by their last download time from Artifactory. |
date_range.date_start | string | The start of this date range. This is a timestamp in RFC 3339 format: YYYY-MM-DDTHH-MM-SSZ. |
date_range.date_end | string | The end of this date range. This is a timestamp in RFC 3339 format: YYYY-MM-DDTHH-MM-SSZ. |
patterns | Array of <pattern> | Select the artifacts to scan by providing path patterns. |
Pattern
Parameter | Type | Description |
---|---|---|
include_path_pattern | string | Wildcard patterns for including repository artifact paths. |
exclude_path_pattern | string | Wildcard patterns for excluding repository artifact paths added by the include_path_pattern. |
Categories
Parameter | Type | Description |
---|---|---|
secrets | boolean | Scan Secrets category. Only available for Docker repositories. |
services | boolean | Scan Services category. Only available for Docker repositories. |
applications | boolean | Scan Applications category. Only available for Docker repositories. |
iac | boolean | Scan IaC category. Only available for Terraform Backend repositories. |
Response Codes:
Status Code | Description |
---|---|
200 | OK |
201 | Created |
400 | Bad request |
Sample Request
{ "repository": "docker-trial", "filters": { "date_range": { "type": "artifact_download_date", "date_start": "2023-01-05T08:00:00Z", "date_end": "2023-01-22T20:00:00Z" }, "patterns": [ { "include_path_pattern": "a/b/*" }, { "include_path_pattern": "c/d/*", "exclude_path_pattern": "c/d/e/*" } ] }, "contextual_analysis": true, "exposures": { "categories": { "secrets": true, "services": true, "applications": false } } }
Successful Response
200 OK { "info": "Repository advanced scan started for: docker-trial", "scan_id": 1652639558081437696 }