Skip to main content

Builder for Agent Plugins.

Project description

Agent Plugin Builder

A package which with a help of infectionmonkey/agent-builder and infectionmonkey/plugin-builder Docker images, builds an Agent Plugin archive which can be installed in Monkey Island and used in the simulation over your network.

It uses an Python Docker API client to connect to your local Docker environment and run with the mentioned Docker Images needed docker commands.

Getting started

Installation

Install Agent Plugin Builder with pip install .

Running Agent Plugin Builder

After installation, if pip installed it somewhere in your $PATH Agent Plugin Builder can be started by simply invoking:

build_agent_plugin <PLUGIN_PATH>

where:

Required:
    PLUGIN_PATH: The path where you have the Agent Plugin code.

Optional:
    -b/--build-dir-path: The path where all needed build artifacts will be stored.
    If the directory is not empty, it will delete it using `shutil.rmtree`
    Default: <current_working_directory>/build

    -d/--dist-dir-path: The path where resulting Agent Plugin archive will be stored.
    Default: <current_working_directory>/dist

    -s/--source-dir: The name of the source directory.
    Default: <plugin_name>_<plugin_type>

    -pd/--platform-dependencies: The platform dependencies for the Agent Plugin.
    Options:
    common: All dependencies are packaged once, and shared across all platforms. This
        should only be used if all dependencies are known to be platform-independent.
    separate: Some or all dependencies are platform-dependent, and are therefore packaged
        separately for each supported platform. This is the most reliable option,
        however it results in a larger plugin file, since dependencies are
        duplicated for each platform.
    autodetect: The plugin builder will attempt to detect the best method to use.
    Default: autodetect

    -ver/--verify/--no-verify: Specify whether to verify the plugin's dependencies.
    --verify: Verify the integrity of the plugin's dependencies. (Recommended, default)
    --no-hverify: Do not verify the integrity of the plugin's dependencies. (Not recommended)
    not specified: Same as --verify.

    -v/--verbose: Multiple occurrences increases the logging level of the console logging.
    Example: -v means CRITICAL, -vvvvv means DEBUG.
    Default: if not specific, the logging level will be INFO.

Using Poetry

Alternatively one may use Agent Plugin Builder without installing it by cloning this repository and invoking:

poetry install
poetry run build_agent_plugin <PLUGIN_PATH>

Development

Setting up your development environment

Run the following commands to install the necessary prerequisites:

pip install poetry pre-commit
poetry install
pre-commit install -t pre-commit -t prepare-commit-msg

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

agent_plugin_builder-0.5.0.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

agent_plugin_builder-0.5.0-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

Details for the file agent_plugin_builder-0.5.0.tar.gz.

File metadata

  • Download URL: agent_plugin_builder-0.5.0.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/5.15.0-113-generic

File hashes

Hashes for agent_plugin_builder-0.5.0.tar.gz
Algorithm Hash digest
SHA256 f81b1f55044b01849fa6450a00a0ed11fb15f90585edd2932b8a92a6e0ac2519
MD5 4f9136447d9577a1594858e2b4fafdfe
BLAKE2b-256 f70c4d5909cd4a1a35dfbf48cab996a89a2172a39e09f32dd7abef575d38bca0

See more details on using hashes here.

File details

Details for the file agent_plugin_builder-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_plugin_builder-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da40966e4942db6a355cda51a1d050473fcca0e3cd5073e1056ba3e4eaa0ab71
MD5 7d81decfa73e82f67bc01997c3e48c34
BLAKE2b-256 4ebd9527e73de09072651bb45a3d6b825b902f1c611f9d12bfe11395fc526665

See more details on using hashes here.

Supported by

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