Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define a Plugin repository index schema #3413

Closed
2 tasks done
mssalvatore opened this issue Jun 8, 2023 · 1 comment · Fixed by #3550
Closed
2 tasks done

Define a Plugin repository index schema #3413

mssalvatore opened this issue Jun 8, 2023 · 1 comment · Fixed by #3550
Assignees
Labels
Complexity: Low Enhancement Issue that describes an enhancement to a current feature. Impact: High Plugins sp/3
Milestone

Comments

@mssalvatore
Copy link
Collaborator

mssalvatore commented Jun 8, 2023

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.
@mssalvatore mssalvatore added Enhancement Issue that describes an enhancement to a current feature. Impact: High Complexity: Low Plugins labels Jun 8, 2023
@mssalvatore mssalvatore added this to the v2.3.0 milestone Jun 8, 2023
@cakekoa
Copy link
Contributor

cakekoa commented Jun 13, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Low Enhancement Issue that describes an enhancement to a current feature. Impact: High Plugins sp/3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants