Quick Overview
This scheduled workflow inventories your external attack surface from three HTTP APIs, diffs it against a Postgres baseline, and uses OpenAI to generate concise risk notes before routing critical/high alerts to Slack and medium changes to email, with optional compliance emails for out-of-policy cloud assets.
How it works
- Runs every 6 hours on a schedule trigger.
- Queries three HTTP API sources in parallel to collect subdomains, exposed services, and public cloud resources, then merges and normalizes them into a deduplicated asset inventory with stable fingerprints.
- Loads the previous inventory baseline from Postgres and compares it to the current inventory to identify new, changed, and removed assets.
- Classifies each change with a severity score and flags new cloud resources that are outside the allowed provider/region allowlists.
- Uses OpenAI to generate a one-to-two sentence risk triage narrative for each change and attaches it back to the change record.
- Sends a compliance email when an unauthorized cloud footprint is detected, then routes alerts by severity by posting critical/high changes to Slack, emailing medium changes to the security recipients, and logging low/removed changes without notifying.
- Upserts the full current inventory into Postgres as the new baseline so the next run diffs against the latest known state.
Setup
- Provide credentials for the three HTTP Request nodes (header-auth or equivalent) and update the source API URLs and root domains in the configuration values.
- Create a Postgres table for the baseline (for example,
attack_surface_baseline) and add a Postgres credential, then adjust the SELECT and UPSERT queries to match your schema and conflict keys.
- Add an OpenAI credential and set the model name used for risk narratives.
- Add a Slack credential and set the target channel for critical/high alerts.
- Add SMTP credentials for both email nodes and set the security and compliance recipient addresses and sender address.