aipotheosis-labs / aipotheosis-labs/aci

Security: Fail-open in custom instruction violation check — inference failure bypasses guard

オープン 初心者向け
#649 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
4.9k
フォーク
484
PR マージ指標
30日以内にマージされた PR はありません

説明

## Summary

The `check_for_violation()` function in `custom_instructions.py` catches all exceptions from the OpenAI API call and silently lets the request pass. If OpenAI is down, rate-limited, or returns an error, the custom instruction security guard is completely bypassed.

## Impact

During any period where the OpenAI API is unavailable, ALL custom instruction checks are bypassed. An attacker could potentially trigger this by consuming rate limits, or exploit temporary OpenAI outages. Custom instructions are meant to be safety guards for function execution — if they're not reliably enforced, they provide a false sense of security.

## Steps to Reproduce

1. Configure a function with a custom instruction (e.g., "never delete data")
2. Make the OpenAI API unavailable (invalid key, rate limit, or service outage)
3. Execute the function with input that would normally violate the custom instruction
4. Observe that the request passes through without the guard being enforced

## Suggested Fix

Change the exception handler to fail-closed: reject requests when compliance cannot be verified. I have a working patch and can open a PR if the maintainers would like one.

Per the repo's SECURITY.md, I'm reporting this as an issue since private advisory creation requires admin access. Happy to transition to a private advisory if preferred.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start by reading custom_instructions.py, especially check_for_violation(), and review the repository's SECURITY.md for the intended reporting and handling expectations. Trace the exception path from the OpenAI API call and check any existing tests for this guard. Done means requests are rejected when compliance cannot be verified instead of silently passing.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
backend, security
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
静か
明瞭さ
明確に書かれている
初心者へのやさしさ
68/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。