← Back to scan
File as GitHub Issue repo: openai/openai-python

Push this scan report to openai/openai-python

Click the green button below to open GitHub’s new-issue form, pre-filled with the report title, summary table, top findings, and an embedded score-card image. No authentication needed — you review on GitHub before submitting. Repobility is credited as the scanner.

Embedded score card image

This image will render at the top of the issue body. Hosted on Repobility, refreshes automatically after re-scans.

Repobility score card

Issue title

Workflow uses `secrets.OPENAI_API_KEY` on a `pull_request` trigger

Curate findings to include

Pick exactly which findings appear in the issue body. By default the top 5 are included. Uncheck noise, check what matters.

Top 5 (default)
Severity Rule Title File:line
CRIT MINED019 [MINED019] Ssti Jinja From String: jinja2.Environment().from_string(user_input) — full RC… src/openai/resources/responses/input_it…:88
CRIT MINED107 Missing import: `stat` used but not imported src/openai/resources/uploads/uploads.py:452
CRIT MINED107 Missing import: `string` used but not imported src/openai/_utils/_utils.py:367
CRIT MINED116 Workflow uses `secrets.OPENAI_API_KEY` on a `pull_request` trigger .github/workflows/ci.yml:123
CRIT MINED116 Workflow uses `secrets.OPENAI_API_KEY` on a `pull_request` trigger .github/workflows/ci.yml:119
HIGH MINED004 [MINED004] Weak Crypto: MD5/SHA1/DES/RC4 used for security context (not just checksums). src/openai/types/upload_complete_params…:16
HIGH SEC029 [SEC029] Server-Side Request Forgery (SSRF) — outbound HTTP from user input: Outbound HTT… src/openai/types/beta/threads/image_url…:11
HIGH SEC029 [SEC029] Server-Side Request Forgery (SSRF) — outbound HTTP from user input: Outbound HTT… src/openai/types/beta/chatkit/chatkit_r…:49
HIGH SEC029 [SEC029] Server-Side Request Forgery (SSRF) — outbound HTTP from user input: Outbound HTT… src/openai/__init__.py:227
HIGH MINED006 [MINED006] Overcatch Baseexception: except BaseException: ... — prevents Ctrl+C and Syste… examples/realtime/push_to_talk_app.py:253
HIGH MINED006 [MINED006] Overcatch Baseexception: except BaseException: ... — prevents Ctrl+C and Syste… examples/realtime/audio_util.py:138
HIGH MINED001 [MINED001] Bare Except Pass: except: pass or except Exception: pass — silently swallows e… src/openai/_event_handler.py:44
HIGH MINED001 [MINED001] Bare Except Pass: except: pass or except Exception: pass — silently swallows e… examples/realtime/push_to_talk_app.py:253
HIGH MINED001 [MINED001] Bare Except Pass: except: pass or except Exception: pass — silently swallows e… examples/realtime/audio_util.py:138
HIGH MINED108 `self._aiter_chunks` used but never assigned in __init__ src/openai/_streaming.py:319
HIGH MINED108 `self.decode` used but never assigned in __init__ src/openai/_streaming.py:301
HIGH MINED108 `self._iter_chunks` used but never assigned in __init__ src/openai/_streaming.py:297
HIGH MINED108 `self.retry` used but never assigned in __init__ src/openai/_streaming.py:280
HIGH MINED108 `self.id` used but never assigned in __init__ src/openai/_streaming.py:280
HIGH MINED108 `self.data` used but never assigned in __init__ src/openai/_streaming.py:280
HIGH MINED108 `self.event` used but never assigned in __init__ src/openai/_streaming.py:280
HIGH MINED108 `self.data` used but never assigned in __init__ src/openai/_streaming.py:276
HIGH MINED108 `self.close` used but never assigned in __init__ src/openai/_streaming.py:231
HIGH MINED108 `self._iter_events` used but never assigned in __init__ src/openai/_streaming.py:169
HIGH MINED108 `self.close` used but never assigned in __init__ src/openai/_streaming.py:121
HIGH MINED108 `self._iter_events` used but never assigned in __init__ src/openai/_streaming.py:59
HIGH MINED110 Blocking call `input` inside async function `main` examples/realtime/realtime.py:33
HIGH MINED108 `self.start` used but never assigned in __init__ examples/realtime/audio_util.py:79
HIGH MINED108 `self._get_connection` used but never assigned in __init__ examples/realtime/push_to_talk_app.py:281
HIGH MINED108 `self.query_one` used but never assigned in __init__ examples/realtime/push_to_talk_app.py:262
HIGH MINED108 `self.query_one` used but never assigned in __init__ examples/realtime/push_to_talk_app.py:270
HIGH MINED108 `self.exit` used but never assigned in __init__ examples/realtime/push_to_talk_app.py:266
HIGH MINED108 `self._get_connection` used but never assigned in __init__ examples/realtime/push_to_talk_app.py:245
HIGH MINED108 `self.query_one` used but never assigned in __init__ examples/realtime/push_to_talk_app.py:232
HIGH MINED108 `self.query_one` used but never assigned in __init__ examples/realtime/push_to_talk_app.py:205
HIGH MINED108 `self.query_one` used but never assigned in __init__ examples/realtime/push_to_talk_app.py:178
HIGH MINED108 `self.send_mic_audio` used but never assigned in __init__ examples/realtime/push_to_talk_app.py:154
HIGH MINED108 `self.handle_realtime_connection` used but never assigned in __init__ examples/realtime/push_to_talk_app.py:153
HIGH MINED108 `self.run_worker` used but never assigned in __init__ examples/realtime/push_to_talk_app.py:154
HIGH MINED108 `self.run_worker` used but never assigned in __init__ examples/realtime/push_to_talk_app.py:153
HIGH MINED110 Blocking call `input` inside async function `main` examples/realtime/azure_realtime.py:56
HIGH MINED106 Phantom test coverage: test_pydantic_v1 noxfile.py:5
HIGH MINED118 Dockerfile FROM `mcr.microsoft.com/vscode/devcontainers/python:0-` not pinned by digest .devcontainer/Dockerfile:2
MED SEC127 [SEC127] AI agent stub — TODO: implement / pass placeholder body: Function body left as T… src/openai/_compat.py:228
MED MINED111 Bare except continues silently src/openai/resources/responses/response…:4286
MED MINED111 Bare except continues silently src/openai/resources/responses/response…:3831
MED MINED111 Bare except continues silently src/openai/resources/realtime/realtime.…:897
MED MINED111 Bare except continues silently src/openai/resources/realtime/realtime.…:419
MED MINED111 Bare except continues silently src/openai/_utils/_proxy.py:51
MED MINED111 Bare except continues silently src/openai/_utils/_utils.py:410
MED MINED111 Bare except continues silently src/openai/_base_client.py:424
MED MINED111 Bare except continues silently src/openai/_base_client.py:2182
MED MINED111 Bare except continues silently src/openai/_base_client.py:2175
MED MINED111 Bare except continues silently src/openai/_base_client.py:2168
MED MINED111 Bare except continues silently src/openai/_base_client.py:2103
MED MINED109 Mutable default argument in `delete` (dict) src/openai/_base_client.py:1990
MED MINED109 Mutable default argument in `put` (dict) src/openai/_base_client.py:1964
MED MINED109 Mutable default argument in `patch` (dict) src/openai/_base_client.py:1933
MED MINED109 Mutable default argument in `post` (dict) src/openai/_base_client.py:1905
MED MINED109 Mutable default argument in `post` (dict) src/openai/_base_client.py:1892
MED MINED109 Mutable default argument in `post` (dict) src/openai/_base_client.py:1878
MED MINED109 Mutable default argument in `post` (dict) src/openai/_base_client.py:1865
MED MINED109 Mutable default argument in `get` (dict) src/openai/_base_client.py:1852
MED MINED109 Mutable default argument in `get` (dict) src/openai/_base_client.py:1842
MED MINED109 Mutable default argument in `get` (dict) src/openai/_base_client.py:1831
MED MINED109 Mutable default argument in `get` (dict) src/openai/_base_client.py:1821
MED MINED109 Mutable default argument in `get_api_list` (dict) src/openai/_base_client.py:1407
MED MINED109 Mutable default argument in `delete` (dict) src/openai/_base_client.py:1386
MED MINED109 Mutable default argument in `put` (dict) src/openai/_base_client.py:1360
MED MINED109 Mutable default argument in `patch` (dict) src/openai/_base_client.py:1334
MED MINED109 Mutable default argument in `post` (dict) src/openai/_base_client.py:1306
MED MINED109 Mutable default argument in `post` (dict) src/openai/_base_client.py:1293
MED MINED109 Mutable default argument in `post` (dict) src/openai/_base_client.py:1279
MED MINED109 Mutable default argument in `post` (dict) src/openai/_base_client.py:1266
MED MINED109 Mutable default argument in `get` (dict) src/openai/_base_client.py:1251
MED MINED109 Mutable default argument in `get` (dict) src/openai/_base_client.py:1241
MED MINED109 Mutable default argument in `get` (dict) src/openai/_base_client.py:1230
MED MINED109 Mutable default argument in `get` (dict) src/openai/_base_client.py:1220
MED MINED111 Bare except continues silently src/openai/_models.py:651
MED MINED111 Bare except continues silently src/openai/_models.py:702
MED MINED111 Bare except continues silently src/openai/_models.py:696
MED MINED109 Mutable default argument in `copy` (dict) src/openai/_client.py:1015
MED MINED109 Mutable default argument in `copy` (dict) src/openai/_client.py:509
MED MINED111 Bare except continues silently scripts/utils/ruffen-docs.py:42
MED MINED111 Bare except continues silently examples/image_stream.py:52
MED COMP001 [COMP001] High cognitive complexity: Function `handle_realtime_connection` has cognitive … examples/realtime/push_to_talk_app.py:156
MED COMP001 [COMP001] High cognitive complexity: Function `main` has cognitive complexity 16 (SonarSo… examples/realtime/azure_realtime.py:15
MED DKR007 Docker build context has no .dockerignore .dockerignore
MED AIC001 Parallel implementation file sits beside a canonical file src/openai/types/beta/realtime/transcri…:1
LOW COMP001 [COMP001] High cognitive complexity: Function `send_audio_worker_sounddevice` has cogniti… examples/realtime/audio_util.py:95
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:171
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:170
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:28
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:3
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:61
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:17
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:1
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:166
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:165
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:16
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:40
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:39
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:17
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:25
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:18
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:13
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:20
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:49
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:79
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:8
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:1
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:2
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:5
LOW AIC003 Duplicated implementation block across source files src/openai/resources/admin/organization…:8
LOW AIC003 Duplicated implementation block across source files src/openai/lib/streaming/responses/_res…:53
LOW AIC003 Duplicated implementation block across source files src/openai/lib/streaming/responses/_res…:52
LOW AIC003 Duplicated implementation block across source files src/openai/lib/streaming/chat/_completi…:63
LOW AIC003 Duplicated implementation block across source files src/openai/lib/streaming/_deltas.py:3
LOW AIC003 Duplicated implementation block across source files src/openai/_response.py:8
LOW AIC003 Duplicated implementation block across source files src/openai/_exceptions.py:11
LOW AIC005 Duplicate top-level symbol appears in a patch-style file src/openai/types/beta/realtime/transcri…:1
INFO MINED072 [MINED072] Python Pass Only Class: class Foo: pass — stub waiting to be filled in. src/openai/resources/webhooks/__init__.…:6
INFO MINED072 [MINED072] Python Pass Only Class: class Foo: pass — stub waiting to be filled in. src/openai/_extras/_common.py:20
INFO MINED072 [MINED072] Python Pass Only Class: class Foo: pass — stub waiting to be filled in. src/openai/_exceptions.py:36
INFO MINED049 [MINED049] Print Pii: Logging password/token/email/ssn directly to stdout. examples/responses_input_tokens.py:50
INFO MINED064 [MINED064] Python Input Call: input() blocks for stdin. Inappropriate in services. src/openai/resources/moderations.py:66
INFO MINED064 [MINED064] Python Input Call: input() blocks for stdin. Inappropriate in services. examples/realtime/realtime.py:33
INFO MINED064 [MINED064] Python Input Call: input() blocks for stdin. Inappropriate in services. examples/realtime/azure_realtime.py:56
INFO MINED050 [MINED050] Stub Only Function: Function declared but body is just pass, return None, rais… src/openai/__init__.py:121
INFO MINED050 [MINED050] Stub Only Function: Function declared but body is just pass, return None, rais… examples/realtime/push_to_talk_app.py:254
INFO MINED050 [MINED050] Stub Only Function: Function declared but body is just pass, return None, rais… examples/realtime/audio_util.py:139
Reset to top 5 131 findings available (after auto-suppression of test files + won't-fix)

Issue body (markdown)

## Code-quality scan: `openai/openai-python`

**Score: 87/100 (B+)**  ·  180 findings  ·  scanned 2026-05-24 01:20 UTC  ·  175,616 LOC

| Severity | Count |
|---|---|
| CRITICAL | 5 |
| HIGH | 38 |
| MEDIUM | 46 |
| LOW | 32 |

📊 [Full filterable report](https://repobility.com/scan/b4bd9d3a-a4bb-4865-8249-595ff2477b57/)  ·  ![scorecard](https://repobility.com/scan/b4bd9d3a-a4bb-4865-8249-595ff2477b57/report.png?v=1779585604-s2)

### Top findings

1. **CRITICAL** `MINED019` — Ssti Jinja From String
   `src/openai/resources/responses/input_items.py:88` · CWE-94 · ✓ Repobility
2. **CRITICAL** `MINED107` — Missing import: `stat` used but not imported
   `src/openai/resources/uploads/uploads.py:452` · ✓ Repobility
3. **CRITICAL** `MINED107` — Missing import: `string` used but not imported
   `src/openai/_utils/_utils.py:367` · ✓ Repobility
4. **CRITICAL** `MINED116` — Workflow uses `secrets.OPENAI_API_KEY` on a `pull_request` trigger
   `.github/workflows/ci.yml:123` · ✓ Repobility
5. **CRITICAL** `MINED116` — Workflow uses `secrets.OPENAI_API_KEY` on a `pull_request` trigger
   `.github/workflows/ci.yml:119` · ✓ Repobility

---

_Filed automatically. Close this issue if not useful — we won't refile. Full report: https://repobility.com/scan/b4bd9d3a-a4bb-4865-8249-595ff2477b57/_
Already filed
'openai' is on the known-megaproject org list. These projects use auto-triage bots and established security disclosure channels. Unsolicited automated issues from Repobility would be perceived as AI-generated spam. For security findings, follow the project's SECURITY.md policy. For non-security findings, open a focused PR or community discussion instead.
Already filed
This repo publishes a SECURITY.md policy and the scan contains 3 Critical/High security finding(s). Public issue filing would violate coordinated disclosure. Submit privately via the project's security reporting channel.
Megaproject â high spam risk
Could not determine 'openai/openai-python' star count (GitHub API rate-limited or unreachable). When in doubt about repo size, prefer opening a focused PR or a discussion rather than an issue.
Already filed
80/189 findings (42%) on this scan are already flagged as test-file, won't-fix, or suppressed. The scan is too noisy to file as a single issue. Curate down to specific actionable findings, or address the FP source first.

The button opens GitHubâs new-issue page in a new tab. You will see the title + body pre-filled â review, edit if you want, then click GitHubâs "Submit new issue" button. Repobility never posts anything on your behalf.

For real security findings on big repos: use the project's SECURITY.md or private advisory flow instead of a public issue.