← Back to all products

Databricks Audit Toolkit

$29

Production-ready audit and inventory toolkit for Databricks workspaces. Runs 12 independent audit modules across security, governance, cost, and configuration with consolidated reporting.

39 files
PythonShellMarkdownJSONAzureDatabricksGrafanaGitHub ActionsCI/CDPower BI

Product Preview

Try the interactive reader and demo tools below, or get the full product with all content unlocked.

Interactive Reader (Free Preview) ⚙ Try Demo Tools Download Free Sample

File Structure 39 files

databricks-audit-toolkit/ ├── LICENSE ├── README.md ├── __pycache__/ │ └── config.cpython-312.pyc ├── audits/ │ ├── __init__.py │ ├── a01_catalog_inventory.py │ ├── a02_job_inventory.py │ ├── a03_access_audit.py │ ├── a04_secret_inventory.py │ ├── a05_compute_analysis.py │ ├── a06_security_findings.py │ ├── a07_audit_logs.py │ ├── a08_external_storage.py │ ├── a09_token_inventory.py │ ├── a10_query_history.py │ ├── a11_data_lineage.py │ └── a12_table_permissions.py ├── config.py ├── examples/ │ ├── sample_output.json │ └── scheduling_guide.md ├── free-sample.zip ├── guide/ │ ├── 01_table-of-contents.md │ ├── 02_installation.md │ ├── 03_reports.md │ └── 04_security-considerations.md ├── index.html ├── reports/ │ ├── __init__.py │ ├── html_report.py │ ├── json_report.py │ └── templates/ │ └── audit_report.html ├── requirements.txt ├── run_audit.sh ├── tests/ │ ├── conftest.py │ ├── test_audits.py │ ├── test_config_and_exit.py │ ├── test_reports.py │ └── test_utils.py └── utils.py

Documentation Preview README excerpt

Databricks Audit Toolkit

A comprehensive, production-ready audit and inventory toolkit for Databricks

workspaces. Runs 12 independent audit modules covering security, governance,

compute costs, access control, and data lineage — then generates professional

HTML and JSON reports with risk scores and actionable recommendations.

Built by practitioners who manage large-scale Databricks environments daily.


Table of Contents

  • [Features](#features)
  • [Quick Start](#quick-start)
  • [Prerequisites](#prerequisites)
  • [Installation](#installation)
  • [Configuration](#configuration)
  • [Usage](#usage)
  • [Run All Audits](#run-all-audits)
  • [Run Specific Audits](#run-specific-audits)
  • [Output Formats](#output-formats)
  • [List Available Audits](#list-available-audits)
  • [Audit Modules](#audit-modules)
  • [01 — Catalog Inventory](#01--catalog-inventory)
  • [02 — Job Inventory](#02--job-inventory)
  • [03 — Access Audit](#03--access-audit)
  • [04 — Secret Inventory](#04--secret-inventory)
  • [05 — Compute Analysis](#05--compute-analysis)
  • [06 — Security Findings](#06--security-findings)
  • [07 — Audit Logs](#07--audit-logs)
  • [08 — External Storage](#08--external-storage)
  • [09 — Token Inventory](#09--token-inventory)
  • [10 — Query History](#10--query-history)
  • [11 — Data Lineage](#11--data-lineage)
  • [12 — Table Permissions](#12--table-permissions)
  • [Reports](#reports)
  • [HTML Report](#html-report)
  • [JSON Report](#json-report)
  • [Risk Scoring](#risk-scoring)
  • [Architecture](#architecture)
  • [Project Structure](#project-structure)
  • [BaseAudit Class](#baseaudit-class)
  • [API Client](#api-client)
  • [Finding Severity Levels](#finding-severity-levels)
  • [Customization](#customization)
  • [Adding a Custom Audit](#adding-a-custom-audit)
  • [Adjusting Risk Thresholds](#adjusting-risk-thresholds)
  • [Custom Report Templates](#custom-report-templates)
  • [Scheduling Automated Audits](#scheduling-automated-audits)
  • [Security Considerations](#security-considerations)
  • [Troubleshooting](#troubleshooting)
  • [License](#license)

Features

  • 12 audit modules covering Unity Catalog, access control, secrets, compute,

tokens, query history, data lineage, external storage, and more

... continues with setup instructions, usage examples, and more.

Code Sample .py preview

config.py """ Databricks Audit Toolkit - Central Configuration All credentials are loaded from environment variables. Never hardcode tokens, URLs, or other secrets in source code. Required environment variables: DATABRICKS_HOST - Your workspace URL (e.g., https://your-workspace.cloud.databricks.com) DATABRICKS_TOKEN - Personal access token or service principal token Optional environment variables: DATABRICKS_WAREHOUSE_ID - SQL warehouse ID for query-based audits AUDIT_OUTPUT_DIR - Output directory (default: ./output) AUDIT_LOG_LEVEL - Logging level: DEBUG, INFO, WARNING, ERROR (default: INFO) AUDIT_MAX_RETRIES - Max API retry attempts (default: 3) AUDIT_REQUEST_TIMEOUT - API request timeout in seconds (default: 60) AUDIT_RATE_LIMIT_RPS - Max requests per second (default: 10) """ import os import sys # --------------------------------------------------------------------------- # Credential configuration (always from environment) # --------------------------------------------------------------------------- DATABRICKS_HOST: str = os.environ.get("DATABRICKS_HOST", "").rstrip("/") DATABRICKS_TOKEN: str = os.environ.get("DATABRICKS_TOKEN", "") if not DATABRICKS_HOST: print( "[ERROR] DATABRICKS_HOST environment variable is not set.\n" " Export it before running the toolkit:\n" " export DATABRICKS_HOST='https://your-workspace.cloud.databricks.com'\n" ) sys.exit(1) if not DATABRICKS_TOKEN: print( "[ERROR] DATABRICKS_TOKEN environment variable is not set.\n" " Export it before running the toolkit:\n" " export DATABRICKS_TOKEN='dapi...'\n" ) sys.exit(1) # --------------------------------------------------------------------------- # Optional settings # --------------------------------------------------------------------------- # ... 148 more lines ...