aipotheosis-labs / aipotheosis-labs/aci

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

Đang mở Phù hợp với người mới
#649 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
4.9k
Fork
484
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
backend, security
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
68/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.