Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/base4security/t3sf
Technical Tabletop Exercises Simulation Framework
https://github.com/base4security/t3sf
discord discord-bot framework orchestration python python-3 python3 simulation simulation-framework slack slack-bot telegram telegram-bot training ttx whatsapp whatsapp-bot
Last synced: 2 months ago
JSON representation
Technical Tabletop Exercises Simulation Framework
- Host: GitHub
- URL: https://github.com/base4security/t3sf
- Owner: Base4Security
- License: gpl-3.0
- Created: 2022-04-20T13:51:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-30T18:18:33.000Z (about 1 year ago)
- Last Synced: 2024-03-29T20:35:54.305Z (9 months ago)
- Topics: discord, discord-bot, framework, orchestration, python, python-3, python3, simulation, simulation-framework, slack, slack-bot, telegram, telegram-bot, training, ttx, whatsapp, whatsapp-bot
- Language: Python
- Homepage: https://T3SF.readthedocs.io/en/latest/
- Size: 6.36 MB
- Stars: 42
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
T3SF
[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![PyPI version](https://badge.fury.io/py/T3SF.svg)](https://badge.fury.io/py/T3SF)
[![Documentation Status](https://readthedocs.org/projects/t3sf/badge/?version=latest)](https://t3sf.readthedocs.io/en/latest/?badge=latest)
[![License](https://img.shields.io/badge/license-GPL-blue.svg)](/LICENSE)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6519221.svg)](https://doi.org/10.5281/zenodo.6519221)
[![Docker Image for Discord](https://github.com/Base4Security/T3SF/actions/workflows/publish_discord.yml/badge.svg)](https://hub.docker.com/r/base4sec/t3sf)
[![Docker Image for Slack](https://github.com/Base4Security/T3SF/actions/workflows/publish_slack.yml/badge.svg)](https://hub.docker.com/r/base4sec/t3sf)Technical Tabletop Exercises Simulation Framework
## Table of Contents
- [About](#About)
- [Getting Things Ready](#Starting)
- [TODO](./TODO.md)
- [CHANGELOG](./CHANGELOG.md)
- [Contributing](./CONTRIBUTING.md)## About
T3SF is a framework that offers a modular structure for the orchestration of events based on a master scenario events list (MSEL) together with a set of rules defined for each exercise (optional) and a configuration that allows defining the parameters of the corresponding platform. The main module performs the communication with the specific module (Discord, Slack, Telegram, etc.) that allows the events to present the events in the input channels as injects for each platform. In addition, the framework supports different use cases: "single organization, multiple areas", "multiple organization, single area" and "multiple organization, multiple areas".## Getting Things Ready
To use the framework with your desired platform, whether it's Slack or Discord, you will need to install the required modules for that platform. But don't worry, installing these modules is easy and straightforward.To do this, you can follow this simple step-by-step guide, or if you're already comfortable installing packages with `pip`, you can skip to the last step!
```bash
# Python 3.6+ required
python -m venv .venv # We will create a python virtual environment
source .venv/bin/activate # Let's get inside itpip install -U pip # Upgrade pip
```Once you have created a Python virtual environment and activated it, you can install the T3SF framework for your desired platform by running the following command:
```bash
pip install "T3SF[Discord]" # Install the framework to work with Discord
```
or```bash
pip install "T3SF[Slack]" # Install the framework to work with Slack
```This will install the T3SF framework along with the required dependencies for your chosen platform. Once the installation is complete, you can start using the framework with your platform of choice.
We strongly recommend following the platform-specific guidance within our Read The Docs! Here are the links:
- [Discord](https://t3sf.readthedocs.io/en/latest/Discord.html#installation)
- [Slack](https://t3sf.readthedocs.io/en/latest/Slack.html#installation)
- [Telegram](https://t3sf.readthedocs.io/en/latest/Telegram.html#installation)
- [WhatsApp](https://t3sf.readthedocs.io/en/latest/WhatsApp.html#installation)## Usage
We created this framework to simplify all your work!Using Docker
### Supported Tags
- slack → This image has all the requirements to perform an exercise in Slack.
- discord → This image has all the requirements to perform an exercise in Discord.#### Using it with Slack
```bash
$ docker run --rm -t --env-file .env -v $(pwd)/MSEL.json:/app/MSEL.json base4sec/t3sf:slack
```Inside your `.env` file you have to provide the `SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN` tokens. Read more about it [here](https://t3sf.readthedocs.io/en/latest/Slack.html#providing-the-tokens).
There is another environment variable to set, `MSEL_PATH`. This variable tells the framework in which path the MSEL is located. By default, the container path is `/app/MSEL.json`. If you change the mount location of the volume then also change the variable.
#### Using it with Discord
```bash
$ docker run --rm -t --env-file .env -v $(pwd)/MSEL.json:/app/MSEL.json base4sec/t3sf:discord
```Inside your `.env` file you have to provide the `DISCORD_TOKEN` token. Read more about it [here](https://t3sf.readthedocs.io/en/latest/Discord.html#providing-the-token).
There is another environment variable to set, `MSEL_PATH`. This variable tells the framework in which path the MSEL is located. By default, the container path is `/app/MSEL.json`. If you change the mount location of the volume then also change the variable.
---------------------
Once you have everything ready, use our template for the `main.py`, or modify the following code:
Here is an example if you want to run the framework with the `Discord` bot and a `GUI`.
```python
from T3SF import T3SF
import asyncioasync def main():
await T3SF.start(MSEL="MSEL_TTX.json", platform="Discord", gui=True)if __name__ == '__main__':
asyncio.run(main())
```Or if you prefer to run the framework without `GUI` and with `Slack` instead, you can modify the arguments, and that's it!
Yes, that simple!
```python
await T3SF.start(MSEL="MSEL_TTX.json", platform="Slack", gui=False)
```If you need more help, you can always check our documentation [here](https://t3sf.readthedocs.io/en/latest/)!