Xray plugin use cases

2 minute readExtensibilityDeveloper productivity

The following examples illustrate how you can use the Xray plugin in CloudBees CD/RO to:

Perform on-demand binary scans

Within pipelines, you can use the Xray plugin to perform on-demand binary scans on project binary artifacts.

You must have a plugin configuration to add for the pipeline on-demand binary scan task.

To perform an on-demand binary scan:

  1. After checking out a binary in a project pipeline step, select Add task.

  2. Give the new task a name, and then select Define.

  3. For the Task type, select Plugin.

  4. For the Plugin, select Xray.

  5. For the Procedure, select On-Demand Binary Scan.

  6. Select Input parameters.

  7. Fill in the required parameters:

    1. In the Configuration Name field, add the Xray plugin configuration.

    2. In the Path field, add the path to the binary that you want to scan.

  8. Specify the other parameters, as required for your project.

    The Success criteria field can be configured to include both positive and negative reporting.
  9. Select Save changes to save the task configuration.

  10. Select Assign a Resource or Resource Pool.

  11. Add the resource you configured for the plugin configuration, and then select Save.

  12. Select Save changes to save the task.

You can now run the pipeline, and this task returns the findings of the vulnerabilities scan.

Use JFrog Xray watches in pipelines

Within pipelines, you can use JFrog Platform Xray Watches configured with basic or custom policies as scanning criteria for your artifacts.

To perform the following steps, you must have a Watch configured in JFrog. For more information, refer to JFrog’s Configuring watches and policies documentation.

To implement your JFrog Watches within the plugin:

  1. After checking out a binary in a project pipeline step, select Add task.

  2. Give the new task a name, and then select Define.

  3. For the Task type, select Plugin.

  4. For the Plugin, select Xray.

  5. For the Procedure, select the type of scan you want to perform.

  6. Select Input parameters.

  7. Fill in the required parameters:

    1. For the Configuration Name parameter, add the Xray plugin configuration.

    2. For the Path parameter, add the path to the binary you want scanned.

  8. For the Watches parameter, enter the name of a watch configured in JFrog. This configures your JFrog Xray Watch to be used as the scanning parameter.

  9. Fill in the other parameters as needed for your project.

    The Success criteria field can be configured to include both positive and negative reporting.
  10. Select Save changes to save the task configuration.

  11. Select Assign a Resource or Resource Pool.

  12. Add the resource you configured for the plugin configuration, and then select Save.

  13. Select Save changes to save the task.

You can now run the pipeline and this task uses your JFrog Watch as the scanning criteria.