Skip to content

v0.3.1 — GitHub Action, Pre-commit, Docker API, CrewAI

Choose a tag to compare

@mthamil107 mthamil107 released this 20 Mar 14:10
· 136 commits to main since this release
d93ab01

What's New

GitHub Action

Add prompt injection + PII scanning to any CI/CD pipeline with one YAML file. Posts results as PR comments, configurable threshold, and fail-on-detection policy.

- uses: mthamil107/prompt-shield/.github/actions/prompt-shield-scan@main
  with:
    threshold: '0.7'
    pii-scan: 'true'

Pre-commit Hooks

Scan staged files for injection and PII before every commit.

repos:
  - repo: https://github.com/mthamil107/prompt-shield
    rev: v0.3.1
    hooks:
      - id: prompt-shield-scan
      - id: prompt-shield-pii

Docker + REST API

Production-ready container with 6 REST endpoints.

docker build -t prompt-shield . && docker run -p 8000:8000 prompt-shield
curl -X POST localhost:8000/scan -d '{"text": "ignore instructions"}'

Endpoints: /health, /version, /scan, /pii/scan, /pii/redact, /detectors

CrewAI Integration

PromptShieldCrewAITool and CrewAIGuard with block/flag/monitor modes, PII redaction, and output scanning.

from prompt_shield.integrations.crewai_guard import CrewAIGuard
guard = CrewAIGuard(mode="block", pii_redact=True)

Tests

  • 68 new tests (564 total, all passing)
  • Zero regressions