Skip to content

host_url option to CLI and Databricks validator#11

Open
sean-sinclair wants to merge 3 commits intoadvanced-security:mainfrom
sean-sinclair:databricks
Open

host_url option to CLI and Databricks validator#11
sean-sinclair wants to merge 3 commits intoadvanced-security:mainfrom
sean-sinclair:databricks

Conversation

@sean-sinclair
Copy link

This pull request adds support for validating Databricks Personal Access Tokens, including a new validator, CLI integration, documentation, and comprehensive tests. The main changes are grouped below.

Databricks Token Validation Support:

  • Introduced the DatabricksTokenChecker class in validators/databricks_token.py, which validates Databricks Personal Access Tokens against a specified workspace URL, supporting both CLI flag and environment variable configuration for the host URL.
  • Updated the CLI (cli.py) to accept a new --host-url option, passing it through to validators and ensuring the host URL is available in all relevant commands (check_file, check_github, validate). [1] [2] [3] [4] [5]
  • Modified the Checker base class to accept and handle the host_url parameter, stripping trailing slashes and documenting its usage.

Documentation Updates:

  • Added Databricks token type to the supported secrets table and included example usage and instructions for Databricks token validation in the README.md. [1] [2]

Testing Enhancements:

  • Added tests for the new validator, including host URL configuration, environment variable fallback, and error handling when the host is not set (test_validators.py). Also updated validator metadata tests to include the new Databricks validator. [1] [2] [3]
  • Ensured the new validator is registered and discoverable in the registry tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant