Seki has been created to automatically generate drone.yml
files to run security tools in the cloud.
- Seki Server: example project to deploy drone server.
- SecTools: collections of public security related tools containerized.
pip install seki
Some seki functions use drone cli commands. To be able to use them, DRONE_SERVER
and DRONE_TOKEN
must be exported in terminal. You can find them in drone web ui inside account settings.
This command allows to run docker images on
Usage: seki run [OPTIONS] IMAGE
Option | Value | Description |
---|---|---|
--args | TEXT | Arguments for docker image. |
--telegram | - | Notify on telegram build result. |
--cron | @hourly,@daily,@weekly,@monthly,@yearly | Cron job |
To use the telegram option the following secrets must be set:
telegram_token
: telegram token from telegram developer center
telegram_to
: telegram user id (can be requested from the @userinfobot
inside Telegram)
Find subdomains for google.com
and get results back in telegram.
seki run oscarbc/subfinder.subfinder --args "subfinder -d google.com -o result.txt" --telegram
Usage: seki template [OPTIONS] FILE
Option | Value | Description |
---|---|---|
--cron | @hourly,@daily,@weekly,@monthly,@yearly | Cron job |
Templates can have defined parameters. Parameters must be defined as a list in the first line of the template.
# PARAMETERS: param1,param2,param3
And places to replace as follows:
- echo $$PARAM1 $$PARAM2 $$PARAM3
Find subdomains for google.com
and get results back in telegram. But this time using a template.
seki template test.yml
test.yml
# PARAMETERS: domain
clone:
disable: true
kind: pipeline
name: default
steps:
- name: run
image: oscarbc/subfinder.subfinder
commands:
- subfinder -d $$DOMAIN -o result.txt
- name: create tar
image: alpine
commands:
- tar czf output.tar.gz .
- name: telegram notificaton
image: appleboy/drone-telegram
settings:
document:
- output.tar.gz
format: markdown
message: >
{{#success build.status}}
{{build.number}}: ✅ `{{commit.message}}` 🚁 [See build]({{build.link}})
{{else}}
{{build.number}}: ❌ `{{commit.message}}` 🚁 [See build]({{build.link}})
{{/success}}
to:
from_secret: telegram_to
token:
from_secret: telegram_token
Secrets have to be registered inside seki drone project settings. Inside drone project settings Drone docs
To run pipelines periodically the system uses cron jobs from Drone. Seki creates a new branch and enables cron job for that new branch.
https://github.com/anshumanbh/kubebot
I would like to thank Drone to open source their project.
seki is licensed under the MIT License. Take a look at the LICENSE.md for more information.