• Mauvais document ? Échangez-le gratuitement
  • Rédigé par des étudiants ayant réussi
  • Disponible immédiatement après paiement
  • Lire en ligne ou en PDF
Vendre
Où étudie-tu ?
La langue
Document preview thumbnail
Aperçu 3 sur 16 pages
Examen

WGU D385 Coding Lab 2026/2027 | Python Security & Testing Practice | Quick Fixes and Solutions

Document preview thumbnail
Aperçu 3 sur 16 pages

Prepare for WGU D385 Software Security and Testing with practical coding review focused on common Python errors, security vulnerabilities, and remediation techniques. Review static code analysis, Flake8, Bandit, logging, exception handling, assertions, input validation, API authentication and authorization, pytest, unit testing, SQL injection, XSS, and secure coding practices. Ideal for structured lab preparation and hands-on review.

Aperçu du contenu

WGU D385 CODING LAB 2026/2027 | QUICK FIXES & SOLUTIONS |
MOST COMMON CODING ERRORS EXPLAINED | PRACTICAL EXAMPLES
| HIGH-YIELD REVIEW GUIDE | CURRENTLY UPDATED
1. John is a network administrator for ACME company. He is trying to explain
least privileges to a new technician. Which of the following is the basic
premise of least privilege?

Always assign responsibilities to the administrator who has the
minimum permissions required.

When assigning permissions, give users only the permissions they
need to do their work and no more.

Do not give management more permissions than users.

Regularly review user permissions and take away one that they
currently have to see if they will complain or even notice that it is
missing.

2. If you were to implement a function that checks the quality of user input for a
temperature value, what criteria would you include to ensure its validity?

Check if the value is a boolean.

Check if the value is a list of temperatures.

Check if the value is a string containing letters.

Check if the value is a number within a specified range.

3. Describe what happens when the assertion for temperature checks fails.

The assertion automatically corrects the temperature value.

The program continues without any interruption.

The assertion prints a warning message without stopping the
program.

, The assertion raises an AssertionError, indicating the temperature is
not below freezing.

4. Describe the importance of logging errors such as division by zero in Python
applications.

Logging is only important for syntax errors, not runtime errors.

Logging errors is unnecessary as they do not affect the program's
execution.

Logging errors only serves to slow down the application without any
benefits.

Logging errors like division by zero helps in debugging and
maintaining code quality by providing insights into runtime issues.

5. If a developer receives serialized data that does not pass validation checks,
what is the recommended action to take?

Automatically fix the data and proceed.

Reject the data and raise an error.

Ignore the validation and deserialize the data.

Log the data and continue processing.

6. Describe how plain text should be formatted before it is encrypted using AES
CTR mode.

The plain text should be compressed before encryption.

The plain text should be converted to a hexadecimal format.

The plain text should be left as a string without any changes.

The plain text should be formatted into bytes and padded
appropriately.

, 7. What is the assertion used to check if an integer temperature is below
freezing?

assert temperature <= 0

assert temperature < 0

assert temperature > 0

assert temperature == 0

8. If a developer is currently using SHA-1 for password hashing, what steps
should they take to transition to a more secure method?

They should implement bcrypt for password hashing and rehash
existing passwords.

They should continue using SHA-1 and add additional security
measures.

They should switch to SHA-256 without any changes to existing
passwords.

They should store passwords in plain text for easier access.

9. What describes how CTR mode encryption functions?

Converts the block cipher into a stream cipher, then uses another
value and a nonce to encrypt the data.

Uses a self-synchronizing stream cipher where the initialization vector
(IV) is encrypted and XORed with the data stream one bit at a time.

Encrypts each block with the same key, where each block is
independent of the others.

Uses an initialization vector (IV) to encrypt the first block, then uses
the result of the encryption to encrypt the next block.

Infos sur le Document

Publié le
30 septembre 2026
Nombre de pages
16
Écrit en
2026/2027
Type
Examen
Contient
Questions et réponses
$21.99

Mauvais document ? Échangez-le gratuitement Dans les 14 jours suivant votre achat et avant le téléchargement, vous pouvez choisir un autre document. Vous pouvez simplement dépenser le montant à nouveau.
Rédigé par des étudiants ayant réussi
Disponible immédiatement après paiement
Lire en ligne ou en PDF

Seller avatar
ExamPrepPro
1.0
(1)
Vendu
4
Abonnés
1
Éléments
378
Dernière vente
1 jours de cela




Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Vous travaillez sur vos références ?

Créez des citations précises en APA, MLA et Harvard avec notre générateur de sources gratuit.

Vous travaillez sur vos références ?

Foire aux questions