โ† All CPP Flashcard Decks

Security & Error Handling Flashcards

6 cards from real CPP practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 6 Security & Error Handling flashcards as text
  1. What is the purpose of code signing?

    Answer: Applying a digital signature to code so recipients can verify its authenticity and integrity

    Code signing uses a private key to sign binaries; users verify with the public key that the software hasn't been tampered with and comes from a trusted source.

  2. What is the fail-fast principle in error handling?

    Answer: Detecting and reporting errors as early as possible rather than propagating invalid state deeper into the system

    Fail-fast surfaces bugs immediately at their source before corrupted state propagates, making root cause analysis far easier.

  3. What is a security audit in the context of software development?

    Answer: A systematic review of code and architecture to identify security vulnerabilities and compliance gaps

    A security audit examines code, configurations, and architecture to find vulnerabilities before attackers do, often including manual review and automated scanning.

  4. What is the role of a circuit breaker pattern in distributed systems?

    Answer: Detecting repeated failures in a service call and short-circuiting requests to prevent cascading failures

    The circuit breaker pattern stops calling a failing service temporarily, allowing it to recover and preventing the caller from blocking on timeouts.

  5. What is the principle behind 'defense in depth' in security?

    Answer: Using multiple independent security controls so that if one layer is breached, others still protect the system

    Defense in depth layers security controls (authentication, authorization, encryption, firewalls, monitoring) so no single failure exposes the entire system.

  6. What is the purpose of exception handling best practice of 'catching specific exceptions'?

    Answer: To handle each error type appropriately and avoid silently swallowing unexpected errors

    Catching specific exception types lets you respond correctly to each situation; catching generic Exception may mask bugs by handling all errors the same way.