• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 13 páginas
Examen

WGU D522 Python for IT Automation | Secure Coding, Secrets & Logging Quick Reference | Git, Exams of Information Technology

Document preview thumbnail
Vista previa 2 fuera de 13 páginas

WGU D522 Python for IT Automation | Secure Coding, Secrets & Logging Quick Reference | Git, Exams of Information Technology

Vista previa del contenido

WGU D522 Python for IT Automation |
Secure Coding, Secrets & Logging Quick
Reference | Git, Exams of Information
Technology
1. Which practice best supports secure and reliable operations when a script
authenticates to a production service?
A. Hard-code passwords in the script
B. Commit tokens to version control
C. Retrieve credentials through an approved secure mechanism rather than
embedding secrets in source code
D. Print secrets to logs for debugging

Answer: C — Secrets should be protected through approved credential-
management mechanisms, not embedded in source code or committed to version
control .

2. A script must execute an external command safely. Which approach
minimizes operational and security risk?
A. Concatenate untrusted input into shell commands
B. Execute arbitrary user input directly
C. Disable all validation for speed
D. Validate inputs and use safe command-execution mechanisms rather than
constructing unsafe shell strings

Answer: D — Safe command execution reduces injection and unintended command
risks. Using shell=True with untrusted input creates shell injection vulnerabilities .

3. Production automation should include which safeguards to limit operational
risk?
A. Disabled logs and no validation
B. Untested code running with administrator rights
C. Validation, limited permissions, logging, testing, and an appropriate approval
process
D. Unlimited retries without exception handling

Answer: C — Production automation should include safeguards that limit
operational risk: validation, limited permissions, logging, testing, and approval
processes .

4. What is idempotent automation?
A. Automation that produces different results each run

, B. Automation designed to produce the desired state without unnecessary repeated
side effects
C. Automation that runs only once
D. Automation that deletes all data on each run

Answer: B — Idempotent automation produces the desired state without
unnecessary repeated side effects when rerun .

5. When a multi-system automation task encounters a failure on one target,
what is the recommended approach?
A. Stop at the first error automatically
B. Handle expected exceptions per target and record the failure without
unnecessarily terminating the entire workflow
C. Hide all exceptions
D. Retry forever until success

Answer: B — Targeted exception handling supports resilient multi-system
automation, allowing the workflow to continue while recording failures .

6. How should JSON data from an API be handled in automation scripts?
A. Assume every field exists
B. Parse the JSON into appropriate Python structures and validate required fields
before using them
C. Treat it as trusted executable code
D. Ignore malformed responses

Answer: B — Structured API data should be parsed and validated before
processing .

7. What does the principle of least privilege mean for automation scripts?
A. Give all scripts administrator rights for simplicity
B. Run scripts with only the permissions necessary for their function
C. Disable all authentication
D. Use the same credentials for all environments

Answer: B — Least privilege limits permissions to only what is necessary, reducing
potential damage from compromised or buggy scripts.

8. Why should automation scripts validate inputs before processing?
A. To slow down execution
B. To prevent injection attacks and malformed data from causing failures
C. To increase code complexity
D. To reduce logging output

Información del documento

Subido en
17 de septiembre de 2026
Número de páginas
13
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$19.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
1
Seguidores
0
Artículos
343
Última venta
1 mes hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes