QuestionQ28

DevSecOps Pipeline-Release and Deploy Stage

Michael Rady recently joined an IT company as a DevSecOps engineer. His organization develops software products and web applications related to online marketing. Michael deployed a web application on an Apache server. He would like to safeguard the deployed application from diverse types of web attacks by deploying ModSecurity WAF on the Apache server.

Which of the following commands should Michael run to install ModSecurity WAF?

  • A sudo apt install libapache2-mod-security2 –x
  • B sudo apt install libapache2-mod-security2 –z
  • C sudo apt install libapache2-mod-security2 –w
  • D sudo apt install libapache2-mod-security2 –y
Explanation

The correct command uses the -y flag, which instructs apt to automatically answer "yes" to any confirmation prompts during package installation, enabling a smooth, non-interactive installation of the libapache2-mod-security2 package. This is the standard and documented syntax for installing ModSecurity as an Apache module on Debian/Ubuntu-based systems. Flags such as -x, -z, and -w are not valid options for the apt install command in this context.

Learn more

Community Discussion

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