QuestionQ18

DevSecOps Pipeline-Code Stage

Allen Smith has been working as a senior DevSecOps engineer for the past four years at an IT company that develops software products and applications for retail companies. To detect common security issues in source code, he wants to integrate the Bandit SAST tool with Jenkins. Allen installed Bandit and created a Jenkins job. In the Source Code Management section, he provided the repository URL, credentials, and the branch he wants to analyze. Since Bandit is installed on the Jenkins server, he selected "Execute shell" for the Build step and configured the Bandit script.

After successfully integrating the Bandit SAST tool with Jenkins, in which of the following can Allen detect security issues?

  • A Ruby code
  • B Python code
  • C C++ code
  • D Java code
Explanation

Bandit is a static application security testing (SAST) tool developed and maintained under the Python Code Quality Authority (PyCQA) project. It works by building an abstract syntax tree (AST) from Python source code and running plugins against the AST nodes to identify common security issues such as hardcoded passwords, use of insecure functions, SQL injection risks, and weak cryptographic practices. Bandit is designed exclusively for Python codebases and does not support scanning Ruby, C++, or Java source code, so integrating it with Jenkins only enables detection of security issues in Python code.

Learn more

Community Discussion

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