Which of the following is an example of a secure coding guideline?

Use hard-coded passwords

Use parameterized queries

Using parameterized queries is an excellent example of a secure coding guideline. This approach helps prevent SQL injection attacks, which are among the most prevalent security vulnerabilities in web applications. When an application dynamically generates SQL queries using user input directly, it allows attackers to manipulate the query and potentially gain unauthorized access to the database.

Parameterized queries address this by separating SQL code from data input. Instead of concatenating user input directly into a SQL string, a parameterized query allows developers to define the SQL structure in advance and treat user input as parameters. This not only enhances security by ensuring that any user input is treated purely as data but also can improve performance and maintainability of the code as it can be reused.

In contrast, the other options represent practices that can lead to security vulnerabilities. For example, hard-coded passwords expose applications to significant risks, making it easy for attackers to gain access if they discover the password. Keeping all files public compromises data privacy and integrity, while ignoring user inputs increases the likelihood of allowing malicious data to enter the system, which could lead to exploitation. Overall, parameterized queries exemplify best practices in secure coding, prioritizing the protection of application data and integrity.

Keep all files public

Ignore user inputs

Want more questions?

All options are one-time payments.

$12.99

30 day pass for new members

All the basics to get you started

  • Ad-free experience
  • View your previous attempt history
  • Mobile app access
  • In-depth explanations
  • 30 day premium pass access
$29.99$92.93 usd

6 month DELUXE pass (most popular)

Full access FOR 6 MONTHS! & the ultimate digital PDF study guide (BONUS)

  • $92.93 usd value for $29.99! You save $62.94!
  • Ad-free experience
  • View your previous attempt history
  • Mobile app access
  • In-depth explanations
  • 6 months of full access
  • Ultimate digital PDF study guide included
  • Priority support
$14.99 $19.99

Ultimate digital PDF study guide

For those that prefer a more traditional form of learning

  • Available for instant download
  • Available offline
  • Hundreds of practice multiple choice questions
  • Comprehensive content
  • Detailed explanations
Image Description
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy