Get Instant Access to 312-97 Practice Exam Questions [Q19-Q36]

Share

Get Instant Access to 312-97 Practice Exam Questions

Reliable Study Materials & Testing Engine for 312-97 Exam Success!

NEW QUESTION # 19
(Thomas McInerney has been working as a senior DevSecOps engineer in an IT company that develops software products and web applications related to the healthcare sector. His organization deployed various applications in Docker containers. Thomas' team leader would like to prevent a container from gaining new privileges. Therefore, he asked Thomas to set no_new_priv bit, which functions across clone, execve, and fork to prevent a container from gaining new privileges. Which of the following commands should Thomas use to list out security options for all the containers?)

  • A. docker ps -quiet -all | xargs docker inspect --format ': SecurityOpt'.
  • B. docker ps --quiet --all | xargs docker inspect --format ': SecurityOpt='.
  • C. docker ps -quiet -all | xargs docker inspect --format ': SecurityOpt='.
  • D. docker ps --quiet --all | xargs docker inspect --format ': SecurityOpt'.

Answer: B

Explanation:
Docker allows inspection of container runtime configuration using the docker inspect command. To list security-related options such as no_new_privileges for all containers, the correct approach is to first retrieve all container IDs using docker ps --quiet --all and then pass them to docker inspect with a formatted output.
The command docker ps --quiet --all | xargs docker inspect --format ': SecurityOpt=' correctly extracts the security options configured for each container. Options that use incorrect flags such as -quiet instead of -- quiet, omit required parameters, or misformat the output string are invalid. Inspecting security options during the Operate and Monitor stage helps ensure that privilege escalation protections are enforced consistently, supporting container hardening and compliance with security benchmarks.
========


NEW QUESTION # 20
(Sarah Wheeler is an experienced DevSecOps engineer. She recently joined an IT company that develops software products for customers stretched across the globe. Sarah would like to use a security testing tool that protects the application from false positives, network sniffing, tampering with code, etc. The tool should monitor the incoming traffic to the server and APIs for suspicious activities and help her team in remediating them during runtime. Which of the following tools should Sarah select that will help her team in precisely detecting and remediating the security issues in the application code during runtime?.)

  • A. IAST.
  • B. DAST.
  • C. SAST.
  • D. RASP.

Answer: D

Explanation:
Runtime Application Self-Protection (RASP) operates from within the application runtime environment, monitoring incoming traffic, API calls, and execution behavior in real time. Because it has deep visibility into application logic and execution context, RASP can accurately detect attacks such as injection, tampering, and abnormal behavior while minimizing false positives. SAST analyzes source code statically, DAST tests running applications externally, and IAST combines some runtime insight with testing but does not actively block threats. RASP's ability to detect and remediate attacks during runtime makes it ideal for protecting applications in production environments, aligning with the Operate and Monitor stage of the DevSecOps pipeline.


NEW QUESTION # 21
(Brady Coleman is a senior DevSecOps engineer at CloudVac Security Private Ltd. He has created a new container named "eccbrad" from the centos:7 image using the command docker run -i -t --name geeklab centos:7 /bin/bash. Now, Brady wants to install the httpd package inside the eccbrad container. Which of the following commands should Brady use to install the httpd package inside the container?)

  • A. yum install httpd.
  • B. sudo install httpd.
  • C. sudo install-httpd.
  • D. yum install-httpd.

Answer: A

Explanation:
The CentOS operating system uses theyumpackage manager to install software packages. Inside a CentOS- based Docker container, the correct way to install the Apache HTTP Server is by running yum install httpd.
Containers typically run as the root user by default, making the use of sudo unnecessary. Commands such as install-httpd are invalid because yum requires the install keyword followed by the package name separated by a space. Installing required packages inside containers should be done carefully to avoid bloating images and increasing the attack surface. During the Operate and Monitor stage, DevSecOps teams must balance functionality with container hardening best practices by installing only necessary components.
========


NEW QUESTION # 22
(Scott Adkins has recently joined an IT company located in New Orleans, Louisiana, as a DevSecOps engineer. He would like to build docker infrastructure using Terraform; therefore, he has created a directory named terraform-docker-container. He then changed into the directory using the command: cd terraform- docker-container. Now, Scott wants to create a file to define the infrastructure. Which of the following commands should Scott use to create a file to define the infrastructure?)

  • A. cat main.tf.
  • B. sudo main.tf.
  • C. echo main.tf.
  • D. touch main.tf.

Answer: D

Explanation:
Terraform infrastructure definitions are written in files with the .tf extension, commonly named main.tf. To create a new, empty file where infrastructure code can be added, the correct command is touch main.tf. This command creates the file without adding any content, allowing Scott to begin defining Docker infrastructure using Terraform syntax. The cat command is used to display file contents, not create files. The echo command prints text to standard output and does not create files unless output redirection is used. The command sudo main.tf is invalid and does not create files. Creating Terraform configuration files during the Release and Deploy stage supports Infrastructure as Code practices, enabling version control, repeatability, and security validation of infrastructure deployments. This approach allows DevSecOps teams to define, review, and deploy infrastructure in a consistent and auditable manner.
========


NEW QUESTION # 23
(Steven Smith has been working as a DevSecOps engineer in an IT company that develops software products related to the financial sector. His team leader asked him to integrate Conjur with Jenkins to secure the secret credentials. Therefore, Steven downloaded Conjur.hpi file and uploaded it in the Upload Plugin section of Jenkins. He declared host and layers, and declared the variables. Which of the following commands should Steven use to set the value of variables?)

  • A. $ conjur variable set -p < policy-path-of-variable-name > -s < secret-value >.
  • B. $ conjur variable set -v < policy-path-of-variable-name > -i < secret-value >.
  • C. $ conjur variable set -s < policy-path-of-variable-name > -p < secret-value >.
  • D. $ conjur variable set -i < policy-path-of-variable-name > -v < secret-value >.

Answer: D

Explanation:
In Conjur secret management, variables are first declared in policy files and then populated with actual secret values using the Conjur CLI. The correct command to assign a value to a variable is conjur variable set, where the -i option specifies the fully qualifiedpolicy path of the variable name, and the -v option specifies the secret valueto be stored securely. This command writes the secret into Conjur's encrypted vault and associates it with the declared variable so that Jenkins jobs can retrieve it securely at runtime. The other options misuse flags or reverse their meanings, which would result in invalid commands or incorrect secret handling. Integrating Conjur with Jenkins during the Build and Test stage ensures that sensitive credentials such as passwords, API keys, and tokens are never hard-coded in pipeline scripts or source code. Instead, secrets are dynamically fetched when required, supporting least-privilege access, auditability, and compliance requirements-critical for financial-sector applications.
========


NEW QUESTION # 24
(Kevin Williamson has been working as a DevSecOps engineer in an MNC company for the past 5 years. In January of 2017, his organization migrated all the applications and data from on-prem to AWS cloud due to the robust security feature and cost-effective services provided by Amazon. His organization is using Amazon DevOps services to develop software products securely and quickly. To detect errors in the code and to catch bugs in the application code, Kevin integrated PHPStan into the AWS pipeline for static code analysis. What will happen if security issues are detected in the application code?.)

  • A. The integrated PHPStan into the AWS pipeline will invoke AWS Config to parse and send result to the security hub.
  • B. The integrated PHPStan into the AWS pipeline will invoke the AWS Lambda function to parse and send result to the security hub.
  • C. The integrated PHPStan into the AWS pipeline will invoke AWS CloudFormation to parse and send result to the security hub.
  • D. The integrated PHPStan into the AWS pipeline will invoke AWS Elastic BeanStalk to parse and send result to the security hub.

Answer: B

Explanation:
In AWS-based DevSecOps pipelines, static analysis tools such as PHPStan commonly send their results to AWS services through event-driven processing. When PHPStan detects security issues, the results are typically parsed and processed by anAWS Lambda function, which can transform findings and forward them to AWS Security Hub. CloudFormation is used for infrastructure provisioning, AWS Config evaluates configuration compliance, and Elastic Beanstalk is an application deployment service-none of these are suited for parsing and relaying scan results. Lambda functions provide a scalable and serverless way to handle scan outputs automatically. This integration ensures that security findings are centralized, visible, and actionable, aligning with secure automation practices during the Code stage.
========


NEW QUESTION # 25
(Dustin Hoffman has been working as a DevSecOps engineer in an IT company located in San Diego, California. For detecting new security vulnerabilities at the beginning of the source code development, he would like to integrate Checkmarx SCA tool with GitLab. The Checkmarx template has all the jobs defined for pipeline. Where should Dustin incorporate the Checkmarx template file 'https://raw.githubusercontent.com
/checkmarx-ltd/cx-flow/develop/templates/gitlab/v3/Checkmarx.gitlab-ci.yml'?)

  • A. gitlab.yml root directory.
  • B. gitlab-ci/cd.yml root directory.
  • C. gitlab-cd.yml root directory.
  • D. gitlab-ci.yml root directory.

Answer: D

Explanation:
GitLab CI/CD pipelines are defined using a configuration file namedgitlab-ci.yml, which must be placed in the root directory of the repository. This file controls pipeline stages, jobs, and template inclusions. To integrate Checkmarx SCA using a predefined template, the template reference must be included in the root- level gitlab-ci.yml file so GitLab can load and execute the defined jobs automatically. The other filenames listed in the options are not recognized by GitLab as valid pipeline configuration files. Integrating SCA at the Code stage allows early detection of vulnerable open-source dependencies, reducing remediation cost and preventing insecure components from progressing further in the DevSecOps pipeline.


NEW QUESTION # 26
(Lara Grice has been working as a DevSecOps engineer in an IT company located in Denver, Colorado. Her team leader has told her to save all the container images in the centos repository to centos-all.tar. Which of the following is a STDOUT command that Lara can use to save all the container images in the centos repository to centos-all.tar?.)

  • A. # docker save centos < centos-all.tar.
  • B. # docker save centos > centos-all.tar.
  • C. # docker save centos < centos all.tar.
  • D. # docker save centos > centos all.tar.

Answer: B

Explanation:
The docker save command exports one or more Docker images to a tar archive by writing the image data to standard output (STDOUT). To redirect this output into a file, the > redirection operator is used. The correct syntax is docker save <image> > <filename>.tar. In this scenario, the image repository name is centos, and the desired archive file is centos-all.tar, making option B correct. Options C and D incorrectly use input redirection (<) instead of output redirection. Option A includes a space in the filename (centos all.tar), which would be interpreted as two separate arguments and cause an error unless quoted. Saving images to a tar archive is a common operational task used for backups, transfers between environments, or offline analysis during the Operate and Monitor stage.


NEW QUESTION # 27
(Patricia Cornwell has been working as a DevSecOps engineer in an IT company that provides custom software solutions. She would like to use GitMiner to mine the secret credentials such as usernames and passwords, API credentials, and other sensitive data from GitHub. Therefore, to start the scanning, she cloned the repo to the local machine by using the git clonehttp://github.com/UnkL4b/GitMinercommand; then, she moved to the current directory using $ cd GitMiner command. Which of the following commands should Patricia use to install the dependencies?)

  • A. pip3 install -q requirement.txt.
  • B. pip3 install -d requirement.txt.
  • C. pip3 install -r requirement.txt.
  • D. pip3 install -m requirement.txt.

Answer: C

Explanation:
GitMiner is a Python-based tool, and like most Python projects, it manages its dependencies through a requirements file named requirements.txt. The correct way to install all dependencies listed in this file is by using the pip3 install -r requirements.txt command. The -r flag instructs pip to read package names and versions from the specified file and install them accordingly. The other flags shown in the options do not correspond to dependency installation from a requirements file and would result in command errors or unexpected behavior. Installing dependencies correctly is a prerequisite for running GitMiner successfully.
During the Code stage, tools like GitMiner help identify hard-coded secrets and sensitive information early, reducing the risk of credential leakage and preventing security incidents later in the DevSecOps pipeline.


NEW QUESTION # 28
(GainInsights is an IT company that develops mobile applications software. On February 11, 2022, the organization became a victim of a cyber-attack. The attacker targeted the organization's application and compromised some important functionality. After the incident, the DevSecOps team of GainInsights identified the cause of the security issue, resolved it, and noted it for future reference. Based on this information, which of the following set of tests was conducted by GainInsights?.)

  • A. White box testing.
  • B. Security acceptance tests.
  • C. Blameless post-mortem.
  • D. Security smoke tests.

Answer: C

Explanation:
Ablameless post-mortemis conducted after a security incident to analyze what happened, why it happened, and how similar incidents can be prevented in the future-without assigning individual blame. The key indicators in the scenario are that the team identified the cause, resolved the issue, and documented lessons learned for future reference. Security acceptance tests and smoke tests are pre-release validation activities, while white-box testing focuses on code-level analysis rather than incident review. Blameless post-mortems are a cornerstone of DevSecOps culture, encouraging transparency, continuous learning, and systemic improvement during the Operate and Monitor stage.
========


NEW QUESTION # 29
(William Scott, after completing his graduation in computer science, joined an IT company as a DevSecOps engineer. His team leader has asked him to use GitHub Code Scanning for evaluating the source code in his organization's GitHub repository to detect security issues and coding errors. How can William set up coding scanning in GitHub repository?)

  • A. By using GitMiner.
  • B. By using CodeQL.
  • C. By using Gauntlt.
  • D. By using OWASP ZAP.

Answer: B

Explanation:
GitHub Code Scanning is a built-in security capability designed to automatically analyze source code for security vulnerabilities and coding errors. The primary and officially supported engine for GitHub Code Scanning isCodeQL. CodeQL works by converting source code into a database and running security queries to detect issues such as injection flaws, insecure coding patterns, and logic errors. William can enable CodeQL by configuring GitHub Actions with either the default or advanced CodeQL workflow. Once enabled, CodeQL scans are triggered on events such as code pushes and pull requests, and the results appear as code scanning alerts in the repository's Security tab. Gauntlt is a security testing harness used mainly for infrastructure and application testing, GitMiner is used to discover sensitive data like secrets in repositories, and OWASP ZAP is a dynamic application security testing tool used against running applications. None of these tools configure GitHub's native Code Scanning feature. Therefore, CodeQL is the correct tool to set up GitHub Code Scanning in the Code stage of a DevSecOps pipeline.
========


NEW QUESTION # 30
(Joyce Vincent has been working as a senior DevSecOps engineer at MazeSoft Solution Pvt. Ltd. She would like to integrate Trend Micro Cloud One RASP tool with Microsoft Azure to secure container-based application by inspecting the traffic, detecting vulnerabilities, and preventing threats. In Microsoft Azure PowerShell, Joyce created the Azure container instance in a resource group (ACI) (named "aci-test-closh") and loaded the container image to it. She then reviewed the deployment of the container instance. Which of the following commands should Joyce use to get the logging information from the container?.)

  • A. azure container logs --resource-group ACI --name aci-test-closh.
  • B. az container logs --resource-group ACI --name aci-test-closh.
  • C. azure container logs -resource-group ACI -name aci-test-closh.
  • D. az container logs -resource-group ACI -name aci-test-closh.

Answer: B

Explanation:
Azure Container Instances (ACI) exposes container logs via the Azure CLI using the az container logs command. To retrieve logs, you must provide the resource group and the container group name using the long- form parameters --resource-group and --name. Option A matches the correct CLI structure and parameter format: az container logs --resource-group ACI --name aci-test-closh. Options B and D incorrectly use single- dash forms (-resource-group and -name), which are not valid for these long option names. Options C and D incorrectly use azure instead of az; the Azure CLI command group is invoked with az, not azure. Getting logs after deployment review is a critical Operate and Monitor activity: it helps confirm the container started correctly, diagnose runtime errors, and validate that runtime protection (such as a RASP/micro-agent) is functioning. This visibility supports faster incident response and helps ensure the containerized workload remains secure and stable in its runtime environment.
========


NEW QUESTION # 31
(Alex Hales has been working as a DevSecOps in an IT company that develops software products and web applications for visualizing scientific data. He would like to trigger a Jenkins build job using Git post commit script or hooks that helps his team in saving time by automating commit. Therefore, before triggering the build job, Alex made changes and saved the code in the respective IDE under Git repository and added the changes in the master branch using git add command and ran the post commit script to check the status of the build. Then, he navigated to the Jenkins project and selected the "Trigger build remotely from Build triggers" radio button. It would automate the trigger every time a change gets committed to the project. Alex navigated back to Bash terminal to trigger the build job. Which of the following commands should Alex use in Bash terminal to trigger the build job?)

  • A. github commit -b "commit from terminal".
  • B. git commit -m "commit from terminal".
  • C. github commit -m "commit from terminal".
  • D. git commit -b "commit from terminal".

Answer: B

Explanation:
Git post-commit hooks are executed automatically after a commit is successfully created. To trigger the Jenkins build job configured to respond to commits, Alex must create a valid Git commit using the correct Git command. The standard command to commit changes with a message is git commit -m "commit from terminal". Running this command records the changes in the repository and triggers the post-commit hook, which in turn initiates the Jenkins build. Commands using github commit are invalid because github is not a native Git command-line utility. The -b flag is also not used with git commit. Automating build triggers during the Code stage improves efficiency, reduces manual intervention, and ensures continuous integration is consistently enforced.
========


NEW QUESTION # 32
(William Scott has been working as a senior DevSecOps engineer at GlobalSec Pvt. Ltd. His organization develops software products related to mobile apps. William would like to exploit Jenkins using Metasploit framework; therefore, he downloaded Metasploit. He would like to initiate an Nmap scan by specifying the target IP to find the version of Jenkins running on the machine. Which of the following commands should William use to find the version of Jenkins running on his machine using Nmap?.)

  • A. Nmap -sJ -sN "Target IP".
  • B. Nmap -sN -sJ "Target IP".
  • C. Nmap -sS -sV "Target IP".
  • D. Nmap -sV -sS "Target IP".

Answer: D

Explanation:
To identify the version of a service running on a target system, Nmap uses the -sV option, which enables service version detection. The -sS flag specifies a TCP SYN scan, which is a common and efficient scanning method. Combining these two flags allows Nmap to discover open ports and accurately identify the service versions running on those ports, such as Jenkins. Options A and B reference invalid scan types (-sJ) and do not enable version detection. Option C includes the correct flags but places them in a less conventional order; however, the commonly accepted and documented usage is -sV -sS. Running this scan during the Operate and Monitor stage helps security teams understand exposed services and assess potential attack surfaces.
========


NEW QUESTION # 33
(Allen Smith has been working as a senior DevSecOps engineer for the past 4 years in an IT company that develops software products and applications for retail companies. To detect common security issues in the source code, he would like to integrate Bandit SAST tool with Jenkins. Allen installed Bandit and created a Jenkins job. In the Source Code Management section, he provided repository URL, credentials, and the branch that he wants to analyze. As Bandit is installed on Jenkins' server, he selected Execute shell for the Build step and configure Bandit script. After successfully integrating Bandit SAST tool with Jenkins, in which of the following can Allen detect security issues?.)

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

Answer: B

Explanation:
Bandit is a Static Application Security Testing (SAST) tool developed specifically for analyzingPython source code. It scans Python scripts and applications to identify common security issues such as use of weak cryptography, hardcoded passwords, unsafe use of functions like eval, and insecure imports. Bandit works by parsing Python Abstract Syntax Trees (ASTs) and applying a set of security-focused rules. It does not support Java, Ruby, or C++ code, which require different static analysis tools tailored to their respective languages.
By integrating Bandit with Jenkins during the Build and Test stage, Allen enables automated detection of Python-specific security flaws as soon as code changes are introduced. This shift-left approach reduces remediation costs, prevents vulnerable code from progressing further in the pipeline, and improves overall application security posture.
========


NEW QUESTION # 34
(Frances Fisher joined TerraWolt Pvt. Ltd. as a DevSecOps engineer in 2020. On February 1, 2022, his organization became a victim of cyber security attack. The attacker targeted the network and application vulnerabilities and compromised some important functionality of the application. To secure the organization against similar types of attacks, Franches used a flexible, accurate, low maintenance vulnerability management and assessment solution that continuously scans the network and application vulnerabilities and provides daily updates and specialized testing methodologies to catch maximum detectable vulnerabilities.
Based on the above-mentioned information, which of the following tools is Frances using?)

  • A. BeSECURE.
  • B. Shadow Daemon.
  • C. SonarQube.
  • D. Black Duck.

Answer: A

Explanation:
BeSECURE is a vulnerability management and assessment solution designed for continuous scanning of both network and application vulnerabilities. It emphasizes flexibility, accuracy, low maintenance overhead, and frequent updates to vulnerability detection mechanisms. These characteristics align directly with the scenario described, where the organization requires continuous scanning, daily updates, and specialized testing methodologies to detect a wide range of vulnerabilities. SonarQube focuses on static code quality and security analysis during development, Black Duck is primarily used for open-source software composition analysis, and Shadow Daemon is a web application firewall rather than a comprehensive vulnerability management solution. Using BeSECURE during the Operate and Monitor stage allows organizations to maintain ongoing visibility into their security posture, detect new vulnerabilities as they emerge, and reduce the likelihood of repeat attacks by addressing weaknesses proactively.
========


NEW QUESTION # 35
(Richard Harris carries an experience of 5 years as a DevSecOps engineer. On February 1, 2022, he got the job of senior DevSecOps engineer in an IT company located Raleigh, North Carolina. He would like to trigger scan on each build in Jenkins, run customize scans for some specific vulnerabilities, fail the build process if a particular threat-level is reached, and generate reports automatically by integrating Acunetix DAST Tool with Jenkins. Richard installed Acunetix plugin successfully in Jenkins, after which he restarted Jenkins. He would like to find the path and install the certificate in Linux. Which of the following commands should Richard execute to find out the currently running Java binary in the Jenkins service?.)

  • A. pc - aux | grep Jenkins.
  • B. ps - aux | grep Jenkins.
  • C. ac - aux | grep Jenkins.
  • D. as - aux | grep Jenkins.

Answer: B

Explanation:
To identify the currently running Java binary used by Jenkins, administrators typically inspect the running processes on the Linux system. The command ps -aux | grep Jenkins lists all active processes and filters those related to Jenkins. This output includes details such as the user, process ID, and the full command line used to start Jenkins, which often contains the path to the Java executable. The other options reference invalid or nonexistent commands (pc, as, ac). Locating the Java binary is necessary when installing certificates into the correct Java keystore, which is required for secure communication between Jenkins and tools like Acunetix.
Performing this setup during the Build and Test stage ensures that DAST scans can run securely and reliably as part of automated pipelines.
========


NEW QUESTION # 36
......

Validate your Skills with Updated 312-97 Exam Questions & Answers and Test Engine: https://www.dumpstorrent.com/312-97-exam-dumps-torrent.html

Tested & Approved 312-97 Study Materials Download: https://drive.google.com/open?id=1KuY8K6bQuGe-kjEdI3FXJoGaRX1L98uP