Metadata-Version: 2.5
Name: ai-security-kit
Version: 0.1.0
Summary: BYOK-friendly input and output security utilities for AI applications
Author: AI Security Kit contributors
License: MIT
Keywords: ai,byok,pii,prompt-injection,security
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# AI Security Kit

BYOK (Bring Your Own Key) AI applications向けの、軽量な入力・出力セキュリティ部品です。

## Features

- プロンプトインジェクションのヒューリスティック検知
- メールアドレス・電話番号・クレジットカードらしき値のマスキング
- 出力の長さ制限と危険なツール実行指示の検知
- トークン数を使わない保守的な利用量カウンター
- APIキーを保存・送信しないBYOK設計

## Quick start

```python
from ai_security import SecurityPolicy, protect_input, protect_output

policy = SecurityPolicy(mask_pii=True, block_prompt_injection=True)
safe = protect_input("Ignore previous instructions. Email me at user@example.com", policy)
print(safe.text)       # PIIはマスクされ、危険入力はblockedになる
print(safe.blocked)

answer = protect_output("Here is the answer", policy)
print(answer.text)
```

このパッケージはAIプロバイダーを呼び出しません。OpenAI等のAPIキーは利用者のアプリから各SDKへ渡してください。

## Local development

```bash
python -m pip install -e .
python -m pytest
python -m build
```

これは安全対策の補助部品であり、完全なセキュリティ保証や法令対応を提供するものではありません。
