Skip to content

Commit beab650

Browse files
authored
Release/0.5.0 (#250)
Key Updates: - Fully revamped Lakeview SAT dashboards - New accounts console IP allow list check - Brand new Secret Scanning feature for Databricks Notebooks - Updated documentation and clarification instructions - Bug fixes
1 parent 6a67551 commit beab650

35 files changed

Lines changed: 11066 additions & 277 deletions

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,6 @@ dmypy.json
143143
# Pyre type checker
144144
.pyre/
145145

146-
# DABs Generated Template
147-
dabs/dabs_template/template/tmp
148146

149147
**/.terraform*
150148
**/terraform.tfvars

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SAT: Monitor the Security Health of your Workspaces
1+
# SAT: Monitor the Security Health of Databricks Workspaces
22

33
The **Security Analysis Tool (SAT)** analyzes your Databricks account and workspace configurations, providing recommendations to help you follow Databricks' security best practices.
44

configs/security_best_practices.csv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ id,check_id,category,check,evaluation_value,severity,recommendation,aws,azure,gc
5151
50,GOV-15,Governance,"Enable verbose audit logs (on Azure, diagnostic logs)",-1,Medium,"Enable verbose audit logs (on Azure, diagnostic logs)",1,1,1,1,0,Check workspace-conf for enableVerboseAuditLogs setting,curl -n -X GET 'https://<workspace_url>/api/2.0/preview/workspace-conf?keys=enableVerboseAuditLogs',https://docs.databricks.com/en/admin/account-settings/verbose-logs.html,https://learn.microsoft.com/en-us/azure/databricks/admin/account-settings/verbose-logs,https://docs.gcp.databricks.com/en/admin/account-settings/verbose-logs.html
5252
51,DP-9,Data Protection,FileStore endpoint for HTTPS file serving,-1,Medium,Review and disable FileStore endpoint in admin console workspace settings,1,1,1,1,0,Check workspace-conf for enableFileStoreEndpoint setting,curl -n -X GET 'https://<workspace_url>/api/2.0/preview/workspace-conf?keys=enableFileStoreEndpoint',https://docs.databricks.com/dbfs/filestore.html#filestore,https://learn.microsoft.com/en-us/azure/databricks/dbfs/filestore,https://docs.gcp.databricks.com/dbfs/filestore.html#filestore
5353
53,GOV-16,Governance,Workspace Unity Catalog metastore assignment,-1,Medium,Enable a workspace for Unity Catalog by assigning a Unity Catalog metastore,1,1,1,1,0,Check if current-metastore-assignment has the workspace assigned to metastore_id,curl --netrc -X GET \ https://<workspace_url>/api/2.1/unity-catalog/current-metastore-assignment,https://docs.databricks.com/data-governance/unity-catalog/enable-workspaces.html,https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/enable-workspaces,https://docs.gcp.databricks.com/data-governance/unity-catalog/enable-workspaces.html
54-
54,GOV-17,Governance,Limit the lifetime (expiration) of metastore Delta Sharing recipient token,-1,High,Set the lifetime of Delta Sharing recipient tokens,1,1,1,1,0,Check if delta_sharing_recipient_token_lifetime_in_seconds is set less than 90 days where delta_sharing_scope is INTERNAL_AND_EXTERNAL,curl --netrc -X GET \ https://<workspace_url>/api/2.1/unity-catalog/metastore_summary,https://docs.databricks.com/data-sharing/create-recipient.html#modify-the-recipient-token-lifetime,https://learn.microsoft.com/en-us/azure/databricks/data-sharing/create-recipient#modify-recipient-token-lifetime,https://docs.gcp.databricks.com/data-sharing/create-recipient.html#modify-the-recipient-token-lifetime
54+
54,GOV-17,Governance,Limit the lifetime (expiration) of metastore Delta Sharing recipient token,90,High,Set the lifetime of Delta Sharing recipient tokens,1,1,1,1,0,Check if delta_sharing_recipient_token_lifetime_in_seconds is set to less than configured days where delta_sharing_scope is INTERNAL_AND_EXTERNAL,curl --netrc -X GET \ https://<workspace_url>/api/2.1/unity-catalog/metastore_summary,https://docs.databricks.com/data-sharing/create-recipient.html#modify-the-recipient-token-lifetime,https://learn.microsoft.com/en-us/azure/databricks/data-sharing/create-recipient#modify-recipient-token-lifetime,https://docs.gcp.databricks.com/data-sharing/create-recipient.html#modify-the-recipient-token-lifetime
5555
55,GOV-18,Governance,Delta Sharing IP access lists,-1,Medium,Configure Delta Sharing IP access lists to restrict recipient access to trusted IP addresses,1,1,1,1,0,"Check if ip_access_list is present on share recipients for authentication_type ""TOKEN""",curl --netrc -X GET \ https://<workspace_url>/api/2.1/unity-catalog/recipients,https://docs.databricks.com/data-sharing/access-list.html#use-ip-access-lists-to-restrict-delta-sharing-recipient-access-open-sharing,https://learn.microsoft.com/en-gb/azure/databricks/data-sharing/access-list,https://docs.gcp.databricks.com/data-sharing/create-recipient.html#security-considerations-for-tokens
5656
56,GOV-19,Governance,Delta Sharing token expiration,-1,Medium,Establish a process for rotating credentials Delta sharing token,1,1,1,1,0,"Check if expiration_time on share recipients for tokens for share with authentication_type ""TOKEN""",curl --netrc -X GET \ https://<workspace_url>/api/2.1/unity-catalog/recipients,https://docs.databricks.com/data-sharing/create-recipient.html#security-considerations-for-tokens,https://learn.microsoft.com/en-us/azure/databricks/data-sharing/create-recipient#--security-considerations-for-tokens,https://docs.gcp.databricks.com/data-sharing/access-list.html#security-considerations-for-tokens
5757
57,GOV-20,Governance,Existence of Unity Sharing metastores,-1,Low,Create a Unity Catalog metastore,1,1,1,1,0,Check if securable_type = 'METASTORE' exists in metasores,curl --netrc -X GET \ https://<workspace_url>/api/2.1/unity-catalog/metastores,https://docs.databricks.com/data-governance/unity-catalog/create-metastore.html,https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/create-metastore,https://docs.gcp.databricks.com/data-governance/unity-catalog/create-metastore.html
@@ -74,3 +74,4 @@ id,check_id,category,check,evaluation_value,severity,recommendation,aws,azure,gc
7474
107,GOV-36,Governance,Automatic cluster update,-1,Medium,Ensure that all the clusters in a workspace are periodically updated to the latest host OS image and security updates,1,1,0,1,0,Get the automatic cluster update setting and check the value is set to true,curl --netrc -X GET \ https://<workspace_url>/api/2.0/settings/types/automatic_cluster_update/names/default \ | jq,https://docs.databricks.com/en/admin/clusters/automatic-cluster-update.html,https://learn.microsoft.com/en-us/azure/databricks/admin/clusters/automatic-cluster-update,N/A
7575
108,INFO-39,Informational,Compliance security profile for the workspace,-1,Low,Validate and deploy on a platform that has put in place controls to meet the unique compliance needs of highly regulated industries,1,1,0,1,0,Check if compliance security profile for new workspaces is enabled,curl -n -X GET 'https:///<workspace_url>/api/2.0/settings/types/shield_csp_enablement_ws_db/names/default',https://docs.databricks.com/en/security/privacy/security-profile.html,https://learn.microsoft.com/en-us/azure/databricks/security/privacy/security-profile,N/A
7676
109,INFO-40,Informational,Enhanced security monitoring for the workspace,-1,Low,Validate and deploy on a platform that has put in place controls to meet the unique compliance needs of highly regulated industries,1,1,0,1,0,Check if compliance security profile for new workspaces is enabled,curl -n -X GET 'https:///<workspace_url>api/2.0/settings/types/shield_esm_enablement_ws_db/names/default',https://docs.databricks.com/en/security/privacy/enhanced-security-monitoring.html,https://learn.microsoft.com/en-us/azure/databricks/security/privacy/enhanced-security-monitoring,N/A
77+
110,NS-8,Network Security,IP access lists for account console access,-1,High,Configure IP access lists for the account console to allow users to connect to the account console UI and account-level REST APIs only through a set of approved IP addresses to reduce the risk of account takeover,1,1,1,1,0,Check if ip-access-lists are configured and enabled,curl --netrc -X GET \ https://accounts.cloud.databricks.com/api/2.0/accounts/{account_id}/ip-access-lists,https://docs.databricks.com/security/network/ip-access-list.html#add-an-ip-access-list,https://learn.microsoft.com/en-us/azure/databricks/security/network/front-end/ip-access-list,https://docs.gcp.databricks.com/security/network/ip-access-list.html

configs/trufflehog_detectors.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# TruffleHog Custom Detectors Configuration
2+
# This file contains custom detector definitions for TruffleHog secret scanning
3+
# Used by the SAT (Security Analysis Tool) TruffleHog integration
4+
5+
- name: DapiToken
6+
description: "Databricks DAPI token detector"
7+
keywords:
8+
- dapi
9+
regex:
10+
id: (?i)\b(dapi[a-h0-9]{32})
11+
12+
- name: DkeaToken
13+
description: "Databricks DKEA token detector"
14+
keywords:
15+
- dkea
16+
regex:
17+
id: (?i)\b(dkea[a-h0-9]{32})
18+
19+
- name: DsapiToken
20+
description: "Databricks Databricks Scoped API Token detector"
21+
keywords:
22+
- dsapi
23+
regex:
24+
id: (?i)\b(dsapi[a-h0-9]{32})
25+
26+
- name: DoseToken
27+
description: "Databricks DOSE token detector"
28+
keywords:
29+
- dose
30+
regex:
31+
id: (?i)\b(dose[a-h0-9]{32})
32+
33+
# Configuration settings for TruffleHog scanning
34+
settings:
35+
excluded_detectors:
36+
- DatabricksToken # Exclude built-in Databricks token detector to avoid false positives
37+
38+
scan_options:
39+
no_update: true
40+
json_output: true
41+
42+
rate_limiting:
43+
api_sleep_seconds: 10 # Sleep between API calls to prevent rate limiting
44+
45+
file_paths:
46+
temp_config: "/tmp/trufflehog_config.yaml"
47+
temp_notebooks: "/tmp/notebooks"
48+
results_log: "/tmp/trufflehog_scan_results.json"
49+
50+
search_settings:
51+
page_size: 50
52+
days_back: 1 # Number of days back to search for modified notebooks
53+
# Set to 0 to scan ALL notebooks (no time filter)
54+
# Can be overridden by TIME environment variable (epoch milliseconds)

dabs/dabs_template/template/tmp/resources/sat_driver_job.yml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ resources:
55
tags:
66
Application: SAT
77
schedule:
8-
quartz_cron_expression: "0 0 8 ? * Mon,Wed,Fri"
8+
quartz_cron_expression: "0 0 7 ? * Mon,Wed,Fri"
99
timezone_id: "America/New_York"
1010
tasks:
1111
- task_key: "sat_initializer"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
resources:
2+
jobs:
3+
sat_secrets:
4+
name: "SAT Secrets Scanner"
5+
tags:
6+
Application: SAT
7+
schedule:
8+
quartz_cron_expression: "0 0 8 * * ?"
9+
timezone_id: "America/New_York"
10+
11+
tasks:
12+
- task_key: "secrets_scanner"
13+
14+
{{- if eq .serverless false }}
15+
job_cluster_key: job_cluster
16+
17+
libraries:
18+
- pypi:
19+
package: dbl-sat-sdk
20+
{{- end }}
21+
notebook_task:
22+
notebook_path: "../notebooks/security_analysis_secrets_scanner.py"
23+
24+
{{- if eq .serverless false }}
25+
job_clusters:
26+
- job_cluster_key: job_cluster
27+
new_cluster:
28+
data_security_mode: SINGLE_USER
29+
num_workers: 5
30+
spark_version: {{.latest_lts}}
31+
runtime_engine: "PHOTON"
32+
node_type_id: {{.node_type}}
33+
{{- end }}

dabs/sat/config.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,10 @@ def form():
3030
r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", x
3131
),
3232
),
33-
Confirm(
34-
name="enable_uc",
35-
message="Use Unity Catalog?",
36-
default=lambda x: uc_enabled(client),
37-
ignore=lambda x: not uc_enabled(client),
38-
),
3933
List(
4034
name="catalog",
4135
message="Select catalog",
4236
choices=loading(get_catalogs, client=client),
43-
ignore=lambda x: not x["enable_uc"],
44-
default="hive_metastore",
4537
),
4638
Text(
4739
name="security_analysis_schema",

dashboards/SAT_Dashboard_definition.json

Lines changed: 9407 additions & 1 deletion
Large diffs are not rendered by default.

docs/sat/docs/functionality.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ SAT is typically run daily as an automated workflow within the customer’s envi
3333

3434
* **Detailed failure explanations**, enabling admins to pinpoint, isolate, and remediate issues quickly.
3535

36+
* **Secret scanning**, using TruffleHog to detect exposed credentials and sensitive data in workspace notebooks.
37+
3638
## SAT Insights
3739

3840
Data from all configured workspaces is consolidated and presented through a single-pane SQL Dashboard, which serves as the primary consumption layer for SAT insights. All findings are organized into the following well-defined categories:

docs/sat/docs/installation/terraform/aws.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ terraform apply
6666
* This must be run successfully once. While it can be run multiple times, a single successful run is sufficient.
6767
2. Run "SAT Driver Notebook":
6868
* This notebook can be scheduled to run periodically (e.g., every Monday, Wednesday, and Friday).
69+
3. Run "SAT Secrets Scanner Notebook" (Optional):
70+
* This notebook scans workspace notebooks for exposed secrets using TruffleHog. Can be run on-demand or scheduled based on security requirements.
6971

7072
### Step 7: Access the SAT Dashboard
7173
1. Navigate to the <b>SQL > Dashboard </b> in the left menu from the Databricks workspace.

0 commit comments

Comments
 (0)