aipotheosis-labs / aipotheosis-labs/aci

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

Ouverte Adaptée aux débutants
#649 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
4.9k
Forks
484
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
backend, security
Type d'issue
Bug
Difficulté
2/5
Temps estimé
1-3 heures
Activité
Calme
Clarté
Clairement spécifiée
Accessibilité débutants
68/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.