Skip to content

Commit 4d87487

Browse files
author
Baur
authored
Merge pull request #7 from ZenGuard-AI/baur/fix
[sdk] add secrets
2 parents 850e35f + e6e0f53 commit 4d87487

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "zenguard"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
description = "Plug-and-play production grade security for GenAI applications"
55
authors = ["ZenGuard Team <hello@zenguard.ai>"]
66
license = "MIT"

tests/e2e_test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ def test_keywords(zenguard: ZenGuard):
4343
response = zenguard.detect(detectors=detectors, prompt=prompt)
4444
assert_successful_response_not_detected(response)
4545

46+
def test_secrets(zenguard: ZenGuard):
47+
prompt = "Simple secrets test"
48+
detectors = [Detector.SECRETS]
49+
response = zenguard.detect(detectors=detectors, prompt=prompt)
50+
assert_successful_response_not_detected(response)
51+
4652

4753
if __name__ == "__main__":
4854
api_key = os.environ.get("ZEN_API_KEY")

zenguard/zenguard.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class Detector(Enum):
2424
ALLOWED_TOPICS = "v1/detect/topics/allowed"
2525
BANNED_TOPICS = "v1/detect/topics/banned"
2626
KEYWORDS = "v1/detect/keywords"
27+
SECRETS = "v1/detect/secrets"
2728

2829

2930
class ZenGuard:

0 commit comments

Comments
 (0)