Skip to main content

vulkro-sf org event-monitoring

Checks the live org's Event Monitoring log files for signs of data theft, brute force and abuse. Needs Salesforce Shield Event Monitoring; without it, the command says the add-on is missing.

vulkro-sf org event-monitoring --target-org <alias>
vulkro-sf org event-monitoring -o <alias> --since-days 30 --format json
FindingSeverityMeaning
SF-EVENT-MON-001HighA Bulk API job processed more than 50,000 records.
SF-EVENT-MON-002HighA non-admin user ran more than 1,000 deletes.
SF-EVENT-MON-003MediumA report was exported outside 06:00 to 22:00 UTC.
SF-EVENT-MON-004HighMore than 10 failed logins for one user.
SF-EVENT-MON-005MediumAn Apex run took more than 10 seconds.
SF-EVENT-MON-006MediumMore than 5 unexpected Apex exceptions.
SF-EVENT-MON-007HighA guest user touched more than 100 records.
SF-EVENT-MON-008HighMore than 5,000 API requests from one user.
SF-EVENT-MON-009HighMore than 10 related error events (Apex, API and Lightning).

--since-days <n> sets the lookback window (default 7, or VULKRO_SF_EVENT_MON_SINCE_DAYS).

It reads log file summary rows, not each event. A big Bulk API job is often a scheduled load.

See also: Event Monitoring detectors, org audit-trail.

Command reference​

Generated from vulkro-sf org event-monitoring --help (vulkro-sf 0.33.0). Run scripts/gen-docs.sh in the product repository to refresh it; do not edit this section by hand.

Audit Salesforce Shield Event Monitoring log files for anomaly patterns (SF-EVENT-MON-001 through -009 and -019 through -024).

vulkro-sf org event-monitoring [OPTIONS] --target-org <TARGET_ORG>

Options​

FlagDescription
-t, --target-org <TARGET_ORG>Target org alias or username, as known to sf org login
-f, --format <FORMAT>Output format: table or json. Default: table.
--since-days <SINCE_DAYS>Lookback window in days. Overrides VULKRO_SF_EVENT_MON_SINCE_DAYS (which is consulted when this flag is absent). Default is 7 days.
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help (see a summary with '-h')
Full vulkro-sf org event-monitoring --help
Audit Salesforce Shield Event Monitoring log files for anomaly patterns (SF-EVENT-MON-001 through -009 and -019 through -024).

Queries the Tooling-API EventLogFile object over the lookback window set by `--since-days` (default 7; env override `VULKRO_SF_EVENT_MON_SINCE_DAYS`) and runs the [`posture::audit_event_log_files`] rule pack over the metadata rows. Fifteen rules fire:

SF-EVENT-MON-001 High event-monitoring-bulk-api-mass-exfil A BulkApi event log row whose RecordsProcessed exceeds 50,000 in a single job (canonical mass-exfil bar). SF-EVENT-MON-002 High event-monitoring-mass-delete-bulk-api A BulkApiResult / ApiTotalUsage row showing more than 1,000 DELETE operations from a non-admin user. SF-EVENT-MON-003 Medium event-monitoring-data-export-after-hours A ReportExport event whose LogDate UTC hour is outside 06:00-22:00. SF-EVENT-MON-004 High event-monitoring-failed-login-burst More than 10 failed Login rows for one user: a brute-force burst. SF-EVENT-MON-005 Medium event-monitoring-slow-soql An ApexExecution whose RUN_TIME exceeds 10,000 ms: a slow / abusive transaction. SF-EVENT-MON-006 Medium event-monitoring-exception-storm More than 5 ApexUnexpectedException rows. SF-EVENT-MON-007 High event-monitoring-guest-user-abuse A Guest user touching more than 100 records: a public-site data leak. SF-EVENT-MON-008 High event-monitoring-api-burst-anomaly More than 5,000 API-family request rows (Api / RestApi / ApexRest / ApexSoap / ApexCallout) for one user. SF-EVENT-MON-009 High event-monitoring-api-error-storm More than 10 correlated error events (ApexUnexpectedException + ApiErrorResponse + LightningError). SF-EVENT-MON-019 High event-monitoring-visualforce-render-exfil A VisualforceRequest response larger than 5,000,000 bytes (render-and-scrape exfil). SF-EVENT-MON-020 High event-monitoring-content-share-burst More than 25 public content shares for one user. SF-EVENT-MON-021 High event-monitoring-analytics-export-exfil More than 100,000 CRM Analytics rows downloaded by one user. SF-EVENT-MON-022 Medium event-monitoring-async-failure-storm More than 10 failed async jobs. SF-EVENT-MON-023 Medium event-monitoring-search-scraping-burst More than 1,000 global searches for one user. SF-EVENT-MON-024 High event-monitoring-cross-org-callout-egress More than 500 cross-org / external callouts for one user. SF-EVENT-MON-030 Low event-monitoring-key-log-types-missing Event Monitoring is licensed but the Login, AuraRequest or API / RestApi log has no file in the last 7 days. Every missing key type (also BulkApi and ReportExport) is listed as "not checked" with the detections it blinds.

Shield Event Monitoring is a paid Salesforce add-on. When the org does not license it, the EventLogFile object is not queryable; the handler detects the `INVALID_TYPE` error, names the add-on, and reports the section as NOT CHECKED (exit 0, no findings, but never presented as a clean org).

Note: v1 audits only the EventLogFile metadata row (EventType, LogDate, LogFileLength, and the augmented per-row fields). Streaming the LogFile CSV for richer per-event correlation is deferred to a follow-up.

Environment:

VULKRO_SF_EVENT_MON_SINCE_DAYS Lookback window (days). Default 7. Overridden by --since-days.

Exit codes: 0 = no findings; 1 = findings reported; 2 = error.

Usage: vulkro-sf org event-monitoring [OPTIONS] --target-org <TARGET_ORG>

Options:
-t, --target-org <TARGET_ORG>
Target org alias or username, as known to `sf org login`

-f, --format <FORMAT>
Output format: table or json

[default: table]

--since-days <SINCE_DAYS>
Lookback window in days. Overrides `VULKRO_SF_EVENT_MON_SINCE_DAYS` (which is consulted when this flag is absent). Default is 7 days

-v, --verbose...
Bump stderr log verbosity. `-v` enables debug-level tracing for the `vulkro` + `vulkro_sf` targets; `-vv` enables trace. Honoured only when `RUST_LOG` is unset (an explicit `RUST_LOG` always wins)

-q, --quiet
Print only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged

--no-color
Turn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb

-h, --help
Print help (see a summary with '-h')