datasecops-cli 0.1.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- datasecops_cli-0.2.1/CHANGELOG.md +92 -0
- datasecops_cli-0.2.1/PKG-INFO +165 -0
- datasecops_cli-0.2.1/README.md +145 -0
- datasecops_cli-0.2.1/docs/getting-started.md +355 -0
- datasecops_cli-0.2.1/docs/mcp-server.md +259 -0
- datasecops_cli-0.2.1/mcp-servers.json +28 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/pyproject.toml +4 -1
- datasecops_cli-0.2.1/setup.ps1 +239 -0
- datasecops_cli-0.2.1/setup.sh +210 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/main.py +78 -4
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/menus/development.py +50 -1
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/menus/downloads.py +20 -3
- datasecops_cli-0.2.1/src/datasecops_cli/services/bootstrap_service.py +140 -0
- datasecops_cli-0.2.1/src/datasecops_cli/services/download_service.py +222 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/services/linting_service.py +34 -1
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/services/snowflake_service.py +3 -0
- datasecops_cli-0.2.1/src/datasecops_mcp/__init__.py +1 -0
- datasecops_cli-0.2.1/src/datasecops_mcp/__main__.py +5 -0
- datasecops_cli-0.2.1/src/datasecops_mcp/connection.py +123 -0
- datasecops_cli-0.2.1/src/datasecops_mcp/server.py +458 -0
- datasecops_cli-0.1.0/PKG-INFO +0 -16
- datasecops_cli-0.1.0/setup.ps1 +0 -98
- datasecops_cli-0.1.0/setup.sh +0 -97
- datasecops_cli-0.1.0/src/datasecops_cli/services/download_service.py +0 -103
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/.github/workflows/publish-cli.yml +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/.gitignore +0 -0
- /datasecops_cli-0.1.0/README.md → /datasecops_cli-0.2.1/DEVELOPMENT.md +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/LICENSE +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/docs/legacy.md +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/docs/legacy_plan_of_action.md +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/__init__.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/config.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/menus/__init__.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/menus/git_operations.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/models/__init__.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/models/git_helpers.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/models/project_config.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/services/__init__.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/services/dbt_runner.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/services/git_service.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/services/skill_service.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/utilities/__init__.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/utilities/display.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/utilities/file_utils.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/src/datasecops_cli/utilities/yaml_utils.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/tests/__init__.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/tests/test_config.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/tests/test_file_utils.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/tests/test_models.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/tests/test_version.py +0 -0
- {datasecops_cli-0.1.0 → datasecops_cli-0.2.1}/tests/test_yaml_utils.py +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the DataSecOps CLI are documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.2.1] - 2026-05-10
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **SQLFluff config now includes `[sqlfluff:templater:dbt]` section** with `project_dir` and `profiles_dir` when downloaded from the framework, eliminating the need for `${DBT_PROFILES_DIR}` environment variable substitution
|
|
10
|
+
- **Auto-download `.sqlfluff` before linting** — the lint menu now automatically downloads the config from the framework if it doesn't exist locally, instead of failing silently or erroring
|
|
11
|
+
- **CI lint action handles missing `.sqlfluffconfig`** — the `tasks/lint-sql` action now only runs `envsubst` if `.sqlfluffconfig` exists, and accepts a pre-generated `.sqlfluff` file directly
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- `download_sqlfluff_config()` accepts an optional `profiles_dir` parameter to embed in the generated config
|
|
16
|
+
- `DevelopmentMenu` and `DownloadsMenu` pass the resolved `profiles_dir` through to the download service
|
|
17
|
+
- `.sqlfluff` no longer needs to be committed to client repos — it is generated on-the-fly from the framework
|
|
18
|
+
|
|
19
|
+
## [0.2.0] - 2026-05-09
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- **MCP Server** — new `datasecops-mcp` server exposes framework governance config to AI coding tools (VS Code, Cursor, Cortex Code, Claude Code)
|
|
24
|
+
- `get_branching_rules` — branch types, naming conventions, ticket requirements
|
|
25
|
+
- `get_linting_rules` — SQLFluff rules from the native app
|
|
26
|
+
- `get_dbt_packages` — approved packages with pinned versions
|
|
27
|
+
- `get_pipeline_config` — CI/CD pipeline templates (GitHub/Azure DevOps)
|
|
28
|
+
- `get_dbt_versions` — mandated dbt and SQLFluff versions
|
|
29
|
+
- `get_project_settings` — project paths, execution mode, targets
|
|
30
|
+
- `get_project_profiles` — all registered dbt projects
|
|
31
|
+
- `get_deployment_targets` — environment targets with roles and warehouses
|
|
32
|
+
- `get_available_skills` — Cortex Code skills metadata
|
|
33
|
+
- `get_default_macros` — default macros for a project profile
|
|
34
|
+
- `validate_branch_name` — validates branch names against framework conventions
|
|
35
|
+
- `get_deployment_workflow` — environment promotion flow
|
|
36
|
+
- `lint_sql` — lint a SQL file using project's SQLFluff config
|
|
37
|
+
- `fix_sql` — auto-fix linting issues in a SQL file
|
|
38
|
+
- `lint_project` — lint or fix all models in the project
|
|
39
|
+
|
|
40
|
+
- **Bootstrap command** — `datasecops bootstrap` sets up a new dbt project in one step:
|
|
41
|
+
1. Runs `dbtf init` and generates `profiles.yml` from framework targets
|
|
42
|
+
2. Downloads default macros for the project profile
|
|
43
|
+
3. Downloads `.sqlfluff` linting configuration
|
|
44
|
+
4. Downloads CI/CD pipeline files (GitHub Actions or Azure DevOps)
|
|
45
|
+
5. Downloads `packages.yml` with approved versions
|
|
46
|
+
6. Runs `dbt deps`
|
|
47
|
+
7. Checks SQLFluff version requirements
|
|
48
|
+
8. Installs Cortex Code skills
|
|
49
|
+
- Also available from main menu as option [4]
|
|
50
|
+
|
|
51
|
+
- **Macro downloads** — new `api.get_macros_for_profile` integration
|
|
52
|
+
- Downloads default macros (e.g., `generate_schema_name`) to `macros/` directory
|
|
53
|
+
- Available in downloads menu as option [4]
|
|
54
|
+
- Included in bootstrap process
|
|
55
|
+
|
|
56
|
+
- **MCP server configuration in setup scripts** — `setup.sh` and `setup.ps1` now:
|
|
57
|
+
- Check for Node.js (needed for GitHub/Azure DevOps MCP servers)
|
|
58
|
+
- Install with MCP support (`datasecops-cli[mcp]`)
|
|
59
|
+
- Optionally install `dbt-mcp`
|
|
60
|
+
- Interactively configure MCP servers for VS Code, Cursor, or Cortex Code
|
|
61
|
+
- Support GitHub and Azure DevOps PAT configuration
|
|
62
|
+
|
|
63
|
+
- **MCP server integration guide** (`mcp-servers.json`) — example config for running framework, dbt, GitHub, and Azure DevOps MCP servers together
|
|
64
|
+
|
|
65
|
+
### Changed
|
|
66
|
+
|
|
67
|
+
- `pyproject.toml` — added `mcp` optional dependency group and `datasecops-mcp` script entry point
|
|
68
|
+
- Main menu now shows option [4] for bootstrap
|
|
69
|
+
- Downloads menu reordered: macros is option [4], skills is [5], new project is [6]
|
|
70
|
+
- Setup scripts install `datasecops-cli[mcp]` by default instead of `datasecops-cli`
|
|
71
|
+
|
|
72
|
+
### Documentation
|
|
73
|
+
|
|
74
|
+
- `docs/getting-started.md` — full setup guide for CLI + MCP servers with VS Code, Cursor, Cortex Code
|
|
75
|
+
- `docs/mcp-server.md` — MCP server reference with tool documentation, architecture, and usage examples
|
|
76
|
+
- `README.md` — updated with MCP server section, recommended server stack, and new documentation links
|
|
77
|
+
|
|
78
|
+
## [0.1.0] - 2025-03-05
|
|
79
|
+
|
|
80
|
+
### Added
|
|
81
|
+
|
|
82
|
+
- Initial release of the DataSecOps CLI
|
|
83
|
+
- Interactive menu-driven interface for dbt development, git operations, and configuration downloads
|
|
84
|
+
- dbt commands via dbt Fusion subprocess (run, build, test, lint, compile, snapshot, freshness, docs, seed, deps, clean, debug, list, retry)
|
|
85
|
+
- Git operations via GitPython (branching, commit, push, pull, rebase, squash, deploy, cherry-pick)
|
|
86
|
+
- Configuration downloads from native app (SQLFluff rules, CI/CD pipelines, dbt packages, Cortex Code skills)
|
|
87
|
+
- Framework-enforced branch naming conventions
|
|
88
|
+
- Environment branch deployment (dev/test/prod)
|
|
89
|
+
- SQLFluff linting with framework-managed rules
|
|
90
|
+
- Snowflake Native App integration via stored procedures
|
|
91
|
+
- Cross-platform support (Windows, Linux, macOS)
|
|
92
|
+
- PyPI distribution with GitHub Actions OIDC publishing
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: datasecops-cli
|
|
3
|
+
Version: 0.2.1
|
|
4
|
+
Summary: DataSecOps Framework CLI for Snowflake Native App
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Requires-Dist: colorama>=0.4
|
|
9
|
+
Requires-Dist: gitpython>=3.1
|
|
10
|
+
Requires-Dist: pydantic>=2.0
|
|
11
|
+
Requires-Dist: pyyaml>=6.0
|
|
12
|
+
Requires-Dist: snowflake-connector-python>=3.0
|
|
13
|
+
Requires-Dist: sqlfluff>=3.0
|
|
14
|
+
Provides-Extra: mcp
|
|
15
|
+
Requires-Dist: mcp>=1.0; extra == 'mcp'
|
|
16
|
+
Provides-Extra: test
|
|
17
|
+
Requires-Dist: pytest-cov>=4.0; extra == 'test'
|
|
18
|
+
Requires-Dist: pytest>=7.0; extra == 'test'
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# DataSecOps CLI
|
|
22
|
+
|
|
23
|
+
A command-line interface for the [Data Engineers DataSecOps Native App](https://app.snowflake.com/marketplace) on Snowflake. Streamlines dbt development, source control workflows, and framework configuration management for teams using the DataSecOps Framework.
|
|
24
|
+
|
|
25
|
+
## What is this?
|
|
26
|
+
|
|
27
|
+
The DataSecOps CLI is the local developer companion to the **Data Engineers DataSecOps Native App** — a Snowflake Native App that provides governance, configuration management, and standardised development workflows for data teams.
|
|
28
|
+
|
|
29
|
+
This CLI connects to the native app and gives developers:
|
|
30
|
+
|
|
31
|
+
- **dbt development commands** — run, build, test, lint, and manage dbt projects via dbt Fusion
|
|
32
|
+
- **Source control operations** — branching, committing, rebasing, and deploying via GitPython with naming conventions enforced by the framework
|
|
33
|
+
- **Configuration downloads** — pull SQLFluff rules, CI/CD pipelines, dbt packages, and Cortex Code skills from the native app to your local project
|
|
34
|
+
- **MCP server** — expose framework governance rules to AI coding assistants (VS Code, Cursor, Cortex Code, Claude Code)
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install datasecops-cli
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
With MCP server support:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install "datasecops-cli[mcp]"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Requires Python 3.10 or later.
|
|
49
|
+
|
|
50
|
+
## Prerequisites
|
|
51
|
+
|
|
52
|
+
- A Snowflake connection configured in `~/.snowflake/connections.toml`
|
|
53
|
+
- The **Data Engineers DataSecOps Native App** installed in your Snowflake account
|
|
54
|
+
- A project profile created in the native app
|
|
55
|
+
|
|
56
|
+
Optional:
|
|
57
|
+
|
|
58
|
+
- **dbt Fusion** (or dbt-core with dbt-snowflake) for dbt commands
|
|
59
|
+
- **Cortex Code** for skill downloads
|
|
60
|
+
- **Node.js 18+** for GitHub/Azure DevOps MCP servers
|
|
61
|
+
|
|
62
|
+
## Quick Start
|
|
63
|
+
|
|
64
|
+
### 1. Run the setup script
|
|
65
|
+
|
|
66
|
+
The setup script creates a virtual environment, installs the CLI, and writes your local configuration.
|
|
67
|
+
|
|
68
|
+
**Linux / macOS:**
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
chmod +x setup.sh && ./setup.sh
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Windows (PowerShell):**
|
|
75
|
+
|
|
76
|
+
```powershell
|
|
77
|
+
.\setup.ps1
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
You'll be prompted for your Snowflake connection name and the native app database name.
|
|
81
|
+
|
|
82
|
+
### 2. Activate the virtual environment and run
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
source .venv/bin/activate # Linux/macOS
|
|
86
|
+
.\.venv\Scripts\Activate.ps1 # Windows
|
|
87
|
+
|
|
88
|
+
datasecops
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Features
|
|
92
|
+
|
|
93
|
+
| Menu | Capabilities |
|
|
94
|
+
|------|-------------|
|
|
95
|
+
| **Development** | dbt run, build, test, lint (SQLFluff), deps, seed, compile, snapshot, freshness, docs |
|
|
96
|
+
| **Git** | Branch create/checkout/delete, commit & push, rebase, squash, deploy to environment branches, cherry-pick |
|
|
97
|
+
| **Downloads** | SQLFluff config, CI/CD pipelines (GitHub Actions / Azure DevOps), dbt packages, Cortex Code skills |
|
|
98
|
+
|
|
99
|
+
## MCP Server
|
|
100
|
+
|
|
101
|
+
The package includes an MCP (Model Context Protocol) server that exposes your framework's governance configuration to AI coding assistants. Instead of static skill files, the MCP server gives AI tools live access to your native app's current rules.
|
|
102
|
+
|
|
103
|
+
### Available Tools
|
|
104
|
+
|
|
105
|
+
| Category | Tools |
|
|
106
|
+
|----------|-------|
|
|
107
|
+
| **Configuration** | `get_branching_rules`, `get_linting_rules`, `get_dbt_packages`, `get_pipeline_config`, `get_dbt_versions` |
|
|
108
|
+
| **Project** | `get_project_settings`, `get_project_profiles`, `get_deployment_targets`, `get_available_skills` |
|
|
109
|
+
| **Linting** | `lint_sql`, `fix_sql`, `lint_project` |
|
|
110
|
+
| **Source Control** | `validate_branch_name`, `get_deployment_workflow` |
|
|
111
|
+
|
|
112
|
+
### Setup for AI Tools
|
|
113
|
+
|
|
114
|
+
**Cortex Code:**
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
cortex mcp add datasecops-framework -- datasecops-mcp
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**VS Code / Cursor** — add to `.vscode/mcp.json` or `.cursor/mcp.json`:
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"mcpServers": {
|
|
125
|
+
"datasecops-framework": {
|
|
126
|
+
"command": "datasecops-mcp",
|
|
127
|
+
"args": []
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Recommended MCP Server Stack
|
|
134
|
+
|
|
135
|
+
For full integration with Snowflake, dbt, and your source control platform, configure these MCP servers alongside the framework server:
|
|
136
|
+
|
|
137
|
+
| Server | Purpose | Install |
|
|
138
|
+
|--------|---------|---------|
|
|
139
|
+
| **datasecops-framework** | Governance rules, linting, branch validation | Included (`datasecops-mcp`) |
|
|
140
|
+
| **dbt** | Lineage, model discovery, codegen, semantic layer | `pip install dbt-mcp` |
|
|
141
|
+
| **GitHub** | PRs, issues, CI checks, releases | `npx -y @modelcontextprotocol/server-github` |
|
|
142
|
+
| **Azure DevOps** | PRs, pipelines, work items, boards | `npx -y @tiberriver256/mcp-server-azure-devops` |
|
|
143
|
+
|
|
144
|
+
See the [Getting Started Guide](docs/getting-started.md) for full configuration instructions for each editor and platform.
|
|
145
|
+
|
|
146
|
+
## Configuration
|
|
147
|
+
|
|
148
|
+
The CLI reads from a `.datasecops.yml` file in your project root (created by the setup script):
|
|
149
|
+
|
|
150
|
+
```yaml
|
|
151
|
+
connection_name: "my_connection"
|
|
152
|
+
app_database: "DATA_ENGINEERS_DATASECOPS_FRAMEWORK"
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Project profiles, linting rules, pipeline templates, and deployment targets are all managed centrally in the native app and pulled down by the CLI.
|
|
156
|
+
|
|
157
|
+
## Documentation
|
|
158
|
+
|
|
159
|
+
- [Getting Started Guide](docs/getting-started.md) — install CLI, configure MCP servers for VS Code/Cursor/Cortex Code with Snowflake, dbt, and GitHub/Azure DevOps
|
|
160
|
+
- [MCP Server Reference](docs/mcp-server.md) — full tool documentation, architecture, and usage examples
|
|
161
|
+
- [Development Guide](DEVELOPMENT.md) — project structure, setup scripts, native app API reference, and publishing details
|
|
162
|
+
|
|
163
|
+
## License
|
|
164
|
+
|
|
165
|
+
MIT
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# DataSecOps CLI
|
|
2
|
+
|
|
3
|
+
A command-line interface for the [Data Engineers DataSecOps Native App](https://app.snowflake.com/marketplace) on Snowflake. Streamlines dbt development, source control workflows, and framework configuration management for teams using the DataSecOps Framework.
|
|
4
|
+
|
|
5
|
+
## What is this?
|
|
6
|
+
|
|
7
|
+
The DataSecOps CLI is the local developer companion to the **Data Engineers DataSecOps Native App** — a Snowflake Native App that provides governance, configuration management, and standardised development workflows for data teams.
|
|
8
|
+
|
|
9
|
+
This CLI connects to the native app and gives developers:
|
|
10
|
+
|
|
11
|
+
- **dbt development commands** — run, build, test, lint, and manage dbt projects via dbt Fusion
|
|
12
|
+
- **Source control operations** — branching, committing, rebasing, and deploying via GitPython with naming conventions enforced by the framework
|
|
13
|
+
- **Configuration downloads** — pull SQLFluff rules, CI/CD pipelines, dbt packages, and Cortex Code skills from the native app to your local project
|
|
14
|
+
- **MCP server** — expose framework governance rules to AI coding assistants (VS Code, Cursor, Cortex Code, Claude Code)
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install datasecops-cli
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
With MCP server support:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install "datasecops-cli[mcp]"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Requires Python 3.10 or later.
|
|
29
|
+
|
|
30
|
+
## Prerequisites
|
|
31
|
+
|
|
32
|
+
- A Snowflake connection configured in `~/.snowflake/connections.toml`
|
|
33
|
+
- The **Data Engineers DataSecOps Native App** installed in your Snowflake account
|
|
34
|
+
- A project profile created in the native app
|
|
35
|
+
|
|
36
|
+
Optional:
|
|
37
|
+
|
|
38
|
+
- **dbt Fusion** (or dbt-core with dbt-snowflake) for dbt commands
|
|
39
|
+
- **Cortex Code** for skill downloads
|
|
40
|
+
- **Node.js 18+** for GitHub/Azure DevOps MCP servers
|
|
41
|
+
|
|
42
|
+
## Quick Start
|
|
43
|
+
|
|
44
|
+
### 1. Run the setup script
|
|
45
|
+
|
|
46
|
+
The setup script creates a virtual environment, installs the CLI, and writes your local configuration.
|
|
47
|
+
|
|
48
|
+
**Linux / macOS:**
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
chmod +x setup.sh && ./setup.sh
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Windows (PowerShell):**
|
|
55
|
+
|
|
56
|
+
```powershell
|
|
57
|
+
.\setup.ps1
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
You'll be prompted for your Snowflake connection name and the native app database name.
|
|
61
|
+
|
|
62
|
+
### 2. Activate the virtual environment and run
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
source .venv/bin/activate # Linux/macOS
|
|
66
|
+
.\.venv\Scripts\Activate.ps1 # Windows
|
|
67
|
+
|
|
68
|
+
datasecops
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Features
|
|
72
|
+
|
|
73
|
+
| Menu | Capabilities |
|
|
74
|
+
|------|-------------|
|
|
75
|
+
| **Development** | dbt run, build, test, lint (SQLFluff), deps, seed, compile, snapshot, freshness, docs |
|
|
76
|
+
| **Git** | Branch create/checkout/delete, commit & push, rebase, squash, deploy to environment branches, cherry-pick |
|
|
77
|
+
| **Downloads** | SQLFluff config, CI/CD pipelines (GitHub Actions / Azure DevOps), dbt packages, Cortex Code skills |
|
|
78
|
+
|
|
79
|
+
## MCP Server
|
|
80
|
+
|
|
81
|
+
The package includes an MCP (Model Context Protocol) server that exposes your framework's governance configuration to AI coding assistants. Instead of static skill files, the MCP server gives AI tools live access to your native app's current rules.
|
|
82
|
+
|
|
83
|
+
### Available Tools
|
|
84
|
+
|
|
85
|
+
| Category | Tools |
|
|
86
|
+
|----------|-------|
|
|
87
|
+
| **Configuration** | `get_branching_rules`, `get_linting_rules`, `get_dbt_packages`, `get_pipeline_config`, `get_dbt_versions` |
|
|
88
|
+
| **Project** | `get_project_settings`, `get_project_profiles`, `get_deployment_targets`, `get_available_skills` |
|
|
89
|
+
| **Linting** | `lint_sql`, `fix_sql`, `lint_project` |
|
|
90
|
+
| **Source Control** | `validate_branch_name`, `get_deployment_workflow` |
|
|
91
|
+
|
|
92
|
+
### Setup for AI Tools
|
|
93
|
+
|
|
94
|
+
**Cortex Code:**
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
cortex mcp add datasecops-framework -- datasecops-mcp
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**VS Code / Cursor** — add to `.vscode/mcp.json` or `.cursor/mcp.json`:
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"mcpServers": {
|
|
105
|
+
"datasecops-framework": {
|
|
106
|
+
"command": "datasecops-mcp",
|
|
107
|
+
"args": []
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Recommended MCP Server Stack
|
|
114
|
+
|
|
115
|
+
For full integration with Snowflake, dbt, and your source control platform, configure these MCP servers alongside the framework server:
|
|
116
|
+
|
|
117
|
+
| Server | Purpose | Install |
|
|
118
|
+
|--------|---------|---------|
|
|
119
|
+
| **datasecops-framework** | Governance rules, linting, branch validation | Included (`datasecops-mcp`) |
|
|
120
|
+
| **dbt** | Lineage, model discovery, codegen, semantic layer | `pip install dbt-mcp` |
|
|
121
|
+
| **GitHub** | PRs, issues, CI checks, releases | `npx -y @modelcontextprotocol/server-github` |
|
|
122
|
+
| **Azure DevOps** | PRs, pipelines, work items, boards | `npx -y @tiberriver256/mcp-server-azure-devops` |
|
|
123
|
+
|
|
124
|
+
See the [Getting Started Guide](docs/getting-started.md) for full configuration instructions for each editor and platform.
|
|
125
|
+
|
|
126
|
+
## Configuration
|
|
127
|
+
|
|
128
|
+
The CLI reads from a `.datasecops.yml` file in your project root (created by the setup script):
|
|
129
|
+
|
|
130
|
+
```yaml
|
|
131
|
+
connection_name: "my_connection"
|
|
132
|
+
app_database: "DATA_ENGINEERS_DATASECOPS_FRAMEWORK"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Project profiles, linting rules, pipeline templates, and deployment targets are all managed centrally in the native app and pulled down by the CLI.
|
|
136
|
+
|
|
137
|
+
## Documentation
|
|
138
|
+
|
|
139
|
+
- [Getting Started Guide](docs/getting-started.md) — install CLI, configure MCP servers for VS Code/Cursor/Cortex Code with Snowflake, dbt, and GitHub/Azure DevOps
|
|
140
|
+
- [MCP Server Reference](docs/mcp-server.md) — full tool documentation, architecture, and usage examples
|
|
141
|
+
- [Development Guide](DEVELOPMENT.md) — project structure, setup scripts, native app API reference, and publishing details
|
|
142
|
+
|
|
143
|
+
## License
|
|
144
|
+
|
|
145
|
+
MIT
|