guardicore / monkey

Infection Monkey - An open-source adversary emulation platform
https://www.guardicore.com/infectionmonkey/
GNU General Public License v3.0
6.55k stars 764 forks source link

Extract Agent plugin interface repository #3922

Closed mssalvatore closed 5 months ago

mssalvatore commented 7 months ago

Goal

Extract classes, constants, and functions that make up the agent plugin interface.

Motivation

In order for 3rd-party developers to develop their own plugins efficiently, plugins' dependencies should be installable with pip. Extracting the agent/plugin interface into its own repository as we did with monkeytypes, #3756 helps enable this.

See also #3725.

Details

Resources

ilija-lazoroski commented 6 months ago

extract-monkeyagentplugininterface.zip

This brings us to a somewhat working repo with passing UTs. We decided to abandon for now this as it depends on Utils.

mssalvatore commented 6 months ago

extract-monkeyagentplugininterface.zip

This brings us to a somewhat working repo with passing UTs. We decided to abandon for now this as it depends on Utils.

Not abandon, just postpone.

ilija-lazoroski commented 6 months ago

Yep, poor choice of words.

shreyamalviya commented 6 months ago

extract-monkeyagentplugininterface.zip This brings us to a somewhat working repo with passing UTs. We decided to abandon for now this as it depends on Utils.

Not abandon, just postpone.

Only until we extract the plugin utils repository?

mssalvatore commented 6 months ago

Where sensible, this package should contain interfaces, not concrete implementations. For example, we may want to write an ITCPPortSelector interface for this package and leave the TCPPortSelector implementation in the agent.

ilija-lazoroski commented 5 months ago

extract-monkeyagentplugininterface.zip This brings us to a somewhat working repo with passing UTs. We decided to abandon for now this as it depends on Utils.

Not abandon, just postpone.

Only until we extract the plugin utils repository?

Only until we do #3984

ilija-lazoroski commented 5 months ago

Where sensible, this package should contain interfaces, not concrete implementations. For example, we may want to write an ITCPPortSelector interface for this package and leave the TCPPortSelector implementation in the agent.

We need to do that in this issue?

mssalvatore commented 5 months ago

Where sensible, this package should contain interfaces, not concrete implementations. For example, we may want to write an ITCPPortSelector interface for this package and leave the TCPPortSelector implementation in the agent.

We need to do that in this issue?

Might as well. Otherwise the agent/plugin interface would be improperly defined.

mssalvatore commented 5 months ago

The new repository is at https://github.com/guardicorde/agentpluginapi. The Package is at https://pypi.org/project/monkey-agentpluginapi/