A web application developer wants to remediate software vulnerabilities that allow attacker-controlled inputs to execute malicious scripts in user browsers or alter database commands. Which of the following secure coding practices should the developer implement to address these application vulnerabilities? (Select TWO.)
- Context-aware output encoding before rendering user input in HTML responsesCevap
- Parameterized queries and prepared statements for all database operationsCevap
- CDeploying network-level stateful firewalls at the enterprise perimeter
- DUsing role-based access control (RBAC) to authenticate user credentials during session initiation
Cevap
The correct secure coding practices are context-aware output encoding and parameterized queries with prepared statements.
Context-aware output encoding neutralizes script execution to mitigate Cross-Site Scripting (XSS), while parameterized queries isolate user data from executable SQL commands to mitigate SQL Injection (SQLi). Both are essential application-level secure coding practices.
Adım Adım Çözüm
Anahtar Kavram
Application Software Vulnerability Remediation and Secure Coding