Skip to content

STRY64482225: HTTPS Proxy Support for ServiceNow DevOps GitHub Actions - #34

Open
maheshganjiSnc wants to merge 9 commits into
devfrom
feature/https-proxy-agent
Open

STRY64482225: HTTPS Proxy Support for ServiceNow DevOps GitHub Actions#34
maheshganjiSnc wants to merge 9 commits into
devfrom
feature/https-proxy-agent

Conversation

@maheshganjiSnc

Copy link
Copy Markdown
Collaborator

HTTPS Proxy Support for ServiceNow DevOps GitHub Actions

 

Summary

Adds HTTPS proxy support enabling customers behind corporate proxies to route all HTTP/HTTPS traffic through their proxy server using the https-proxy-agent npm package.
 

Changes

  • Introduced createHttpClient() using HttpsProxyAgent to tunnel all axios requests via HTTP CONNECT
  • Supported environment variables (checked in order): HTTPS_PROXY, https_proxy, HTTP_PROXY, http_proxy
  • Supported proxy URL formats: http://<host>:<port> and http://<user>:<pass>@<host>:<port>
  • Added .github/workflows/proxy-test.yml example workflow with HTTPS_PROXY_URL as a configurable secret
  • Updated README.md with HTTPS Proxy Support documentation
  • Action runtime updated to node24
     

How it works

When a proxy environment variable is set, the action creates an HttpsProxyAgent and attaches it to the axios HTTP client. All requests to ServiceNow are tunneled via HTTP CONNECT. If no proxy variable is set, the action connects directly — no breaking changes.
 

Testing

  • Verified proxy tunneling using an in-workflow Squid proxy service container
  • Confirmed HTTP CONNECT entries in proxy access logs for ServiceNow API calls
  • Validated end-to-end action execution through the proxy

ankur-jain1-snow and others added 9 commits December 2, 2025 18:56
- Add create-release.yml for production releases
- Add test-release.yml for safe release testing
- Add WORKFLOWS.md with comprehensive workflow documentation
- Automate tag creation, build, and GitHub release publishing
MAINT:Add automated release workflows and documentation
STRY63145083: Added CodeQL security scanning workflow
…ate proxies

Axios built-in proxy handling uses absolute-form HTTP requests which
enterprise proxies (e.g. Visa) reject with 400 Bad Request. This adds
https-proxy-agent to force proper CONNECT tunneling when HTTPS_PROXY
or HTTP_PROXY environment variables are set.

Changes:
- Added https-proxy-agent 7.0.6 dependency
- Created proxy-aware Axios instance via createHttpClient()
- Replaced bare axios calls with httpClient for CONNECT tunnel support
- Zero behavior change when no proxy env vars are set
- Rebuilt dist/index.js bundle
STRY64095305: Release 7.0 — Merge dev → main to publish updated GitHub Action to Marketplace with Node 24 runtime support
- Add proxy-test.yml: example workflow demonstrating HTTPS proxy usage
  with configurable proxy URL via HTTPS_PROXY_URL secret
- Update README.md: add HTTPS Proxy Support section documenting
  supported environment variables (HTTPS_PROXY, https_proxy, HTTP_PROXY,
  http_proxy), proxy URL format, and usage example
Comment thread src/main.js
}
core.debug("[ServiceNow DevOps], Sending Request for Test Report, Request options :"+JSON.stringify(httpHeaders)+", Payload :"+JSON.stringify(payload)+"\n");
snowResponse = await axios.post(endpoint, JSON.stringify(payload), httpHeaders);
snowResponse = await httpClient.post(endpoint, JSON.stringify(payload), httpHeaders);
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.

3 participants