Skip to main content
This guide shows how to ingest SafeDep endpoint Package Guard block events into CrowdStrike SIEM over HEC (HTTP Event Collector). Two block events are ingested:
  • Malicious package blocks (PMG_PACKAGE_ACTION_BLOCKED)
  • Dependency cooldown blocks (PMG_PACKAGE_ACTION_COOLDOWN_BLOCKED)

Prerequisites

  • SafeDep A SafeDep Cloud tenant on the Team plan or higher. See the SafeDep Cloud quickstart.
  • PMG connected to SafeDep Cloud and syncing to your tenant. See Enable cloud sync.
  • The safedep CLI authenticated to your tenant. See Authentication.
  • CrowdStrike CrowdStrike SIEM (Falcon LogScale or Next-Gen SIEM) with an HEC endpoint. For Next-Gen SIEM, set up a HEC data connector.
  • Python 3.8 or later.

Keys and URLs

Collect these before you start:
  • SAFEDEP_TOKEN: a SafeDep Cloud API token. Get it with the safedep CLI:
  • SAFEDEP_TENANT_ID: your SafeDep tenant domain, for example your-company.safedep.io.
  • CROWDSTRIKE_HEC_URL: your CrowdStrike HEC ingest URL, for example https://<your-cloud>/services/collector.
  • CROWDSTRIKE_HEC_TOKEN: your CrowdStrike HEC token.

Run the ingest script

Download the ingest script. Review it before you run it.
Set the environment variables and run the script:
The script polls the SafeDep Cloud API and sends new block events to CrowdStrike. Output:

Ingested Payload

Each block event is sent to CrowdStrike as one HEC record, pretty-printed here but sent as a single line. IDs and endpoint names are placeholders.

Malicious package block

Dependency cooldown block

Cooldown events carry a cooldown object instead of the malware fields:

Notes

  • Token. The token is short-lived. For a long run, refresh SAFEDEP_TOKEN with safedep auth token again before it expires.
  • Cursor. The position is saved to cursor.json next to the script, so a restart resumes where it stopped. Delete cursor.json to re-read from the backfill window.

Environment variables