or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/pymisp@2.5.x
tile.json

tessl/pypi-pymisp

tessl install tessl/pypi-pymisp@2.5.0

Python API for MISP threat intelligence platform enabling programmatic access to MISP instances.

Agent Success

Agent success rate when using this tile

96%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.25x

Baseline

Agent success rate without this tile

77%

task.mdevals/scenario-9/

MISP User Onboarding Automation

Build a user onboarding automation tool that manages analyst accounts in a MISP instance. The tool should handle bulk user creation from a CSV file, update user details, and manage user lifecycle operations.

Requirements

Your solution should provide the following functionality:

CSV User Import

Read user records from a CSV file with the following columns:

  • email (required)
  • organization_id (required, integer)
  • role_id (required, integer)
  • password (optional, defaults to auto-generated secure password)

The import function should:

  • Create users that don't already exist
  • Skip users with emails that already exist in MISP
  • Return a summary of created and skipped users

User Lookup

Provide functionality to:

  • Retrieve a specific user by their ID
  • List all users, optionally filtered by criteria

User Profile Updates

Support updating user information including:

  • Changing a user's password
  • Modifying a user's role assignment

User Deactivation

Implement user account deletion for offboarding scenarios.

Test Cases

  • Importing a CSV with 3 valid user records creates 3 new users @test
  • Importing users with duplicate emails skips existing users without errors @test
  • Retrieving a user by ID returns the correct user details @test
  • Updating a user's password succeeds for valid user IDs @test
  • Deleting a user removes the account from MISP @test

Implementation

@generates

API

def import_users_from_csv(misp_client, csv_filepath: str) -> dict:
    """
    Import users from CSV file into MISP.

    Returns a dict with keys 'created' (list of user IDs) and 'skipped' (list of emails).
    """

def get_user_by_id(misp_client, user_id: int) -> dict:
    """
    Retrieve a user by their ID.

    Returns the user details dict.
    """

def list_all_users(misp_client) -> list:
    """
    List all users in the MISP instance.

    Returns a list of user dicts.
    """

def update_user_password(misp_client, user_id: int, new_password: str) -> dict:
    """
    Update a user's password.

    Returns the updated user details.
    """

def change_user_role(misp_client, user_id: int, new_role_id: int) -> dict:
    """
    Change a user's role assignment.

    Returns the updated user details.
    """

def delete_user_account(misp_client, user_id: int) -> dict:
    """
    Delete a user account.

    Returns the deletion response.
    """

Dependencies { .dependencies }

pymisp { .dependency }

Provides Python API for interacting with MISP threat intelligence platform.