CSSLP Domain 4 – Secure Software Implementation Flashcards

(98 cards)

1
Q

Question

A

Model Answer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  1. What is the primary goal of secure software implementation?
A

To translate secure design into code that resists vulnerabilities and maintains confidentiality, integrity, and availability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  1. What are the two main approaches to implementing security in code?
A

Declarative (security in configuration/deployment) and Imperative (security embedded directly in code).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  1. What is the advantage of declarative security?
A

It allows flexible configuration changes without altering code and supports central management by operations teams.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  1. What is the advantage of imperative security?
A

It provides greater control and granularity over security decisions within the application logic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. What is secure coding?
A

Writing software that prevents, detects, and mitigates vulnerabilities, following best practices and standards like OWASP or CWE.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  1. What are common categories of software vulnerabilities?
A

Injection, buffer overflow, cross-site scripting, insecure deserialization, broken authentication, and insecure direct object references.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  1. What is the OWASP Top 10?
A

A list of the ten most critical web application security risks published by OWASP, updated periodically.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  1. What is the Common Weakness Enumeration (CWE)?
A

A community-developed list of common software security weaknesses for awareness, testing, and mitigation guidance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  1. Why is input validation critical?
A

It ensures that only properly formatted, expected data is accepted, preventing attacks such as injection and XSS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  1. What is output encoding/sanitization?
A

Transforming output data to prevent unintended code execution or data leakage when displayed or transmitted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  1. How does buffer overflow occur?
A

When a program writes more data to a buffer than it can hold, potentially overwriting memory and enabling code execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  1. What is tokenization and why is it important?
A

Replacing sensitive data with non-sensitive tokens, reducing exposure of actual values during processing or storage.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  1. What are the benefits of using managed code environments (e.g., .NET, Java)?
A

Automatic memory management, type safety, and sandboxing reduce common implementation vulnerabilities.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  1. What risks exist with unmanaged code?
A

Manual memory handling can lead to buffer overflows, memory leaks, and pointer manipulation vulnerabilities.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  1. What is cryptographic agility?
A

The ability to change cryptographic algorithms or parameters without modifying source code, ensuring adaptability to new standards.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
  1. What is exception handling and why is it important?
A

Proper handling of errors prevents the system from failing in an insecure state or leaking sensitive information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
  1. What should developers avoid when logging errors?
A

Sensitive data such as passwords, encryption keys, or PII should never be logged in plaintext.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q
  1. What is sandboxing?
A

Isolating code execution in a restricted environment to prevent untrusted or malicious code from affecting the system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q
  1. What are compiler switches used for?
A

To enforce code safety options such as stack protection, exception handling, and memory safety during build time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q
  1. What are the benefits of code review?
A

Identifies logic errors, security flaws, and ensures adherence to secure coding standards before release.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q
  1. What are SAST and DAST tools?
A

Static Application Security Testing (SAST) analyzes source code; Dynamic Application Security Testing (DAST) tests running applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q
  1. What is the role of IAST in secure implementation?
A

Interactive Application Security Testing combines SAST and DAST insights during runtime to detect vulnerabilities more accurately.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q
  1. What is secure configuration management?
A

Controlling and protecting code, dependencies, and environment configurations to prevent unauthorized changes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
24. How should third-party libraries be managed securely?
Verify authenticity, maintain version control, and monitor for vulnerabilities using SBOMs and trusted repositories.
26
25. What is the benefit of version control systems (e.g., Git) in secure development?
They track code changes, support accountability, and enable rollback or audit in case of security issues.
27
Question
Model Answer
28
1. What is the primary goal of secure software implementation?
To translate secure design into code that resists vulnerabilities and maintains confidentiality, integrity, and availability.
29
2. What are the two main approaches to implementing security in code?
Declarative (security in configuration/deployment) and Imperative (security embedded directly in code).
30
3. What is the advantage of declarative security?
It allows flexible configuration changes without altering code and supports central management by operations teams.
31
4. What is the advantage of imperative security?
It provides greater control and granularity over security decisions within the application logic.
32
5. What is secure coding?
Writing software that prevents, detects, and mitigates vulnerabilities, following best practices and standards like OWASP or CWE.
33
6. What are common categories of software vulnerabilities?
Injection, buffer overflow, cross-site scripting, insecure deserialization, broken authentication, and insecure direct object references.
34
7. What is the OWASP Top 10?
A list of the ten most critical web application security risks published by OWASP, updated periodically.
35
8. What is the Common Weakness Enumeration (CWE)?
A community-developed list of common software security weaknesses for awareness, testing, and mitigation guidance.
36
9. Why is input validation critical?
It ensures that only properly formatted, expected data is accepted, preventing attacks such as injection and XSS.
37
10. What is output encoding/sanitization?
Transforming output data to prevent unintended code execution or data leakage when displayed or transmitted.
38
11. How does buffer overflow occur?
When a program writes more data to a buffer than it can hold, potentially overwriting memory and enabling code execution.
39
12. What is tokenization and why is it important?
Replacing sensitive data with non-sensitive tokens, reducing exposure of actual values during processing or storage.
40
13. What are the benefits of using managed code environments (e.g., .NET, Java)?
Automatic memory management, type safety, and sandboxing reduce common implementation vulnerabilities.
41
14. What risks exist with unmanaged code?
Manual memory handling can lead to buffer overflows, memory leaks, and pointer manipulation vulnerabilities.
42
15. What is cryptographic agility?
The ability to change cryptographic algorithms or parameters without modifying source code, ensuring adaptability to new standards.
43
16. What is exception handling and why is it important?
Proper handling of errors prevents the system from failing in an insecure state or leaking sensitive information.
44
17. What should developers avoid when logging errors?
Sensitive data such as passwords, encryption keys, or PII should never be logged in plaintext.
45
18. What is sandboxing?
Isolating code execution in a restricted environment to prevent untrusted or malicious code from affecting the system.
46
19. What are compiler switches used for?
To enforce code safety options such as stack protection, exception handling, and memory safety during build time.
47
20. What are the benefits of code review?
Identifies logic errors, security flaws, and ensures adherence to secure coding standards before release.
48
21. What are SAST and DAST tools?
Static Application Security Testing (SAST) analyzes source code; Dynamic Application Security Testing (DAST) tests running applications.
49
22. What is the role of IAST in secure implementation?
Interactive Application Security Testing combines SAST and DAST insights during runtime to detect vulnerabilities more accurately.
50
23. What is secure configuration management?
Controlling and protecting code, dependencies, and environment configurations to prevent unauthorized changes.
51
24. How should third-party libraries be managed securely?
Verify authenticity, maintain version control, and monitor for vulnerabilities using SBOMs and trusted repositories.
52
25. What is the benefit of version control systems (e.g., Git) in secure development?
They track code changes, support accountability, and enable rollback or audit in case of security issues.
53
Question
Model Answer
54
Explain the goal of secure software implementation. (Domain 4)
To translate secure design into code that is free of vulnerabilities and adheres to security standards and best practices.
55
Describe why secure coding standards are essential. (Domain 4)
They ensure consistent, defensible code and prevent common errors like injection, buffer overflow, and improper error handling.
56
Define secure coding guidelines. (Domain 4)
Guidelines provide language-specific rules and recommendations that help developers implement security controls correctly.
57
Explain the role of developer training in secure implementation. (Domain 4)
Training ensures developers understand secure coding principles and how to avoid introducing vulnerabilities.
58
Describe how code review contributes to software security. (Domain 4)
Code reviews identify logic and security flaws early and enforce adherence to organizational standards.
59
Explain the importance of input validation in secure coding. (Domain 4)
Validating inputs prevents injection attacks and ensures data integrity before processing or storage.
60
Describe output encoding and why it is necessary. (Domain 4)
Encoding ensures that output data cannot be interpreted as code, protecting against cross-site scripting and injection attacks.
61
Define canonicalization in input processing. (Domain 4)
It normalizes input data into a standard format before validation to prevent bypass via alternate encodings.
62
Explain how improper input validation can lead to vulnerabilities. (Domain 4)
Unvalidated or poorly validated input can enable attacks such as SQL injection, command injection, or buffer overflow.
63
Describe how data sanitization differs from validation. (Domain 4)
Validation checks input for correctness; sanitization modifies or removes unsafe data before further use.
64
Explain the difference between authentication and authorization. (Domain 4)
Authentication verifies user identity; authorization determines what actions the user is permitted to perform.
65
Describe secure password storage practices. (Domain 4)
Passwords should be hashed with a strong algorithm, salted, and stored using key-stretching techniques like PBKDF2 or bcrypt.
66
Explain the purpose of multifactor authentication (MFA). (Domain 4)
MFA combines independent credentials—something you know, have, or are—to strengthen access control.
67
Describe the principle of session management. (Domain 4)
Session management maintains user state securely and should include timeouts, rotation, and invalidation upon logout.
68
Explain how privilege escalation vulnerabilities occur. (Domain 4)
They occur when users can perform actions beyond their intended authorization level, often due to missing access checks.
69
Describe the correct use of cryptography in software implementation. (Domain 4)
Use vetted algorithms, manage keys securely, and apply encryption at appropriate data states—in transit and at rest.
70
Explain why developers should avoid creating custom cryptographic algorithms. (Domain 4)
Custom algorithms are rarely peer-reviewed and often contain design flaws that compromise security.
71
Define key management. (Domain 4)
The process of generating, distributing, rotating, and revoking cryptographic keys to maintain confidentiality and integrity.
72
Describe the role of hashing in data protection. (Domain 4)
Hashing provides integrity verification and can protect stored data when used with salts.
73
Explain the difference between symmetric and asymmetric encryption. (Domain 4)
Symmetric uses one key for encryption/decryption; asymmetric uses a key pair (public/private) for added flexibility and security.
74
Describe best practices for error and exception handling. (Domain 4)
Handle all exceptions gracefully, avoid exposing internal information, and log security-relevant errors securely.
75
Explain why error messages should not reveal system details. (Domain 4)
Detailed messages can expose configuration or implementation information that attackers can exploit.
76
Define fail-secure error handling. (Domain 4)
Ensures the system defaults to a secure state if an error occurs or handling fails.
77
Describe how improper error handling can lead to denial of service. (Domain 4)
If exceptions are unhandled, they can crash processes or lock up resources, impacting availability.
78
Explain why exceptions should be logged securely. (Domain 4)
Security-related logs help detect issues but must avoid storing sensitive data or secrets.
79
Explain the concept of secure configuration. (Domain 4)
Ensuring software and environment settings align with defined baselines and disable unnecessary features.
80
Describe how configuration management tools enhance security. (Domain 4)
They enforce consistency across environments, reducing human error and configuration drift.
81
Explain why default credentials should be changed during deployment. (Domain 4)
Default credentials are widely known and exploited; changing them prevents unauthorized access.
82
Describe the importance of environment hardening. (Domain 4)
Removing unnecessary services and applying the principle of least functionality reduces attack surfaces.
83
Define baseline configuration. (Domain 4)
A documented, approved configuration that represents the secure standard for systems or applications.
84
Describe the concept of a secure build environment. (Domain 4)
An isolated, controlled environment where code is compiled, dependencies verified, and artifacts signed before release.
85
Explain the risks associated with using third-party components. (Domain 4)
External libraries can introduce vulnerabilities or malicious code if not vetted or updated regularly.
86
Define dependency management. (Domain 4)
The process of tracking, verifying, and updating third-party components to prevent vulnerabilities.
87
Describe why reproducible builds are important. (Domain 4)
They ensure consistent outputs from the same source, helping detect tampering or corruption.
88
Explain the purpose of software signing. (Domain 4)
Digital signatures verify the authenticity and integrity of code and deployment artifacts.
89
Describe how static analysis tools help secure implementation. (Domain 4)
They scan source code for vulnerabilities such as hardcoded credentials, injection flaws, or insecure APIs.
90
Explain the benefits of dynamic analysis during implementation. (Domain 4)
It tests running applications for vulnerabilities not detectable by static analysis alone.
91
Define the term 'peer review' in secure development. (Domain 4)
A structured evaluation of code by peers to ensure compliance with standards and catch potential flaws early.
92
Describe the purpose of threat-based code review. (Domain 4)
It focuses on areas of the code most likely to contain vulnerabilities based on threat models.
93
Explain how secure coding practices reduce operational risk. (Domain 4)
By removing exploitable flaws, they decrease the likelihood of incidents, breaches, and unplanned downtime.
94
Describe the importance of build verification before deployment. (Domain 4)
Verifies that only approved, signed code moves to production and that artifacts match integrity baselines.
95
Explain why security testing should occur in pre-production environments. (Domain 4)
Testing in an environment mirroring production ensures real-world conditions and configurations are validated.
96
Define configuration as code and its security benefits. (Domain 4)
Treating configuration files as code allows version control, peer review, and automated compliance enforcement.
97
Describe how continuous integration (CI) pipelines improve implementation security. (Domain 4)
CI automates testing, code scanning, and policy enforcement with each commit, catching issues early.
98
Explain how DevSecOps integrates with secure implementation. (Domain 4)
DevSecOps embeds security checks, reviews, and tests throughout the CI/CD pipeline, ensuring continuous security assurance.