Repository navigation
Phase 1+2: offline pytest suites for 5 pure-logic tools + bcrypt fix (89 tests) - #5
Merged
Merged
Conversation
…WTInspect, HashDetect, PortMap, DNSAudit) + bcrypt/argon2 fix; CI now runs 89 tests (was 26) HashDetect: detect_hash matched bcrypt/argon2 against lowercased value and gated on hex/base64, so $2b$12$... always returned 'not valid hex or base64'. Now matches raw input before the gate. CI header updated (was 'Two of them have real pytest suites'). No root pyproject/requirements by design (monorepo of standalone tools, per-tool requirements.txt are the design).
…quests at module level)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 (audit/verify) + Phase 2 (offline tests) for SecureNET-Toolkit.
Phase 1 — verified, no behavior change
*.db,.venv,__pycache__, logs): clean.pyproject.toml/requirements.txtby design (monorepo of standalone tools, 17 per-toolrequirements.txtwith>=floors are correct). Nothing forced.Phase 2 — five new offline pytest suites (no network, no display)
HeaderScan/test_analyzer.pyHEADER_WEIGHTS=100,_compute_gradeA≥90/B≥75/C≥50/F, URL normalizationJWTInspect/tests/test_parser.pyparse_jwt(plus related (valid/expired/alg:none/malformed/Bearer)HashDetect/test_detector.pydetect_hash, regexHASH_TYPES(MD5/SHA-1/SHA-256/SHA-512/bcrypt)PortMap/test_scanner.pyget_service_name,get_risk,is_private_ipDNSAudit/test_scorer.pyscore_audit, caps (Zone Transfer→F, no SPF+DKIM+DMARC→D, takeover→C)Real bug fixed by the new suite:
HashDetect/detector.pydetect_hash()matched bcrypt/argon2 against the lowercased value and gated on hex/base64, so$2b$12$...always returned "Input is not valid hex or base64" — bcrypt could never be identified. Now matches raw input before the gate.CI (
.github/workflows/ci.yml): header updated (was "Two of them have real pytest suites" — stale), and the Run step now executes all 7 suites (89 tests: 65 + 24,89 passedlocally).HeaderScan/test.ymlis a manual workflow, not a test;APIGuard/tests/are OWASP definitions, not pytest — both still excluded, as before.Next (Phase 3, follow-up PR): cross-tool correlation verdict module (one explainable risk verdict per target across tools).