Skip to content

feat: v0.4.0 — code quality, tool pipeline, and stealth expansion#62

Merged
rfunix merged 5 commits intomainfrom
improvement/v0.4.0-quality-fixes
Mar 17, 2026
Merged

feat: v0.4.0 — code quality, tool pipeline, and stealth expansion#62
rfunix merged 5 commits intomainfrom
improvement/v0.4.0-quality-fixes

Conversation

@rfunix
Copy link
Owner

@rfunix rfunix commented Mar 11, 2026

Summary

  • New tool_pipeline() helper (src/tengu/tools/pipeline.py) — encapsulates the full security pipeline (sanitize → allowlist → stealth → rate_limit → audit → execute), reducing ~20 lines of boilerplate per tool
  • Expanded stealth proxy injection to 8 additional tools: hydra, amass, rustscan, katana, httpx, testssl, dalfox, crlfuzz
  • Shared test fixtures (tests/conftest.py) with mock_config, mock_ctx, mock_audit, mock_allowlist, and autouse singleton reset
  • Exception narrowing: tor_check.py(httpx.RequestError, TimeoutError), metasploit.pyInvalidInputError
  • from __future__ import annotations added to 24 __init__.py files
  • Updated CLAUDE.md (proxy table, module map, test count), README.md (test count), CHANGELOG.md (v0.4.0 entry)

Test plan

  • make lint — 0 ruff errors
  • make format — all files formatted
  • make typecheck — 0 mypy errors
  • make test — 2643 tests passing (up from 2562)
  • New test_tool_pipeline.py — 7 tests covering basic execution, allowlist block, custom sanitizer, stealth injection, no rate limit, execution failure audit
  • New stealth injection tests — 8 tests for expanded proxy injection tools
  • Updated test_tools_tor_check.py — uses httpx.ConnectError instead of generic Exception

🤖 Generated with Claude Code

rfunix and others added 5 commits March 11, 2026 19:21
Add tool_pipeline() helper to eliminate ~20 lines of boilerplate per tool,
expand stealth proxy injection to 8 additional tools, add shared test
fixtures, narrow exception handling, and add future annotations to 24 files.

- New: src/tengu/tools/pipeline.py with tool_pipeline() and PipelineResult
- New: tests/conftest.py with shared fixtures and autouse singleton reset
- Stealth: hydra, amass, rustscan, katana, httpx, testssl, dalfox, crlfuzz
- Narrowed: tor_check.py (httpx.RequestError), metasploit.py (InvalidInputError)
- Added from __future__ import annotations to 24 __init__.py files
- Updated CLAUDE.md, README.md, CHANGELOG.md with v0.4.0 changes
- 2643 tests passing, 0 lint errors, 0 type errors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- hydra: removed wrong `-p` flag (that's for password), use HYDRA_PROXY
  env var via get_proxy_env() instead
- rustscan: removed — has no proxy support at all (use proxychains wrapper)
- httpx: fixed `-proxy` → `-http-proxy` (ProjectDiscovery CLI flag)
- testssl: removed — only accepts host:port HTTP, incompatible with socks5://
- Added HYDRA_PROXY to get_proxy_env() output
- Updated tests, CLAUDE.md proxy table, and CHANGELOG.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
P0-1: Fix generate_report silently dropping findings with uppercase
severity values (e.g. "Critical", "HIGH"). The Pydantic Finding model
requires lowercase, but _normalize_finding was not lowercasing the
severity field before validation. Also coerce cvss_score to float.

P0-2: Unify risk scoring across score_risk, correlate_findings, and
generate_report into a single algorithm in scoring.py. All three now
use real CVSS scores when available (falling back to severity weights),
with attack chain and critical finding boosts. Eliminates score
inconsistency between tools (previously 6.2 vs 8.5 for same findings).

P1-4: Fix sqlmap --answers flag missing "How many=a" response, which
caused batch mode to send invalid "N" when sqlmap asks how many
entries to retrieve. Also added "follow=Y" and "keep testing=Y".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rfunix rfunix merged commit 250cb82 into main Mar 17, 2026
2 checks passed
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.

1 participant