Skip to content

Define a Plugin repository index schema #3413

Closed

Description

@mssalvatore

Context

Agent plugins will be stored in a repository and made available to the Island at runtime. See https://guardicore.atlassian.net/wiki/spaces/RES/pages/4281794663/Agent+Plugin+Repository for more context, as well as design and implementation details.

Description

Define a pydantic object for the Agent plugin repository's index. Store this object in monkey/common/agent_plugins. Below is a pseudocode suggestion:

{
    "timestamp": int,  # Seconds since the Unix epoch
    "compatible_infection_monkey_version": Union[SemVer, Literal["development"]],
    "plugins": {
        "credentials_collector": {
            "<NAME>": [
                {
                    "name": str,
                    "type": AgentPluginType,
                    "resource_path": PurePosixPath,
                    "sha256": constr(regex=r'[0-9a-fA-F]{64}'),  # req 1.2
                    "description": str,
                    "version": SemVer,  # req 1.3
                    "safe": bool,  # req 1.5
                },
                ...
            ],
            ...
        },
        "exploiter": {
            ...
        },
        "payload": {
            ...
        }
    }
}

Tasks

  • Create the plugin repository index pydantic object in monkey/common/agent_plugins (0d)
    • Plugins with multiple versions should be sorted in ascending order by version number. The pydantic object should enforce this by sorting lists as necessary.

Activity

  1. added this to the v2.3.0 milestone on Jun 8, 2023
  2. cakekoa commented on Jun 13, 2023

    @cakekoa
    Contributor

    Do we want to add a name to the index now, or push off that decision for later?

  3. self-assigned this
    on Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions