Skip to content

Conversation

@grokas-splunk
Copy link
Contributor

@grokas-splunk grokas-splunk commented Oct 30, 2025

PAPP-36909

‼️ Do not merge after approval (we are waiting to release)

@grokas-splunk grokas-splunk force-pushed the grokas/PAPP-36909-sdkify_imap branch 4 times, most recently from 183ce35 to ae06f51 Compare November 3, 2025 17:26
@grokas-splunk grokas-splunk force-pushed the grokas/PAPP-36909-sdkify_imap branch 4 times, most recently from 84cfc40 to e6e92fb Compare November 3, 2025 21:47
@grokas-splunk grokas-splunk force-pushed the grokas/PAPP-36909-sdkify_imap branch 8 times, most recently from ff940f6 to 59d56ee Compare November 6, 2025 00:45
@grokas-splunk grokas-splunk force-pushed the grokas/PAPP-36909-sdkify_imap branch from 1a2c738 to b18ad75 Compare November 6, 2025 16:45
@grokas-splunk grokas-splunk force-pushed the grokas/PAPP-36909-sdkify_imap branch from b18ad75 to 3b9a8b7 Compare November 6, 2025 17:34
@grokas-splunk grokas-splunk force-pushed the grokas/PAPP-36909-sdkify_imap branch from bb6b27f to f053287 Compare November 6, 2025 22:01
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this hoisting of app is needed? Just curious

helper = ImapHelper(soar, asset)
helper._connect_to_server()

state = app.actions_manager.ingestion_state
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @sodle-splunk does this actually work, and/or are we in the process of moving this?

Comment on lines +98 to +105
first_run_max_emails: float = AssetField(
required=True,
description="Maximum emails to poll first time for schedule and interval polling",
default=2000.0,
)
max_emails: float = AssetField(
required=True, description="Maximum emails to poll", default=100.0
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These can only be whole numbers, right? So why are they floats instead of ints?

f"Error occurred while deleting state file: {ex!s}"
)

def encrypt_state(self, state, connector=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SDK now handles state encryption and decryption

isinstance(asset_id, str) and asset_id.isalnum() and len(asset_id) <= 128
)

def delete_state(self, connector):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is going to be incompatible with SOAR in the near future, as state is coming off the filesystem

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this script is effectively duplicated across the major email apps. I think we need a ticket to reimplement this functionality inside the SDK, under something like a utils namespace

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would actually probably be best if it was an optional component of the SDK package, since it seems it will bring with it some other dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants