datasecops-cli 0.5.3__tar.gz → 0.5.5__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.
Files changed (56) hide show
  1. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/CHANGELOG.md +15 -0
  2. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/PKG-INFO +1 -1
  3. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/mcp-servers.json +2 -2
  4. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/pyproject.toml +1 -1
  5. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/main.py +8 -5
  6. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/services/download_service.py +2 -0
  7. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/utilities/mcp.py +9 -1
  8. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_mcp/server.py +7 -5
  9. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/.github/workflows/auto-tag.yml +0 -0
  10. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/.github/workflows/publish-cli.yml +0 -0
  11. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/.github/workflows/test.yml +0 -0
  12. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/.gitignore +0 -0
  13. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/DEVELOPMENT.md +0 -0
  14. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/LICENSE +0 -0
  15. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/README.md +0 -0
  16. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/docs/getting-started.md +0 -0
  17. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/docs/git-operations.md +0 -0
  18. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/docs/legacy.md +0 -0
  19. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/docs/legacy_plan_of_action.md +0 -0
  20. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/docs/mcp-server.md +0 -0
  21. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/setup.ps1 +0 -0
  22. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/setup.sh +0 -0
  23. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/__init__.py +0 -0
  24. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/config.py +0 -0
  25. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/menus/__init__.py +0 -0
  26. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/menus/configuration.py +0 -0
  27. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/menus/development.py +0 -0
  28. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/menus/downloads.py +0 -0
  29. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/menus/git_operations.py +0 -0
  30. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/models/__init__.py +0 -0
  31. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/models/git_helpers.py +0 -0
  32. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/models/project_config.py +0 -0
  33. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/services/__init__.py +0 -0
  34. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/services/bootstrap_service.py +0 -0
  35. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/services/dbt_project_generator.py +0 -0
  36. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/services/dbt_runner.py +0 -0
  37. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/services/directory_scaffolder.py +0 -0
  38. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/services/git_service.py +0 -0
  39. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/services/linting_service.py +0 -0
  40. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/services/skill_service.py +0 -0
  41. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/services/snowflake_service.py +0 -0
  42. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/services/upstream_service.py +0 -0
  43. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/utilities/__init__.py +0 -0
  44. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/utilities/display.py +0 -0
  45. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/utilities/file_utils.py +0 -0
  46. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_cli/utilities/yaml_utils.py +0 -0
  47. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_mcp/__init__.py +0 -0
  48. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_mcp/__main__.py +0 -0
  49. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/src/datasecops_mcp/connection.py +0 -0
  50. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/tests/__init__.py +0 -0
  51. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/tests/test_config.py +0 -0
  52. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/tests/test_file_utils.py +0 -0
  53. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/tests/test_main.py +0 -0
  54. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/tests/test_models.py +0 -0
  55. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/tests/test_version.py +0 -0
  56. {datasecops_cli-0.5.3 → datasecops_cli-0.5.5}/tests/test_yaml_utils.py +0 -0
@@ -2,6 +2,21 @@
2
2
 
3
3
  All notable changes to the DataSecOps CLI are documented in this file.
4
4
 
5
+ ## [0.5.5] - 2026-06-19
6
+
7
+ ### Fixed
8
+
9
+ - **AzureDevOps pipelines download to correct folder** — `download_pipelines` now writes AzureDevOps pipeline files to `.azuredevops/workflows/` instead of the project root, matching the platform convention (similar to how GitHub pipelines are written to `.github/workflows/`).
10
+ - **MCP server setup recognises all AzureDevOps platform variants** — the initial setup flow in `main.py` now uses case-insensitive matching for the platform name (`"AzureDevOps"` and `"Azure DevOps"` both work), consistent with the menu paths.
11
+ - **Cortex Code MCP server uses absolute venv path** — the `datasecops-framework` MCP server entry in `.snowflake/cortex/mcp.json` now uses the absolute path to the project's `.venv/Scripts/datasecops-mcp` (Windows) or `.venv/bin/datasecops-mcp` (Unix) instead of the bare `datasecops-mcp` command, fixing "Process exited with code 1" errors in Cortex Code Desktop when the venv isn't on the system PATH.
12
+
13
+ ## [0.5.4] - 2026-06-05
14
+
15
+ ### Changed
16
+
17
+ - **`get_linting_rules` returns `.sqlfluff` INI format** — the MCP tool now returns the rendered `.sqlfluff` config file content (INI format) instead of raw JSON, matching what `get_sqlfluff_config` returns and what SQLFluff actually consumes. Returns an empty string (not a prose message) when no config is found, so callers can reliably detect the empty case.
18
+ - **MCP server uses project `.venv`** — `mcp-servers.json` now points `command` to `${PROJECT_DIR}/.venv/${VENV_BIN:-bin}/datasecops-mcp`, defaulting to `bin` (Unix) with `VENV_BIN=Scripts` for Windows, making the config cross-platform.
19
+
5
20
  ## [0.5.3] - 2026-06-05
6
21
 
7
22
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datasecops-cli
3
- Version: 0.5.3
3
+ Version: 0.5.5
4
4
  Summary: DataSecOps Framework CLI for Snowflake Native App
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -2,9 +2,9 @@
2
2
  "mcpServers": {
3
3
  "datasecops-framework": {
4
4
  "type": "stdio",
5
- "command": "datasecops-mcp",
5
+ "command": "${PROJECT_DIR}/.venv/${VENV_BIN:-bin}/datasecops-mcp",
6
6
  "args": ["--connection-name", "<CONNECTION>", "--app-database", "<APP_DB>"],
7
- "description": "DataSecOps Framework governance rules, branching conventions, linting config, and project profiles from your Snowflake Native App"
7
+ "description": "DataSecOps Framework governance rules, branching conventions, linting config, and project profiles from your Snowflake Native App. Set VENV_BIN=Scripts on Windows."
8
8
  },
9
9
  "github": {
10
10
  "type": "stdio",
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "datasecops-cli"
7
- version = "0.5.3"
7
+ version = "0.5.5"
8
8
  description = "DataSecOps Framework CLI for Snowflake Native App"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -316,9 +316,12 @@ def _run_setup(project_dir: Path):
316
316
  info_line("Adding MCP servers to Cortex Code...")
317
317
  mcp_path = project_dir / ".snowflake" / "cortex" / "mcp.json"
318
318
 
319
+ from datasecops_cli.utilities.mcp import _resolve_mcp_command
320
+ mcp_command = _resolve_mcp_command()
321
+
319
322
  servers = {"datasecops-framework": {
320
323
  "type": "stdio",
321
- "command": "datasecops-mcp",
324
+ "command": mcp_command,
322
325
  "args": ["--connection-name", connection_name, "--app-database", app_database],
323
326
  }}
324
327
 
@@ -336,7 +339,7 @@ def _run_setup(project_dir: Path):
336
339
  server_entry["headers"] = {"Authorization": f"Bearer {snowflake_pat}"}
337
340
  servers["datasecops-docs"] = server_entry
338
341
 
339
- if platform_choice == "GitHub":
342
+ if platform_choice.lower() == "github":
340
343
  github_token = get_input_string("Enter your GitHub PAT (or press Enter to skip): ", allow_empty=True)
341
344
  if github_token:
342
345
  servers["github"] = {
@@ -345,7 +348,7 @@ def _run_setup(project_dir: Path):
345
348
  "args": ["-y", "@modelcontextprotocol/server-github"],
346
349
  "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": github_token},
347
350
  }
348
- elif platform_choice == "Azure DevOps":
351
+ elif platform_choice.lower() in ("azuredevops", "azure devops"):
349
352
  azure_org = get_input_string("Enter your Azure DevOps org URL (e.g. https://dev.azure.com/myorg): ")
350
353
  azure_pat = get_input_string("Enter your Azure DevOps PAT (or press Enter to skip): ", allow_empty=True)
351
354
  if azure_pat:
@@ -387,13 +390,13 @@ def _run_setup(project_dir: Path):
387
390
  }
388
391
  info_line("Note: Replace <YOUR_PAT> in datasecops-docs headers with your Snowflake PAT")
389
392
 
390
- if platform_choice == "GitHub":
393
+ if platform_choice.lower() == "github":
391
394
  servers["github"] = {
392
395
  "command": "npx",
393
396
  "args": ["-y", "@modelcontextprotocol/server-github"],
394
397
  "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"},
395
398
  }
396
- elif platform_choice == "Azure DevOps":
399
+ elif platform_choice.lower() in ("azuredevops", "azure devops"):
397
400
  servers["azure-devops"] = {
398
401
  "command": "npx",
399
402
  "args": ["-y", "@tiberriver256/mcp-server-azure-devops"],
@@ -139,6 +139,8 @@ class DownloadService:
139
139
  if filename and yaml_content:
140
140
  if platform.lower() == "github":
141
141
  dest = self.project_dir / ".github" / "workflows" / filename
142
+ elif platform.lower() in ("azuredevops", "azure devops"):
143
+ dest = self.project_dir / ".azuredevops" / "workflows" / filename
142
144
  else:
143
145
  dest = self.project_dir / filename
144
146
  write_file(dest, yaml_content)
@@ -1,12 +1,19 @@
1
1
  """MCP server configuration utilities."""
2
2
 
3
3
  import json
4
+ import sys
4
5
  from pathlib import Path
5
6
 
6
7
  from datasecops_cli.utilities.display import get_input_string, success_line
7
8
  from datasecops_cli.utilities.file_utils import ensure_dir, write_file
8
9
 
9
10
 
11
+ def _resolve_mcp_command() -> str:
12
+ """Resolve the relative path to the datasecops-mcp executable in the project venv."""
13
+ venv_bin = "Scripts" if sys.platform == "win32" else "bin"
14
+ return f".venv/{venv_bin}/datasecops-mcp"
15
+
16
+
10
17
  def build_cortex_mcp_servers(
11
18
  servers: list[str],
12
19
  connection_name: str,
@@ -16,13 +23,14 @@ def build_cortex_mcp_servers(
16
23
 
17
24
  Returns a dict suitable for {"mcpServers": ...} JSON output.
18
25
  """
26
+ mcp_command = _resolve_mcp_command()
19
27
  server_config = {}
20
28
 
21
29
  for server in servers:
22
30
  if server == "datasecops-framework":
23
31
  server_config["datasecops-framework"] = {
24
32
  "type": "stdio",
25
- "command": "datasecops-mcp",
33
+ "command": mcp_command,
26
34
  "args": ["--connection-name", connection_name, "--app-database", app_database],
27
35
  }
28
36
 
@@ -64,16 +64,18 @@ def get_work_items_config() -> str:
64
64
  def get_linting_rules() -> str:
65
65
  """Get the SQLFluff linting rules configured for this project.
66
66
 
67
- Returns the active SQL linting rules including dialect, indentation settings,
68
- and enabled rule codes. Use this when writing or reviewing SQL to ensure
67
+ Returns the .sqlfluff INI config file content (dialect, indentation settings,
68
+ and enabled rule codes). Use this when writing or reviewing SQL to ensure
69
69
  compliance with the team's standards.
70
+
71
+ Returns an empty string if no configuration is found in the native app.
70
72
  """
71
73
  sf = get_snowflake_service()
72
- raw = sf.get_framework_config("SQLFLUFF_RULES")
74
+ raw = sf.get_sqlfluff_config_file()
73
75
  if not raw:
74
- return "No SQLFluff rules found in native app"
76
+ return ""
75
77
 
76
- return json.dumps(raw, indent=2)
78
+ return raw
77
79
 
78
80
 
79
81
  @mcp.tool()
File without changes
File without changes
File without changes
File without changes