Skip to content

Comments

docs(tools): add README + comprehensive tests for security tools#5164

Open
Emart29 wants to merge 1 commit intoaden-hive:mainfrom
Emart29:docs/add-security-tools-readme
Open

docs(tools): add README + comprehensive tests for security tools#5164
Emart29 wants to merge 1 commit intoaden-hive:mainfrom
Emart29:docs/add-security-tools-readme

Conversation

@Emart29
Copy link
Contributor

@Emart29 Emart29 commented Feb 20, 2026

Description

Adds comprehensive documentation and unit tests for all 7 security scanning tools.

Fixes #5094

READMEs Added (7 files)

Tool Purpose
port_scanner TCP connect scans, banner grabbing, risky port detection
ssl_tls_scanner TLS version, cipher suite, certificate analysis
http_headers_scanner OWASP security headers validation
dns_security_scanner SPF, DMARC, DKIM, DNSSEC, zone transfer checks
subdomain_enumerator Passive CT log subdomain discovery
tech_stack_detector Web technology fingerprinting
risk_scorer Weighted letter-grade risk scoring

Each README includes:

  • Feature description and usage examples
  • API reference with parameters and response format
  • Security checks explained with severity levels
  • Ethical use guidelines
  • Error handling
  • Integration with risk_scorer

Unit Tests Added (92 total)

Expanded test_security_tools.py with comprehensive coverage:

  • Port Scanner: Constants, port categories, async _check_port tests
  • SSL/TLS Scanner: Weak ciphers, insecure TLS versions, cert date parsing
  • HTTP Headers Scanner: Security headers, leaky headers validation
  • DNS Security Scanner: SPF/DMARC/DKIM/DNSSEC policy checks
  • Subdomain Enumerator: Keyword detection, severity levels
  • Tech Stack Detector: Cookie analysis, CDN/CMS/framework detection
  • Risk Scorer: Grading logic, category scoring, JSON parsing, inverted checks

Testing

cd tools
pytest tests/tools/test_security_tools.py -v
# 92 passed in 1.17s

Checklist

  • READMEs follow existing tool documentation patterns
  • All 92 tests pass locally
  • Lint passes (ruff check)
  • Ethical use guidelines included for security tools

READMEs added for 7 security scanning tools:
- port_scanner: TCP connect scans, banner grabbing, risky port detection
- ssl_tls_scanner: TLS version, cipher, certificate analysis
- http_headers_scanner: OWASP security headers validation
- dns_security_scanner: SPF, DMARC, DKIM, DNSSEC, zone transfer
- subdomain_enumerator: Passive CT log subdomain discovery
- tech_stack_detector: Web technology fingerprinting
- risk_scorer: Weighted letter-grade risk scoring

Comprehensive unit tests (92 total):
- Port scanner: constants, port categories, _check_port async tests
- SSL/TLS scanner: weak ciphers, TLS versions, cert parsing helpers
- HTTP headers scanner: security headers, leaky headers validation
- DNS security scanner: SPF/DMARC/DKIM/DNSSEC checks
- Subdomain enumerator: keyword detection, severity levels
- Tech stack detector: cookies, CDN, CMS, framework detection
- Risk scorer: grading logic, category scoring, JSON parsing

Fixes aden-hive#5094
Copy link
Collaborator

@bryanadenhq bryanadenhq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Emart29, thanks for your contribution, please address the review comment

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to this file is unnecessary, just keeping the readme is already good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs]: Add README.md for security scanning tools

2 participants