Docsity

LFS262 Implementing DevSecOps Practice Exam, Exams of Technology

Toggle sidebar
bg1
LFS262 Implementing DevSecOps Practice
Exam
**Question 1.** Which statement best describes the primary goal of DevSecOps?
A) Accelerate feature delivery by removing security checks
B) Integrate security practices early and continuously throughout the software lifecycle
C) Replace developers with security engineers
D) Isolate security teams from development activities
Answer: B
Explanation: DevSecOps aims to embed security into every phase—from planning to
operations—ensuring continuous protection while maintaining speed.
**Question 2.** In the context of “shifting left,” what does “left” refer to?
A) Moving security testing to later stages of deployment
B) Performing security activities earlier in the development lifecycle
C) Relocating code repositories to the left side of the network diagram
D) Using left‑handed cryptographic algorithms
Answer: B
Explanation: “Shifting left” means addressing security earlier (e.g., during coding and CI) rather
than after code is built.
**Question 3.** Which cultural principle is NOT a core tenet of DevSecOps?
A) Shared responsibility for security
B) Silos between development and security teams
C) Continuous feedback loops
D) Automation of repetitive security tasks
Answer: B
Explanation: DevSecOps promotes collaboration, not silos; security is a shared responsibility.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d

Partial preview of the text

Download LFS262 Implementing DevSecOps Practice Exam and more Exams Technology in PDF only on Docsity!

Exam

Question 1. Which statement best describes the primary goal of DevSecOps? A) Accelerate feature delivery by removing security checks B) Integrate security practices early and continuously throughout the software lifecycle C) Replace developers with security engineers D) Isolate security teams from development activities Answer: B Explanation: DevSecOps aims to embed security into every phase—from planning to operations—ensuring continuous protection while maintaining speed. Question 2. In the context of “shifting left,” what does “left” refer to? A) Moving security testing to later stages of deployment B) Performing security activities earlier in the development lifecycle C) Relocating code repositories to the left side of the network diagram D) Using left‑handed cryptographic algorithms Answer: B Explanation: “Shifting left” means addressing security earlier (e.g., during coding and CI) rather than after code is built. Question 3. Which cultural principle is NOT a core tenet of DevSecOps? A) Shared responsibility for security B) Silos between development and security teams C) Continuous feedback loops D) Automation of repetitive security tasks Answer: B Explanation: DevSecOps promotes collaboration, not silos; security is a shared responsibility.

Exam

Question 4. Which component is NOT typically part of a CI/CD pipeline? A) Source code repository B) Build automation tool C) Load balancer for production traffic D) Automated test suite Answer: C Explanation: Load balancers handle traffic routing, not CI/CD pipeline activities. Question 5. Which tool is primarily used for container image vulnerability scanning? A) SonarQube B) Trivy C) JUnit D) Terraform Answer: B Explanation: Trivy scans container images for known OS and application vulnerabilities. Question 6. What does SCA stand for in DevSecOps? A) Secure Code Automation B) Software Composition Analysis C) Service Configuration Audit D) Static Code Assessment Answer: B Explanation: SCA identifies and manages risks from third‑party and open‑source components.

Exam

Question 10. Which practice helps protect secrets during local development? A) Hard‑coding API keys in source files B) Storing secrets in environment variables without encryption C) Using a local instance of HashiCorp Vault for secret retrieval D) Committing .env files to the repository Answer: C Explanation: A local Vault instance provides secure, audited secret access without exposing them in code. Question 11. Which IaC tool is primarily declarative and used for provisioning cloud resources? A) Ansible B) Chef C) Terraform D) Maven Answer: C Explanation: Terraform uses a declarative language to define and provision infrastructure. Question 12. Which of the following best describes a “multi‑stage build” in Docker? A) Building images on multiple operating systems simultaneously B) Separating build and runtime layers to produce a smaller final image C) Running containers in parallel for load testing D) Using multiple Dockerfiles for the same application Answer: B

Exam

Explanation: Multi‑stage builds compile code in one stage and copy only necessary artifacts to a minimal runtime stage, reducing image size and attack surface. Question 13. In DAST, which type of vulnerability is most commonly discovered? A) Hard‑coded credentials in source code B) SQL injection in a running web application C) Outdated library versions in the build artifact D) Unused IAM permissions in cloud accounts Answer: B Explanation: DAST tests a live application and can detect runtime injection flaws like SQL injection. Question 14. Which Kubernetes object enforces security context constraints at the pod level? A) ConfigMap B) ServiceAccount C) PodSecurityPolicy (or Pod Security Standards) D) Ingress Answer: C Explanation: PodSecurityPolicy (deprecated in newer versions) or Pod Security Standards define allowed security settings for pods. Question 15. What is the primary purpose of a NetworkPolicy in Kubernetes? A) Define resource limits for containers B) Control traffic flow between pods and external endpoints C) Store secret data for applications

Exam

C) JMeter D) Puppet Answer: A Explanation: InSpec allows writing declarative tests that validate infrastructure compliance. Question 19. Which component is essential for aggregating logs from multiple microservices? A) Dockerfile B) ELK stack (Elasticsearch, Logstash, Kibana) C) GitHub Actions D) Terraform state file Answer: B Explanation: ELK aggregates, indexes, and visualizes logs from distributed services. Question 20. What does the “lease duration” concept in secret management refer to? A) The time a secret remains valid before it must be rotated or renewed B) The length of time a developer can access the code repository C) The duration of a container’s runtime D) The period a CI pipeline is allowed to run before timing out Answer: A Explanation: Lease duration defines how long a secret is usable, encouraging regular rotation. Question 21. Which of the following is NOT a typical output of a SAST tool? A) Source code line numbers with potential bugs B) Runtime request/response logs

Exam

C) Severity rating of findings D) Recommendations for remediation Answer: B Explanation: SAST analyzes static code; it does not produce runtime logs. Question 22. Which cloud‑native security service can automatically scan container images stored in a registry? A) AWS GuardDuty B) Azure Container Registry (ACR) Scan C) Google Cloud Pub/Sub D) IBM Watson Answer: B Explanation: ACR Scan (or similar services like Amazon ECR Scan) automatically scans images for vulnerabilities. Question 23. In a CI pipeline, where is the optimal point to integrate SCA scanning? A) After deployment to production B) During the build stage, before artifact packaging C) Only during manual code reviews D) After the Docker image is pushed to the registry Answer: B Explanation: Running SCA early catches vulnerable dependencies before they become part of the final artifact. Question 24. Which of the following is a recommended practice when handling third‑party licenses?

Exam

Question 27. Which metric is most useful for detecting a potential credential leak in logs? A) CPU usage spikes B) Number of 404 HTTP responses C) Presence of high‑entropy strings matching secret patterns D. Number of Kubernetes pods restarted Answer: C Explanation: High‑entropy strings often indicate secrets; log monitoring can flag them. Question 28. What does the “principle of least privilege” dictate for IAM roles? A) Grant all permissions to simplify management B) Assign only the permissions required to perform a specific task C) Use a single admin role for all services D. Rotate IAM credentials weekly Answer: B Explanation: Least privilege minimizes risk by limiting access to only what is necessary. Question 29. Which of the following is an example of a “runtime security control” for a web application? A) Code linting during development B) Web Application Firewall (WAF) protecting incoming traffic C) Storing passwords in plain text files D. Using a static Dockerfile for image builds Answer: B Explanation: A WAF inspects live traffic and blocks malicious requests at runtime.

Exam

Question 30. Which tool can be used to enforce security policies on Kubernetes manifests before they are applied? A) kubelet B) kubeadm C) kube-score D) kube-proxy Answer: C Explanation: kube-score evaluates manifests against best‑practice security checks. Question 31. Which of the following best describes a “false positive” in security scanning? A) A vulnerability that is missed by the scanner B) A reported issue that is actually not a security risk C) A vulnerability that is exploited in production D. An alert that triggers automatic remediation Answer: B Explanation: False positives are findings that appear as issues but are benign. Question 32. Which of the following is NOT a typical source of secrets in a CI/CD pipeline? A) Environment variables defined in the CI system B) Plain‑text files committed to source control C) External secret vaults accessed via API D. Build artifact metadata Answer: B Explanation: Storing secrets in source control is insecure and should be avoided.

Exam

Question 36. Which of the following is a recommended approach for handling third‑party binaries in a CI pipeline? A) Directly download them from the internet at build time without verification B) Store them in a trusted artifact repository and verify checksums C) Embed them in the source code repository D. Use them only in production, not during testing Answer: B Explanation: Trusted repositories and checksum verification ensure integrity and provenance. Question 37. What is the primary purpose of a “policy as code” framework like Open Policy Agent (OPA)? A) Automate database backups B) Define and enforce policies in a declarative, programmable manner across the pipeline C) Generate random passwords for users D. Replace all unit tests with policy checks Answer: B Explanation: OPA enables consistent policy enforcement via code that can be versioned and tested. Question 38. Which of the following best describes “immutable infrastructure”? A) Servers are patched in place without redeployment B) Infrastructure components are never changed after deployment; updates are performed by replacing them C) Configuration files are stored in mutable databases D. Containers are restarted daily to apply changes Answer: B

Exam

Explanation: Immutable infrastructure treats components as read‑only; changes require new instances. Question 39. Which of these is a common indicator of compromise (IOC) in container logs? A) Regular heartbeat messages B) Unexpected execve system calls launching unknown binaries C) Consistent health‑check responses D. Normal DNS resolution for known services Answer: B Explanation: Unexpected execve calls can signal malicious processes inside a container. Question 40. Which of the following is a benefit of integrating a SIEM with a vulnerability management system? A) Automatic code generation B) Correlating security events with known vulnerabilities for prioritized response C) Eliminating the need for firewalls D. Providing UI themes for developers Answer: B Explanation: Correlation helps prioritize remediation based on active threats. Question 41. Which Kubernetes resource is used to store configuration data that is not sensitive? A) Secret B) ConfigMap C) PersistentVolumeClaim D. ServiceAccount

Exam

D. Expansion of the source code repository size Answer: B Explanation: Drift occurs when manual changes alter the environment, causing it to differ from IaC definitions. Question 45. Which of the following is an example of a “runtime security hardening” technique for Kubernetes? A) Using a default ServiceAccount with full cluster admin rights B) Enabling the pod security admission controller to enforce restricted policies C. Disabling network policies altogether D. Allowing privileged containers by default Answer: B Explanation: Enforcing pod security policies reduces the attack surface at runtime. Question 46. Which of the following is the most appropriate way to rotate a secret stored in HashiCorp Vault? A) Delete the secret manually and re‑enter it B) Use Vault’s built‑in lease and renewal mechanisms to automatically rotate after a defined TTL C. Store multiple copies of the same secret D. Never rotate; use long‑lived secrets Answer: B Explanation: Vault’s lease system automates rotation, improving security. Question 47. In a CI/CD workflow, which stage is best suited for running integration tests that require external services (e.g., databases)? A) Linting stage

Exam

B) Build stage C) Test stage with provisioned test environment D. Deploy stage to production Answer: C Explanation: Integration tests run after the build, using a temporary environment that mimics production dependencies. Question 48. Which of the following is a key advantage of using “Infrastructure as Code” for security compliance? A) Manual configuration steps are faster B) Policies can be automatically validated during code commits C) Only senior engineers can modify the infrastructure D. Compliance checks are performed once per year Answer: B Explanation: IaC enables automated compliance checks as part of the development workflow. Question 49. Which of the following tools is primarily used for dynamic analysis of APIs? A) SonarQube B) OWASP ZAP C. Terraform D. Ansible Answer: B Explanation: OWASP ZAP can perform DAST against RESTful APIs. Question 50. Which of the following is NOT a typical function of a container runtime security tool?

Exam

Question 53. Which of the following is a recommended practice for handling Terraform state files? A) Store them in the local filesystem without encryption B) Keep them in a remote backend with versioning and access controls C. Commit them to the source code repository D. Delete them after each apply Answer: B Explanation: Remote backends protect state files, enable locking, and provide auditability. Question 54. Which of the following is a primary reason to enable “Read‑Only Filesystem” for containers? A) To improve container startup speed B) To prevent malicious processes from writing to the container’s file system at runtime C. To allow containers to modify host kernel modules D. To enable dynamic code compilation inside the container Answer: B Explanation: A read‑only filesystem limits the impact of compromised processes. Question 55. Which of the following best describes the purpose of “secret scanning” in a CI pipeline? A) Detecting hard‑coded secrets in source code before they are merged B) Scanning network traffic for encrypted payloads C. Verifying SSL certificates of external services D. Measuring latency of API calls Answer: A

Exam

Explanation: Secret scanning identifies accidental exposure of credentials in code. Question 56. Which of the following is a typical output of a DAST scan? A) List of insecure code patterns in source files B) HTTP request/response pairs that triggered alerts C. Dependency tree of third‑party libraries D. Configuration drift report for IaC Answer: B Explanation: DAST provides details of the malicious requests that caused vulnerabilities. Question 57. Which of the following is a best practice for managing IAM policies in a multi‑tenant cloud environment? A) Use a single admin account for all tenants B) Apply tenant‑specific least‑privilege roles and isolate permissions per tenant C. Grant all users read‑write access to every resource D. Disable MFA for convenience Answer: B Explanation: Isolating permissions per tenant reduces cross‑tenant risk. Question 58. Which of the following tools can be used to enforce security policies on Kubernetes Admission Controllers via Rego language? A) Helm B. OPA Gatekeeper C. kubelet D. Docker Compose