|
1 | | -#!/bin/sh |
2 | | -# note: this provides the Docker socket to the image and is NOT intended as a security container |
3 | | -if [ ! -f ".env" ]; then |
4 | | - touch ".env" |
5 | | -fi |
| 1 | +#!/bin/bash |
| 2 | + |
| 3 | +# SPDX-FileCopyrightText: 2025 GitHub |
| 4 | +# SPDX-License-Identifier: MIT |
| 5 | + |
| 6 | +# Script for running seclab-taskflow-agent in a docker container |
| 7 | +# (using the docker image that we publish). |
| 8 | +# |
| 9 | +# To use this script, `cd` to a directory containing taskflows. |
| 10 | +# For example: |
| 11 | +# |
| 12 | +# git clone https://github.com/GitHubSecurityLab/seclab-taskflow-agent.git |
| 13 | +# cd seclab-taskflow-agent/src |
| 14 | +# export COPILOT_TOKEN=<My GitHub PAT> |
| 15 | +# export GITHUB_AUTH_HEADER=<My GitHub PAT> |
| 16 | +# sudo -E ../docker/run.sh -p seclab_taskflow_agent.personalities.assistant 'explain modems to me please' |
| 17 | + |
| 18 | +touch -a .env |
| 19 | +mkdir -p logs |
| 20 | +mkdir -p data |
| 21 | + |
6 | 22 | docker run -i \ |
7 | | - --platform linux/amd64 \ |
8 | | - --volume "$PWD/"logs:/app/logs \ |
9 | | - --mount type=bind,src="$PWD/".env,dst=/app/.env,ro \ |
10 | | - ${MY_DATA:+--mount type=bind,src=$MY_DATA,dst=/app/my_data} \ |
11 | | - ${MY_TASKFLOWS:+--mount type=bind,src=$MY_TASKFLOWS,dst=/app/taskflows/my_taskflows,ro} \ |
12 | | - ${MY_TOOLBOXES:+--mount type=bind,src=$MY_TOOLBOXES,dst=/app/toolboxes/my_toolboxes,ro} \ |
13 | | - ${MY_PROMPTS:+--mount type=bind,src=$MY_PROMPTS,dst=/app/prompts/my_prompts,ro} \ |
14 | | - ${MY_PERSONALITIES:+--mount type=bind,src=$MY_PERSONALITIES,dst=/app/personalities/my_personalities,ro} \ |
| 23 | + --mount type=bind,src="$PWD",dst=/app \ |
| 24 | + -e DATA_DIR=/app/data \ |
| 25 | + -e GITHUB_PERSONAL_ACCESS_TOKEN="$GITHUB_PERSONAL_ACCESS_TOKEN" \ |
| 26 | + -e COPILOT_TOKEN="$COPILOT_TOKEN" \ |
15 | 27 | "ghcr.io/githubsecuritylab/seclab-taskflow-agent" "$@" |
0 commit comments