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-name: 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
Running unit tests
To run all automated tests, invoke:
poetry run pytest
There are also integration tests which are slow and can be skipped by invoking:
poetry run pytest --skip-integration
Metadata
Release files for agent-plugin-builder 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_plugin_builder-0.6.0.tar.gz | 24.4 kB | Without provenance | Details for agent_plugin_builder-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_plugin_builder-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for agent_plugin_builder-0.6.0-py3-none-any.whl |
Total release size: 54.6 kB
Release files / agent_plugin_builder-0.6.0.tar.gz
| Download URL | agent_plugin_builder-0.6.0.tar.gz |
|---|---|
| Size | 24.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c89a73c454e8a4e297429c58e487560f13b32b17d3bfa46d449f385bebe1eb5a
|
|
BLAKE2b-256 checksum How to use checksums |
882dacb11f31d333edc45e76783f70d35ec54802b35a85a477152c7a831a89da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-45-generic
|
Release files / agent_plugin_builder-0.6.0-py3-none-any.whl
| Download URL | agent_plugin_builder-0.6.0-py3-none-any.whl |
|---|---|
| Size | 30.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af3a848623385890af45ae2bf152d696c36b70d7813184e4e88bbceae44c550d
|
|
BLAKE2b-256 checksum How to use checksums |
f7a717a07e6bc07fb5fde612b59300cdb18cf6035ba68cef8e910c892bbd4aa7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-45-generic
|
Security for agent-plugin-builder 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.