Trying to set the GITHUB_API_URL for it to override github.com for the issues to be created after I run a baseline scan.
However, it seems that it's not working?
I checked the code and I can see that it's using the env variable when instantiating Octokit.
const octokit = getOctokit(token, {
baseUrl: process.env.GITHUB_API_URL,
}).rest;
jobs:
zap_scan:
runs-on: [ our custom runner ]
env:
GITHUB_API_URL: 'https://our-github-enterprise-url/api/v3/'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Echo GITHUB_API_URL
run: echo '${{ env.GITHUB_API_URL }}'
- name: ZAP Baseline Scan With Auth
uses: zaproxy/[email protected]
env:
ZAP_AUTH_HEADER_VALUE: 'ApiKey 12345'
with:
token: ${{ secrets.GITHUB_TOKEN }}
target: 'https://my-target'
cmd_options: '-d'
Scanning process completed, starting to analyze the results!
[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead
Error: request to https://api.github.com/search/issues?q=is%3Aissue+state%3Aopen+repo%3APESS%2Fpess+ZAP+Scan+Baseline+Report&sort=updated failed, reason: getaddrinfo ENOTFOUND api.github.com