Skip to main content

Seki

PyPI version Known Vulnerabilities Supported python versions License

Seki has been created to automatically generate drone.yml files to run security tools in the cloud.

Related projects

  • Seki Server: example project to deploy drone server.
  • SecTools: collections of public security related tools containerized.

Installation

pip install seki

Usage

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.

Run

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

Telegram

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)

Examples

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

Templates

Usage: seki template [OPTIONS] FILE
Option Value Description
--cron @hourly,@daily,@weekly,@monthly,@yearly Cron job

Parameters

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

Examples

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

Secrets have to be registered inside seki drone project settings. Inside drone project settings Drone docs

Cron

To run pipelines periodically the system uses cron jobs from Drone. Seki creates a new branch and enables cron job for that new branch.

Related projects

https://github.com/anshumanbh/kubebot

Thanks

I would like to thank Drone to open source their project.

License

seki is licensed under the MIT License. Take a look at the LICENSE.md for more information.

Release files for seki 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for seki 0.4.0
File Size Uploaded
seki-0.4.0.tar.gz 8.1 kB Details

Release files / seki-0.4.0.tar.gz

Download URL seki-0.4.0.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
da2ee64f9f1ca49a5ee52710247f40a80d94d5b20f79a1e28e45a19c8bec5a35
BLAKE2b-256 checksum
How to use checksums
d18050aeae42c3dc33bb426b1ebdee9f9c3a802cb00f44fbed1b69e79af90206
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.5

Release history Release notifications | RSS feed

This release

0.4.0 This release

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.0

1 release file

0.1.3

1 release file

0.1.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page