# Security Testing Basics
## Table of Contents
1. [XSS Prevention](#xss-prevention)
2. [CSRF Protection](#csrf-protection)
3. [Authentication Security](#authentication-security)
4. [Authorization Testing](#authorization-testing)
5. [Input Validation](#input-validation)
6. [Security Headers](#security-headers)
## XSS Prevention
### Test Reflected XSS
```typescript
test("input is properly escaped", async ({ page }) => {
const xssPayloads = [
'',
'
',
'">',
"javascript:alert(1)",
'