11import type {
2- SecurityVulnerability ,
3- SecurityScanResult
2+ KernelSecurityVulnerability ,
3+ KernelSecurityScanResult
44} from '@objectstack/spec/kernel' ;
55import type { ObjectLogger } from '../logger.js' ;
66
@@ -42,10 +42,10 @@ export class PluginSecurityScanner {
4242 private logger : ObjectLogger ;
4343
4444 // Known vulnerabilities database (CVE cache)
45- private vulnerabilityDb = new Map < string , SecurityVulnerability > ( ) ;
45+ private vulnerabilityDb = new Map < string , KernelSecurityVulnerability > ( ) ;
4646
4747 // Scan results cache
48- private scanResults = new Map < string , SecurityScanResult > ( ) ;
48+ private scanResults = new Map < string , KernelSecurityScanResult > ( ) ;
4949
5050 private passThreshold : number = 70 ;
5151
@@ -59,7 +59,7 @@ export class PluginSecurityScanner {
5959 /**
6060 * Perform a comprehensive security scan on a plugin
6161 */
62- async scan ( target : ScanTarget ) : Promise < SecurityScanResult > {
62+ async scan ( target : ScanTarget ) : Promise < KernelSecurityScanResult > {
6363 this . logger . info ( 'Starting security scan' , {
6464 pluginId : target . pluginId ,
6565 version : target . version
@@ -91,7 +91,7 @@ export class PluginSecurityScanner {
9191 // Calculate security score (0-100, higher is better)
9292 const score = this . calculateSecurityScore ( issues ) ;
9393
94- const result : SecurityScanResult = {
94+ const result : KernelSecurityScanResult = {
9595 timestamp : new Date ( ) . toISOString ( ) ,
9696 scanner : { name : 'ObjectStack Security Scanner' , version : '1.0.0' } ,
9797 status : score >= this . passThreshold ? 'passed' : 'failed' ,
@@ -309,7 +309,7 @@ export class PluginSecurityScanner {
309309 addVulnerability (
310310 packageName : string ,
311311 version : string ,
312- vulnerability : SecurityVulnerability
312+ vulnerability : KernelSecurityVulnerability
313313 ) : void {
314314 const key = `${ packageName } @${ version } ` ;
315315 this . vulnerabilityDb . set ( key , vulnerability ) ;
@@ -324,7 +324,7 @@ export class PluginSecurityScanner {
324324 /**
325325 * Get scan result from cache
326326 */
327- getScanResult ( pluginId : string , version : string ) : SecurityScanResult | undefined {
327+ getScanResult ( pluginId : string , version : string ) : KernelSecurityScanResult | undefined {
328328 return this . scanResults . get ( `${ pluginId } :${ version } ` ) ;
329329 }
330330
0 commit comments