abrade-cli 0.1.6__tar.gz → 0.1.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.
Files changed (25) hide show
  1. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/PKG-INFO +1 -1
  2. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/pyproject.toml +1 -1
  3. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/pyproject.toml.orig +1 -1
  4. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/verify.py +15 -4
  5. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/README.md +0 -0
  6. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/__init__.py +0 -0
  7. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/auth.py +0 -0
  8. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/canary.py +0 -0
  9. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/ci_trust.py +0 -0
  10. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/cli.py +0 -0
  11. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/config.py +0 -0
  12. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/containment.py +0 -0
  13. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/corpus.py +0 -0
  14. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/data/__init__.py +0 -0
  15. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/data/sample_corpus.yaml +0 -0
  16. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/evaluator.py +0 -0
  17. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/execution.py +0 -0
  18. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/models.py +0 -0
  19. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/report.py +0 -0
  20. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/runner.py +0 -0
  21. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/safeio.py +0 -0
  22. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/storage.py +0 -0
  23. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/tos.py +0 -0
  24. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/upgrade.py +0 -0
  25. {abrade_cli-0.1.6 → abrade_cli-0.1.7}/src/abrade_cli/upstream_errors.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: abrade-cli
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: Abrade's self-hosted CLI — run the same injection suite entirely offline, no SaaS required.
5
5
  Keywords: ai-agents,security-testing,prompt-injection,red-teaming,llm-security
6
6
  Author: Abrade
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "abrade-cli"
3
- version = "0.1.6"
3
+ version = "0.1.7"
4
4
  description = "Abrade's self-hosted CLI — run the same injection suite entirely offline, no SaaS required."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "abrade-cli"
3
- version = "0.1.6"
3
+ version = "0.1.7"
4
4
  description = "Abrade's self-hosted CLI — run the same injection suite entirely offline, no SaaS required."
5
5
  readme = "README.md"
6
6
  # The project, not a personal handle. PyPI renders this as "Author" on
@@ -226,14 +226,25 @@ def _probe(config) -> Check: # noqa: ANN001
226
226
 
227
227
  from abrade_cli.upstream_errors import describe
228
228
 
229
- key = os.environ.get(config.model_key_env, "").strip()
229
+ # The probe is the one check that actually SENDS the credential, so it
230
+ # is the one that most needs the CI trust boundary — and it was reading
231
+ # the repository's choice directly, straight past it. The ABR-007 fix
232
+ # covered `abrade run` and taught `verify` to *report* a refusal while
233
+ # `--probe` went ahead and fired anyway.
234
+ try:
235
+ key_env = resolve_trusted_key_env(config)
236
+ endpoint = resolve_trusted_endpoint(config)
237
+ except UntrustedConfigError as exc:
238
+ return Check("endpoint reachable", Level.FAIL, f"not probed — {exc}")
239
+
240
+ key = os.environ.get(key_env, "").strip()
230
241
  if not key:
231
242
  return Check(
232
243
  "endpoint reachable", Level.FAIL, "cannot probe without a credential"
233
244
  )
234
245
 
235
246
  try:
236
- client = Anthropic(api_key=key, base_url=config.model_endpoint, timeout=30.0)
247
+ client = Anthropic(api_key=key, base_url=endpoint, timeout=30.0)
237
248
  client.messages.create(
238
249
  model=config.model,
239
250
  max_tokens=1,
@@ -243,7 +254,7 @@ def _probe(config) -> Check: # noqa: ANN001
243
254
  return Check(
244
255
  "endpoint reachable",
245
256
  Level.FAIL,
246
- f"HTTP {exc.status_code} from {config.model_endpoint} — "
257
+ f"HTTP {exc.status_code} from {endpoint} — "
247
258
  + (
248
259
  "credential rejected"
249
260
  if exc.status_code in (401, 403)
@@ -260,7 +271,7 @@ def _probe(config) -> Check: # noqa: ANN001
260
271
  return Check(
261
272
  "endpoint reachable",
262
273
  Level.FAIL,
263
- f"contacting {config.model_endpoint}: {describe(exc, secrets=(key,))}",
274
+ f"contacting {endpoint}: {describe(exc, secrets=(key,))}",
264
275
  )
265
276
  return Check("endpoint reachable", Level.OK, "answered a live request")
266
277
 
File without changes