Freestyle Project

You must provide the container image IDs or Image Names on the plugin configuration page. When Jenkins executes the post-build steps, the plugin only pulls a report for the image IDs or names you have specified. You can also provide image ids through an environment variable.

  1. In Post-Build Actions, perform the following steps:
  2. Select 'Scan container images with Qualys CS'. This opens a form similar to the one shown for pipeline projects.
  3. Provide configuration details and test the connection to ensure success. See How to configure?
  4. Set the IMAGE_ID environment variable to the container image IDs you want to report on. IMAGE_ID can be a single string value like 'a1b2c3d4e5f6' or a comma-separated list like 'a1b2c3d4e5f6,abcdef123456'.

    The variable name must be defined correctly or the plugin does not work.

What are the steps?

  1. Use a specific tag to build a container image you wish to scan for vulnerabilities.
  2. Add a build step called 'Execute shell' in which write a shell script to use that tag to get the ID of the container image and then store that image ID in the format: IMAGE_ID=<image_id> into a file.
  3. Add the 'Inject environment variables' step in which provide the filename of the file in which you stored the image ID.

    Freestyle_image_id_throgh_env_variable

Related Topic

Use the WebHook