Skip to content

Commit 227a268

Browse files
committed
Log disclaimer about connection tests, with link to docs
1 parent 9f347b1 commit 227a268

4 files changed

Lines changed: 16 additions & 1 deletion

File tree

lib/start-proxy-action.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/doc-url.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export enum DocUrl {
88
CODEQL_BUILD_MODES = "https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#codeql-build-modes",
99
DEFINE_ENV_VARIABLES = "https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow",
1010
DELETE_ACTIONS_CACHE_ENTRIES = "https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manage-caches#deleting-cache-entries",
11+
PRIVATE_REGISTRY_LOGS = "https://docs.github.com/en/code-security/reference/code-scanning/code-scanning-logs#diagnostic-information-for-private-package-registries",
1112
SCANNING_ON_PUSH = "https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#scanning-on-push",
1213
SPECIFY_BUILD_STEPS_MANUALLY = "https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#about-specifying-build-steps-manually",
1314
SYSTEM_REQUIREMENTS = "https://codeql.github.com/docs/codeql-overview/system-requirements/",

src/start-proxy-action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ async function run(startedAt: Date) {
111111
logger,
112112
);
113113

114-
// Check that the private registries are reachable.
114+
// Perform best-effort checks that the private registries are reachable.
115115
await checkConnections(logger, proxyInfo);
116116

117117
// Report success if we have reached this point.

src/start-proxy/reachability.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as https from "https";
22

33
import { HttpsProxyAgent } from "https-proxy-agent";
44

5+
import { DocUrl } from "../doc-url";
56
import { Logger } from "../logging";
67
import { getErrorMessage } from "../util";
78

@@ -96,6 +97,13 @@ export async function checkConnections(
9697
// Don't do anything if there are no registries.
9798
if (proxy.registries.length === 0) return result;
9899

100+
// Start a log group and print a message with a disclaimer with a link to the
101+
// relevant documentation that these checks are a best-effort process.
102+
logger.startGroup("Testing connections via the proxy");
103+
logger.info(
104+
`The connection tests performed here are best-effort only and failures here may not affect the subsequent analysis. See ${DocUrl.PRIVATE_REGISTRY_LOGS} for more information.`,
105+
);
106+
99107
try {
100108
// Initialise a networking backend if no backend was provided.
101109
if (backend === undefined) {
@@ -145,5 +153,6 @@ export async function checkConnections(
145153
);
146154
}
147155

156+
logger.endGroup();
148157
return result;
149158
}

0 commit comments

Comments
 (0)