AnalysisType: rule
Filename: box_access_granted.py
RuleID: "Box.Access.Granted"
DisplayName: "Box Access Granted"
Enabled: true
LogTypes:
- Box.Event
Tags:
- Box
Severity: Low
Description: >
A user granted access to their box account to Box technical support from account settings.
Reference: https://support.box.com/hc/en-us/articles/7039943421715-Enabling-and-Disabling-Access-for-Box-Support
Runbook: >
Investigate whether the user purposefully granted access to their account.
SummaryAttributes:
- p_any_ip_addresses
Tests:
- Name: Regular Event
ExpectedResult: false
Log:
{
"type": "event",
"additional_details": '{"key": "value"}',
"created_by":
{
"id": "12345678",
"type": "user",
"login": "cat@example",
"name": "Bob Cat",
},
"event_type": "DELETE",
}
- Name: Access Granted
ExpectedResult: true
Log:
{
"type": "event",
"additional_details": '{"key": "value"}',
"created_by":
{
"id": "12345678",
"type": "user",
"login": "cat@example",
"name": "Bob Cat",
},
"event_type": "ACCESS_GRANTED",
"source":
{
"id": "12345678",
"type": "user",
"login": "user@example",
"name": "Bob Cat",
},
}
# ------ paired body: box_access_granted.py ------
def rule(event):
return event.get("event_type") == "ACCESS_GRANTED"
def title(event):
return (
f"User [{event.deep_get('created_by', 'name', default='<UNKNOWN_USER>')}] granted "
f"access to their account"
)