aipotheosis-labs / aipotheosis-labs/aci
Security: Fail-open in custom instruction violation check — inference failure bypasses guard
- Lenguaje dominante
- Python
- Estrellas
- 4.9k
- Forks
- 484
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
## 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.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.