Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 58e34d6

Browse files
committedJul 24, 2024·
Address comments
1 parent 91f9a28 commit 58e34d6

8 files changed

+20
-8
lines changed
 

‎CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Note that the only difference between `v2` and `v3` of the CodeQL Action is the
66

77
## [UNRELEASED]
88

9-
No user facing changes.
9+
- Experimental: add a new `start-proxy` action which starts the same HTTP proxy as used by [`github/dependabot-action`](https://github.com/github/dependabot-action). Do not use this in production as it is part of an internal experiment and subject to change at any time.
1010

1111
## 3.25.11 - 28 Jun 2024
1212

‎lib/start-proxy-action-post.js

+4-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/start-proxy-action-post.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/start-proxy-action.js

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/start-proxy-action.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/start-proxy-action-post.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import * as fs from "fs";
77

88
import * as core from "@actions/core";
99

10+
import * as actionsUtil from "./actions-util";
11+
import * as configUtils from "./config-utils";
1012
import { wrapError } from "./util";
1113

1214
async function runWrapper() {
@@ -20,7 +22,12 @@ async function runWrapper() {
2022
`start-proxy post-action step failed: ${wrapError(error).message}`,
2123
);
2224
}
23-
if (core.isDebug()) {
25+
const config = await configUtils.getConfig(
26+
actionsUtil.getTemporaryDirectory(),
27+
core,
28+
);
29+
30+
if ((config && config.debugMode) || core.isDebug()) {
2431
const logFilePath = core.getState("proxy-log-file");
2532
if (logFilePath) {
2633
const readStream = fs.createReadStream(logFilePath);

‎src/start-proxy-action.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const CERT_SUBJECT = [
4242
},
4343
{
4444
name: "organizationName",
45-
value: "GitHub ic.",
45+
value: "GitHub inc.",
4646
},
4747
{
4848
shortName: "OU",
@@ -130,6 +130,7 @@ async function runWrapper() {
130130
});
131131
subprocess.on("exit", (code) => {
132132
if (code !== 0) {
133+
// If the proxy failed to start, try a different port from the ephemeral range [49152, 65535]
133134
port = Math.floor(Math.random() * (65535 - 49152) + 49152);
134135
subprocess = undefined;
135136
}

‎start-proxy/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "CodeQL: Start proxy"
2-
description: "Start HTTP proxy server"
2+
description: "[Experimental] Start HTTP proxy server"
33
author: "GitHub"
44
inputs:
55
registry_secrets:

0 commit comments

Comments
 (0)
Please sign in to comment.