QuestionQ3

VerifiedDevSecOps Pipeline-Build and Test Stage

Rachel McAdams applied for a DevSecOps engineer position at TetraSoft Pvt. Ltd. She interviewed on February 23, 2022, and was selected as a DevSecOps engineer. Her team is working to secure a Ruby on Rails application. Rachel’s team leader asked her to integrate the Brakeman SAST tool with Jenkins. To perform the integration, she navigated to Jenkins Plugin Manager and installed the Warnings Next Generation Plugin. To run the tool in Jenkins, she invoked Brakeman as part of an Execute shell build step. In the Execute shell column, she wrote the following commands with Brakeman options:

bash -l -c ‘ rvm install 3.0.0 && \  
 rvm use 3.0.0@brakeman -create && \  
 gem install brakeman && \  
 brakeman -no-progress -no-pager -no-exit-on-warn -o brakeman-output.json  

What is the function of the -no-exit-on-warn option in the command mentioned above?

Explanation

The --no-exit-on-warn option prevents Brakeman warnings from producing a failing exit status, so Brakeman returns exit code 0 even if it finds warnings. This lets Jenkins collect and report the findings without the scan itself failing the build.

Learn more

Community Discussion

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