Skip to main content

Example taskflows to use with the the GitHub Security Lab Taskflow Agent Framework (https://github.com/GitHubSecurityLab/seclab-taskflow-agent)

Project description

GitHub Security Lab Taskflows

This repository contains example taskflows to use with the SecLab Taskflow Agent, as well as the custom MCP servers that are needed to run the taskflows.

Quick start

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

Now try running our auditing taskflows on one of your projects. Here, we're using the OWASP Juice Shop as an example:

./scripts/audit/run_audit.sh juice-shop/juice-shop

⚠️ Note: the auditing taskflows can take several hours to run, especially on larger projects, and make a lot of AI requests. You will almost certainly need a Copilot Pro account to run them.

The results of the audit are written to an SQLite database, which is opened automatically in an SQLite viewer at the end of the run. The results are in the table named "audit_result". The table has a column named "has_vulnerability", with checkmarks in the rows that are most likely to be genuine vulnerabilities.

Running with docker script

We recommend running taskflows in a sandboxed environment. GitHub Codespaces are convenient, or if you prefer you can use the script run_seclab_agent.sh to run a docker container of the seclab-taskflow-agent as outlined here. Note that this script needs to be run from the main directory of the repo, and the .env file with the environment variables for the custom MCP servers to store data needs to be in the same directory.

First, create a .env file in the main directory of the repo. For run_seclab_agent.sh you can use:

MEMCACHE_STATE_DIR=/app/data
CODEQL_DBS_BASE_PATH=/app/data
DATA_DIR=/app/data
LOG_DIR=/app/logs

The MEMCACHE_STATE_DIR is needed to persist some intermediate data in the memcache, DATA_DIR is needed for various mcp servers to store intermediate results, and LOG_DIR is used to store log files generated by the servers. These can be set in a .env file in the main directory. If no environment variables are set for the custom MCP servers, relevant folders will be created automatically. The location depends on the platform, and is set by platformdirs.

In addition, AI API endpoints and secrets also need to be configured via environment variables or Codespace secrets. In particular, the environment variables AI_API_TOKEN and AI_API_ENDPOINT need to be set to the appropriate AI API endpoints and credentials. If not set, the default AI_API_ENDPOINT is GitHub models:

AI_API_ENDPOINT="https://models.github.ai/inference"

In addition, the GH_TOKEN environment variable also needs to be set to allow interaction with the GitHub API, such as fetching content, creating issues etc.

Individual taskflows may need additional setup, please refer to the README.md in the relevant subdirectories for further requirements.

After setting the relevant env vars, run an example taskflow with:

./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

SecLab Taskflows is a companion repository to the SecLab Taskflow Agent repository. SecLab Taskflow Agent is an experimental agentic framework maintained by GitHub Security Lab. This repository provides example taskflows and supporting resources for use with the SecLab Taskflow Agent. We are using the agent and these taskflows to experiment with using AI Agents for security purposes, such as auditing code for vulnerabilities or triaging issues.

We'd love to hear your feedback. Please create an issue to send us a feature request or bug report. We also welcome pull requests (see our contribution guidelines for more information if you wish to contribute).

Requirements

Python >= 3.9 or Docker

License

This project is licensed under the terms of the MIT license. Please refer to the LICENSE file for the full terms.

Maintainers

CODEOWNERS

Support

SUPPORT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seclab_taskflows-0.0.4.tar.gz (83.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seclab_taskflows-0.0.4-py3-none-any.whl (131.7 kB view details)

Uploaded Python 3

File details

Details for the file seclab_taskflows-0.0.4.tar.gz.

File metadata

  • Download URL: seclab_taskflows-0.0.4.tar.gz
  • Upload date:
  • Size: 83.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for seclab_taskflows-0.0.4.tar.gz
Algorithm Hash digest
SHA256 8370297ab994a3031c934638760b7d5bc9643f0db49fd3edd67a367772f9bd55
MD5 1b00ad5f442db614147bd5ff68b5aabc
BLAKE2b-256 2fb0e4b97e3ef027e284a2458dcfe923a1da05e1ec65b1a69696d1c5e02a8449

See more details on using hashes here.

Provenance

The following attestation bundles were made for seclab_taskflows-0.0.4.tar.gz:

Publisher: publish-to-pypi.yaml on GitHubSecurityLab/seclab-taskflows

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file seclab_taskflows-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for seclab_taskflows-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e8c4acc59d560f8431c8ace0738f0e1f5ff26b4f801f7d1dc8564f398bdcd2e0
MD5 031b819a80aee4f6fd3bc13146420694
BLAKE2b-256 390e89fe712523f470bf8c125b6188f914eb5167d58a466ff70000b8ac86dbe9

See more details on using hashes here.

Provenance

The following attestation bundles were made for seclab_taskflows-0.0.4-py3-none-any.whl:

Publisher: publish-to-pypi.yaml on GitHubSecurityLab/seclab-taskflows

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page