Add root-isolated online notebook environment - #740
Open
Namelessh8te wants to merge 4 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a GitHub Codespaces / devcontainer setup plus two Jupyter notebooks to support running the hackingtool project in an isolated, root-capable container environment, with accompanying documentation.
Changes:
- Add a root-run devcontainer configuration for Codespaces, including JupyterLab dependencies and port forwarding.
- Add two notebooks: an interactive CLI launcher notebook and an environment/package helper notebook.
- Add
ONLINE_NOTEBOOK.mddocumentation describing how to use Codespaces and the notebooks.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
ONLINE_NOTEBOOK.md |
Documents how to run the notebooks in Codespaces and clarifies the isolation boundary. |
Interactive-1.ipynb |
Provides repo-root discovery, safe command runner, and an on-demand launcher for the project CLI. |
contents for hackertools.ipynb |
Adds OS/package-manager detection plus explicit system package installation helper. |
.devcontainer/requirements.txt |
Declares Python dependencies needed in the devcontainer for notebook usage. |
.devcontainer/devcontainer.json |
Defines the Codespaces/devcontainer image, root user, post-create install, and port forwarding. |
Suppressed comments (2)
Interactive-1.ipynb:64
launch_hackingtool()tries to executehackingtool.py, which doesn’t exist in this repo (CLI entrypoint ishackingtool.cli:main). This call will fail even after fixing repo-root detection.
"def launch_hackingtool() -> subprocess.CompletedProcess[str]:\n",
" \"\"\"Launch the interactive CLI on demand; this is not called by Run All.\"\"\"\n",
" return run_command([sys.executable, REPO_ROOT / \"hackingtool.py\"], check=False)"
Interactive-1.ipynb:78
- The Run-All readiness check asserts the presence of
hackingtool.py,constants.py, andrequirements.txtat the repo root, but this project haspyproject.tomlandsrc/hackingtool/constants.pyinstead. As written,Run Allwill always fail in this repository.
"required_files = [\n",
" REPO_ROOT / \"hackingtool.py\",\n",
" REPO_ROOT / \"constants.py\",\n",
" REPO_ROOT / \"requirements.txt\",\n",
"]\n",
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+27
to
+33
| "def find_repo_root(start: Path | None = None) -> Path:\n", | ||
| " \"\"\"Find the repository without depending on the notebook launch directory.\"\"\"\n", | ||
| " current = (start or Path.cwd()).resolve()\n", | ||
| " for candidate in (current, *current.parents):\n", | ||
| " if (candidate / \"hackingtool.py\").is_file():\n", | ||
| " return candidate\n", | ||
| " raise FileNotFoundError(\"Could not find hackingtool.py from the current directory\")\n", |
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.
Type of Change
For New Tool Additions — Required Fields
Why should it be added?
Is the tool actively maintained?
Checklist
tools/*.pyfileTITLE,DESCRIPTION,INSTALL_COMMANDS,RUN_COMMANDS,PROJECT_URLall setSUPPORTED_OSset correctly (["linux"]/["linux", "macos"])TOOLSlist in the collection class at the bottom of the filerequirements.txtwithout discussion