Skip to content

Commit 3626e03

Browse files
committed
Default TLS status check failures to enabled
1 parent 100e08b commit 3626e03

8 files changed

Lines changed: 15 additions & 15 deletions

File tree

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32117,8 +32117,8 @@ function isTLSEnabled(owner) {
3211732117
return false;
3211832118
}
3211932119
catch (e) {
32120-
core.info(`[!] Unable to check TLS_STATUS`);
32121-
return false;
32120+
core.info(`[!] Unable to check TLS_STATUS. Defaulting to TLS enabled.`);
32121+
return true;
3212232122
}
3212332123
});
3212432124
}

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/post/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32165,8 +32165,8 @@ function isTLSEnabled(owner) {
3216532165
return false;
3216632166
}
3216732167
catch (e) {
32168-
core.info(`[!] Unable to check TLS_STATUS`);
32169-
return false;
32168+
core.info(`[!] Unable to check TLS_STATUS. Defaulting to TLS enabled.`);
32169+
return true;
3217032170
}
3217132171
});
3217232172
}

dist/post/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pre/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85446,8 +85446,8 @@ function isTLSEnabled(owner) {
8544685446
return false;
8544785447
}
8544885448
catch (e) {
85449-
lib_core.info(`[!] Unable to check TLS_STATUS`);
85450-
return false;
85449+
lib_core.info(`[!] Unable to check TLS_STATUS. Defaulting to TLS enabled.`);
85450+
return true;
8545185451
}
8545285452
});
8545385453
}

dist/pre/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/tls-inspect.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ test("tls-inspect not enabled", async () => {
3333
expect(got).toBe(false);
3434
});
3535

36-
test("isTLSEnabled returns false within ~3s when server is slow (regression test for AggregateError)", async () => {
36+
test("isTLSEnabled returns true within ~3s when server is slow (regression test for AggregateError)", async () => {
3737
const owner = "slow-org";
3838

3939
mockFetch((_url, init) => {
@@ -55,11 +55,11 @@ test("isTLSEnabled returns false within ~3s when server is slow (regression test
5555
const result = await isTLSEnabled(owner);
5656
const elapsed = Date.now() - start;
5757

58-
expect(result).toBe(false);
58+
expect(result).toBe(true);
5959
expect(elapsed).toBeLessThan(3500);
6060
}, 10_000);
6161

62-
test("isTLSEnabled returns false on connection error without hanging", async () => {
62+
test("isTLSEnabled returns true on connection error without hanging", async () => {
6363
const owner = "broken-org";
6464

6565
mockFetch(async () => {
@@ -72,6 +72,6 @@ test("isTLSEnabled returns false on connection error without hanging", async ()
7272
const result = await isTLSEnabled(owner);
7373
const elapsed = Date.now() - start;
7474

75-
expect(result).toBe(false);
75+
expect(result).toBe(true);
7676
expect(elapsed).toBeLessThan(3500);
7777
});

src/tls-inspect.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export async function isTLSEnabled(owner: string): Promise<boolean> {
1515
core.info(`[!] TLS_NOT_ENABLED: ${owner}`);
1616
return false;
1717
} catch (e) {
18-
core.info(`[!] Unable to check TLS_STATUS`);
19-
return false;
18+
core.info(`[!] Unable to check TLS_STATUS. Defaulting to TLS enabled.`);
19+
return true;
2020
}
2121
}
2222

0 commit comments

Comments
 (0)