QuestionQ21

VerifiedDevSecOps Pipeline-Build and Test Stage

Alex Hales has recently joined TAVR Software Solutions Pvt. Ltd. as a DevSecOps engineer. To automatically detect security vulnerabilities in web applications during the build and test process, he integrated the OWASP ZAP DAST plugin with Jenkins.

How can Alex uniquely identify every build in the project?

Explanation

Jenkins provides a built-in environment variable, BUILD_ID (equivalent to BUILD_NUMBER), that increments with each build and uniquely identifies it. By appending ${Build_ID} to a file name in the Post-build Actions tab, Alex ensures that the ZAP scan report or artifact generated for each build is saved with a unique name, preventing overwriting and allowing traceability of results back to a specific build. The other variables referenced—ZAPROXY_HOME (the ZAP installation directory), zap_scan, and Profile_ID—are not Jenkins build identifiers and do not serve this uniquification purpose.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!