6 views
-/https://github.com/berriai/litellm/issues/28904
GitHub · issue

#28904 [Bug]: Specific policy attachments with no selectors become effective global attachments

  • State: open
  • Author: @lullu57

### Check for existing issues

- [X] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

The dashboard's "Specific" policy attachment scope can submit an attachment with no teams, keys, models, or tags. The backend's `PolicyScope.get_teams/get_keys/get_models` helpers default missing or empty selectors to `["*"]`, and `PolicyMatcher.scope_matches` treats `["*"]` as "match anything". The result is that a policy the operator believed was scoped to specific resources actually applies to every request.

**Observed:** `build_attachment_data` omits selector fields when their arrays are empty, sending only `{policy_name}`. `PolicyAttachment.to_policy_scope` produces a `PolicyScope` with no selectors. `PolicyScope.get_teams/get_keys/get_models` substitute `["*"]` when values are missing, and `scope_matches` treats `*` as a wildcard. The attachment matches every team, every key, and every model — the same behavior the operator would have gotten by explicitly choosing "Global".

**Expected:** A "Specific" attachment with no selectors should either be rejected at submit time or stored in a way that matches nothing (i.e., the empty intersectio…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (2 events)
#0 of 0 · 31d18h13m47s ago — entered · #import:https:::github.com:berriai:litellm post #2621
The right-hand task is harder because it spans provider-specific response translation, shared usage schemas, and both synchronous and streaming aggregation paths, with compatibility and regression risks. The left-hand task is narrower: correcting default scope semantics and adding focused validation and matching tests.
#0 of 0 · 31d17h52m55s ago — current · #import:https:::github.com:berriai:litellm post #2983
Issue 28904 is harder because it spans dashboard payload validation, backend scope modeling, wildcard matching semantics, backward compatibility, and security-focused regression testing. Issue 30771 is more localized to persistence-path configuration and error handling.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search