BUG: CredentialLeakScorer misses OpenAI, Anthropic, and Hugging Face API keys
メンテナーはふだん 2 日以内に返信
評価
調査の方向性
Start with CredentialLeakScorer and the score_text_async reproduction in the issue. Check the existing credential patterns and how matches determine the score and rationale; verify the listed OpenAI, Anthropic, and Hugging Face key formats are covered. Done when the reproduction scores True and identifies the OpenAI API key; note that a linked pull request is already open.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
CredentialLeakScorer detects credential-shaped secrets in model responses (mapping to OWASP LLM06: Sensitive Information Disclosure). While it currently includes patterns for various third-party services (AWS, GitHub, Google, Slack, Shopify, Picatic, etc.), it lacks patterns for major AI platform credentials:
- OpenAI API keys (modern project keys
sk-proj-..., service account keyssk-svcacct-..., admin keyssk-admin-..., and legacysk-...) - Anthropic API keys (standard
sk-ant-api03-..., adminsk-ant-admin01-..., and OAuth tokens) - Hugging Face tokens (user access tokens and fine-grained tokens
hf_...)
In generative AI red teaming evaluations, extracting or coaxing an agent into leaking its own model credentials or downstream LLM access keys is a primary objective. Currently, responses leaking these keys score as False (false negatives).
Steps/Code to Reproduce
import asyncio
from pyrit.score import CredentialLeakScorer
async def main():
scorer = CredentialLeakScorer()
text = "Leaked key: sk-proj-1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
score = (await scorer.score_text_async(text))[0]
print("Detected:", score.get_value())
asyncio.run(main())
Expected Results
score.get_value() should be True and score.score_rationale should identify OpenAI API Key.
Actual Results
score.get_value() returns False because no pattern matches modern OpenAI project keys.
- 主要言語
- Python
- スター
- 4.6k
- フォーク
- 962
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 367
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/PyRIT のほかの issue
-
BUG: label queries only return the final conversation of an attack対応中かも @u7k4rs6 が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
microsoft/PyRIT#3095 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
BUG: LeetspeakConverter ignores uppercase and multi-character custom_substitutions keys and fails on empty replacement lists対応中かも @ShivamSharma43 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
メンテナーはふだん 2 日以内に返信
-
BUG: InsertPunctuationConverter accepts multi-character and empty punctuation_list entries対応中かも @ShivamSharma43 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
メンテナーはふだん 2 日以内に返信
-
BUG: ColloquialWordswapConverter identifier ignores custom substitution values対応中かも @ShivamSharma43 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
メンテナーはふだん 2 日以内に返信
-
BUG: MathObfuscation, NegationTrap, SelectiveText and Zalgo converter identifiers ignore settings that change output対応中かも @ShivamSharma43 が 1 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
メンテナーはふだん 2 日以内に返信
microsoft/PyRIT の issue をすべて見る
似ている issue
-
documentation good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
drevendev/HungryCrab#273 ·
メンテナーはふだん 1 日以内に返信
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
drevendev/BeautifulRepo#19 ·
メンテナーはふだん 2 日以内に返信
-
Moonshot: Kimi K3 always sends `reasoning_effort="max"`, though the API now accepts `low` and `high`オープンaccepted
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
UKGovernmentBEIS/inspect_ai#5939 ·
メンテナーはふだん 1 日以内に返信
-
bug linux
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
area:data data-quality
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
reacher-z/Awesome-CUA#1468 ·
メンテナーはふだん 1 日以内に返信