• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 20 pages
Other

WGU D385 Software Security and Testing | Static Code Analysis & Flake8 Practice Lab | Python Security, Logging, Testing & Remediation | 2026

Document preview thumbnail
Preview 3 out of 20 pages

Prepare more effectively for WGU D385 – Software Security and Testing with this detailed Static Code Analysis & Flake8 Practice Lab, designed to strengthen the practical skills associated with the current D385 course and the static-analysis concepts encountered in Task 1 preparation. This 20-page hands-on practice resource goes beyond basic definitions by showing how static analysis, secure coding, logging, testing, debugging, and vulnerability remediation work together in a realistic Python workflow. Inside, you’ll work through vulnerable Python examples, Flake8 findings, code corrections, testing strategies, security-focused logging, exception handling, input validation, assertions, pytest cases, and before/after remediation verification. What this D385 resource includes: Static code analysis fundamentals Practical Flake8 workflow and findings Vulnerable Python code examples Identification and explanation of code-quality issues Security weaknesses that Flake8 may not detect Step-by-step code remediation Secure input validation Exception-handling techniques Python assertions Safe and useful logging practices Abnormal log-event analysis Authentication-related security considerations Pytest/unit-testing examples 10 verification test cases Before-and-after code comparison Vulnerability remediation explanations Technical-report writing guidance Independent practice lab Answer key Flake8 quick-reference material This resource is ideal for students who want to understand why a static-analysis issue occurs, how to correct it, and how to verify that the remediation works, rather than simply memorizing terminology. Best for WGU D385 students preparing for Software Security and Testing, especially learners reviewing Task 1 concepts involving static code analysis, Flake8, Python security, debugging, logging, vulnerability identification, remediation, and testing. Updated for September 2026 study preparation.

Content preview

WGU D385 - Static Code Analysis & Flake8 Practice Lab | September 2026 Study Edition




WGU D385
Software Security and Testing
Static Code Analysis & Flake8 Practice Lab
Task 1 Skills Practice - September 2026 Study Edition

Academic-use note: This is a complete worked practice lab built from original code. It is designed to teach the skills associated
with D385, not to provide a completed WGU Task 1 submission. Your actual rubric, starter code, screenshots, filenames, and
evaluator requirements may differ.




Includes: static analysis concepts, Flake8 setup, issue interpretation, remediation, logging, defensive coding, testing,
log analysis, report-writing model, independent practice, and answer key.



All sample code and practice findings in this document are original teaching examples.




Original study resource - not an official WGU assessment, rubric, answer key, or submission. Page 1

,WGU D385 - Static Code Analysis & Flake8 Practice Lab | September 2026 Study Edition


1. September 2026 Alignment and Evidence Base
The September 2026 WGU Institutional Catalog lists D385 - Software Security and Testing as a 3-CU course and describes its
purpose as preparing learners to recognize software security vulnerabilities, plan interventions, develop fixes, and test those
interventions. The catalog specifically names Web security, permissions and identity security, debugging, log-file analysis, API
security, and encryption/cryptography as course topics. [1]
The public catalog does not publish the detailed Task 1 rubric. Recent 2026 student reports about the newer two-task version
describe Task 1 work involving static code analysis, issue identification, Python logging, exception handling, assertions, test
evidence, and interpretation of log abnormalities. Those reports are useful for study planning but are unofficial and can change. [2]
[3]

Alignment rule: Use your current WGU task instructions and rubric as the final authority. This lab deliberately teaches
transferable skills without copying WGU starter code or producing a submit-ready answer.




Practice-Lab Alignment Map
Skill area What you do in this lab Basis

Recognize vulnerabilities Inspect intentionally flawed Python code; Official D385 course goal [1]
classify lint findings and security concerns.

Plan interventions Prioritize fixes by correctness, reliability, and Official D385 course goal [1]
security impact.

Develop and test interventions Refactor code, add validation/logging, then run Official D385 course goal [1]
unit tests.

Debugging and log analysis Generate troubleshooting logs and interpret Official topic + 2026 public reports [1][2]
abnormal events.

Static code analysis Run/interpret Flake8-style findings; distinguish 2026 public reports [2]
lint findings from security findings.

Defensive coding Use explicit validation, targeted exceptions, 2026 public reports [2]
and carefully scoped assertions.



What "partly covered in Task 1" means here
This lab treats Flake8 as one component of a broader Task 1 skill set. Flake8 is primarily a Python linting and quality tool. It can
expose patterns that contribute to defects - such as undefined names, unused imports, bare except clauses, style problems, and
excessive complexity - but it is not a complete security vulnerability scanner. Security analysis still requires reasoning about
authentication, secret handling, input validation, logging, permissions, data flow, and misuse cases.




Original study resource - not an official WGU assessment, rubric, answer key, or submission. Page 2

, WGU D385 - Static Code Analysis & Flake8 Practice Lab | September 2026 Study Edition


2. Lab Outcomes and Completion Standard
By the end of this worked practice lab, you should be able to complete the following without copying the model solution:
 Explain static code analysis in plain language and distinguish it from dynamic testing.
 Install and invoke Flake8 against a Python file or project.
 Interpret common E, W, and F findings and explain why they matter.
 Separate lint/style findings from genuine security vulnerabilities.
 Document at least five distinct findings with line references and remediation rationale.
 Replace broad exception handling with specific exceptions and useful log events.
 Validate untrusted input before using it in business or authentication logic.
 Use assertions only for internal invariants, not as the sole security boundary.
 Create troubleshooting logs without exposing secrets or sensitive values.
 Run tests that prove both normal behavior and rejected/abnormal behavior.
 Interpret log abnormalities and connect them to security or reliability concerns.
 Write a concise technical report that ties evidence to remediation and testing.

Completion Standard for This Practice Lab
Area Evidence expected Target

Static analysis You can explain what the tool found and what Mastery
it did not find.

Issue documentation At least 5 unique findings include line, code, Mastery
risk, and fix.

Remediation The revised code removes lint defects and Mastery
improves defensive behavior.

Logging Normal and abnormal events are recorded Mastery
without logging credentials.

Testing Positive and negative tests pass; rejected Mastery
inputs are intentionally exercised.

Reflection You can explain why each change improves Mastery
quality or security.



Important technical nuance: Assertions can be disabled when Python runs with optimization. For production security
boundaries, use explicit validation and exceptions. This lab includes one assertion only to demonstrate an internal invariant,
while untrusted input is protected by normal control flow.




Original study resource - not an official WGU assessment, rubric, answer key, or submission. Page 3

Document information

Uploaded on
September 10, 2026
Number of pages
20
Written in
2026/2027
Type
Other
Person
Unknown
$16.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
EvaTee
3.9
(990)
Sold
5490
Followers
3584
Items
59527
Last sold
3 hours ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions