Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →SQL injection prevention, XSS, CSRF, validation.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | -28% | 0% |
| case-01 | ✗→✓ | ▲ Improved | -35% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -40% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -59% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -63% | 0% |
php<?php // ❌ Bad $sql = "SELECT * FROM users WHERE email = '{$email}'"; // ✅ Good: Query builder $this->db->table('users')->where('email', $email)->get(); // ✅ Good: Prepared statement $this->db->query("SELECT * FROM users WHERE email = ?", [$email]);
php<?php // In views <?= esc($user->name) ?> // HTML escape <?= esc($user->bio, 'js') ?> // JavaScript escape
php<?php // Config/Security.php public $csrfProtection = 'session'; // In forms <?= csrf_field() ?> // In AJAX headers: { 'X-CSRF-TOKEN': '<?= csrf_hash() ?>' }
php<?php // ❌ Bad $apiKey = 'hardcoded-key'; // ✅ Good $apiKey = env('API_KEY');
Other measured skills in the registry, with their headline benchmark lift.