Move scripts to their own directory#33
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reorganizes the helper scripts for running the SecLab taskflows and aligns the Docker-based workflow with running from the repository root. It moves the scripts into a dedicated scripts hierarchy and updates how the agent is started so Python can import the project via an editable install.
Changes:
- Remove
src/run_seclab_agent.shand reintroduce it asscripts/run_seclab_agent.sh, now running Docker with an editable install of/appand a bind-mountedlogsdirectory. - Remove
src/run_audit.shand addscripts/audit/run_audit.sh, which runs the audit taskflow viapython -m seclab_taskflow_agentinstead of the Docker wrapper. - Update the overall layout so scripts live under
scripts/and can be invoked from the repo root, aligning the Docker and Codespaces usage patterns (though the PR description and existing docs still reference the oldsrc/paths).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/run_seclab_agent.sh |
Removes the old Docker wrapper script that had to be invoked from src/. |
src/run_audit.sh |
Removes the previous audit helper that delegated to run_seclab_agent.sh in src/. |
scripts/run_seclab_agent.sh |
New Docker wrapper in scripts/ that mounts the repo at /app, mounts ./logs into /root/.local, and runs pip install -q -e /app before executing the provided command. |
scripts/audit/run_audit.sh |
New audit script under scripts/audit/ that validates the repo argument and runs the audit taskflow via python -m seclab_taskflow_agent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0d23172 to
51dd8dd
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #!/bin/bash | ||
| # SPDX-FileCopyrightText: 2025 GitHub | ||
| # SPDX-License-Identifier: MIT | ||
|
|
There was a problem hiding this comment.
The script has been moved from src/run_seclab_agent.sh to scripts/run_seclab_agent.sh, but the top-level README and other docs (for example README.md lines 7–9 and src/seclab_taskflows/mcp_servers/codeql_python/README.md line 29) still reference the old location and assume it is run from src. Please update those docs and examples to point at the new scripts/ path and root-level .env/data locations so users don’t follow outdated instructions.
| @@ -0,0 +1,16 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
The PR description suggests running the audit script directly in Codespaces as /scripts/audit/run_audit.sh github/cmark-gfm, but the script is added at scripts/audit/run_audit.sh within the repo, so the correct usage from the repo root would be ./scripts/audit/run_audit.sh github/cmark-gfm (or similar). Please align the description and any user-facing examples with the actual relative path so users don’t try to call a non-existent absolute /scripts/... path.
This PR does two things:
run_seclab_agent.shscript so that you run it from the main directory of the repo, rather than having to firstcdinto thesrcdirectory. This is currently a weird discrepancy between the docker experience and the codespaces experience which I want to fix. The main change is that the script now runspip install -q -e /appso that python's importlib knows where to find the files.run_seclab_agent.shandrun_audit.shinto a newscriptsdirectory.After this change, you can run the
run_audit.shscript in docker like this:Or, you can run it in codespaces (or on bare metal) like this: