allsecurex-quantum-scanner 1.0.0 → 1.0.1

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.
package/README.md CHANGED
@@ -7,7 +7,7 @@ Scan your codebase for quantum-vulnerable cryptographic implementations and get
7
7
  ## Installation
8
8
 
9
9
  ```bash
10
- npm install -g @allsecurex-quantum/scanner
10
+ npm install -g allsecurex-quantum-scanner
11
11
  ```
12
12
 
13
13
  ## Quick Start
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allsecurex-quantum-scanner",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "AllSecureX Quantum Scanner - AI-Driven Post-Quantum Cryptography Assessment Tool",
5
5
  "keywords": [
6
6
  "quantum",
@@ -14,7 +14,9 @@ const path = require('path');
14
14
  const { execSync } = require('child_process');
15
15
  const crypto = require('crypto');
16
16
 
17
+ // Primary URL (custom domain) with S3 fallback
17
18
  const BINARY_BASE_URL = 'https://scanner.allsecurex.com/releases';
19
+ const BINARY_FALLBACK_URL = 'https://quantum-scanner-binaries.s3.ap-south-1.amazonaws.com/releases';
18
20
  const VERSION = require('../package.json').version;
19
21
 
20
22
  // Platform-specific binary mappings
@@ -29,7 +31,7 @@ const PLATFORM_BINARIES = {
29
31
  // SHA256 checksums for each binary (updated with each release)
30
32
  const CHECKSUMS = {
31
33
  'darwin-x64': '',
32
- 'darwin-arm64': '',
34
+ 'darwin-arm64': '6daacc27d0ac22c85cbf1249b1f849271e1764fde98d41151695043f58cc45f7',
33
35
  'linux-x64': '',
34
36
  'linux-arm64': '',
35
37
  'win32-x64': '',
@@ -150,7 +152,8 @@ async function install() {
150
152
 
151
153
  const platformKey = getPlatformKey();
152
154
  const binaryName = getBinaryName();
153
- const downloadUrl = `${BINARY_BASE_URL}/v${VERSION}/${binaryName}`;
155
+ const primaryUrl = `${BINARY_BASE_URL}/v${VERSION}/${binaryName}`;
156
+ const fallbackUrl = `${BINARY_FALLBACK_URL}/v${VERSION}/${binaryName}`;
154
157
 
155
158
  console.log(`šŸ“‹ Platform: ${platformKey}`);
156
159
  console.log(`šŸ“‹ Version: ${VERSION}`);
@@ -165,7 +168,13 @@ async function install() {
165
168
  }
166
169
 
167
170
  try {
168
- await downloadFile(downloadUrl, binaryPath);
171
+ // Try primary URL first, fall back to S3 if it fails
172
+ try {
173
+ await downloadFile(primaryUrl, binaryPath);
174
+ } catch (primaryError) {
175
+ console.log(`āš ļø Primary download failed, trying fallback...`);
176
+ await downloadFile(fallbackUrl, binaryPath);
177
+ }
169
178
 
170
179
  // Verify checksum
171
180
  const expectedChecksum = CHECKSUMS[platformKey];
@@ -192,7 +201,7 @@ async function install() {
192
201
  } catch (error) {
193
202
  console.error(`\nāŒ Installation failed: ${error.message}`);
194
203
  console.error('\nManual installation:');
195
- console.error(`1. Download the binary from: https://scanner.allsecurex.com/download`);
204
+ console.error(`1. Download the binary from: ${fallbackUrl}`);
196
205
  console.error(`2. Place it in your PATH as 'quantum-scanner'`);
197
206
  console.error(`3. Make it executable: chmod +x quantum-scanner`);
198
207
  process.exit(1);