Skip to content

Remove Deprecated Azure Custom Ops#1042

Merged
sayanshaw24 merged 1 commit intomainfrom
sayanshaw/ssrf
Apr 3, 2026
Merged

Remove Deprecated Azure Custom Ops#1042
sayanshaw24 merged 1 commit intomainfrom
sayanshaw/ssrf

Conversation

@sayanshaw24
Copy link
Copy Markdown
Collaborator

Remove deprecated Azure custom operators

Motivation

This PR addresses a security issue: the Azure custom operators (AzureTextToText, AzureAudioToText, OpenAIAudioToText, AzureTritonInvoker) accept user-controlled endpoint URIs and auth tokens, enabling non-blind SSRF from any host running an ONNX Runtime session with these ops loaded. An attacker who controls model inputs can make the host issue authenticated HTTP requests to arbitrary endpoints and read back the full response body.

These operators have been deprecated since v0.12 and are disabled by default (OCOS_ENABLE_AZURE=OFF). They are not shipped in any official packages. Rather than trying to bolt on URL-allowlisting (which would break the operators' core design), we are removing them entirely.

Changes

Deleted:

  • operators/azure/ — all 12 source files (~1,157 lines)
  • cmake/externals/triton.cmake, triton_cmake.patch, curl.cmake
  • test/test_azure_ops.py, test/shared_test/test_ortops_azure.cc, test/data/azure/ (17 test data files)

Edited:

  • CMakeLists.txt — removed OCOS_ENABLE_AZURE option, env-var override, platform exclusion block, source glob, compile definition, and triton/curl/openssl linker block (~120 lines)
  • include/ocos.h — removed CustomAzureStruct macro and ENABLE_AZURE extern
  • shared/lib/ops_registry.cc — removed LoadCustomOpClasses_Azure registration
  • cmake/ext_java.cmake — removed curl/openssl copy block for Android AAR
  • .pyproject/cmdclass.py — removed no_azure build option
  • tools/gen_selectedops.py — removed OCOS_ENABLE_AZURE op mapping
  • tools/test_cibuildwheel.sh, .bat — removed azure test invocations
  • tools/install_deps.sh, .bat — removed openssl/vcpkg installs (only used by azure ops)
  • CI pipelines (.pipelines/wheels_linux.yml, tools/ci_build/github/azure-pipeline/wheels_linux.yml, templates/build-package-for-linux.yml) — removed OCOS_ENABLE_AZURE references
  • docs/custom_ops.md — removed Azure operator documentation section
  • cgmanifest.json — removed triton, rapidjson, openssl, zlib, curl, vcpkg entries
  • ThirdPartyNotices.txt — removed corresponding license notices

Testing

  • Verified clean build on Windows (Visual Studio 2022) with OCOS_ENABLE_CTEST=ON
  • All existing tests pass — no functional code was affected
  • Grep confirms zero remaining OCOS_ENABLE_AZURE / ENABLE_AZURE references in source

@sayanshaw24 sayanshaw24 requested a review from a team as a code owner April 2, 2026 21:31
@sayanshaw24 sayanshaw24 requested a review from skottmckay April 2, 2026 21:32
@sayanshaw24 sayanshaw24 merged commit 748725b into main Apr 3, 2026
38 checks passed
@sayanshaw24 sayanshaw24 deleted the sayanshaw/ssrf branch April 3, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants