• 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 4 out of 34 pages
Other

WGU D385 ZHN1 Task 2 Software Security & Testing | Secure Coding, API Security, Python Vulnerability Remediation & Pytest Solutions | 2026/2027

Document preview thumbnail
Preview 4 out of 34 pages

Prepare confidently for WGU D385 Software Security and Testing – ZHN1 Task 2 with this detailed secure coding and API security study guide focused on vulnerability identification, remediation, testing, and mitigation reporting. This resource is designed to help learners understand how to improve insecure Python/Flask code, strengthen API security, validate fixes with pytest, and clearly document the security impact of each remediation. Inside you’ll find: • D385 ZHN1 Task 2 workflow overview • Secure coding principles • Static analysis with Flake8 and Bandit • General Python vulnerability identification • API security vulnerability analysis • Authentication vs. authorization • Least-privilege implementation • Input validation and allowlisting • Secure exception handling • Secret and credential management • TLS and encryption concepts • Secure logging practices • Original vulnerable Flask/API practice application • Four detailed vulnerability-remediation examples • Secure replacement code examples • Four pytest validation solutions • Expected vs. actual test-result analysis • Security regression testing • Mitigation-report structure • Multiple mitigation strategies for each vulnerability • Input-validation improvement guidance • Exception-handling recommendations • Encryption and transport-security analysis • Evidence and screenshot planning • Original fictional API security case study • Common revision risks and fixes • Final Task 2 submission-readiness checklist • 30 scenario-based knowledge-check questions with answers Ideal for WGU cybersecurity students who want a clear, structured resource for understanding D385 Task 2 from vulnerability identification through secure remediation, API security implementation, pytest validation, and final mitigation reporting.

Content preview

WGU D385
Software Security and Testing

ZHN1 TASK 2
SECURE CODING, API SECURITY IMPLEMENTATION, PYTHON VULNERABILITY
REMEDIATION & PYTEST SOLUTIONS
2026/2027 Study Exemplar

IMPORTANT USE NOTE
This is an independently created study guide and practice exemplar. It does not reproduce WGU proprietary starter code, exact task prompts,
evaluator comments, or a submitted student solution. The code, filenames, endpoints, logs, screenshots, tests, and case data are original
practice material. Students should verify the current live ZHN1 directions and rubric before submission.



Plain black-and-white academic layout for study and listing use.




WGU D385 ZHN1 Task 2 - Independent Study Exemplar - 2026/2027 | Page 1

,Contents
Section Content
1 2026 D385 / ZHN1 Task 2 alignment
2 Task 2 workflow and evidence architecture
3 Secure-coding principles and threat model
4 Static-analysis triage: Flake8, Bandit and false positives
5 General vulnerability remediation patterns
6 API security architecture
7 Authentication, authorization and least privilege
8 Secrets, credentials and configuration security
9 Input validation and injection resistance
10 Exception handling and safe error responses
11 Transport encryption and data protection
12 Security logging without leaking secrets
13 Pytest strategy and evidence capture
14 Original vulnerable practice application
15 Remediation 1 - unsafe file path handling
16 Remediation 2 - unsafe exception disclosure
17 Remediation 3 - broken object-level authorization
18 Remediation 4 - hard-coded API token
19 Four pytest validation solutions
20 Security mitigation report framework
21 Two mitigation strategies per vulnerability
22 Two input-validation techniques
23 Two exception-handling improvements
24 Encryption method analysis
25 Integrated original case study
26 Evidence and screenshot checklist
27 Submission package / file organization
28 Common revision risks
29 30 scenario knowledge checks with answers
30 Final readiness audit
31 References and originality statement



How to use this guide
Follow the secure-development sequence: identify -> explain risk -> implement minimal secure change -> preserve the insecure example as a
commented practice comparison -> run focused pytest validation -> document evidence -> write the mitigation rationale. Do not copy practice
code verbatim into a live assessment without adapting it to the current starter project and rubric.




WGU D385 ZHN1 Task 2 - Independent Study Exemplar - 2026/2027 | Page 2

,1. 2026 D385 / ZHN1 Task 2 Alignment
WGU catalogs D385 (ITEC 2034) as Software Security and Testing. Public 2026 course materials consistently describe ZHN1 as
a performance assessment with two tasks. Task 2 focuses on secure coding and secure API implementation, remediation of
general and API vulnerabilities, pytest validation, and a written mitigation report.
Area Practical Task 2 skill
Identify code-quality/security weaknesses and replace them with safer
General code security
implementation patterns.
Protect endpoints with authentication, authorization, least privilege,
API security
safe input handling and secure configuration.
Use focused automated tests to prove intended secure behavior and
Validation
rejection of invalid/unauthorized behavior.
Explain risk, remediation rationale, validation, input handling, exception
Reporting
handling and encryption in professional language.
Capture readable before/after code, line context and passing tests
Evidence
without exposing secrets.



Version-sensitive note
Public marketplace copies describe a pattern of two general vulnerabilities plus two API vulnerabilities and four passing pytest validations. Treat
all exact file names, line numbers, screenshots and submission packaging as version-sensitive; the live WGU task instructions are authoritative.




WGU D385 ZHN1 Task 2 - Independent Study Exemplar - 2026/2027 | Page 3

,2. Task 2 Workflow and Evidence Architecture
1. Read the live task and identify every required deliverable before editing code.
2. Create a clean working copy and preserve the provided original.
3. Review static-analysis reports and map each finding to a line, weakness class and security impact.
4. Select only the findings required by the live task.
5. Implement the smallest secure change that fully mitigates each weakness.
6. Run targeted tests for each remediation, then the entire suite.
7. Capture evidence only after the final code is stable.
8. Write the report from evidence rather than from memory.
9. Package files exactly as the current instructions require.
10. Run a final requirement-by-requirement audit.
Evidence object What it should prove
Before code The insecure behavior/pattern existed in the designated location.
Secure replacement The vulnerability was mitigated with a defensible control.
The secure behavior works and the insecure path is rejected or
Test
contained.
Why the original pattern was risky and why the replacement reduces
Report rationale
risk.
What the change does not solve and what additional controls would be
Limitations
appropriate in production.




WGU D385 ZHN1 Task 2 - Independent Study Exemplar - 2026/2027 | Page 4

Document information

Uploaded on
November 23, 2026
Number of pages
34
Written in
2026/2027
Type
Other
Person
Unknown
$17.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
59520
Last sold
1 day ago



Why students choose Stuvia

Created by fellow students, verified by reviews

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

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right 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 aced 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