allsecurex-quantum-scanner 1.0.0
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/LICENSE +46 -0
- package/README.md +112 -0
- package/bin/quantum-scanner +60 -0
- package/package.json +51 -0
- package/scripts/install-binary.js +206 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
AllSecureX Quantum Scanner - Proprietary License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 AllSecureX. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software and associated documentation files (the "Software") are the
|
|
6
|
+
proprietary property of AllSecureX. The Software is licensed, not sold.
|
|
7
|
+
|
|
8
|
+
TERMS OF USE:
|
|
9
|
+
|
|
10
|
+
1. LICENSE GRANT
|
|
11
|
+
Subject to the terms of this agreement and your subscription tier, you are
|
|
12
|
+
granted a limited, non-exclusive, non-transferable license to use the
|
|
13
|
+
Software for scanning your own codebases for quantum-vulnerable cryptographic
|
|
14
|
+
implementations.
|
|
15
|
+
|
|
16
|
+
2. RESTRICTIONS
|
|
17
|
+
You may NOT:
|
|
18
|
+
- Reverse engineer, decompile, or disassemble the Software
|
|
19
|
+
- Modify, adapt, or create derivative works based on the Software
|
|
20
|
+
- Rent, lease, lend, sell, sublicense, or distribute the Software
|
|
21
|
+
- Use the Software to compete with AllSecureX products or services
|
|
22
|
+
- Remove or alter any proprietary notices in the Software
|
|
23
|
+
|
|
24
|
+
3. USAGE LIMITS
|
|
25
|
+
Your use of the Software is subject to the scan limits of your subscription
|
|
26
|
+
tier (Community: 5/month, Professional: 100/month, Enterprise: Unlimited).
|
|
27
|
+
|
|
28
|
+
4. DATA PRIVACY
|
|
29
|
+
The Software performs local analysis and does not transmit source code to
|
|
30
|
+
AllSecureX servers. Only anonymized findings metadata may be transmitted
|
|
31
|
+
when cloud sync is enabled.
|
|
32
|
+
|
|
33
|
+
5. DISCLAIMER OF WARRANTIES
|
|
34
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
35
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
36
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
37
|
+
|
|
38
|
+
6. LIMITATION OF LIABILITY
|
|
39
|
+
IN NO EVENT SHALL ALLSECUREX BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
|
|
40
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING FROM THE USE OF THE SOFTWARE.
|
|
41
|
+
|
|
42
|
+
7. TERMINATION
|
|
43
|
+
This license is effective until terminated. AllSecureX may terminate this
|
|
44
|
+
license at any time if you breach any of its terms.
|
|
45
|
+
|
|
46
|
+
For questions about licensing, contact: legal@allsecurex.com
|
package/README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# AllSecureX Quantum Scanner
|
|
2
|
+
|
|
3
|
+
**AI-Driven Post-Quantum Cryptography Assessment Tool**
|
|
4
|
+
|
|
5
|
+
Scan your codebase for quantum-vulnerable cryptographic implementations and get actionable migration recommendations.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @allsecurex-quantum/scanner
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Authenticate with your API key
|
|
17
|
+
quantum-scanner auth login --key qv_your_api_key_here
|
|
18
|
+
|
|
19
|
+
# Scan current directory
|
|
20
|
+
quantum-scanner scan .
|
|
21
|
+
|
|
22
|
+
# Scan with cloud sync
|
|
23
|
+
quantum-scanner scan . --sync
|
|
24
|
+
|
|
25
|
+
# View quota
|
|
26
|
+
quantum-scanner quota
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Features
|
|
30
|
+
|
|
31
|
+
- **Private Scanning** - All detection patterns are compiled into the binary; source code never leaves your machine
|
|
32
|
+
- **Comprehensive Detection** - Identifies RSA, ECDSA, DH, DSA, MD5, SHA-1, weak ciphers, and more
|
|
33
|
+
- **Migration Roadmap** - Get prioritized recommendations for quantum-safe alternatives
|
|
34
|
+
- **Crypto Agility Score** - Track your organization's readiness for the post-quantum era
|
|
35
|
+
- **Cloud Sync** - Optionally sync findings to your AllSecureX dashboard
|
|
36
|
+
|
|
37
|
+
## Commands
|
|
38
|
+
|
|
39
|
+
| Command | Description |
|
|
40
|
+
|---------|-------------|
|
|
41
|
+
| `quantum-scanner auth login` | Authenticate with your API key |
|
|
42
|
+
| `quantum-scanner auth logout` | Remove stored credentials |
|
|
43
|
+
| `quantum-scanner auth status` | Show authentication status |
|
|
44
|
+
| `quantum-scanner scan <path>` | Scan directory for quantum-vulnerable crypto |
|
|
45
|
+
| `quantum-scanner scan . --sync` | Scan and sync results to cloud |
|
|
46
|
+
| `quantum-scanner scan . --output report.json` | Export results to JSON |
|
|
47
|
+
| `quantum-scanner quota` | Check remaining scans for your tier |
|
|
48
|
+
| `quantum-scanner history` | View scan history |
|
|
49
|
+
| `quantum-scanner report [scan_id]` | View a scan report |
|
|
50
|
+
|
|
51
|
+
## Scan Tiers
|
|
52
|
+
|
|
53
|
+
| Tier | Monthly Scans |
|
|
54
|
+
|------|---------------|
|
|
55
|
+
| Community | 5 |
|
|
56
|
+
| Professional | 100 |
|
|
57
|
+
| Enterprise | Unlimited |
|
|
58
|
+
|
|
59
|
+
Upgrade at [allsecurex.com/pricing](https://allsecurex.com/pricing)
|
|
60
|
+
|
|
61
|
+
## Detection Categories
|
|
62
|
+
|
|
63
|
+
| Category | Risk Level | Recommended Replacement |
|
|
64
|
+
|----------|------------|------------------------|
|
|
65
|
+
| RSA | Broken by 2030 | ML-KEM-768 |
|
|
66
|
+
| ECDSA/ECDH | Broken by 2030 | ML-DSA-65 |
|
|
67
|
+
| Diffie-Hellman | Broken by 2030 | ML-KEM-768 |
|
|
68
|
+
| MD5, SHA-1 | Broken Now | SHA-256+ |
|
|
69
|
+
| 3DES, RC4, Blowfish | Broken Now | AES-256-GCM |
|
|
70
|
+
| TLS 1.0/1.1 | Broken Now | TLS 1.3 |
|
|
71
|
+
|
|
72
|
+
## Output Example
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
76
|
+
║ AllSecureX Quantum Scanner Report ║
|
|
77
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
78
|
+
|
|
79
|
+
Scan: my-project
|
|
80
|
+
Files Scanned: 1,234
|
|
81
|
+
Findings: 47
|
|
82
|
+
|
|
83
|
+
Crypto Agility Score: 65/100
|
|
84
|
+
|
|
85
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
86
|
+
│ SEVERITY BREAKDOWN │
|
|
87
|
+
├─────────────────────────────────────────────────────────────┤
|
|
88
|
+
│ ⛔ Critical (Broken Now): 12 │
|
|
89
|
+
│ 🔴 High (Broken by 2030): 23 │
|
|
90
|
+
│ 🟡 Medium (Uncertain): 8 │
|
|
91
|
+
│ 🟢 Low (Quantum Safe): 4 │
|
|
92
|
+
└─────────────────────────────────────────────────────────────┘
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Privacy
|
|
96
|
+
|
|
97
|
+
Your source code **never leaves your machine**. The scanner binary contains all detection patterns locally. Only anonymized findings metadata is sent to the API when using `--sync`.
|
|
98
|
+
|
|
99
|
+
## Requirements
|
|
100
|
+
|
|
101
|
+
- Node.js 16 or later
|
|
102
|
+
- macOS (Intel/ARM), Linux, or Windows
|
|
103
|
+
|
|
104
|
+
## Support
|
|
105
|
+
|
|
106
|
+
- Documentation: [allsecurex.com/docs](https://allsecurex.com/docs)
|
|
107
|
+
- Email: support@allsecurex.com
|
|
108
|
+
- Issues: [github.com/allsecurex/quantum-scanner/issues](https://github.com/allsecurex/quantum-scanner/issues)
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
Proprietary - © 2025 AllSecureX. All rights reserved.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AllSecureX Quantum Scanner - CLI Wrapper
|
|
5
|
+
*
|
|
6
|
+
* This wrapper script invokes the platform-specific binary
|
|
7
|
+
* that was downloaded during npm install.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const { spawn } = require('child_process');
|
|
11
|
+
const path = require('path');
|
|
12
|
+
const fs = require('fs');
|
|
13
|
+
|
|
14
|
+
// Determine binary path
|
|
15
|
+
const binDir = __dirname;
|
|
16
|
+
const isWindows = process.platform === 'win32';
|
|
17
|
+
const binaryName = isWindows ? 'quantum-scanner.exe' : 'quantum-scanner-bin';
|
|
18
|
+
const binaryPath = path.join(binDir, binaryName);
|
|
19
|
+
|
|
20
|
+
// Check if binary exists
|
|
21
|
+
if (!fs.existsSync(binaryPath)) {
|
|
22
|
+
console.error('\n╔══════════════════════════════════════════════════════════════╗');
|
|
23
|
+
console.error('║ ❌ Quantum Scanner binary not found! ║');
|
|
24
|
+
console.error('╚══════════════════════════════════════════════════════════════╝\n');
|
|
25
|
+
console.error('The binary may not have been downloaded correctly during installation.');
|
|
26
|
+
console.error('\nTo fix this, try:');
|
|
27
|
+
console.error(' 1. npm rebuild @allsecurex-quantum/scanner');
|
|
28
|
+
console.error(' 2. Or reinstall: npm install -g @allsecurex-quantum/scanner');
|
|
29
|
+
console.error('\nFor manual installation:');
|
|
30
|
+
console.error(' Visit: https://scanner.allsecurex.com/download\n');
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Spawn the binary with all arguments passed through
|
|
35
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
36
|
+
stdio: 'inherit',
|
|
37
|
+
env: process.env,
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// Handle process exit
|
|
41
|
+
child.on('error', (err) => {
|
|
42
|
+
if (err.code === 'EACCES') {
|
|
43
|
+
console.error('\n❌ Permission denied. Try running:');
|
|
44
|
+
console.error(` chmod +x "${binaryPath}"\n`);
|
|
45
|
+
} else {
|
|
46
|
+
console.error(`\n❌ Error running quantum-scanner: ${err.message}\n`);
|
|
47
|
+
}
|
|
48
|
+
process.exit(1);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
child.on('exit', (code) => {
|
|
52
|
+
process.exit(code || 0);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// Forward signals to child process
|
|
56
|
+
['SIGINT', 'SIGTERM', 'SIGQUIT'].forEach((signal) => {
|
|
57
|
+
process.on(signal, () => {
|
|
58
|
+
child.kill(signal);
|
|
59
|
+
});
|
|
60
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "allsecurex-quantum-scanner",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "AllSecureX Quantum Scanner - AI-Driven Post-Quantum Cryptography Assessment Tool",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"quantum",
|
|
7
|
+
"cryptography",
|
|
8
|
+
"security",
|
|
9
|
+
"scanner",
|
|
10
|
+
"pqc",
|
|
11
|
+
"post-quantum",
|
|
12
|
+
"crypto-agility",
|
|
13
|
+
"vulnerability",
|
|
14
|
+
"assessment"
|
|
15
|
+
],
|
|
16
|
+
"author": "AllSecureX <support@allsecurex.com>",
|
|
17
|
+
"license": "Proprietary",
|
|
18
|
+
"homepage": "https://allsecurex.com",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/allsecurex/quantum-scanner.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/allsecurex/quantum-scanner/issues"
|
|
25
|
+
},
|
|
26
|
+
"bin": {
|
|
27
|
+
"quantum-scanner": "bin/quantum-scanner"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"postinstall": "node scripts/install-binary.js"
|
|
31
|
+
},
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=16.0.0"
|
|
34
|
+
},
|
|
35
|
+
"os": [
|
|
36
|
+
"darwin",
|
|
37
|
+
"linux",
|
|
38
|
+
"win32"
|
|
39
|
+
],
|
|
40
|
+
"cpu": [
|
|
41
|
+
"x64",
|
|
42
|
+
"arm64"
|
|
43
|
+
],
|
|
44
|
+
"files": [
|
|
45
|
+
"bin/",
|
|
46
|
+
"scripts/",
|
|
47
|
+
"README.md",
|
|
48
|
+
"LICENSE"
|
|
49
|
+
],
|
|
50
|
+
"publishConfig": {}
|
|
51
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AllSecureX Quantum Scanner - Binary Installer
|
|
5
|
+
*
|
|
6
|
+
* Downloads the appropriate pre-compiled binary for the user's platform.
|
|
7
|
+
* Binaries are hosted on S3 and are signed for integrity verification.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const https = require('https');
|
|
11
|
+
const http = require('http');
|
|
12
|
+
const fs = require('fs');
|
|
13
|
+
const path = require('path');
|
|
14
|
+
const { execSync } = require('child_process');
|
|
15
|
+
const crypto = require('crypto');
|
|
16
|
+
|
|
17
|
+
const BINARY_BASE_URL = 'https://scanner.allsecurex.com/releases';
|
|
18
|
+
const VERSION = require('../package.json').version;
|
|
19
|
+
|
|
20
|
+
// Platform-specific binary mappings
|
|
21
|
+
const PLATFORM_BINARIES = {
|
|
22
|
+
'darwin-x64': 'quantum-scanner-darwin-x64',
|
|
23
|
+
'darwin-arm64': 'quantum-scanner-darwin-arm64',
|
|
24
|
+
'linux-x64': 'quantum-scanner-linux-x64',
|
|
25
|
+
'linux-arm64': 'quantum-scanner-linux-arm64',
|
|
26
|
+
'win32-x64': 'quantum-scanner-win-x64.exe',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// SHA256 checksums for each binary (updated with each release)
|
|
30
|
+
const CHECKSUMS = {
|
|
31
|
+
'darwin-x64': '',
|
|
32
|
+
'darwin-arm64': '',
|
|
33
|
+
'linux-x64': '',
|
|
34
|
+
'linux-arm64': '',
|
|
35
|
+
'win32-x64': '',
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
function getPlatformKey() {
|
|
39
|
+
const platform = process.platform;
|
|
40
|
+
const arch = process.arch;
|
|
41
|
+
return `${platform}-${arch}`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function getBinaryName() {
|
|
45
|
+
const platformKey = getPlatformKey();
|
|
46
|
+
const binary = PLATFORM_BINARIES[platformKey];
|
|
47
|
+
|
|
48
|
+
if (!binary) {
|
|
49
|
+
console.error(`\n❌ Unsupported platform: ${platformKey}`);
|
|
50
|
+
console.error('Supported platforms:');
|
|
51
|
+
Object.keys(PLATFORM_BINARIES).forEach(p => console.error(` - ${p}`));
|
|
52
|
+
console.error('\nPlease visit https://allsecurex.com/download for manual installation.');
|
|
53
|
+
process.exit(1);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return binary;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function downloadFile(url, destPath) {
|
|
60
|
+
return new Promise((resolve, reject) => {
|
|
61
|
+
const protocol = url.startsWith('https') ? https : http;
|
|
62
|
+
const file = fs.createWriteStream(destPath);
|
|
63
|
+
|
|
64
|
+
console.log(`📥 Downloading from ${url}...`);
|
|
65
|
+
|
|
66
|
+
const request = protocol.get(url, (response) => {
|
|
67
|
+
// Handle redirects
|
|
68
|
+
if (response.statusCode === 301 || response.statusCode === 302) {
|
|
69
|
+
file.close();
|
|
70
|
+
fs.unlinkSync(destPath);
|
|
71
|
+
return downloadFile(response.headers.location, destPath).then(resolve).catch(reject);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (response.statusCode !== 200) {
|
|
75
|
+
file.close();
|
|
76
|
+
fs.unlinkSync(destPath);
|
|
77
|
+
reject(new Error(`Failed to download: HTTP ${response.statusCode}`));
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const totalSize = parseInt(response.headers['content-length'], 10);
|
|
82
|
+
let downloadedSize = 0;
|
|
83
|
+
|
|
84
|
+
response.on('data', (chunk) => {
|
|
85
|
+
downloadedSize += chunk.length;
|
|
86
|
+
if (totalSize) {
|
|
87
|
+
const percent = ((downloadedSize / totalSize) * 100).toFixed(1);
|
|
88
|
+
process.stdout.write(`\r Progress: ${percent}% (${formatBytes(downloadedSize)} / ${formatBytes(totalSize)})`);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
response.pipe(file);
|
|
93
|
+
|
|
94
|
+
file.on('finish', () => {
|
|
95
|
+
file.close();
|
|
96
|
+
console.log('\n');
|
|
97
|
+
resolve();
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
request.on('error', (err) => {
|
|
102
|
+
file.close();
|
|
103
|
+
fs.unlink(destPath, () => {});
|
|
104
|
+
reject(err);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
request.setTimeout(60000, () => {
|
|
108
|
+
request.destroy();
|
|
109
|
+
file.close();
|
|
110
|
+
fs.unlink(destPath, () => {});
|
|
111
|
+
reject(new Error('Download timeout'));
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function formatBytes(bytes) {
|
|
117
|
+
if (bytes < 1024) return bytes + ' B';
|
|
118
|
+
if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(1) + ' KB';
|
|
119
|
+
return (bytes / (1024 * 1024)).toFixed(1) + ' MB';
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function verifyChecksum(filePath, expectedChecksum) {
|
|
123
|
+
if (!expectedChecksum) {
|
|
124
|
+
console.log('⚠️ Checksum verification skipped (no checksum available for this release)');
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
console.log('🔐 Verifying checksum...');
|
|
129
|
+
const fileBuffer = fs.readFileSync(filePath);
|
|
130
|
+
const hashSum = crypto.createHash('sha256');
|
|
131
|
+
hashSum.update(fileBuffer);
|
|
132
|
+
const actualChecksum = hashSum.digest('hex');
|
|
133
|
+
|
|
134
|
+
if (actualChecksum !== expectedChecksum) {
|
|
135
|
+
console.error('❌ Checksum verification failed!');
|
|
136
|
+
console.error(` Expected: ${expectedChecksum}`);
|
|
137
|
+
console.error(` Got: ${actualChecksum}`);
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
console.log('✅ Checksum verified');
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
async function install() {
|
|
146
|
+
console.log('\n╔══════════════════════════════════════════════════════════════╗');
|
|
147
|
+
console.log('║ AllSecureX Quantum Scanner - Binary Installer ║');
|
|
148
|
+
console.log('║ AI-Driven Post-Quantum Cryptography Assessment ║');
|
|
149
|
+
console.log('╚══════════════════════════════════════════════════════════════╝\n');
|
|
150
|
+
|
|
151
|
+
const platformKey = getPlatformKey();
|
|
152
|
+
const binaryName = getBinaryName();
|
|
153
|
+
const downloadUrl = `${BINARY_BASE_URL}/v${VERSION}/${binaryName}`;
|
|
154
|
+
|
|
155
|
+
console.log(`📋 Platform: ${platformKey}`);
|
|
156
|
+
console.log(`📋 Version: ${VERSION}`);
|
|
157
|
+
console.log(`📋 Binary: ${binaryName}\n`);
|
|
158
|
+
|
|
159
|
+
const binDir = path.join(__dirname, '..', 'bin');
|
|
160
|
+
const binaryPath = path.join(binDir, process.platform === 'win32' ? 'quantum-scanner.exe' : 'quantum-scanner-bin');
|
|
161
|
+
|
|
162
|
+
// Ensure bin directory exists
|
|
163
|
+
if (!fs.existsSync(binDir)) {
|
|
164
|
+
fs.mkdirSync(binDir, { recursive: true });
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
try {
|
|
168
|
+
await downloadFile(downloadUrl, binaryPath);
|
|
169
|
+
|
|
170
|
+
// Verify checksum
|
|
171
|
+
const expectedChecksum = CHECKSUMS[platformKey];
|
|
172
|
+
if (!verifyChecksum(binaryPath, expectedChecksum)) {
|
|
173
|
+
fs.unlinkSync(binaryPath);
|
|
174
|
+
console.error('\n❌ Installation failed: Checksum mismatch');
|
|
175
|
+
console.error('Please try again or contact support@allsecurex.com');
|
|
176
|
+
process.exit(1);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Make executable on Unix systems
|
|
180
|
+
if (process.platform !== 'win32') {
|
|
181
|
+
fs.chmodSync(binaryPath, '755');
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
console.log('✅ Installation complete!\n');
|
|
185
|
+
console.log('🚀 Get started:');
|
|
186
|
+
console.log(' quantum-scanner auth login # Authenticate with your API key');
|
|
187
|
+
console.log(' quantum-scanner scan . # Scan current directory');
|
|
188
|
+
console.log(' quantum-scanner --help # Show all commands\n');
|
|
189
|
+
console.log('📚 Documentation: https://allsecurex.com/docs/quantum-scanner');
|
|
190
|
+
console.log('💬 Support: support@allsecurex.com\n');
|
|
191
|
+
|
|
192
|
+
} catch (error) {
|
|
193
|
+
console.error(`\n❌ Installation failed: ${error.message}`);
|
|
194
|
+
console.error('\nManual installation:');
|
|
195
|
+
console.error(`1. Download the binary from: https://scanner.allsecurex.com/download`);
|
|
196
|
+
console.error(`2. Place it in your PATH as 'quantum-scanner'`);
|
|
197
|
+
console.error(`3. Make it executable: chmod +x quantum-scanner`);
|
|
198
|
+
process.exit(1);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// Run installer
|
|
203
|
+
install().catch((err) => {
|
|
204
|
+
console.error('Installation error:', err);
|
|
205
|
+
process.exit(1);
|
|
206
|
+
});
|