ARTIFACTORY: How to set up the period cleanup for On-Demand Scanning results?

AuthorFullName__c
Yunzong Guo
articleNumber
000005875
FirstPublishedDate
2023-09-18T07:58:34Z
lastModifiedDate
2025-08-01

ARTIFACTORY: How to set up the period cleanup for On-Demand Scanning results?

Background:

Xray uses the JFrog CLI to provide on-demand binary scanning to scan your binaries during development, in order to find and fix vulnerabilities before your code is compiled.
After that, the scanning results will displayed on UI|Security & Compliance|On-Demand Scanning.

User-added image


By default, the scan results will be retained by default for 7 days, and then automatically cleaned.

How to set up the period for scan results cleanup?


If you want to schedule the period or a specific date for scan result cleanup, you can use the following solution, here is an example:

Step 1:
Adding the following configuration within the “$JFROG_HOME/xray/var/etc/system.yaml”:

...
server:
    graphScans:
        cleanup:
            olderThanDays: 5
    graphScanCleanupSchedule: "0 0/1 * * *"
...

The scan results older than 5 days will be cleaned, and the cleanup job will be executed every 60 minutes.

Step 2:
Restart Xray.

The cleanup job will be executed according to the rules you defined.