Security Testing

Security Testing

Guides a coding agent through security testing of applications: SAST, DAST, dependency scanning and checks for SQL injection, XSS, CSRF, secrets and security headers.

Skill files10 files

references/

scripts/

SKILL.md105 lines
1
---
2
name: security-testing
3
description: >
4
Identify security vulnerabilities through SAST, DAST, penetration testing, and
5
dependency scanning. Use for security test, vulnerability scanning, OWASP, SQL
6
injection, XSS, CSRF, and penetration testing.
7
---
8
9
# Security Testing
10
11
## Table of Contents
12
13
- [Overview](#overview)
14
- [When to Use](#when-to-use)
15
- [Quick Start](#quick-start)
16
- [Reference Guides](#reference-guides)
17
- [Best Practices](#best-practices)
18
19
## Overview
20
21
Security testing identifies vulnerabilities, weaknesses, and threats in applications to ensure data protection, prevent unauthorized access, and maintain system integrity. It combines automated scanning (SAST, DAST) with manual penetration testing and code review.
22
23
## When to Use
24
25
- Testing for OWASP Top 10 vulnerabilities
26
- Scanning dependencies for known vulnerabilities
27
- Testing authentication and authorization
28
- Validating input sanitization
29
- Testing API security
30
- Checking for sensitive data exposure
31
- Validating security headers
32
- Testing session management
33
34
## Quick Start
35
36
Minimal working example:
37
38
```python
39
# security_scan.py
40
from zapv2 import ZAPv2
41
import time
42
43
class SecurityScanner:
44
def __init__(self, target_url, api_key=None):
45
self.zap = ZAPv2(apikey=api_key, proxies={
46
'http': 'http://localhost:8080',
47
'https': 'http://localhost:8080'
48
})
49
self.target = target_url
50
51
def scan(self):
52
"""Run full security scan."""
53
print(f"Scanning {self.target}...")
54
55
# Spider the application
56
print("Spidering...")
57
scan_id = self.zap.spider.scan(self.target)
58
while int(self.zap.spider.status(scan_id)) < 100:
59
time.sleep(2)
60
print(f"Spider progress: {self.zap.spider.status(scan_id)}%")
61
62
# Active scan
63
print("Running active scan...")
64
// ... (see reference guides for full implementation)
65
```
66
67
## Reference Guides
68
69
Detailed implementations in the `references/` directory:
70
71
| Guide | Contents |
72
|---|---|
73
| [OWASP ZAP (DAST)](references/owasp-zap-dast.md) | OWASP ZAP (DAST) |
74
| [SQL Injection Testing](references/sql-injection-testing.md) | SQL Injection Testing |
75
| [XSS Testing](references/xss-testing.md) | XSS Testing |
76
| [Authentication & Authorization Testing](references/authentication-authorization-testing.md) | Authentication & Authorization Testing |
77
| [CSRF Protection Testing](references/csrf-protection-testing.md) | CSRF Protection Testing |
78
| [Dependency Vulnerability Scanning](references/dependency-vulnerability-scanning.md) | Dependency Vulnerability Scanning |
79
| [Security Headers Testing](references/security-headers-testing.md) | Security Headers Testing |
80
| [Secrets Detection](references/secrets-detection.md) | Secrets Detection |
81
82
## Best Practices
83
84
### ✅ DO
85
86
- Run security scans in CI/CD
87
- Test with real attack vectors
88
- Scan dependencies regularly
89
- Use security headers
90
- Implement rate limiting
91
- Validate and sanitize all input
92
- Use parameterized queries
93
- Test authentication/authorization thoroughly
94
95
### ❌ DON'T
96
97
- Store secrets in code
98
- Trust user input
99
- Expose detailed error messages
100
- Skip dependency updates
101
- Use default credentials
102
- Ignore security warnings
103
- Test only happy paths
104
- Commit sensitive data
105

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 13,328 prompts

More by @OpenSourceBuffGuy

See all
Seaside morning vlog from bedroom to terrace prompt image

Seaside morning vlog from bedroom to terrace

Generates a 15-second vertical seaside vlog of a woman waking up, stepping onto a terrace and speaking to camera, with a beat for every second and written dialogue.

video-prompt, vlog, timed-beats, multi-shot, lip-sync, short-form-video, vertical-format, selfie, ocean, travel, natural-light, golden-hour, character-consistency, handheld, camera-movement, cinematic, photorealistic, woman, hailuo, for-content-creators, long-form, structured-output, bokeh, summer, text-to-video

Giant chocolate bar towering over snowy mountain valley prompt image

Giant chocolate bar towering over snowy mountain valley

Draws a photorealistic chocolate advertisement of a gigantic bar towering over a snowy mountain valley, with tiny photographers and floating chocolate pieces.

image-prompt, product-photography, advertising, surreal, forced-perspective, mountains, winter, landscape, golden-hour, photorealistic, cinematic, vertical-format, luxury, food-photography, packaging-design, negative-prompt, gpt-image, chatgpt, quick, vibrant-colors, dramatic-lighting, wide-shot

Black adjustable dumbbells in a luxury gym prompt image

Black adjustable dumbbells in a luxury gym

Produces a 10-second premium commercial for black adjustable dumbbells in a luxury gym, moving from a low close-up and macro dials to a wide hero shot.

video-prompt, video-ad, product-video, multi-shot, timed-beats, macro, camera-movement, cinematic, photorealistic, natural-light, studio-lighting, product-photography, vertical-format, fitness, shallow-depth-of-field, luxury, for-marketers

Reviews

Loading reviews…

Discussion

Loading comments…