codeprobe-scanner 1.0.5 → 1.0.6
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/bin/codeprobe.cjs +1 -1
- package/package.json +1 -1
- package/src/integrations/videodb.ts +9 -8
package/bin/codeprobe.cjs
CHANGED
|
@@ -40,7 +40,7 @@ if (!bunCmd) {
|
|
|
40
40
|
|
|
41
41
|
// Run the CLI
|
|
42
42
|
const args = process.argv.slice(2);
|
|
43
|
-
const cmd = `${bunCmd} run ${path.join(packageRoot, 'src/cli
|
|
43
|
+
const cmd = `${bunCmd} run ${path.join(packageRoot, 'src/cli/index.ts')} ${args.join(' ')}`;
|
|
44
44
|
|
|
45
45
|
try {
|
|
46
46
|
execSync(cmd, {
|
package/package.json
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { VideoDb } from "videodb";
|
|
2
|
-
|
|
3
1
|
interface ExploitVideoRecord {
|
|
4
2
|
cveId: string;
|
|
5
3
|
package: string;
|
|
@@ -11,7 +9,7 @@ interface ExploitVideoRecord {
|
|
|
11
9
|
}
|
|
12
10
|
|
|
13
11
|
export class VideoDBRecorder {
|
|
14
|
-
private videoDb:
|
|
12
|
+
private videoDb: any = null;
|
|
15
13
|
private apiKey: string;
|
|
16
14
|
private recordedVideos: Map<string, ExploitVideoRecord> = new Map();
|
|
17
15
|
|
|
@@ -22,15 +20,18 @@ export class VideoDBRecorder {
|
|
|
22
20
|
|
|
23
21
|
private initializeVideoDB(): void {
|
|
24
22
|
if (!this.apiKey) {
|
|
25
|
-
console.warn("[VideoDB] API key not found, video recording disabled");
|
|
26
23
|
return;
|
|
27
24
|
}
|
|
28
25
|
|
|
29
26
|
try {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
const videodb = require("videodb");
|
|
28
|
+
const Constructor = videodb.VideoDb || videodb.Connection || videodb.connect;
|
|
29
|
+
if (typeof Constructor === "function") {
|
|
30
|
+
this.videoDb = new Constructor({ apiKey: this.apiKey });
|
|
31
|
+
console.log("[VideoDB] ✓ Initialized - exploit recordings enabled");
|
|
32
|
+
}
|
|
33
|
+
} catch {
|
|
34
|
+
// VideoDB unavailable, video recording disabled
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
|