206k views
2 votes
The code snippet below controls all electronic door locks to a secure facility in which the doors should only fail open in an emergency. In the code, ""criticalValue"" indicates if an emergency is underway:

try {if (criticalValue) OpenDoors=true else OpenDoors=false} catch (e) { OpenDoors=true}

Which of the following is the BEST course of action for a security analyst to recommend to the software developer?

A. Rewrite the software to implement fine-grained, conditions-based testing
B. Add additional exception handling logic to the main program to prevent doors from being opened
C. Apply for a life-safety-based risk exception allowing secure doors to fail open
D. Rewrite the software's exception handling routine to fail in a secure state

User Anuni
by
7.5k points

1 Answer

4 votes

Final answer:

The best recommendation for a security analyst in this situation is to advise the software developer to rewrite the software's exception-handling routine to ensure the doors fail in a secure state, rather than defaulting to open during exceptions. (option B)

Step-by-step explanation:

The software code snippet controls the locking mechanism for electronic door locks in a secure facility. The existing code sets OpenDoors to true not only when criticalValue is true, but also as a default exception-handling behavior. This presents a potential security risk as it may fail in an unsecured state during non-critical exceptions.

The best course of action for a security analyst to recommend would be to rewrite the software's exception-handling routine to fail in a secure state. This involves adjusting the catch block so that it does not automatically default to a fail-open scenario unless it is a genuine emergency. This change would ensure that the default state of the doors is secure, thereby upholding the integrity of the facility's security.

While adding fine-grained, conditions-based testing and applying for a life-safety-based risk exception might be considered, the primary concern is to address the exception handling directly related to the door locking mechanism. Thus, the recommended approach focuses on strengthening the security posture by enforcing fail-secure policies in the software's exception handling.

User TheGoat
by
7.0k points