You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-51Lines changed: 52 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,17 +14,43 @@ It's primary value proposition is as a CLI tool that allows users to quickly def
14
14
15
15
Agents are defined through [personalities](personalities/), that receive a [task](taskflows/) to complete given a set of [tools](toolboxes/).
16
16
17
-
Agents can cooperate to complete sequences of tasks through so-called [Taskflows](taskflows/GRAMMAR.md).
17
+
Agents can cooperate to complete sequences of tasks through so-called [taskflows](taskflows/GRAMMAR.md).
18
+
19
+
You can find a detailed overview of the taskflow grammar [here](https://github.com/GitHubSecurityLab/seclab-taskflow-agent/blob/main/taskflows/GRAMMAR.md) and example taskflows [here](https://github.com/GitHubSecurityLab/seclab-taskflow-agent/tree/main/taskflows/examples).
20
+
21
+
## Use Cases and Examples
22
+
23
+
The Seclab Taskflow Agent framework was primarily designed to fit the iterative feedback loop driven work involved in Agentic security research workflows and vulnerability triage tasks.
24
+
25
+
Its design philosophy is centered around the belief that a prompt level focus of capturing vulnerability patterns will greatly improve and scale security research results as frontier model capabilities evolve over time.
26
+
27
+
While the maintainer himself primarily uses this framework as a code auditing tool it also serves as a more generic swiss army knife for exploring Agentic workflows. For example, the GitHub Security Lab also uses this framework for automated code scanning alert triage.
28
+
29
+
The framework includes a [CodeQL](https://codeql.github.com/) MCP server that can be used for Agentic code review, see the [CVE-2023-2283](https://github.com/GitHubSecurityLab/seclab-taskflow-agent/blob/main/taskflows/CVE-2023-2283/CVE-2023-2283.yaml) for an example of how to have an Agent review C code using a CodeQL database.
30
+
31
+
Instead of generating CodeQL queries itself, the CodeQL MCP Server is used to provide CodeQL-query based MCP tools that allow an Agent to navigate and explore code. It leverages templated CodeQL queries to provide targeted context for model driven code analysis.
18
32
19
33
## Requirements
20
34
21
35
Python >= 3.9 or Docker
22
36
23
-
# Usage
37
+
## Configuration
38
+
39
+
Provide a GitHub token for an account that is entitled to use GitHub Copilot via the `COPILOT_TOKEN` environment variable. Further configuration is use case dependent, i.e. pending which MCP servers you'd like to use in your taskflows.
40
+
41
+
You can set persisting environment variables via an `.env` file in the project root.
24
42
25
-
Provide a Copilot entitled GitHub PAT via the `COPILOT_TOKEN` environment variable.
43
+
Example:
26
44
27
-
## Source
45
+
```sh
46
+
# Tokens
47
+
COPILOT_TOKEN=<your_github_token>
48
+
# MCP configs
49
+
GITHUB_PERSONAL_ACCESS_TOKEN=<your_github_token>
50
+
CODEQL_DBS_BASE_PATH="/app/my_data/"
51
+
```
52
+
53
+
## Deploying from Source
28
54
29
55
First install the required dependencies:
30
56
@@ -48,40 +74,42 @@ Example: deploying a Taskflow:
48
74
python main.py -t example
49
75
```
50
76
51
-
## Docker
77
+
## Deploying from Docker
52
78
53
-
Alternatively you can deploy the Agent via its Docker image using `docker/run.sh`.
79
+
You can deploy the Taskflow Agent via its Docker image using `docker/run.sh`.
80
+
81
+
WARNING: the Agent Docker image is _NOT_ intended as a security boundary but strictly a deployment convenience.
54
82
55
83
The image entrypoint is `main.py` and thus it operates the same as invoking the Agent from source directly.
56
84
57
85
You can find the Docker image for the Seclab Taskflow Agent [here](https://github.com/GitHubSecurityLab/seclab-taskflow-agent/pkgs/container/seclab-taskflow-agent) and how it is built [here](release_tools/).
58
86
59
87
Note that this image is based on a public release of the Taskflow Agent, and you will have to mount any custom taskflows, personalities, or prompts into the image for them to be available to the Agent.
60
88
61
-
See [docker/run.sh](docker/run.sh) for configuration details.
89
+
Optional image mount points to supply custom data are configured via the environment:
62
90
63
-
Example: deploying a Taskflow:
91
+
- Custom data via `MY_DATA`, mounts to `/app/my_data`
92
+
- Custom personalities via `MY_PERSONALITIES`, mounts to `/app/personalities/my_personalities`
93
+
- Custom taskflows via `MY_TASKFLOWS`, mounts to `/app/taskflows/my_taskflows`
94
+
- Custom prompts via `MY_PROMPTS`, mounts to `/app/prompts/my_prompts`
95
+
- Custom toolboxes via `MY_TOOLBOXES`, mounts to `/app/toolboxes/my_toolboxes`
96
+
97
+
See [docker/run.sh](docker/run.sh) for further details.
98
+
99
+
Example: deploying a Taskflow (example.yaml):
64
100
65
101
```sh
66
102
docker/run.sh -t example
67
103
```
68
-
Example: deploying a custom taskflow:
104
+
Example: deploying a custom taskflow (custom_taskflow.yaml):
- Custom personalities via `MY_PERSONALITIES` environment variable
78
-
- Custom taskflows via `MY_TASKFLOWS` environment variable
79
-
- Custom prompts via `MY_PROMPTS` environment variable
80
-
- Custom toolboxes via `MY_TOOLBOXES` environment variable
81
-
82
110
For more advanced scenarios like e.g. making custom MCP server code available, you can alter the run script to mount your custom code into the image and configure your toolboxes to use said code accordingly.
83
111
84
-
Example: custom MCP server deployment via Docker image:
112
+
Example: a custom MCP server deployment via Docker image:
85
113
86
114
```sh
87
115
export MY_MCP_SERVERS=./mcp_servers
@@ -109,7 +137,7 @@ docker run \
109
137
110
138
Our default run script makes the Docker socket available to the image, which contains the Docker cli, so 3rd party Docker based stdio MCP servers also function as normal.
111
139
112
-
Example: a toolbox configuration for the official GitHub MCP Server:
140
+
Example: a toolbox configuration using the official GitHub MCP Server via Docker:
Set environment variables via an `.env` file in the project root.
126
-
127
-
Example: a persistent Agent configuration with various MCP server environment variables set:
128
-
129
-
```sh
130
-
# Tokens
131
-
COPILOT_TOKEN=...
132
-
# Docker config, MY_DATA is mounted to /app/my_data
133
-
MY_DATA="/home/user/my_data"
134
-
# MCP configs
135
-
GITHUB_PERSONAL_ACCESS_TOKEN=...
136
-
CODEQL_DBS_BASE_PATH="/app/my_data/"
137
-
```
138
-
139
-
# Personalities
151
+
## Personalities
140
152
141
153
Core characteristics for a single Agent. Configured through YAML files in `personalities/`.
142
154
@@ -157,7 +169,7 @@ toolboxes:
157
169
- echo
158
170
```
159
171
160
-
# Toolboxes
172
+
## Toolboxes
161
173
162
174
MCP servers that provide tools. Configured through YAML files in `toolboxes/`.
163
175
@@ -174,18 +186,7 @@ server_params:
174
186
SOME: value
175
187
```
176
188
177
-
Example sse config:
178
-
179
-
```yaml
180
-
server_params:
181
-
kind: sse
182
-
# make sure you .env config the echo server, see echo_sse.py for example
183
-
url: http://127.0.0.1:9000/echo
184
-
headers:
185
-
SomeHeader: "{{ env USER }}"
186
-
```
187
-
188
-
# Taskflows
189
+
## Taskflows
189
190
190
191
A sequence of interdependent tasks performed by a set of Agents. Configured through a YAML based [grammar](taskflows/GRAMMAR.md) in [taskflows/](taskflows/).
191
192
@@ -263,6 +264,6 @@ This project is licensed under the terms of the MIT open source license. Please
263
264
264
265
[SUPPORT](./SUPPORT.md)
265
266
266
-
## Acknowledgement
267
+
## Acknowledgements
267
268
268
-
Security Lab team members @m-y-mo and @p- for contributing heavily to the testing and development of this framework, as well as the rest of the Security Lab team for helpful discussions and use cases.
269
+
Security Lab team members [Man Yue Mo](https://github.com/m-y-mo) and [Peter Stockli](https://github.com/p-) for contributing heavily to the testing and development of this framework, as well as the rest of the Security Lab team for helpful discussions and feedback.
0 commit comments