litellm/ruff-strict-budget.json
ryan-crabbe-berri 78addb230b
fix(proxy): deny agent access when key and team grants resolve to nothing (#36221)
* fix(proxy): deny when agent grants resolve to nothing

`get_allowed_agents` returned a plain list where the empty value meant both
"this caller was never restricted" and "this caller's grants resolved to
nothing". Downstream read either as allow-all, so a key restricted to one
agent inside a team restricted to another reached every agent on the proxy,
and an access group that resolved to no agents did the same.

Replace it with `resolve_agent_access`, returning a tagged
UnrestrictedAgentAccess | RestrictedAgentAccess. Only a caller with no grant
anywhere is unrestricted; an empty restricted set denies. Access group lookup
failures now propagate to the key/team resolvers so a DB error still fails
open exactly as before, while a group that genuinely resolves to nothing
denies.

* style(proxy): drop redundant comments from the agent access match
2026-08-07 20:44:11 +00:00

368 lines
4.1 KiB
JSON

{
"ANN001": {
"limit": 3121
},
"ANN002": {
"limit": 71
},
"ANN003": {
"limit": 834
},
"ANN201": {
"limit": 2032
},
"ANN202": {
"limit": 865
},
"ANN204": {
"limit": 713
},
"ANN205": {
"limit": 114
},
"ANN206": {
"limit": 133
},
"ANN401": {
"limit": 1630
},
"ASYNC230": {
"limit": 11
},
"B004": {
"limit": 2
},
"B006": {
"limit": 178
},
"B008": {
"limit": 505
},
"B009": {
"limit": 81
},
"B010": {
"limit": 190
},
"B018": {
"limit": 2
},
"B019": {
"limit": 1
},
"B021": {
"limit": 1
},
"B026": {
"limit": 3
},
"B033": {
"limit": 0
},
"BLE001": {
"limit": 2924
},
"C401": {
"limit": 8
},
"C404": {
"limit": 1
},
"C405": {
"limit": 19
},
"C408": {
"limit": 11
},
"C414": {
"limit": 4
},
"C419": {
"limit": 1
},
"C901": {
"limit": 315
},
"D419": {
"limit": 6
},
"DTZ001": {
"limit": 2
},
"DTZ003": {
"limit": 26
},
"DTZ005": {
"limit": 233
},
"DTZ006": {
"limit": 10
},
"DTZ007": {
"limit": 19
},
"DTZ011": {
"limit": 3
},
"EXE001": {
"limit": 4
},
"EXE002": {
"limit": 3
},
"F401": {
"limit": 17
},
"FURB136": {
"limit": 0
},
"FURB168": {
"limit": 0
},
"FURB188": {
"limit": 0
},
"I001": {
"limit": 0
},
"LOG015": {
"limit": 5
},
"N999": {
"limit": 1
},
"PERF102": {
"limit": 27
},
"PERF401": {
"limit": 12
},
"PERF402": {
"limit": 0
},
"PERF403": {
"limit": 34
},
"PIE790": {
"limit": 0
},
"PIE800": {
"limit": 0
},
"PIE804": {
"limit": 18
},
"PIE810": {
"limit": 43
},
"PLC0206": {
"limit": 26
},
"PLC0208": {
"limit": 0
},
"PLC0414": {
"limit": 46
},
"PLR0124": {
"limit": 1
},
"PLR0206": {
"limit": 1
},
"PLR0402": {
"limit": 0
},
"PLR1704": {
"limit": 3
},
"PLR1711": {
"limit": 0
},
"PLR1714": {
"limit": 257
},
"PLR1730": {
"limit": 0
},
"PLR2044": {
"limit": 0
},
"PLW0127": {
"limit": 57
},
"PLW0133": {
"limit": 1
},
"PLW0602": {
"limit": 215
},
"PLW0603": {
"limit": 191
},
"PLW1508": {
"limit": 190
},
"PLW1510": {
"limit": 2
},
"PYI030": {
"limit": 0
},
"PYI036": {
"limit": 3
},
"PYI041": {
"limit": 0
},
"PYI064": {
"limit": 0
},
"RET501": {
"limit": 0
},
"RET504": {
"limit": 177
},
"RUF010": {
"limit": 0
},
"RUF012": {
"limit": 241
},
"RUF015": {
"limit": 8
},
"RUF019": {
"limit": 38
},
"RUF022": {
"limit": 0
},
"RUF023": {
"limit": 0
},
"RUF046": {
"limit": 4
},
"RUF051": {
"limit": 0
},
"RUF059": {
"limit": 67
},
"RUF100": {
"limit": 100
},
"S110": {
"limit": 218
},
"S112": {
"limit": 22
},
"SIM101": {
"limit": 58
},
"SIM102": {
"limit": 322
},
"SIM103": {
"limit": 119
},
"SIM113": {
"limit": 3
},
"SIM114": {
"limit": 0
},
"SIM115": {
"limit": 2
},
"SIM117": {
"limit": 7
},
"SIM118": {
"limit": 0
},
"SIM201": {
"limit": 1
},
"SIM210": {
"limit": 8
},
"SIM211": {
"limit": 1
},
"SIM222": {
"limit": 1
},
"SIM401": {
"limit": 11
},
"TC004": {
"limit": 5
},
"TC005": {
"limit": 0
},
"TID251": {
"limit": 1240
},
"TRY002": {
"limit": 528
},
"TRY004": {
"limit": 96
},
"TRY201": {
"limit": 407
},
"TRY203": {
"limit": 113
},
"TRY300": {
"limit": 860
},
"UP006": {
"limit": 0
},
"UP007": {
"limit": 0
},
"UP008": {
"limit": 0
},
"UP012": {
"limit": 0
},
"UP018": {
"limit": 0
},
"UP024": {
"limit": 0
},
"UP028": {
"limit": 2
},
"UP031": {
"limit": 2
},
"UP032": {
"limit": 0
},
"UP034": {
"limit": 0
},
"UP035": {
"limit": 0
},
"UP036": {
"limit": 1
},
"UP037": {
"limit": 0
},
"UP045": {
"limit": 0
}
}