cis490-doctor: e2e shipper --ping picks up dev-dir shipper package when run from a manual clone #12
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Running
cis490-doctor --role lab-hostfrom inside a manual dev clone (/home/elliottk/.env/CIS490/) instead of from/opt/cis490.What happened
The e2e check subprocesses
sudo -u cis490 /opt/cis490/.venv/bin/python -m shipper .... Python adds the calling process CWD tosys.path, so it finds/home/elliottk/.env/CIS490/shipper/before/opt/cis490/shipper/. The traceback references the dev-clone path:Same issue affects the
tier3: module catalog parsescheck which reportsNo module named exploitsfor the same reason.What was tried
Running the doctor directly as
/opt/cis490/.venv/bin/python /opt/cis490/tools/cis490_doctor.py(production path) avoids the issue. It is a latent bug in the doctor subprocess call.Suggested next step
In
tools/cis490_doctor.py, when spawning the shipper --ping subprocess, setcwd=/opt/cis490explicitly (or use theREPO_ROOTthe doctor already knows) so Python does not inherit the caller CWD on itssys.path.Refs spectral/CIS490 Dev_REL1_043026 bring-up.
Fixed in
95ac56aas part of the Dev_REL2_043026 merge (same root cause as issue #10 bug 3b). _run() now takes a cwd kwarg and check_end_to_end passes cwd='/opt/cis490' for the shipper --ping subprocess, so Python's CWD-on-sys.path heuristic doesn't pick up a dev clone. main() also inserts repo_root into sys.path so the inline 'from exploits.modules import …' check works regardless of where the doctor was invoked from.