Commit Graph

7 Commits

Author SHA1 Message Date
Émile Ré
9156d6a16a Add wsl linter and fix
Signed-off-by: Émile Ré <emile@probo.com>
2026-05-20 09:27:28 +04:00
Bryan Frimin
5237e57d27 Revert "Use inline trufflehog:ignore instead of exclude paths file"
This reverts commit f10ecb8210b1176311d9372d1108b91ce8290fd4.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-30 14:18:29 +02:00
Bryan Frimin
7dcc3d21ac Use inline trufflehog:ignore instead of exclude paths file
Inline comments are more targeted than excluding the entire file
from secret scanning. Remove the .trufflehog.yml exclude file and
the --exclude-paths flag from the workflow.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-30 14:18:29 +02:00
Bryan Frimin
4725a1b080 Fix false positives in agent guardrails
Skip empty fingerprints in SystemPromptLeakGuardrail to prevent blank
values from flagging every message. Replace overly broad "sk-" pattern
in SensitiveDataGuardrail with specific LLM provider prefixes
("sk-proj-" for OpenAI, "sk-ant-" for Anthropic) to avoid false
positives on common words like "risk-based" or "task-management".

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-30 14:18:29 +02:00
Bryan Frimin
2f8674471b Fix one-argument-per-line style in prompt injection guardrail
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-30 14:18:29 +02:00
Bryan Frimin
ded859d130 Set temperature to 0 for prompt injection classifier
Deterministic output improves consistency of the safety classifier.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-30 14:18:29 +02:00
Bryan Frimin
ef8402ca93 Add reusable agent guardrails for prompt injection and data leaks
Introduce a pkg/agent/guardrail package with three guardrails that
can be composed into any agent:

- PromptInjectionGuardrail: LLM-based input classifier that detects
  prompt injection attempts before the agent processes them.
- SensitiveDataGuardrail: pattern-based output check for leaked
  tokens, keys, connection strings, and raw SQL.
- SystemPromptLeakGuardrail: configurable output check that detects
  system prompt content in responses using caller-provided
  fingerprints.

The classifier prompt is embedded from a plain text file for easy
review and editing.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-30 14:18:29 +02:00