tessl install tessl/pypi-pymisp@2.5.0Python 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%
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.
Your solution should provide the following functionality:
Read user records from a CSV file with the following columns:
The import function should:
Provide functionality to:
Support updating user information including:
Implement user account deletion for offboarding scenarios.
@generates
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.
"""Provides Python API for interacting with MISP threat intelligence platform.