Skip to content

Commit 5ab1c4d

Browse files
committed
fix(firewall): pin sfw v1.15.4
sfw v1.15.4 restores the "not found in PATH" verdict for a command PowerShell genuinely cannot resolve on Windows (SocketDev/firewall#210); v1.15.3 reported that case as a resolver error. The action installs only the version its checksum table covers, so the fix is not installable through it until this bump. Recompute all twelve checksums from the published v1.15.4 assets and rebuild dist/. Also move findCachedFirewall above firewallDownloadUrls. #18 and #24 each passed lint on their own, but merging both left the export out of the alphabetical order the sort-source-methods rule wants, which fails lint on main and blocks any commit touching this file.
1 parent 59fe48b commit 5ab1c4d

2 files changed

Lines changed: 68 additions & 69 deletions

File tree

‎dist/main.js‎

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

‎src/tools/firewall.js‎

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const FIREWALL_DISTRIBUTIONS = {
3737
* Release tag every checksum below was taken from, and the version the action
3838
* installs when `firewall-version` is left at its default.
3939
*/
40-
export const FIREWALL_VERSION = 'v1.15.3'
40+
export const FIREWALL_VERSION = 'v1.15.4'
4141

4242
/**
4343
* SHA256 of each `FIREWALL_VERSION` asset, per edition and per
@@ -49,31 +49,31 @@ export const FIREWALL_VERSION = 'v1.15.3'
4949
export const FIREWALL_CHECKSUMS = {
5050
enterprise: {
5151
'darwin-arm64':
52-
'dee9d3179ce1cc6e8cf469c1e446af02ba7a47172cf13220b1808bbd7a524605',
52+
'b243b85e68435d2fb5a9419a037bfbc70f37e9ea5ca5a6690276843779331772',
5353
'darwin-x64':
54-
'873bf3ad2bdd012793a9801860fd3a26a5536353b783f6bce7b807002e3c7789',
54+
'4b3e686afca92029afe3d0d477c2755e0b50bcb9c3bb3c2df178940be380ca50',
5555
'linux-arm64':
56-
'aba4f4fba0d6775496f10c383d290518db1984bba5cf4378540878ac08752973',
56+
'f044a48abfaf546b4d0877602043a905418daf7063e79fb8087760bba4d13c5e',
5757
'linux-x64':
58-
'165aab86a749d3a249c5572ff693548017f98c6ee8a8df51f41804c542decf70',
58+
'bcb8e0f0debec245a0cff6fed01ab2cb2c37c0d03a0be6c0b39164d60dd3a291',
5959
'win32-arm64':
60-
'261d58f5caa8d4afd1e7a5159249d28b73bcd817f7ed6ffb812d0b1cf7258fe1',
60+
'6804c7972da28638ad7abda9378c1cf59ba6e10d1c04294560de9c46c0b5d733',
6161
'win32-x64':
62-
'cbbd2a50e3ced2ec1f32491542d979ec0e906142c3e13f0be7aa6355b6bd0388',
62+
'a6b8b8909a95d92bf83521a6dce418d4c44189ff977854ef1fa1767361654a0b',
6363
},
6464
free: {
6565
'darwin-arm64':
66-
'284e68467dc017ac6a8c17bdfd6e883cdf6b3195d14c263610a2eb03ae1bfdc0',
66+
'1b705ea7c399727ee41aa93f63e0469d2c3787c50e1dd8842cb8ff5ceec9eb99',
6767
'darwin-x64':
68-
'c68d15da47b870f557e148669e009e5ba0af386c4df6ec1ad88be05a418d207e',
68+
'b19f96f0dd3ebc4ecc7111dbc43cc2b095f37bf759273c0bd9c0c4784ea24731',
6969
'linux-arm64':
70-
'd10a203a91aea18d527e24f32f9164e9d322c96ca57749e2ab535fa3791b0455',
70+
'c8c80aa582829f24f5d633f2c3f2ccd0b070bbee80bf3b956e5e2a9880184e20',
7171
'linux-x64':
72-
'2aca7b45150bebd7343e977fb82f387ffe143f5bc03e557741daeb51f5ee27b4',
72+
'cf9f55b8343e1ef6e6dcccdb09b99c70c0430a22ed7d0079286eccddeaf72670',
7373
'win32-arm64':
74-
'521d1021ac82562978dc871f47d584c8f4c41c71c6c5e456ef6389429fef5457',
74+
'16607f9c64055b8e0af918dc93a72a342ca8352f46e6e3f810d1a378a380a82a',
7575
'win32-x64':
76-
'f097b51e8ffb3d4d5313d84a371b20f18e4e2f830cc44b71165468161d9affc2',
76+
'f8c94fc5e41d49c51d2fd013c2c169274df9c483fc763d8c82ff71c5579d3bb0',
7777
},
7878
}
7979

@@ -311,31 +311,6 @@ export async function downloadToolWithRetry(urls) {
311311
}
312312
}
313313

314-
/**
315-
* Equivalent origins to download one release asset from. GitHub release
316-
* assets come first; the free edition is also mirrored on Socket-owned
317-
* infrastructure. The enterprise repository is private and not mirrored, so it
318-
* stays GitHub-only. Callers decide the order to try them in.
319-
*
320-
* @param {string} edition Firewall edition being installed.
321-
* @param {string} repo GitHub repository the release lives in.
322-
* @param {string} version Release tag to download.
323-
* @param {string} asset Release asset name.
324-
*
325-
* @returns {string[]} Download URLs, GitHub first.
326-
*/
327-
export function firewallDownloadUrls(edition, repo, version, asset) {
328-
const urls = [
329-
`https://github.com/SocketDev/${repo}/releases/download/${version}/${asset}`,
330-
]
331-
332-
if (edition === 'free') {
333-
urls.push(`${FIREWALL_FREE_MIRROR_BASE_URL}/${version}/${asset}`)
334-
}
335-
336-
return urls
337-
}
338-
339314
/**
340315
* Directory an earlier job cached the binary in, or undefined when there is
341316
* none this version can use. `find` only checks that the version directory
@@ -366,6 +341,30 @@ export function findCachedFirewall(cacheOptions) {
366341

367342
return pathCache
368343
}
344+
/**
345+
* Equivalent origins to download one release asset from. GitHub release
346+
* assets come first; the free edition is also mirrored on Socket-owned
347+
* infrastructure. The enterprise repository is private and not mirrored, so it
348+
* stays GitHub-only. Callers decide the order to try them in.
349+
*
350+
* @param {string} edition Firewall edition being installed.
351+
* @param {string} repo GitHub repository the release lives in.
352+
* @param {string} version Release tag to download.
353+
* @param {string} asset Release asset name.
354+
*
355+
* @returns {string[]} Download URLs, GitHub first.
356+
*/
357+
export function firewallDownloadUrls(edition, repo, version, asset) {
358+
const urls = [
359+
`https://github.com/SocketDev/${repo}/releases/download/${version}/${asset}`,
360+
]
361+
362+
if (edition === 'free') {
363+
urls.push(`${FIREWALL_FREE_MIRROR_BASE_URL}/${version}/${asset}`)
364+
}
365+
366+
return urls
367+
}
369368

370369
export function firewallReleaseVersion(requestedVersion) {
371370
let versionToDownload = FIREWALL_VERSION

0 commit comments

Comments
 (0)