Loop icon
Get icon
Script icon
If icon
SlackIncomingWebhook icon
Set icon
Schedule icon

Find Exposed .git, .env and Database Dumps on Your Websites

Probe your websites daily for exposed .git folders, .env files, cloud keys, SQL dumps and debug pages, confirmed by content, and alert in Slack.

Categories
Infrastructure

A deploy that copies the whole project folder to the web root, a misconfigured CDN rule, or a forgotten debug endpoint can make secrets downloadable by anyone. Scanners on the internet look for these paths within hours. This blueprint looks first, on the sites you own, every day.

It requests a short list of well-known sensitive paths and confirms each finding by its content, so a site that answers 200 to every URL (a soft 404) does not cause false alarms:

Path Severity Confirmed when the response contains
/.git/HEAD, /.git/config critical ref: refs/ or a commit hash; [core]
/.env critical at least two NAME=value lines
/.aws/credentials critical aws_access_key_id
/backup.sql, /dump.sql critical CREATE TABLE or INSERT INTO
/wp-config.php.bak critical DB_PASSWORD
/actuator/env high propertySources (Spring Boot)
/phpinfo.php high the phpinfo() page
/server-status high Apache Server Status
/.DS_Store medium the Bud1 file signature
/ medium a directory listing (Index of /, or Python's Directory listing for /)

It also reports a /.well-known/security.txt whose Expires date has passed (RFC 9116). Each exposure is posted once, and again when it is fixed.

Only audit sites you own or are authorized to test. Requests identify themselves with the kestra-exposure-audit (authorized self-check) user agent, read at most 64 KB, and run two sites at a time.

How it works

For each entry in sites (Loop, two at a time):

  1. load_previous reads the exposures reported at the last run from the Kestra KV store.
  2. probe requests each path and keeps only the confirmed findings.
  3. if_changed skips Slack when nothing changed.
  4. alert_owner posts new exposures, ranked by severity, and fixed ones.
  5. remember_findings stores the findings, after the alert.

A site that cannot be reached at all fails its own iteration, and the errors branch reports it.

Prerequisites

  • A Slack Incoming Webhook.
  • Network access from the Kestra worker to the sites (public sites, or internal ones from an internal worker).

Secrets

  • SLACK_WEBHOOK_URL: Slack Incoming Webhook URL for alerts and failures.

In the open-source edition, secrets are environment variables on the Kestra container, prefixed with SECRET_ and base64-encoded. See how to manage secrets.

Inputs

  • sites (JSON): list of {"url", "owner"} objects. Include every hostname that serves its own files (the main site, docs, marketing pages, admin panels, staging).
  • timeout_seconds (INT, default 10): the timeout per request.

Quick start

  1. Add the Slack secret and replace the example sites with yours.
  2. Execute the flow. Any exposure that exists today is posted.
  3. Enable daily. To add a path, append a line to CHECKS in probe with its content check.

When something is found, block the path at the web server or CDN first, then rotate every secret the file contained, because it may already have been copied.

Outputs

  • {{ outputs.probe.vars }} per iteration: findings (path to description), new, resolved.
  • KV entries exposure_audit_<site>: the exposures already reported.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.