herozion 1.1.75 → 1.1.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_comment": "SHA-256 hashes for each platform binary. Auto-generated in CI from release CHECKSUMS.sha256. DO NOT edit manually.",
3
- "_version": "1.1.75",
4
- "herozion-linux-amd64": "42e718f60c1cfd3633a04e30c000bbb5311f15dd7222396b9bb7cba530570654",
5
- "herozion-macos-amd64": "09a8aec95ac62df1bbe6f1b4f875248ce50ca9bf02ba2664e1f32d842f273ee7",
6
- "herozion-macos-arm64": "441a7c237e5c7fb09c598dcfc7b4e3403d8d308768a8e2302110f39efeae5dd1",
7
- "herozion-windows-amd64.exe": "9345261a6d986b327c2f68c9d21d687a0eb6c3622de1340e34149c418afbb4e5"
3
+ "_version": "1.1.76",
4
+ "herozion-linux-amd64": "388813017d4212e1615132e8ea98cba63eefa8b6885d9b8509f64e9d9c7f46d1",
5
+ "herozion-macos-amd64": "50145d9ac239c0380fe60c2e775ed43bd9588efd32538fe4bcee4c89a6a92cbd",
6
+ "herozion-macos-arm64": "5fe6d4c03b5d7d944e14d59371477b9a5a2e456a8a2ee3f051022587303594cc",
7
+ "herozion-windows-amd64.exe": "1a64cc8460e5cf92b4806e0ecd69b857bc70d2b7fe42981842ff9b8cf24d558f"
8
8
  }
package/install.js CHANGED
@@ -66,8 +66,18 @@ const _ALLOWED_REDIRECT_HOSTS = new Set([
66
66
  "objects.githubusercontent.com",
67
67
  "codeload.github.com",
68
68
  "releases.githubusercontent.com",
69
+ "release-assets.githubusercontent.com",
69
70
  ]);
70
71
 
72
+ function _isAllowedRedirectHost(host) {
73
+ if (_ALLOWED_REDIRECT_HOSTS.has(host)) {
74
+ return true;
75
+ }
76
+ // GitHub release binaries are served from various *.githubusercontent.com CDNs.
77
+ // Allow the suffix so new CDN hostnames do not break installs.
78
+ return host.endsWith(".githubusercontent.com");
79
+ }
80
+
71
81
  function _validateRedirectUrl(location) {
72
82
  if (!location || !location.startsWith("https://")) {
73
83
  throw new Error(`Redirect to non-HTTPS URL rejected: ${location}`);
@@ -76,10 +86,10 @@ function _validateRedirectUrl(location) {
76
86
  try { host = new URL(location).hostname; } catch (_) {
77
87
  throw new Error(`Invalid redirect URL: ${location}`);
78
88
  }
79
- if (!_ALLOWED_REDIRECT_HOSTS.has(host)) {
89
+ if (!_isAllowedRedirectHost(host)) {
80
90
  throw new Error(
81
91
  `Redirect to untrusted host rejected: ${host}\n` +
82
- "Only github.com and githubusercontent.com are allowed."
92
+ "Only github.com and *.githubusercontent.com are allowed."
83
93
  );
84
94
  }
85
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "herozion",
3
- "version": "1.1.75",
3
+ "version": "1.1.76",
4
4
  "description": "Security audit and performance analysis CLI tool for developers",
5
5
  "keywords": [
6
6
  "security",