WGU D385 LOGGING AND SECURITY ISSUES FINAL PAPER
QUESTIONS AND SOLUTIONS
◉ Unconstrained Input
Answer: - the user can input as much data as they want
◉ CERT Top 10 Secure Coding Practices
Answer: 1. validate input
2. heed compiler warning
3. architect/design for security
4. keep it simple
5. default deny
6. least privileges
7. sanitize data
,8. defense in depth
9. QA
10. standards
◉ Unit Test
Answer: - smallest, testable pieces of code called units
- verifies that each part of the code works correctly and as intended
◉ What are the popular Python unit testing frameworks?
Answer: - PyUnit (built-in)
- PyTest
◉ Which SDL phase uses static code analysis?
Answer: - implementation
- white box testing during the implementation phase
,◉ What are true about assertions?
Answer: - they are conditional Boolean expressions
- they have an optional message part
- they are used to check the types or values of arguments
◉ What happens when assertion condition result is false?
Answer: - the program will stop and given an error message
◉ What is the general structure of an assertion statement?
Answer: - assert expression [assertion_message]
◉ Which test is solely black box testing?
Answer: - Integration testing
, ◉ What are two techniques of defensive programming?
Answer: - value substitution
- exception handling
◉ Which two classes does the bdb module implement?
Answer: - Breakpoint
- Bdb
◉ Which attribute provides a dictionary of breakpoint instances?
Answer: - bplist
- maintains a (file, line) tuple of breakpoints
◉ Which function can be used to return all set breakpoints?
Answer: - get_all_breaks( )
- returns a string with all set breakpoints
QUESTIONS AND SOLUTIONS
◉ Unconstrained Input
Answer: - the user can input as much data as they want
◉ CERT Top 10 Secure Coding Practices
Answer: 1. validate input
2. heed compiler warning
3. architect/design for security
4. keep it simple
5. default deny
6. least privileges
7. sanitize data
,8. defense in depth
9. QA
10. standards
◉ Unit Test
Answer: - smallest, testable pieces of code called units
- verifies that each part of the code works correctly and as intended
◉ What are the popular Python unit testing frameworks?
Answer: - PyUnit (built-in)
- PyTest
◉ Which SDL phase uses static code analysis?
Answer: - implementation
- white box testing during the implementation phase
,◉ What are true about assertions?
Answer: - they are conditional Boolean expressions
- they have an optional message part
- they are used to check the types or values of arguments
◉ What happens when assertion condition result is false?
Answer: - the program will stop and given an error message
◉ What is the general structure of an assertion statement?
Answer: - assert expression [assertion_message]
◉ Which test is solely black box testing?
Answer: - Integration testing
, ◉ What are two techniques of defensive programming?
Answer: - value substitution
- exception handling
◉ Which two classes does the bdb module implement?
Answer: - Breakpoint
- Bdb
◉ Which attribute provides a dictionary of breakpoint instances?
Answer: - bplist
- maintains a (file, line) tuple of breakpoints
◉ Which function can be used to return all set breakpoints?
Answer: - get_all_breaks( )
- returns a string with all set breakpoints