skills/ethical-hacking-ethics/SKILL.md
Legal and ethical guidelines for bug bounties, pentesting, and security research. Use when conducting authorized security testing.
npx skillsauth add igbuend/grimbard ethical-hacking-ethicsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guidance for ethical hacking: bug bounties, pentesting, and security research.
Access systems solely for good-faith testing, avoid harm to individuals/public, use findings to improve security.
Legal risk: CFAA (US) and CMA 1990 (UK) prohibit unauthorized access. Penalties include imprisonment.
Before beginning any testing, verify:
| Type | Authorization | Safe Harbor | Notes | |------|--------------|-------------|-------| | Bug Bounty | Implicit via program | If offered | Follow program rules | | Pentest | Written contract/SOW | Per contract | May require NDA | | VDP | Program invitation | Varies | Usually no rewards | | CTF | Competition rules | Within boundaries | Legal only in competition |
| Severity | Violations | Consequence | |----------|-----------|-------------| | Critical | Unauthorized access, data theft, service disruption, extortion, social engineering, physical breach | Permanent ban + legal action | | Severe | Premature disclosure, prohibited techniques, third-party sharing, withholding details | Warnings + potential ban | | Minor | Unintentional scope violation, incomplete reports, format issues | Education + warning |
| Situation | Action | |-----------|--------| | Outside scope | Halt, document, report, await guidance | | Sensitive data exposure | Stop exploration, don't download, report immediately | | Service disruption (or near) | Stop, document, report, await instructions | | Asked to stop | Cease all activities, get written confirmation |
| Jurisdiction | Law | Key Points | |-------------|-----|------------| | US | CFAA (18 U.S.C. § 1030) | Prohibits unauthorized access. Van Buren (2021) narrowed scope. | | UK | CMA 1990 | No "good faith" defense. Section 1: up to 2 years. No safe harbor equivalent. | | EU | GDPR | Legal basis required for data. Report breaches within 72 hours. |
Other jurisdictions: Canada, Australia, Germany, France, Japan have similar laws. Research local laws before international testing.
References: CFAA | CMA | GDPR
| Standard | Use Case | Reference | |----------|----------|-----------| | PTES | General pentesting (7 stages) | pentest-standard.org | | OWASP WSTG | Web application testing | owasp.org/wstg | | NIST SP 800-115 | Government/compliance testing | csrc.nist.gov | | OSSTMM | Metrics-based security testing | isecom.org |
| Platform | Safe Harbor | Disclosure | Key Requirement | |----------|-------------|------------|-----------------| | HackerOne | Gold Standard (GSSH) | Program-specific | Human-in-the-loop validation | | Bugcrowd | Disclose.io framework | Coordinated/Custom/Non | Secure POC sharing | | Intigriti | Varies | Coordinated | GDPR compliance | | YesWeHack | Varies | Program-specific | Follow program brief |
Platform Docs: HackerOne | Bugcrowd | Intigriti | YesWeHack
| Certification | Focus | Ethics Requirement | |--------------|-------|-------------------| | OSCP | Practical exploitation | Legal boundaries, documentation | | CEH | Theory + practical | Code of ethics required | | GPEN | Advanced pentesting | Legal/ethical training | | CREST/CHECK | UK government schemes | Background checks, conduct codes | | PCI-DSS | Cardholder data environments | Qualified assessor, documentation |
Platforms: HackerOne Docs | Bugcrowd Docs | Disclose.io
Standards: PTES | OWASP WSTG | NIST SP 800-115
Legal: CFAA | CMA 1990
For detailed reference material, see the references/ directory.
development
Security anti-pattern for Cross-Site Scripting vulnerabilities (CWE-79). Use when generating or reviewing code that renders HTML, handles user input in web pages, uses innerHTML/document.write, or builds dynamic web content. Covers Reflected, Stored, and DOM-based XSS. AI code has 86% XSS failure rate.
development
Security anti-pattern for XPath injection vulnerabilities (CWE-643). Use when generating or reviewing code that queries XML documents, constructs XPath expressions, or handles user input in XML operations. Detects unescaped quotes and special characters in XPath queries.
development
Security anti-pattern for weak password hashing (CWE-327, CWE-759). Use when generating or reviewing code that stores or verifies user passwords. Detects use of MD5, SHA1, SHA256 without salt, or missing password hashing entirely. Recommends bcrypt, Argon2, or scrypt.
development
Security anti-pattern for weak encryption (CWE-326, CWE-327). Use when generating or reviewing code that encrypts data, handles encryption keys, or uses cryptographic modes. Detects DES, ECB mode, static IVs, and custom crypto implementations.