Which of the following is considered a secure coding practice?*Using regular expressions to validate all inputsImplementing least privilege access controlStoring passwords in plain text with a unique user identifierRelying on client-side validation for security checks
Question
Which of the following is considered a secure coding practice?*Using regular expressions to validate all inputsImplementing least privilege access controlStoring passwords in plain text with a unique user identifierRelying on client-side validation for security checks
Solution
The secure coding practices among the options provided are:
-
Using regular expressions to validate all inputs: This is a secure coding practice as it helps to ensure that only valid data is accepted by the system. Regular expressions can be used to check if the input data matches a specific pattern, which can help to prevent attacks such as SQL injection.
-
Implementing least privilege access control: This is also a secure coding practice. The principle of least privilege states that a user should be given the minimum levels of access – or permissions – they need to perform their work functions. This can help to minimize the potential damage caused if an attacker is able to compromise a user account.
The other two options are not considered secure coding practices:
-
Storing passwords in plain text with a unique user identifier: This is not a secure practice as if an attacker is able to gain access to the system, they would be able to easily read and use the passwords.
-
Relying on client-side validation for security checks: This is also not a secure practice as client-side validation can be easily bypassed by an attacker. It is important to also have server-side validation to ensure security.
Similar Questions
Which of the following is a common secure coding practice?1 pointA) Hardcoding passwordsB) Disabling encryptionC) Validating input dataD) Ignoring error handling
8.Question 8Which of the following are coding techniques that can be used to prevent SQL injection attacks? Select three answers.1 pointInput validationInput sanitizationPublic key infrastructure (PKI)Prepared statements
Which of the following is not a common technique used to prevent SQL injection attacks? Input validation Output encoding Prepared statements Session hijacking
Which of the following is a security feature found in most word processing applications?Select one:a.Passwordsb.Grammar checkc.Cloud-computingd.Portability
Which of the following is used to secure data and passwords?Select one:EncryptionAuthorizationAccountabilityAuthentication
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.