Skip to content

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

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

STRY64482225: HTTPS Proxy Support for ServiceNow DevOps GitHub Actions#69
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

maheshganjiSnc and others added 9 commits March 12, 2026 14:52
* Add CodeQL security scanning workflow

  - Run weekly security scans every Monday
  - Scan pull requests targeting main branch
  - Use security-extended query suite for comprehensive analysis

* MAINT:Enable CodeQL scanning for dev branch PRs

* Sync the Dev Branch with the Main Branch (#29)

* change version to 1.35.2

* Update README.md

* STRY55387839:Adding support for token authentication in changeaction

* STRY55387839:Updating README.md file and adding sample workflow script

* STRY55387839:Updated node version to node16

* STRY55387839:Modifying workflow file

* defect fixes

* defect fixes

* fixes

* STRY55377568: Add logs in case of auto-approval/rejection

* Deployment Gate changes

* change status poll issue fix

* defect fixes

* updated version to v2.0.0

* updated version to v2.0.0

* fixed syntax issue in src/lib/create-change.js

* added new index.js file

* STRY56127181 : As per comments by customer as part of a case task

* STRY56127181 : Adding AutoCloseChange to Helper text in Readme file

* STRY56127181 : adding etc alone in description file

* STRY56127181 : autoCloseChange added in change attributes

* updated version in READme file

* regenerated index.js file

---------

Co-authored-by: bhavani.velivala <bhavani.velivala@servicenow.com>
Co-authored-by: Bhavani Velivala (ServiceNow) <76525147+bhavani-velivala-sn@users.noreply.github.com>
Co-authored-by: roy-ca <roy.ca@servicenow.com>
Co-authored-by: sampath-methuku-servicenow <83061325+sampath-methuku-servicenow@users.noreply.github.com>
Co-authored-by: sampath.methuku <sampath.methuku@servicenow.com>
Co-authored-by: suryateja.konduru <suryateja.konduru@servicenow.com>
Co-authored-by: surya-konduru-sn <89965037+surya-konduru-sn@users.noreply.github.com>

* DEF0783855: Fix encoded url for names during get change control API

* DEF0783855: add error logging for failed change creation requests

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855:Remove logs

---------

Co-authored-by: Nitin Parashar <nitin.parashar@servicenow.com>
Co-authored-by: bhavani.velivala <bhavani.velivala@servicenow.com>
Co-authored-by: Bhavani Velivala (ServiceNow) <76525147+bhavani-velivala-sn@users.noreply.github.com>
Co-authored-by: roy-ca <roy.ca@servicenow.com>
Co-authored-by: sampath-methuku-servicenow <83061325+sampath-methuku-servicenow@users.noreply.github.com>
Co-authored-by: sampath.methuku <sampath.methuku@servicenow.com>
Co-authored-by: suryateja.konduru <suryateja.konduru@servicenow.com>
Co-authored-by: surya-konduru-sn <89965037+surya-konduru-sn@users.noreply.github.com>
Co-authored-by: ankur-jain1-snow <ankur.jain1@servicenow.com>
Co-authored-by: vivek.nalubandu <vivek.nalubandu@servicenow.com>
…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
…b Action to Marketplace with Node 24 runtime support. (#66)

* Add CodeQL security scanning workflow

  - Run weekly security scans every Monday
  - Scan pull requests targeting main branch
  - Use security-extended query suite for comprehensive analysis

* MAINT:Enable CodeQL scanning for dev branch PRs

* Sync the Dev Branch with the Main Branch (#29)

* change version to 1.35.2

* Update README.md

* STRY55387839:Adding support for token authentication in changeaction

* STRY55387839:Updating README.md file and adding sample workflow script

* STRY55387839:Updated node version to node16

* STRY55387839:Modifying workflow file

* defect fixes

* defect fixes

* fixes

* STRY55377568: Add logs in case of auto-approval/rejection

* Deployment Gate changes

* change status poll issue fix

* defect fixes

* updated version to v2.0.0

* updated version to v2.0.0

* fixed syntax issue in src/lib/create-change.js

* added new index.js file

* STRY56127181 : As per comments by customer as part of a case task

* STRY56127181 : Adding AutoCloseChange to Helper text in Readme file

* STRY56127181 : adding etc alone in description file

* STRY56127181 : autoCloseChange added in change attributes

* updated version in READme file

* regenerated index.js file

---------

Co-authored-by: bhavani.velivala <bhavani.velivala@servicenow.com>
Co-authored-by: Bhavani Velivala (ServiceNow) <76525147+bhavani-velivala-sn@users.noreply.github.com>
Co-authored-by: roy-ca <roy.ca@servicenow.com>
Co-authored-by: sampath-methuku-servicenow <83061325+sampath-methuku-servicenow@users.noreply.github.com>
Co-authored-by: sampath.methuku <sampath.methuku@servicenow.com>
Co-authored-by: suryateja.konduru <suryateja.konduru@servicenow.com>
Co-authored-by: surya-konduru-sn <89965037+surya-konduru-sn@users.noreply.github.com>

* DEF0783855: Fix encoded url for names during get change control API

* DEF0783855: add error logging for failed change creation requests

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855:Remove logs

* STRY63592000: Migrate Node.js runtime from node20 to node24 (#65)

* STRY63145083: DevOps 6.3- GitHub Custom tasks Release (#63)

* Add CodeQL security scanning workflow

  - Run weekly security scans every Monday
  - Scan pull requests targeting main branch
  - Use security-extended query suite for comprehensive analysis

* MAINT:Enable CodeQL scanning for dev branch PRs

* Sync the Dev Branch with the Main Branch (#29)

* change version to 1.35.2

* Update README.md

* STRY55387839:Adding support for token authentication in changeaction

* STRY55387839:Updating README.md file and adding sample workflow script

* STRY55387839:Updated node version to node16

* STRY55387839:Modifying workflow file

* defect fixes

* defect fixes

* fixes

* STRY55377568: Add logs in case of auto-approval/rejection

* Deployment Gate changes

* change status poll issue fix

* defect fixes

* updated version to v2.0.0

* updated version to v2.0.0

* fixed syntax issue in src/lib/create-change.js

* added new index.js file

* STRY56127181 : As per comments by customer as part of a case task

* STRY56127181 : Adding AutoCloseChange to Helper text in Readme file

* STRY56127181 : adding etc alone in description file

* STRY56127181 : autoCloseChange added in change attributes

* updated version in READme file

* regenerated index.js file

---------

Co-authored-by: bhavani.velivala <bhavani.velivala@servicenow.com>
Co-authored-by: Bhavani Velivala (ServiceNow) <76525147+bhavani-velivala-sn@users.noreply.github.com>
Co-authored-by: roy-ca <roy.ca@servicenow.com>
Co-authored-by: sampath-methuku-servicenow <83061325+sampath-methuku-servicenow@users.noreply.github.com>
Co-authored-by: sampath.methuku <sampath.methuku@servicenow.com>
Co-authored-by: suryateja.konduru <suryateja.konduru@servicenow.com>
Co-authored-by: surya-konduru-sn <89965037+surya-konduru-sn@users.noreply.github.com>

* DEF0783855: Fix encoded url for names during get change control API

* DEF0783855: add error logging for failed change creation requests

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855: Adding logs

* DEF0783855:Remove logs

---------

Co-authored-by: Nitin Parashar <nitin.parashar@servicenow.com>
Co-authored-by: bhavani.velivala <bhavani.velivala@servicenow.com>
Co-authored-by: Bhavani Velivala (ServiceNow) <76525147+bhavani-velivala-sn@users.noreply.github.com>
Co-authored-by: roy-ca <roy.ca@servicenow.com>
Co-authored-by: sampath-methuku-servicenow <83061325+sampath-methuku-servicenow@users.noreply.github.com>
Co-authored-by: sampath.methuku <sampath.methuku@servicenow.com>
Co-authored-by: suryateja.konduru <suryateja.konduru@servicenow.com>
Co-authored-by: surya-konduru-sn <89965037+surya-konduru-sn@users.noreply.github.com>
Co-authored-by: ankur-jain1-snow <ankur.jain1@servicenow.com>
Co-authored-by: vivek.nalubandu <vivek.nalubandu@servicenow.com>

* STRY63281042: Upgrade Node.js runtime from node20 to node24, update dependencies and workflow versions

* STRY63281042: Fix typo in runs-on (ubutun-latest → ubuntu-latest)

* STRY63592000: Pin dependency versions and rebuild dist for Node 24 migration

---------

Co-authored-by: Nitin Parashar <nitin.parashar@servicenow.com>
Co-authored-by: bhavani.velivala <bhavani.velivala@servicenow.com>
Co-authored-by: Bhavani Velivala (ServiceNow) <76525147+bhavani-velivala-sn@users.noreply.github.com>
Co-authored-by: roy-ca <roy.ca@servicenow.com>
Co-authored-by: sampath-methuku-servicenow <83061325+sampath-methuku-servicenow@users.noreply.github.com>
Co-authored-by: sampath.methuku <sampath.methuku@servicenow.com>
Co-authored-by: suryateja.konduru <suryateja.konduru@servicenow.com>
Co-authored-by: surya-konduru-sn <89965037+surya-konduru-sn@users.noreply.github.com>
Co-authored-by: ankur-jain1-snow <ankur.jain1@servicenow.com>
Co-authored-by: vivek.nalubandu <vivek.nalubandu@servicenow.com>
Co-authored-by: Cascade Bot <cascade@example.com>

* Update broken ServiceNow docs URL to latest release-independent URL

---------

Co-authored-by: Nitin Parashar <nitin.parashar@servicenow.com>
Co-authored-by: bhavani.velivala <bhavani.velivala@servicenow.com>
Co-authored-by: Bhavani Velivala (ServiceNow) <76525147+bhavani-velivala-sn@users.noreply.github.com>
Co-authored-by: roy-ca <roy.ca@servicenow.com>
Co-authored-by: sampath-methuku-servicenow <83061325+sampath-methuku-servicenow@users.noreply.github.com>
Co-authored-by: sampath.methuku <sampath.methuku@servicenow.com>
Co-authored-by: suryateja.konduru <suryateja.konduru@servicenow.com>
Co-authored-by: surya-konduru-sn <89965037+surya-konduru-sn@users.noreply.github.com>
Co-authored-by: ankur-jain1-snow <ankur.jain1@servicenow.com>
Co-authored-by: vivek.nalubandu <vivek.nalubandu@servicenow.com>
Co-authored-by: Cascade Bot <cascade@example.com>
- 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
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