Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Individual taskflows may need additional setup, please refer to the `README.md`
After setting the relevant env vars, run an example taskflow with:

```bash
./scripts/run_seclab_agent.sh python -m seclab_taskflow_agent -t seclab_taskflows.taskflows.audit.ghsa_variant_analysis_demo -g repo=github/cmark-gfm -g ghsa=GHSA-c944-cv5f-hpvr
./scripts/run_seclab_agent.sh -t seclab_taskflows.taskflows.audit.ghsa_variant_analysis_demo -g repo=github/cmark-gfm -g ghsa=GHSA-c944-cv5f-hpvr
```

## Background
Expand Down
8 changes: 8 additions & 0 deletions scripts/audit/run_audit_in_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
# SPDX-FileCopyrightText: GitHub, Inc.
# SPDX-License-Identifier: MIT

# https://stackoverflow.com/a/53122736
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

${__dir}/../run_in_docker.sh ${__dir}/run_audit.sh "$1"
20 changes: 20 additions & 0 deletions scripts/run_in_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
# SPDX-FileCopyrightText: GitHub, Inc.
Comment thread
kevinbackhouse marked this conversation as resolved.
# SPDX-License-Identifier: MIT

if [ ! -f ".env" ]; then
touch ".env"
fi

mkdir -p .local
mkdir -p logs
mkdir -p data

# Note: this uses the trick described [here](https://unix.stackexchange.com/a/646335)
# to pass extra command line arguments into `bash -c`.
docker run -i \
--mount type=bind,src="$PWD",dst=/app \
--mount type=bind,src="$PWD/.local",dst=/root/.local \
-e GH_TOKEN="$GH_TOKEN" -e AI_API_TOKEN="$AI_API_TOKEN" --entrypoint /bin/bash \
"ghcr.io/githubsecuritylab/seclab-taskflow-agent" \
Comment thread
kevinbackhouse marked this conversation as resolved.
-c 'pip install -q -e /app && exec "$@"' this-is-bash-dollar-zero "$@"
20 changes: 4 additions & 16 deletions scripts/run_seclab_agent.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
#!/bin/bash
# SPDX-FileCopyrightText: 2025 GitHub
# SPDX-FileCopyrightText: GitHub, Inc.
Comment thread
kevinbackhouse marked this conversation as resolved.
# SPDX-License-Identifier: MIT

if [ ! -f ".env" ]; then
touch ".env"
fi
# https://stackoverflow.com/a/53122736
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

mkdir -p .local
mkdir -p logs
mkdir -p data

# Note: this uses the trick described [here](https://unix.stackexchange.com/a/646335)
# to pass extra command line arguments into `bash -c`.
docker run -i \
--mount type=bind,src="$PWD",dst=/app \
--mount type=bind,src="$PWD/.local",dst=/root/.local \
-e GH_TOKEN="$GH_TOKEN" -e AI_API_TOKEN="$AI_API_TOKEN" --entrypoint /bin/bash \
"ghcr.io/githubsecuritylab/seclab-taskflow-agent" \
-c 'pip install -q -e /app && exec "$@"' this-is-bash-dollar-zero "$@"
${__dir}/run_in_docker.sh python -m seclab_taskflow_agent "$@"
Comment thread
kevinbackhouse marked this conversation as resolved.