# sublime-security/ics-phishing-toolkit architecture

> Architecture diagram of the GitHub repository sublime-security/ics-phishing-toolkit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sublime-security/ics-phishing-toolkit
- Repository: https://github.com/sublime-security/ics-phishing-toolkit

## Overview

ics-phishing-toolkit remediates calendar events left behind after email security quarantines phishing messages. A standalone stack script fetches remediated messages, extracts iCalendar invitations, and asks the selected calendar provider to find matching events; deletion is configurable and defaults to dry-run. The `src` package also contains reusable provider and common-logic implementations. The README documents all six provider combinations; sampled entrypoints show the composition directly, while some stack implementations are unsampled. No persistent store is indicated.

Main entry points: [`src/common.py`](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/common.py) (Remediation workflow), [`src/calendar_providers/google_workspace.py`](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/calendar_providers/google_workspace.py) (Google event deleter), [`proofpoint-google_workspace.py`](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/proofpoint-google_workspace.py) (Proofpoint + Google), [`src/calendar_providers/microsoft365.py`](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/calendar_providers/microsoft365.py) (Microsoft event deleter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entrypoints["Stack scripts"]
  node_proofpoint_google["Proofpoint + Google"]
  node_proofpoint_ms["Proofpoint + Microsoft"]
  node_mimecast_google["Mimecast + Google"]
  node_mimecast_ms["Mimecast + Microsoft"]
  node_abnormal_google["Abnormal + Google"]
  node_abnormal_ms["Abnormal + Microsoft"]
end

subgraph group_messages["Message providers"]
  node_pp_fetcher["Proofpoint fetcher"]
  node_mimecast_fetcher["Mimecast fetcher<br/>[mimecast.py]"]
  node_abnormal_fetcher["Abnormal fetcher"]
end

subgraph group_processing["Remediation logic"]
  node_common["Remediation workflow<br/>[common.py]"]
  node_invitation["Invitation extraction<br/>[common.py]"]
end

subgraph group_calendars["Calendar providers"]
  node_google_calendar["Google event deleter"]
  node_microsoft_calendar["Microsoft event deleter<br/>[microsoft365.py]"]
end

subgraph group_external["External platforms"]
  node_email_security{{"Email security APIs"}}
  node_google_api{{"Google Calendar API"}}
  node_graph_api{{"Microsoft Graph API"}}
end

node_operator(("Scheduled operator"))

node_operator -->|"runs"| node_proofpoint_google
node_operator -->|"runs"| node_proofpoint_ms
node_operator -->|"runs"| node_mimecast_google
node_operator -->|"runs"| node_mimecast_ms
node_operator -->|"runs"| node_abnormal_google
node_operator -->|"runs"| node_abnormal_ms
node_proofpoint_google -->|"constructs"| node_pp_fetcher
node_proofpoint_google -->|"constructs"| node_google_calendar
node_proofpoint_google -->|"invokes workflow"| node_common
node_abnormal_google -->|"constructs"| node_google_calendar
node_abnormal_google -->|"invokes workflow"| node_common
node_mimecast_google -->|"constructs"| node_google_calendar
node_mimecast_google -->|"invokes workflow"| node_common
node_mimecast_ms -->|"constructs"| node_microsoft_calendar
node_mimecast_ms -->|"invokes workflow"| node_common
node_proofpoint_ms -->|"constructs"| node_microsoft_calendar
node_proofpoint_ms -->|"invokes workflow"| node_common
node_common -.->|"fetches messages"| node_pp_fetcher
node_common -->|"extracts invitations"| node_invitation
node_common -->|"delegates matching"| node_google_calendar
node_common -->|"delegates matching"| node_microsoft_calendar
node_pp_fetcher -->|"queries and downloads"| node_email_security
node_mimecast_fetcher -->|"queries archive"| node_email_security
node_abnormal_fetcher -->|"queries and downloads"| node_email_security
node_google_calendar -->|"searches and deletes"| node_google_api
node_microsoft_calendar -->|"searches and deletes"| node_graph_api

click node_proofpoint_google "https://github.com/sublime-security/ics-phishing-toolkit/blob/main/proofpoint-google_workspace.py"
click node_proofpoint_ms "https://github.com/sublime-security/ics-phishing-toolkit/blob/main/proofpoint-microsoft365.py"
click node_mimecast_google "https://github.com/sublime-security/ics-phishing-toolkit/blob/main/mimecast-google_workspace.py"
click node_mimecast_ms "https://github.com/sublime-security/ics-phishing-toolkit/blob/main/mimecast-microsoft365.py"
click node_abnormal_google "https://github.com/sublime-security/ics-phishing-toolkit/blob/main/abnormal_security-google_workspace.py"
click node_abnormal_ms "https://github.com/sublime-security/ics-phishing-toolkit/blob/main/abnormal_security-microsoft365.md"
click node_pp_fetcher "https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/message_providers/proofpoint_cloud.py"
click node_mimecast_fetcher "https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/message_providers/mimecast.py"
click node_abnormal_fetcher "https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/message_providers/abnormal_security.py"
click node_common "https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/common.py"
click node_invitation "https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/common.py"
click node_google_calendar "https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/calendar_providers/google_workspace.py"
click node_microsoft_calendar "https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/calendar_providers/microsoft365.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_proofpoint_google,node_proofpoint_ms,node_mimecast_google,node_mimecast_ms,node_abnormal_google,node_abnormal_ms toneBlue
class node_pp_fetcher,node_mimecast_fetcher,node_abnormal_fetcher toneAmber
class node_common,node_invitation toneMint
class node_google_calendar,node_microsoft_calendar toneRose
class node_email_security,node_google_api,node_graph_api,node_operator toneIndigo
```

## Components

### Stack scripts

- [Proofpoint + Google](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/proofpoint-google_workspace.py): `proofpoint-google_workspace.py`
- [Proofpoint + Microsoft](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/proofpoint-microsoft365.py): `proofpoint-microsoft365.py`
- [Mimecast + Google](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/mimecast-google_workspace.py): `mimecast-google_workspace.py`
- [Mimecast + Microsoft](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/mimecast-microsoft365.py): `mimecast-microsoft365.py`
- [Abnormal + Google](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/abnormal_security-google_workspace.py): `abnormal_security-google_workspace.py`
- [Abnormal + Microsoft](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/abnormal_security-microsoft365.md): `abnormal_security-microsoft365.md`

### Message providers

- [Proofpoint fetcher](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/message_providers/proofpoint_cloud.py): `src/message_providers/proofpoint_cloud.py`
- [Mimecast fetcher](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/message_providers/mimecast.py): `src/message_providers/mimecast.py`
- [Abnormal fetcher](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/message_providers/abnormal_security.py): `src/message_providers/abnormal_security.py`

### Remediation logic

- [Remediation workflow](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/common.py): `src/common.py`
- [Invitation extraction](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/common.py): `src/common.py`

### Calendar providers

- [Google event deleter](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/calendar_providers/google_workspace.py): `src/calendar_providers/google_workspace.py`
- [Microsoft event deleter](https://github.com/sublime-security/ics-phishing-toolkit/blob/main/src/calendar_providers/microsoft365.py): `src/calendar_providers/microsoft365.py`

### External platforms

- **Email security APIs**
- **Google Calendar API**
- **Microsoft Graph API**

### Other components

- **Scheduled operator**

## Connections

- Scheduled operator → Proofpoint + Google: runs (evidence: `README.md`)
- Scheduled operator → Proofpoint + Microsoft: runs (evidence: `README.md`)
- Scheduled operator → Mimecast + Google: runs (evidence: `README.md`)
- Scheduled operator → Mimecast + Microsoft: runs (evidence: `README.md`)
- Scheduled operator → Abnormal + Google: runs (evidence: `README.md`)
- Scheduled operator → Abnormal + Microsoft: runs (evidence: `README.md`)
- Proofpoint + Google → Proofpoint fetcher: constructs (evidence: `proofpoint-google_workspace.py`)
- Proofpoint + Google → Google event deleter: constructs (evidence: `proofpoint-google_workspace.py`)
- Proofpoint + Google → Remediation workflow: invokes workflow (evidence: `proofpoint-google_workspace.py`)
- Abnormal + Google → Google event deleter: constructs (evidence: `abnormal_security-google_workspace.py`)
- Abnormal + Google → Remediation workflow: invokes workflow (evidence: `abnormal_security-google_workspace.py`)
- Mimecast + Google → Google event deleter: constructs (evidence: `mimecast-google_workspace.py`)
- Mimecast + Google → Remediation workflow: invokes workflow (evidence: `mimecast-google_workspace.py`)
- Mimecast + Microsoft → Microsoft event deleter: constructs (evidence: `mimecast-microsoft365.py`)
- Mimecast + Microsoft → Remediation workflow: invokes workflow (evidence: `mimecast-microsoft365.py`)
- Proofpoint + Microsoft → Microsoft event deleter: constructs (evidence: `proofpoint-microsoft365.py`)
- Proofpoint + Microsoft → Remediation workflow: invokes workflow (evidence: `proofpoint-microsoft365.py`)
- Remediation workflow → Proofpoint fetcher: fetches messages (evidence: `src/message_providers/proofpoint_cloud.py`)
- Remediation workflow → Invitation extraction: extracts invitations (evidence: `src/common.py`)
- Remediation workflow → Google event deleter: delegates matching (evidence: `src/common.py`)
- Remediation workflow → Microsoft event deleter: delegates matching (evidence: `src/common.py`)
- Proofpoint fetcher → Email security APIs: queries and downloads (evidence: `src/message_providers/proofpoint_cloud.py`)
- Mimecast fetcher → Email security APIs: queries archive (evidence: `src/message_providers/mimecast.py`)
- Abnormal fetcher → Email security APIs: queries and downloads (evidence: `src/message_providers/abnormal_security.py`)
- Google event deleter → Google Calendar API: searches and deletes (evidence: `src/calendar_providers/google_workspace.py`)
- Microsoft event deleter → Microsoft Graph API: searches and deletes (evidence: `src/calendar_providers/microsoft365.py`)
