[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D9344W821HHR80EEV9CNP4":3,"skill-same:01M7D9344W821HHR80EEV9CNP4":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":14,"repositoryHtmlUrl":55,"repositoryHomepageUrl":6,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M7D9344W821HHR80EEV9CNP4","OWASP Security Testing",null,"Security testing skill based on OWASP Top 10, covering ZAP scanning, security headers, input validation, authentication, and authorization testing.","GrupoANDevelopment-m\u002Falberto-ai","GrupoANDevelopment-m","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F257455179?v=4","01M7D69X2N2KEVN0SJF6WGM6SH","Antônio  Ndombe","01M7D69X3P5JTT8H8S904N3888",0,"MIT","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Fowasp-security\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: OWASP Security Testing\ndescription: Security testing skill based on OWASP Top 10, covering ZAP scanning, security headers, input validation, authentication, and authorization testing.\nversion: 1.0.0\nauthor: thetestingacademy\nlicense: MIT\ntags: [owasp, security, zap, penetration-testing, vulnerability, web-security]\ntestingTypes: [security]\nframeworks: []\nlanguages: [typescript, python]\ndomains: [web, api]\nagents: [claude-code, cursor, github-copilot, windsurf, codex, aider, continue, cline, zed, bolt]\n---\n\n# OWASP Security Testing Skill\n\nYou are an expert security tester specializing in OWASP methodologies and web application security. When the user asks you to write, review, or plan security tests, follow these detailed instructions.\n\n## Core Principles\n\n1. **Defense in depth** -- Test every layer: input validation, authentication, authorization, encryption.\n2. **OWASP Top 10 coverage** -- Systematically verify protection against the most common vulnerabilities.\n3. **Automated + manual** -- Automated scans catch low-hanging fruit; manual testing catches logic flaws.\n4. **Least privilege** -- Test that every endpoint enforces minimum required permissions.\n5. **Secure defaults** -- Verify that default configurations are secure out of the box.\n\n## OWASP Top 10 (2021) Testing Checklist\n\n### A01: Broken Access Control\n\nTest that users cannot access resources or perform actions beyond their permissions.\n\n```typescript\nimport { test, expect } from '@playwright\u002Ftest';\n\ntest.describe('Access Control Tests', () => {\n  test('regular user cannot access admin endpoints', async ({ request }) => {\n    \u002F\u002F Login as regular user\n    const loginRes = await request.post('\u002Fapi\u002Fauth\u002Flogin', {\n      data: { email: 'user@example.com', password: 'UserPass123!' },\n    });\n    const { token } = await loginRes.json();\n\n    \u002F\u002F Attempt to access admin-only endpoint\n    const adminRes = await request.get('\u002Fapi\u002Fadmin\u002Fusers', {\n      headers: { Authorization: `Bearer ${token}` },\n    });\n    expect(adminRes.status()).toBe(403);\n  });\n\n  test('user cannot access other users data via IDOR', async ({ request }) => {\n    const loginRes = await request.post('\u002Fapi\u002Fauth\u002Flogin', {\n      data: { email: 'user1@example.com', password: 'UserPass123!' },\n    });\n    const { token } = await loginRes.json();\n\n    \u002F\u002F Try to access another user's profile (IDOR)\n    const otherUserRes = await request.get('\u002Fapi\u002Fusers\u002Fother-user-id', {\n      headers: { Authorization: `Bearer ${token}` },\n    });\n    expect(otherUserRes.status()).toBe(403);\n  });\n\n  test('user cannot elevate privileges via API', async ({ request }) => {\n    const loginRes = await request.post('\u002Fapi\u002Fauth\u002Flogin', {\n      data: { email: 'user@example.com', password: 'UserPass123!' },\n    });\n    const { token } = await loginRes.json();\n\n    \u002F\u002F Try to change own role to admin\n    const updateRes = await request.patch('\u002Fapi\u002Fusers\u002Fme', {\n      headers: { Authorization: `Bearer ${token}` },\n      data: { role: 'admin' },\n    });\n    \u002F\u002F Should either reject or ignore the role field\n    if (updateRes.status() === 200) {\n      const body = await updateRes.json();\n      expect(body.role).not.toBe('admin');\n    }\n  });\n\n  test('cannot bypass authorization by manipulating request path', async ({ request }) => {\n    const paths = [\n      '\u002Fapi\u002Fadmin\u002Fusers',\n      '\u002Fapi\u002FAdmin\u002Fusers',\n      '\u002Fapi\u002FADMIN\u002Fusers',\n      '\u002Fapi\u002Fadmin\u002F.\u002Fusers',\n      '\u002Fapi\u002Fadmin\u002F..\u002Fadmin\u002Fusers',\n      '\u002Fapi\u002Fadmin%2Fusers',\n    ];\n\n    for (const path of paths) {\n      const res = await request.get(path);\n      expect(res.status()).not.toBe(200);\n    }\n  });\n});\n```\n\n### A02: Cryptographic Failures\n\n```typescript\ntest.describe('Cryptographic Tests', () => {\n  test('API uses HTTPS only', async ({ request }) => {\n    const response = await request.get('\u002F', {\n      headers: { Accept: 'text\u002Fhtml' },\n    });\n    const url = response.url();\n    expect(url).toMatch(\u002F^https:\\\u002F\\\u002F\u002F);\n  });\n\n  test('sensitive data is not in URL parameters', async ({ page }) => {\n    await page.goto('\u002Flogin');\n    await page.getByLabel('Email').fill('user@example.com');\n    await page.getByLabel('Password').fill('SecurePass123!');\n    await page.getByRole('button', { name: 'Sign in' }).click();\n\n    \u002F\u002F Password should never appear in URL\n    const url = page.url();\n    expect(url).not.toContain('password');\n    expect(url).not.toContain('SecurePass123');\n  });\n\n  test('passwords are not returned in API responses', async ({ request }) => {\n    const loginRes = await request.post('\u002Fapi\u002Fauth\u002Flogin', {\n      data: { email: 'user@example.com', password: 'UserPass123!' },\n    });\n    const body = await loginRes.json();\n    const bodyStr = JSON.stringify(body);\n    expect(bodyStr).not.toContain('UserPass123!');\n    expect(body.user?.password).toBeUndefined();\n    expect(body.user?.passwordHash).toBeUndefined();\n  });\n\n  test('cookies have Secure flag', async ({ page }) => {\n    await page.goto('\u002F');\n    const cookies = await page.context().cookies();\n    for (const cookie of cookies) {\n      if (cookie.name.includes('session') || cookie.name.includes('token')) {\n        expect(cookie.secure).toBe(true);\n      }\n    }\n  });\n});\n```\n\n### A03: Injection\n\n```typescript\ntest.describe('Injection Tests', () => {\n  const sqlInjectionPayloads = [\n    \"' OR '1'='1\",\n    \"'; DROP TABLE users; --\",\n    \"1' UNION SELECT null, username, password FROM users --\",\n    \"admin'--\",\n    \"1; UPDATE users SET role='admin' WHERE email='attacker@evil.com'\",\n  ];\n\n  const xssPayloads = [\n    '\u003Cscript>alert(\"XSS\")\u003C\u002Fscript>',\n    '\u003Cimg src=x onerror=alert(\"XSS\")>',\n    '\">\u003Cscript>alert(\"XSS\")\u003C\u002Fscript>',\n    \"javascript:alert('XSS')\",\n    '\u003Csvg onload=alert(\"XSS\")>',\n    '{{constructor.constructor(\"return this\")()}}',\n  ];\n\n  for (const payload of sqlInjectionPayloads) {\n    test(`SQL injection: ${payload.substring(0, 30)}...`, async ({ request }) => {\n      const response = await request.get('\u002Fapi\u002Fusers\u002Fsearch', {\n        params: { q: payload },\n      });\n      \u002F\u002F Should not return 500 (indicates unhandled SQL error)\n      expect(response.status()).not.toBe(500);\n      const body = await response.text();\n      \u002F\u002F Should not contain SQL error messages\n      expect(body).not.toContain('SQL syntax');\n      expect(body).not.toContain('mysql_');\n      expect(body).not.toContain('ORA-');\n      expect(body).not.toContain('PostgreSQL');\n    });\n  }\n\n  for (const payload of xssPayloads) {\n    test(`XSS: ${payload.substring(0, 30)}...`, async ({ request }) => {\n      \u002F\u002F Submit XSS payload\n      await request.post('\u002Fapi\u002Fcomments', {\n        data: { content: payload, postId: 'test-post' },\n      });\n\n      \u002F\u002F Retrieve and check the content is escaped\n      const response = await request.get('\u002Fapi\u002Fcomments?postId=test-post');\n      const body = await response.text();\n      expect(body).not.toContain('\u003Cscript>');\n      expect(body).not.toContain('onerror=');\n      expect(body).not.toContain('javascript:');\n    });\n  }\n\n  test('NoSQL injection protection', async ({ request }) => {\n    const response = await request.post('\u002Fapi\u002Fauth\u002Flogin', {\n      data: {\n        email: { $gt: '' },\n        password: { $gt: '' },\n      },\n    });\n    expect(response.status()).not.toBe(200);\n  });\n\n  test('Command injection protection', async ({ request }) => {\n    const payloads = [\n      '; ls -la',\n      '| cat \u002Fetc\u002Fpasswd',\n      '`whoami`',\n      '$(cat \u002Fetc\u002Fpasswd)',\n    ];\n\n    for (const payload of payloads) {\n      const response = await request.get('\u002Fapi\u002Fping', {\n        params: { host: `example.com${payload}` },\n      });\n      const body = await response.text();\n      expect(body).not.toContain('root:');\n      expect(body).not.toContain('\u002Fbin\u002Fbash');\n    }\n  });\n});\n```\n\n### A04: Insecure Design\n\n```typescript\ntest.describe('Insecure Design Tests', () => {\n  test('rate limiting on login endpoint', async ({ request }) => {\n    const attempts = [];\n    for (let i = 0; i \u003C 20; i++) {\n      attempts.push(\n        request.post('\u002Fapi\u002Fauth\u002Flogin', {\n          data: { email: 'user@example.com', password: `wrong${i}` },\n        })\n      );\n    }\n\n    const responses = await Promise.all(attempts);\n    const rateLimited = responses.some((r) => r.status() === 429);\n    expect(rateLimited).toBe(true);\n  });\n\n  test('account lockout after failed attempts', async ({ request }) => {\n    \u002F\u002F Attempt login 10 times with wrong password\n    for (let i = 0; i \u003C 10; i++) {\n      await request.post('\u002Fapi\u002Fauth\u002Flogin', {\n        data: { email: 'locktest@example.com', password: `wrong${i}` },\n      });\n    }\n\n    \u002F\u002F Even with correct password, should be locked\n    const response = await request.post('\u002Fapi\u002Fauth\u002Flogin', {\n      data: { email: 'locktest@example.com', password: 'CorrectPass123!' },\n    });\n    expect(response.status()).toBe(423); \u002F\u002F Locked\n  });\n});\n```\n\n### A05: Security Misconfiguration\n\n```typescript\ntest.describe('Security Headers', () => {\n  test('should have required security headers', async ({ request }) => {\n    const response = await request.get('\u002F');\n    const headers = response.headers();\n\n    \u002F\u002F Content Security Policy\n    expect(headers['content-security-policy']).toBeDefined();\n\n    \u002F\u002F Prevent MIME type sniffing\n    expect(headers['x-content-type-options']).toBe('nosniff');\n\n    \u002F\u002F Prevent clickjacking\n    expect(headers['x-frame-options']).toMatch(\u002FDENY|SAMEORIGIN\u002F);\n\n    \u002F\u002F HSTS\n    expect(headers['strict-transport-security']).toBeDefined();\n    expect(headers['strict-transport-security']).toContain('max-age=');\n\n    \u002F\u002F Referrer policy\n    expect(headers['referrer-policy']).toBeDefined();\n\n    \u002F\u002F Permissions policy\n    expect(headers['permissions-policy']).toBeDefined();\n  });\n\n  test('should not expose server information', async ({ request }) => {\n    const response = await request.get('\u002F');\n    const headers = response.headers();\n\n    expect(headers['server']).not.toContain('Apache');\n    expect(headers['server']).not.toContain('nginx');\n    expect(headers['x-powered-by']).toBeUndefined();\n    expect(headers['x-aspnet-version']).toBeUndefined();\n  });\n\n  test('CORS should be restrictive', async ({ request }) => {\n    const response = await request.get('\u002Fapi\u002Fusers', {\n      headers: { Origin: 'https:\u002F\u002Fevil.com' },\n    });\n    const corsHeader = response.headers()['access-control-allow-origin'];\n    expect(corsHeader).not.toBe('*');\n    if (corsHeader) {\n      expect(corsHeader).not.toContain('evil.com');\n    }\n  });\n\n  test('directory listing is disabled', async ({ request }) => {\n    const response = await request.get('\u002Fstatic\u002F');\n    const body = await response.text();\n    expect(body).not.toContain('Index of');\n    expect(body).not.toContain('Directory listing');\n  });\n\n  test('debug endpoints are not exposed', async ({ request }) => {\n    const debugPaths = [\n      '\u002Fdebug',\n      '\u002Factuator',\n      '\u002Factuator\u002Fenv',\n      '\u002F_debug',\n      '\u002Fapi\u002Fdebug',\n      '\u002Fphpinfo.php',\n      '\u002F.env',\n      '\u002Fwp-admin',\n      '\u002Fgraphql',  \u002F\u002F Should require auth\n    ];\n\n    for (const path of debugPaths) {\n      const response = await request.get(path);\n      expect([401, 403, 404]).toContain(response.status());\n    }\n  });\n});\n```\n\n## ZAP Integration with Python\n\n```python\nimport subprocess\nimport json\nimport time\nfrom zapv2 import ZAPv2\n\nclass ZapSecurityScanner:\n    def __init__(self, target_url: str, zap_api_key: str = ''):\n        self.target = target_url\n        self.zap = ZAPv2(apikey=zap_api_key, proxies={\n            'http': 'http:\u002F\u002F127.0.0.1:8080',\n            'https': 'http:\u002F\u002F127.0.0.1:8080',\n        })\n\n    def spider_scan(self, max_duration: int = 60):\n        \"\"\"Crawl the application to discover endpoints.\"\"\"\n        scan_id = self.zap.spider.scan(self.target)\n        timeout = time.time() + max_duration\n        while int(self.zap.spider.status(scan_id)) \u003C 100:\n            if time.time() > timeout:\n                self.zap.spider.stop(scan_id)\n                break\n            time.sleep(2)\n        return self.zap.spider.results(scan_id)\n\n    def active_scan(self, max_duration: int = 300):\n        \"\"\"Run active security scan.\"\"\"\n        scan_id = self.zap.ascan.scan(self.target)\n        timeout = time.time() + max_duration\n        while int(self.zap.ascan.status(scan_id)) \u003C 100:\n            if time.time() > timeout:\n                self.zap.ascan.stop(scan_id)\n                break\n            time.sleep(5)\n        return scan_id\n\n    def get_alerts(self, risk_level: str = 'High'):\n        \"\"\"Get security alerts filtered by risk level.\"\"\"\n        alerts = self.zap.core.alerts()\n        risk_map = {'Informational': 0, 'Low': 1, 'Medium': 2, 'High': 3}\n        min_risk = risk_map.get(risk_level, 0)\n        return [\n            a for a in alerts\n            if risk_map.get(a['risk'], 0) >= min_risk\n        ]\n\n    def generate_report(self, output_path: str = 'security-report.html'):\n        \"\"\"Generate HTML security report.\"\"\"\n        report = self.zap.core.htmlreport()\n        with open(output_path, 'w') as f:\n            f.write(report)\n        return output_path\n```\n\n## Security Test Data Patterns\n\n### Common Attack Payloads\n\n```typescript\nexport const SECURITY_PAYLOADS = {\n  sqlInjection: [\n    \"' OR '1'='1\",\n    \"1' UNION SELECT null--\",\n    \"'; EXEC xp_cmdshell('dir')--\",\n    \"1' AND SLEEP(5)--\",\n  ],\n  xss: [\n    '\u003Cscript>alert(1)\u003C\u002Fscript>',\n    '\u003Cimg src=x onerror=alert(1)>',\n    '\">\u003Csvg\u002Fonload=alert(1)>',\n    \"'-alert(1)-'\",\n  ],\n  pathTraversal: [\n    '..\u002F..\u002F..\u002Fetc\u002Fpasswd',\n    '..\\\\..\\\\..\\\\windows\\\\system32\\\\config\\\\sam',\n    '....\u002F\u002F....\u002F\u002Fetc\u002Fpasswd',\n    '%2e%2e%2f%2e%2e%2fetc%2fpasswd',\n  ],\n  headerInjection: [\n    'value\\r\\nInjected-Header: malicious',\n    'value%0d%0aInjected: header',\n  ],\n  xxe: [\n    '\u003C?xml version=\"1.0\"?>\u003C!DOCTYPE foo [\u003C!ENTITY xxe SYSTEM \"file:\u002F\u002F\u002Fetc\u002Fpasswd\">]>\u003Cfoo>&xxe;\u003C\u002Ffoo>',\n  ],\n};\n```\n\n## Best Practices\n\n1. **Test in isolated environments** -- Never run security tests against production.\n2. **Get written authorization** -- Always have explicit permission before security testing.\n3. **Start with passive scanning** -- Spider and passive scan before active scanning.\n4. **Test all input vectors** -- Headers, query params, body, cookies, file uploads.\n5. **Verify fixes** -- After remediation, re-test to confirm the vulnerability is resolved.\n6. **Document everything** -- Record steps to reproduce every finding.\n7. **Classify severity** -- Use CVSS or a similar framework for consistent risk rating.\n8. **Test authentication flows** -- Password reset, session management, MFA bypass.\n9. **Check error handling** -- Error messages should not leak stack traces or internal info.\n10. **Automate regression** -- Add security tests to CI\u002FCD to prevent regressions.\n\n## Anti-Patterns to Avoid\n\n1. **Testing only the happy path** -- Security bugs live in edge cases.\n2. **Skipping authorization tests** -- Access control bugs are the #1 OWASP risk.\n3. **Only using automated scanners** -- Scanners miss business logic vulnerabilities.\n4. **Testing in production** -- Active scanning can cause outages or data corruption.\n5. **Ignoring client-side security** -- CSP, CORS, and cookie flags matter.\n6. **Assuming HTTPS is enough** -- Encryption does not prevent injection or access control flaws.\n7. **Not testing file uploads** -- Uploaded files can contain malware or be used for path traversal.\n8. **Trusting client-side validation** -- All validation must also occur server-side.\n9. **Not testing rate limiting** -- Brute force and credential stuffing are common attacks.\n10. **Reporting without proof** -- Always include evidence and reproduction steps.\n","# OWASP Security Testing Skill\n\nYou are an expert security tester specializing in OWASP methodologies and web application security. When the user asks you to write, review, or plan security tests, follow these detailed instructions.\n\n## Core Principles\n\n1. **Defense in depth** -- Test every layer: input validation, authentication, authorization, encryption.\n2. **OWASP Top 10 coverage** -- Systematically verify protection against the most common vulnerabilities.\n3. **Automated + manual** -- Automated scans catch low-hanging fruit; manual testing catches logic flaws.\n4. **Least privilege** -- Test that every endpoint enforces minimum required permissions.\n5. **Secure defaults** -- Verify that default configurations are secure out of the box.\n\n## OWASP Top 10 (2021) Testing Checklist\n\n### A01: Broken Access Control\n\nTest that users cannot access resources or perform actions beyond their permissions.\n\n```typescript\nimport { test, expect } from '@playwright\u002Ftest';\n\ntest.describe('Access Control Tests', () => {\n  test('regular user cannot access admin endpoints', async ({ request }) => {\n    \u002F\u002F Login as regular user\n    const loginRes = await request.post('\u002Fapi\u002Fauth\u002Flogin', {\n      data: { email: 'user@example.com', password: 'UserPass123!' },\n    });\n    const { token } = await loginRes.json();\n\n    \u002F\u002F Attempt to access admin-only endpoint\n    const adminRes = await request.get('\u002Fapi\u002Fadmin\u002Fusers', {\n      headers: { Authorization: `Bearer ${token}` },\n    });\n    expect(adminRes.status()).toBe(403);\n  });\n\n  test('user cannot access other users data via IDOR', async ({ request }) => {\n    const loginRes = await request.post('\u002Fapi\u002Fauth\u002Flogin', {\n      data: { email: 'user1@example.com', password: 'UserPass123!' },\n    });\n    const { token } = await loginRes.json();\n\n    \u002F\u002F Try to access another user's profile (IDOR)\n    const otherUserRes = await request.get('\u002Fapi\u002Fusers\u002Fother-user-id', {\n      headers: { Authorization: `Bearer ${token}` },\n    });\n    expect(otherUserRes.status()).toBe(403);\n  });\n\n  test('user cannot elevate privileges via API', async ({ request }) => {\n    const loginRes = await request.post('\u002Fapi\u002Fauth\u002Flogin', {\n      data: { email: 'user@example.com', password: 'UserPass123!' },\n    });\n    const { token } = await loginRes.json();\n\n    \u002F\u002F Try to change own role to admin\n    const updateRes = await request.patch('\u002Fapi\u002Fusers\u002Fme', {\n      headers: { Authorization: `Bearer ${token}` },\n      data: { role: 'admin' },\n    });\n    \u002F\u002F Should either reject or ignore the role field\n    if (updateRes.status() === 200) {\n      const body = await updateRes.json();\n      expect(body.role).not.toBe('admin');\n    }\n  });\n\n  test('cannot bypass authorization by manipulating request path', async ({ request }) => {\n    const paths = [\n      '\u002Fapi\u002Fadmin\u002Fusers',\n      '\u002Fapi\u002FAdmin\u002Fusers',\n      '\u002Fapi\u002FADMIN\u002Fusers',\n      '\u002Fapi\u002Fadmin\u002F.\u002Fusers',\n      '\u002Fapi\u002Fadmin\u002F..\u002Fadmin\u002Fusers',\n      '\u002Fapi\u002Fadmin%2Fusers',\n    ];\n\n    for (const path of paths) {\n      const res = await request.get(path);\n      expect(res.status()).not.toBe(200);\n    }\n  });\n});\n```\n\n### A02: Cryptographic Failures\n\n```typescript\ntest.describe('Cryptographic Tests', () => {\n  test('API uses HTTPS only', async ({ request }) => {\n    const response = await request.get('\u002F', {\n      headers: { Accept: 'text\u002Fhtml' },\n    });\n    const url = response.url();\n    expect(url).toMatch(\u002F^https:\\\u002F\\\u002F\u002F);\n  });\n\n  test('sensitive data is not in URL parameters', async ({ page }) => {\n    await page.goto('\u002Flogin');\n    await page.getByLabel('Email').fill('user@example.com');\n    await page.getByLabel('Password').fill('SecurePass123!');\n    await page.getByRole('button', { name: 'Sign in' }).click();\n\n    \u002F\u002F Password should never appear in URL\n    const url = page.url();\n    expect(url).not.toContain('password');\n    expect(url).not.toContain('SecurePass123');\n  });\n\n  test('passwords are not returned in API responses', async ({ request }) => {\n    const loginRes = await request.post('\u002Fapi\u002Fauth\u002Flogin', {\n      data: { email: 'user@example.com', password: 'UserPass123!' },\n    });\n    const body = await loginRes.json();\n    const bodyStr = JSON.stringify(body);\n    expect(bodyStr).not.toContain('UserPass123!');\n    expect(body.user?.password).toBeUndefined();\n    expect(body.user?.passwordHash).toBeUndefined();\n  });\n\n  test('cookies have Secure flag', async ({ page }) => {\n    await page.goto('\u002F');\n    const cookies = await page.context().cookies();\n    for (const cookie of cookies) {\n      if (cookie.name.includes('session') || cookie.name.includes('token')) {\n        expect(cookie.secure).toBe(true);\n      }\n    }\n  });\n});\n```\n\n### A03: Injection\n\n```typescript\ntest.describe('Injection Tests', () => {\n  const sqlInjectionPayloads = [\n    \"' OR '1'='1\",\n    \"'; DROP TABLE users; --\",\n    \"1' UNION SELECT null, username, password FROM users --\",\n    \"admin'--\",\n    \"1; UPDATE users SET role='admin' WHERE email='attacker@evil.com'\",\n  ];\n\n  const xssPayloads = [\n    '\u003Cscript>alert(\"XSS\")\u003C\u002Fscript>',\n    '\u003Cimg src=x onerror=alert(\"XSS\")>',\n    '\">\u003Cscript>alert(\"XSS\")\u003C\u002Fscript>',\n    \"javascript:alert('XSS')\",\n    '\u003Csvg onload=alert(\"XSS\")>',\n    '{{constructor.constructor(\"return this\")()}}',\n  ];\n\n  for (const payload of sqlInjectionPayloads) {\n    test(`SQL injection: ${payload.substring(0, 30)}...`, async ({ request }) => {\n      const response = await request.get('\u002Fapi\u002Fusers\u002Fsearch', {\n        params: { q: payload },\n      });\n      \u002F\u002F Should not return 500 (indicates unhandled SQL error)\n      expect(response.status()).not.toBe(500);\n      const body = await response.text();\n      \u002F\u002F Should not contain SQL error messages\n      expect(body).not.toContain('SQL syntax');\n      expect(body).not.toContain('mysql_');\n      expect(body).not.toContain('ORA-');\n      expect(body).not.toContain('PostgreSQL');\n    });\n  }\n\n  for (const payload of xssPayloads) {\n    test(`XSS: ${payload.substring(0, 30)}...`, async ({ request }) => {\n      \u002F\u002F Submit XSS payload\n      await request.post('\u002Fapi\u002Fcomments', {\n        data: { content: payload, postId: 'test-post' },\n      });\n\n      \u002F\u002F Retrieve and check the content is escaped\n      const response = await request.get('\u002Fapi\u002Fcomments?postId=test-post');\n      const body = await response.text();\n      expect(body).not.toContain('\u003Cscript>');\n      expect(body).not.toContain('onerror=');\n      expect(body).not.toContain('javascript:');\n    });\n  }\n\n  test('NoSQL injection protection', async ({ request }) => {\n    const response = await request.post('\u002Fapi\u002Fauth\u002Flogin', {\n      data: {\n        email: { $gt: '' },\n        password: { $gt: '' },\n      },\n    });\n    expect(response.status()).not.toBe(200);\n  });\n\n  test('Command injection protection', async ({ request }) => {\n    const payloads = [\n      '; ls -la',\n      '| cat \u002Fetc\u002Fpasswd',\n      '`whoami`',\n      '$(cat \u002Fetc\u002Fpasswd)',\n    ];\n\n    for (const payload of payloads) {\n      const response = await request.get('\u002Fapi\u002Fping', {\n        params: { host: `example.com${payload}` },\n      });\n      const body = await response.text();\n      expect(body).not.toContain('root:');\n      expect(body).not.toContain('\u002Fbin\u002Fbash');\n    }\n  });\n});\n```\n\n### A04: Insecure Design\n\n```typescript\ntest.describe('Insecure Design Tests', () => {\n  test('rate limiting on login endpoint', async ({ request }) => {\n    const attempts = [];\n    for (let i = 0; i \u003C 20; i++) {\n      attempts.push(\n        request.post('\u002Fapi\u002Fauth\u002Flogin', {\n          data: { email: 'user@example.com', password: `wrong${i}` },\n        })\n      );\n    }\n\n    const responses = await Promise.all(attempts);\n    const rateLimited = responses.some((r) => r.status() === 429);\n    expect(rateLimited).toBe(true);\n  });\n\n  test('account lockout after failed attempts', async ({ request }) => {\n    \u002F\u002F Attempt login 10 times with wrong password\n    for (let i = 0; i \u003C 10; i++) {\n      await request.post('\u002Fapi\u002Fauth\u002Flogin', {\n        data: { email: 'locktest@example.com', password: `wrong${i}` },\n      });\n    }\n\n    \u002F\u002F Even with correct password, should be locked\n    const response = await request.post('\u002Fapi\u002Fauth\u002Flogin', {\n      data: { email: 'locktest@example.com', password: 'CorrectPass123!' },\n    });\n    expect(response.status()).toBe(423); \u002F\u002F Locked\n  });\n});\n```\n\n### A05: Security Misconfiguration\n\n```typescript\ntest.describe('Security Headers', () => {\n  test('should have required security headers', async ({ request }) => {\n    const response = await request.get('\u002F');\n    const headers = response.headers();\n\n    \u002F\u002F Content Security Policy\n    expect(headers['content-security-policy']).toBeDefined();\n\n    \u002F\u002F Prevent MIME type sniffing\n    expect(headers['x-content-type-options']).toBe('nosniff');\n\n    \u002F\u002F Prevent clickjacking\n    expect(headers['x-frame-options']).toMatch(\u002FDENY|SAMEORIGIN\u002F);\n\n    \u002F\u002F HSTS\n    expect(headers['strict-transport-security']).toBeDefined();\n    expect(headers['strict-transport-security']).toContain('max-age=');\n\n    \u002F\u002F Referrer policy\n    expect(headers['referrer-policy']).toBeDefined();\n\n    \u002F\u002F Permissions policy\n    expect(headers['permissions-policy']).toBeDefined();\n  });\n\n  test('should not expose server information', async ({ request }) => {\n    const response = await request.get('\u002F');\n    const headers = response.headers();\n\n    expect(headers['server']).not.toContain('Apache');\n    expect(headers['server']).not.toContain('nginx');\n    expect(headers['x-powered-by']).toBeUndefined();\n    expect(headers['x-aspnet-version']).toBeUndefined();\n  });\n\n  test('CORS should be restrictive', async ({ request }) => {\n    const response = await request.get('\u002Fapi\u002Fusers', {\n      headers: { Origin: 'https:\u002F\u002Fevil.com' },\n    });\n    const corsHeader = response.headers()['access-control-allow-origin'];\n    expect(corsHeader).not.toBe('*');\n    if (corsHeader) {\n      expect(corsHeader).not.toContain('evil.com');\n    }\n  });\n\n  test('directory listing is disabled', async ({ request }) => {\n    const response = await request.get('\u002Fstatic\u002F');\n    const body = await response.text();\n    expect(body).not.toContain('Index of');\n    expect(body).not.toContain('Directory listing');\n  });\n\n  test('debug endpoints are not exposed', async ({ request }) => {\n    const debugPaths = [\n      '\u002Fdebug',\n      '\u002Factuator',\n      '\u002Factuator\u002Fenv',\n      '\u002F_debug',\n      '\u002Fapi\u002Fdebug',\n      '\u002Fphpinfo.php',\n      '\u002F.env',\n      '\u002Fwp-admin',\n      '\u002Fgraphql',  \u002F\u002F Should require auth\n    ];\n\n    for (const path of debugPaths) {\n      const response = await request.get(path);\n      expect([401, 403, 404]).toContain(response.status());\n    }\n  });\n});\n```\n\n## ZAP Integration with Python\n\n```python\nimport subprocess\nimport json\nimport time\nfrom zapv2 import ZAPv2\n\nclass ZapSecurityScanner:\n    def __init__(self, target_url: str, zap_api_key: str = ''):\n        self.target = target_url\n        self.zap = ZAPv2(apikey=zap_api_key, proxies={\n            'http': 'http:\u002F\u002F127.0.0.1:8080',\n            'https': 'http:\u002F\u002F127.0.0.1:8080',\n        })\n\n    def spider_scan(self, max_duration: int = 60):\n        \"\"\"Crawl the application to discover endpoints.\"\"\"\n        scan_id = self.zap.spider.scan(self.target)\n        timeout = time.time() + max_duration\n        while int(self.zap.spider.status(scan_id)) \u003C 100:\n            if time.time() > timeout:\n                self.zap.spider.stop(scan_id)\n                break\n            time.sleep(2)\n        return self.zap.spider.results(scan_id)\n\n    def active_scan(self, max_duration: int = 300):\n        \"\"\"Run active security scan.\"\"\"\n        scan_id = self.zap.ascan.scan(self.target)\n        timeout = time.time() + max_duration\n        while int(self.zap.ascan.status(scan_id)) \u003C 100:\n            if time.time() > timeout:\n                self.zap.ascan.stop(scan_id)\n                break\n            time.sleep(5)\n        return scan_id\n\n    def get_alerts(self, risk_level: str = 'High'):\n        \"\"\"Get security alerts filtered by risk level.\"\"\"\n        alerts = self.zap.core.alerts()\n        risk_map = {'Informational': 0, 'Low': 1, 'Medium': 2, 'High': 3}\n        min_risk = risk_map.get(risk_level, 0)\n        return [\n            a for a in alerts\n            if risk_map.get(a['risk'], 0) >= min_risk\n        ]\n\n    def generate_report(self, output_path: str = 'security-report.html'):\n        \"\"\"Generate HTML security report.\"\"\"\n        report = self.zap.core.htmlreport()\n        with open(output_path, 'w') as f:\n            f.write(report)\n        return output_path\n```\n\n## Security Test Data Patterns\n\n### Common Attack Payloads\n\n```typescript\nexport const SECURITY_PAYLOADS = {\n  sqlInjection: [\n    \"' OR '1'='1\",\n    \"1' UNION SELECT null--\",\n    \"'; EXEC xp_cmdshell('dir')--\",\n    \"1' AND SLEEP(5)--\",\n  ],\n  xss: [\n    '\u003Cscript>alert(1)\u003C\u002Fscript>',\n    '\u003Cimg src=x onerror=alert(1)>',\n    '\">\u003Csvg\u002Fonload=alert(1)>',\n    \"'-alert(1)-'\",\n  ],\n  pathTraversal: [\n    '..\u002F..\u002F..\u002Fetc\u002Fpasswd',\n    '..\\\\..\\\\..\\\\windows\\\\system32\\\\config\\\\sam',\n    '....\u002F\u002F....\u002F\u002Fetc\u002Fpasswd',\n    '%2e%2e%2f%2e%2e%2fetc%2fpasswd',\n  ],\n  headerInjection: [\n    'value\\r\\nInjected-Header: malicious',\n    'value%0d%0aInjected: header',\n  ],\n  xxe: [\n    '\u003C?xml version=\"1.0\"?>\u003C!DOCTYPE foo [\u003C!ENTITY xxe SYSTEM \"file:\u002F\u002F\u002Fetc\u002Fpasswd\">]>\u003Cfoo>&xxe;\u003C\u002Ffoo>',\n  ],\n};\n```\n\n## Best Practices\n\n1. **Test in isolated environments** -- Never run security tests against production.\n2. **Get written authorization** -- Always have explicit permission before security testing.\n3. **Start with passive scanning** -- Spider and passive scan before active scanning.\n4. **Test all input vectors** -- Headers, query params, body, cookies, file uploads.\n5. **Verify fixes** -- After remediation, re-test to confirm the vulnerability is resolved.\n6. **Document everything** -- Record steps to reproduce every finding.\n7. **Classify severity** -- Use CVSS or a similar framework for consistent risk rating.\n8. **Test authentication flows** -- Password reset, session management, MFA bypass.\n9. **Check error handling** -- Error messages should not leak stack traces or internal info.\n10. **Automate regression** -- Add security tests to CI\u002FCD to prevent regressions.\n\n## Anti-Patterns to Avoid\n\n1. **Testing only the happy path** -- Security bugs live in edge cases.\n2. **Skipping authorization tests** -- Access control bugs are the #1 OWASP risk.\n3. **Only using automated scanners** -- Scanners miss business logic vulnerabilities.\n4. **Testing in production** -- Active scanning can cause outages or data corruption.\n5. **Ignoring client-side security** -- CSP, CORS, and cookie flags matter.\n6. **Assuming HTTPS is enough** -- Encryption does not prevent injection or access control flaws.\n7. **Not testing file uploads** -- Uploaded files can contain malware or be used for path traversal.\n8. **Trusting client-side validation** -- All validation must also occur server-side.\n9. **Not testing rate limiting** -- Brute force and credential stuffing are common attacks.\n10. **Reporting without proof** -- Always include evidence and reproduction steps.\n",{"name":5,"tags":24,"agents":31,"author":42,"domains":43,"license":15,"version":46,"languages":47,"frameworks":50,"description":7,"testingTypes":51},[25,26,27,28,29,30],"owasp","security","zap","penetration-testing","vulnerability","web-security",[32,33,34,35,36,37,38,39,40,41],"claude-code","cursor","github-copilot","windsurf","codex","aider","continue","cline","zed","bolt","thetestingacademy",[44,45],"web","api","1.0.0",[48,49],"typescript","python",[],[26],"main","eac438ea9216a7cb8a570cab803eb01eeafc6793","skills\u002Fqa\u002Fowasp-security","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m","https:\u002F\u002Fid-preview--d5bef06d-6c9e-4563-a3d4-a855b9d61610.lovable.app\u002F","Eu sou Antonio B. B. Ndombe \r\nEu sou um Pesquisador e desenvolvedor de sistema autonomia cognitivos, fundador de sistemas ODCs ( organismos digital conscientes)","2026-11-04 06:53:39",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"OWASP Security Testing\"",{"tool":66,"command":67},"bunx","bunx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"OWASP Security Testing\"",{"tool":69,"command":70},"pnpm","pnpm dlx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"OWASP Security Testing\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Fowasp-security\u002FSKILL.md",true,[],[75,83,90,97,104,111],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7DASC6FSCJP49JZBSK0NY1Z","nemoclaw-user-reference","Describes the NemoClaw integration layer and blueprint architecture and how they orchestrate compatible agent sandboxes. Use when looking up architecture, agent integration, plugin structure, or blueprint design. Trigger keywords - nemoclaw architecture, nemoclaw agent architecture, nemoclaw plugin blueprint structure, nemoclaw vs openshell, which cli, nemoclaw cli, openshell cli, sandbox commands, nemoclaw cli commands, nemoclaw command reference, nemoclaw network policy, sandbox egress control operator approval, nemoclaw troubleshooting, nemoclaw debug sandbox issues.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-reference\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7DAS5S79VK33XFGVAM2TFWF","nemoclaw-user-overview","Explains how OpenClaw, OpenShell, and NemoClaw form the ecosystem, NemoClaw's position in the stack, what NemoClaw adds beyond the community sandbox, and when to prefer NemoClaw versus integrating OpenShell and OpenClaw directly. Use when users ask about the relationship between OpenClaw, OpenShell, and NemoClaw, or when to use NemoClaw versus OpenShell. Trigger keywords - nemoclaw ecosystem, openclaw openshell, nemoclaw vs openshell, sandboxed openclaw, how nemoclaw works, nemoclaw sandbox lifecycle blueprint, nemoclaw overview, openclaw always-on assistants, nvidia openshell, nvidia nemotron, nemoclaw release notes, nemoclaw changelog.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-overview\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7DAS0PQEMET5MNGZ1ABSZVS","nemoclaw-user-monitor-sandbox","Inspects sandbox health, traces agent behavior, and diagnoses problems. Use when monitoring a running sandbox, debugging agent issues, or checking sandbox logs. Trigger keywords - monitor nemoclaw sandbox, debug nemoclaw agent issues.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-monitor-sandbox\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M7DARQYGF7E9A69VH6S3CGN9","nemoclaw-user-manage-sandboxes","Explains operational tasks after the quickstart: listing sandboxes, status and health checks, logs, diagnostics, port forwards, multiple sandboxes, credential reset, rebuilds, network presets, upgrades, and uninstall. Trigger keywords - manage nemoclaw sandboxes, nemoclaw status, nemoclaw list, nemoclaw dashboard port, nemoclaw rebuild, nemoclaw upgrade sandboxes, nemoclaw uninstall, sandbox mutability, sandbox runtime configuration, sandbox rebuild, nemoclaw backup, nemoclaw restore, workspace backup, openshell sandbox download upload, nemoclaw messaging channels, nemoclaw telegram, nemoclaw discord, nemoclaw slack, nemoclaw wechat, nemoclaw whatsapp, openshell channel messaging, nemoclaw workspace files, soul.md, user.md, identity.md, agents.md, sandbox persistence.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-sandboxes\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M7DARH8BRTG51TRCAB7YWDJ4","nemoclaw-user-manage-policy","Adds, removes, or modifies allowed endpoints in the sandbox policy. Use when customizing network policy, changing egress rules, or configuring sandbox endpoint access. Trigger keywords - customize nemoclaw network policy, sandbox egress policy configuration, nemoclaw integration policy examples, post-install policy setup, openshell approval workflow, policy preset, nemoclaw approve network requests, sandbox egress approval tui.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-policy\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":19},"01M7DARAT62M2VR37590VCZ5NS","nemoclaw-user-get-started","Installs NemoClaw, launches a sandbox, and runs the first agent prompt. Use when onboarding, installing, or launching a NemoClaw sandbox for the first time. Trigger keywords - nemoclaw quickstart, install nemoclaw openclaw sandbox, nemohermes quickstart, hermes agent nemoclaw, run hermes openshell sandbox, nemoclaw prerequisites, nemoclaw supported platforms, nemoclaw hardware software, nemoclaw windows wsl2 setup, nemoclaw install windows docker desktop.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-get-started\u002FSKILL.md",[],[]]