genblaze-cli 0.3.6__tar.gz → 0.3.7__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.
@@ -79,3 +79,7 @@ CLAUDE.local.md
79
79
  *.tmp
80
80
  *.bak
81
81
  *.log
82
+ .pre-pr-check/
83
+ pre-pr-check-findings-batch-*.md
84
+ # Node (libs/spec type-generation toolchain)
85
+ node_modules/
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: genblaze-cli
3
- Version: 0.3.6
3
+ Version: 0.3.7
4
4
  Summary: CLI for genblaze manifest operations
5
5
  Project-URL: Homepage, https://github.com/backblaze-labs/genblaze
6
6
  Project-URL: Documentation, https://github.com/backblaze-labs/genblaze#readme
@@ -19,7 +19,7 @@ Classifier: Topic :: Multimedia
19
19
  Classifier: Topic :: Software Development :: Libraries
20
20
  Requires-Python: >=3.11
21
21
  Requires-Dist: click<9,>=8.0
22
- Requires-Dist: genblaze-core<0.4,>=0.3.8
22
+ Requires-Dist: genblaze-core<0.4,>=0.3.9
23
23
  Provides-Extra: dev
24
24
  Requires-Dist: pillow>=10.0; extra == 'dev'
25
25
  Requires-Dist: pytest>=7.0; extra == 'dev'
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "genblaze-cli"
7
- version = "0.3.6"
7
+ version = "0.3.7"
8
8
  description = "CLI for genblaze manifest operations"
9
9
  authors = [{name = "Jeronimo De Leon", email = "jdeleon@backblaze.com"}]
10
10
  readme = "README.md"
@@ -22,7 +22,7 @@ classifiers = [
22
22
  keywords = ["genblaze", "ai", "media", "manifest", "provenance", "c2pa-ready", "genai", "pipeline", "cli", "command-line"]
23
23
 
24
24
  dependencies = [
25
- "genblaze-core>=0.3.8,<0.4",
25
+ "genblaze-core>=0.3.9,<0.4",
26
26
  # <9: bounded-major convention (#61) — caps below the next major so a
27
27
  # future click release can't silently break the CLI at resolve time.
28
28
  "click>=8.0,<9",
@@ -663,3 +663,38 @@ def test_version_label_shows_cli_package() -> None:
663
663
  result = runner.invoke(cli, ["--version"])
664
664
  assert result.exit_code == 0
665
665
  assert "genblaze-cli" in result.output
666
+
667
+
668
+ # --- GHSA-x99g-wcm2-r2v8: hostile identity fields in an untrusted manifest ---
669
+
670
+
671
+ @pytest.mark.parametrize("absolute", [False, True])
672
+ def test_index_rejects_traversing_run_id(tmp_path: Path, absolute: bool) -> None:
673
+ # Both forms land inside tmp_path if unfixed, so a regression is caught
674
+ # without the test itself writing outside its sandbox. Seven ".." climb
675
+ # from runs/<4-level partition> under work/index_out back to tmp_path.
676
+ run_id = str(tmp_path / "escaped") if absolute else "../" * 7 + "escaped"
677
+ manifest_path = _create_manifest_json(tmp_path)
678
+ data = json.loads(manifest_path.read_text(encoding="utf-8"))
679
+ data["run"]["run_id"] = run_id
680
+ manifest_path.write_text(json.dumps(data), encoding="utf-8")
681
+ out_dir = tmp_path / "work" / "index_out"
682
+
683
+ result = CliRunner().invoke(cli, ["index", str(manifest_path), "-o", str(out_dir)])
684
+
685
+ assert result.exit_code != 0
686
+ assert "run_id" in _combined_output(result)
687
+ assert not out_dir.exists()
688
+ assert not list(tmp_path.rglob("escaped*"))
689
+
690
+
691
+ def test_verify_rejects_traversing_step_id(tmp_path: Path) -> None:
692
+ manifest_path = _create_manifest_json(tmp_path)
693
+ data = json.loads(manifest_path.read_text(encoding="utf-8"))
694
+ data["run"]["steps"][0]["step_id"] = "../evil"
695
+ manifest_path.write_text(json.dumps(data), encoding="utf-8")
696
+
697
+ result = CliRunner().invoke(cli, ["verify", str(manifest_path)])
698
+
699
+ assert result.exit_code != 0
700
+ assert "step_id" in _combined_output(result)
File without changes