Repository navigation
Untrusted HTTPS mirror and AP port scan (FR-038, FR-039) - #42
Merged
Merged
Conversation
Requirements and verification contracts first (issue #41): a TLS peer a DUT must refuse, and a TCP connect check of one AP-network host. Bench reset stops the mirror. Appendix D lists the endpoints. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two new L1 modules, routed by portal.py: - tls_mirror_controller: FIRMWARE_DIR served on 8443 with a self-signed certificate generated once by openssl and reused; start/stop/status. - netscan_controller: TCP connect check, 128 in flight, 1 s per connect, bounded by a total budget. The target must be one address in the AP subnet and not the Pi; validation runs before any connection. Pure cores host-tested (pytest/host/test_security_fixtures.py). Driver methods, MCP tools (bundle rebuilt), install.sh (modules, openssl, tls dir) and the user manual updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #41.
What
Two security test fixtures, requested by gplug-mini-test, whose requirements could not be verified on the bench:
POST /api/tls-mirror/start|stop,GET /api/tls-mirror/status. ServesFIRMWARE_DIRathttps://<pi>:8443/firmware/<project>/<file>with a self-signed certificate (generated once byopenssl, reused;sha256fingerprint in the reply). A correct DUT TLS client refuses it. Bench reset stops it.POST /api/net/portscan {"host", "ports"?, "timeout_s"?}→{"ok", "host", "open", "scanned", "complete", "elapsed_s"}. TCP connect only, 128 in flight, 1 s per connect, total budget 1–600 s. The target must be one address in192.168.4.0/24and not the Pi; anything else is a 400 before any connection.How
docs/Harness-FSD.md(§5, Appendix D, FR-036 table, changelog).pi/tls_mirror_controller.py,pi/netscan_controller.py;portal.pyonly routes and wires bench reset.pytest/testbench_driver.pymethods,mcp/testbench_mcp.pySPECS (bundle rebuilt),pi/install.sh(modules,openssl,/var/lib/rfc2217/tls), user manual §3 and §10.1.Verified
ruff check .(0.16.1): clean.pytest pytest/host: 71 passed (newtest_security_fixtures.py).Not done
🤖 Generated with Claude Code