vesk-cli 0.1.2__tar.gz → 0.1.3__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 (34) hide show
  1. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/PKG-INFO +3 -1
  2. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/README.md +2 -0
  3. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/__init__.py +1 -1
  4. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/config.py +13 -1
  5. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/tests/unit/test_scan.py +6 -0
  6. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/.gitignore +0 -0
  7. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/LICENSE +0 -0
  8. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/NOTICE +0 -0
  9. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/docs/.gitkeep +0 -0
  10. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/examples/.gitkeep +0 -0
  11. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/pyproject.toml +0 -0
  12. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/cli.py +0 -0
  13. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/client.py +0 -0
  14. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/data/.gitkeep +0 -0
  15. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/probes/__init__.py +0 -0
  16. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/probes/base.py +0 -0
  17. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/probes/data/.gitkeep +0 -0
  18. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/probes/data/jailbreak.yaml +0 -0
  19. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/probes/data/pii_leakage.yaml +0 -0
  20. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/probes/data/prompt_injection.yaml +0 -0
  21. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/probes/jailbreak.py +0 -0
  22. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/probes/pii_leakage.py +0 -0
  23. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/probes/prompt_injection.py +0 -0
  24. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/report/__init__.py +0 -0
  25. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/report/model.py +0 -0
  26. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/report/render.py +0 -0
  27. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/report/templates/report.html.j2 +0 -0
  28. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/report/templates/report.md.j2 +0 -0
  29. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/runner.py +0 -0
  30. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/src/vesk/scaffold.py +0 -0
  31. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/tests/integration/test_scan_cli.py +0 -0
  32. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/tests/unit/test_cli.py +0 -0
  33. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/tests/unit/test_init.py +0 -0
  34. {vesk_cli-0.1.2 → vesk_cli-0.1.3}/tests/unit/test_report.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: vesk-cli
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Vesk Verify: test LLM endpoints and produce compliance-mapped reports.
5
5
  Author: Vesk
6
6
  License-Expression: Apache-2.0
@@ -53,6 +53,8 @@ vesk scan # run probes, write results.json
53
53
  vesk report results.json -o report.md
54
54
  ```
55
55
 
56
+ `api_key_env` holds the *name* of an environment variable (e.g. `VESK_API_KEY`), not a file path or the key. vesk does not read `.env` files; export the variable in your shell (or load your `.env` first, e.g. `set -a; . ./.env; set +a`). Omit `api_key_env` if the endpoint needs no key.
57
+
56
58
  ## Commands
57
59
 
58
60
  ### `vesk init`
@@ -22,6 +22,8 @@ vesk scan # run probes, write results.json
22
22
  vesk report results.json -o report.md
23
23
  ```
24
24
 
25
+ `api_key_env` holds the *name* of an environment variable (e.g. `VESK_API_KEY`), not a file path or the key. vesk does not read `.env` files; export the variable in your shell (or load your `.env` first, e.g. `set -a; . ./.env; set +a`). Omit `api_key_env` if the endpoint needs no key.
26
+
25
27
  ## Commands
26
28
 
27
29
  ### `vesk init`
@@ -1,3 +1,3 @@
1
1
  """Vesk Verify: LLM endpoint testing with compliance-mapped reports."""
2
2
 
3
- __version__ = "0.1.2"
3
+ __version__ = "0.1.3"
@@ -56,9 +56,21 @@ class Config(_Strict):
56
56
  name = self.target.api_key_env
57
57
  if not name:
58
58
  return None
59
+ if not name.isidentifier():
60
+ raise ConfigError(
61
+ f"target.api_key_env is {name!r}, which is not an environment variable name. "
62
+ "Set it to the NAME of a variable (for example VESK_API_KEY), not a file or "
63
+ "the key itself, then export that variable: export VESK_API_KEY=<your key>"
64
+ )
59
65
  key = os.environ.get(name)
60
66
  if not key:
61
- raise ConfigError(f"environment variable {name} (target.api_key_env) is not set")
67
+ raise ConfigError(
68
+ f"environment variable {name} is not set or is empty "
69
+ f"(named by target.api_key_env in your config). "
70
+ f"Export it in this shell first: export {name}=<your key>. "
71
+ "vesk does not read .env files. If the endpoint needs no key, "
72
+ "remove api_key_env from the config."
73
+ )
62
74
  return key
63
75
 
64
76
 
@@ -49,6 +49,12 @@ def test_api_key_comes_from_env(tmp_path, monkeypatch):
49
49
  assert cfg.api_key() == "abc"
50
50
 
51
51
 
52
+ def test_api_key_env_must_be_a_variable_name(tmp_path):
53
+ cfg = load_config(write(tmp_path, MINIMAL + " api_key_env: .env\n"))
54
+ with pytest.raises(ConfigError, match="not an environment variable name"):
55
+ cfg.api_key()
56
+
57
+
52
58
  def test_select_probes_unknown(tmp_path):
53
59
  cfg = load_config(write(tmp_path, MINIMAL))
54
60
  with pytest.raises(ConfigError, match="unknown probe"):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes