@vibecontrols/vibe-plugin-security-sast-deep 2026.601.1 → 2026.1108.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/dist/index.js +1 -1
- package/package.json +40 -22
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ProviderRegistry,TelemetryEmitter,createLifecycleHooks}from"@vibecontrols/plugin-sdk";import{spawn}from"child_process";import{createHash}from"crypto";import{promises as fs}from"fs";import*as os from"os";import*as path from"path";import{normalizeSarif}from"@vibecontrols/vibe-plugin-security/normalizer";import{resolveToolPath}from"@vibecontrols/vibe-plugin-security/tool-installer";var SEMGREP_VERSION="1.95.0",OSV_SCANNER_VERSION="1.9.2",TOOLS_MANIFEST={semgrep:{version:"1.95.0",binaryName:"semgrep",versionMatcher:"1.95.0".replace(/\./g,"\\."),downloads:{}},"osv-scanner":{version:"1.9.2",binaryName:"osv-scanner",versionMatcher:"1.9.2".replace(/\./g,"\\."),downloads:{"linux-x64":{url:"https://github.com/google/osv-scanner/releases/download/v1.9.2/osv-scanner_linux_amd64",sha256:"d6af4b67fa5de658598bd2d445efb99e90d1734b3146962418719c4350ecb74b",binaryWithinArchive:"osv-scanner",archive:"raw"},"linux-arm64":{url:"https://github.com/google/osv-scanner/releases/download/v1.9.2/osv-scanner_linux_arm64",sha256:"9c6160afb26c79449a1f1b667323b989a57dda8fc19f22936c9ff920fd97ddfa",binaryWithinArchive:"osv-scanner",archive:"raw"},"darwin-x64":{url:"https://github.com/google/osv-scanner/releases/download/v1.9.2/osv-scanner_darwin_amd64",sha256:"487ab433b2c2a8c80b737c0bd428a80e6d2e211b4adf775a52a6964163fa3249",binaryWithinArchive:"osv-scanner",archive:"raw"},"darwin-arm64":{url:"https://github.com/google/osv-scanner/releases/download/v1.9.2/osv-scanner_darwin_arm64",sha256:"393f2c7089d9431bd26a3804d6e46d417b1c05abd5d49c41c7dfc174c520acf0",binaryWithinArchive:"osv-scanner",archive:"raw"}}}};var DEFAULT_TOOL_TIMEOUT_MS=600000,LOG_NAMESPACE="semgrep-osv-scanner-provider";class SemgrepOsvScannerProvider{name="semgrep-osv-scanner";stage="pull_request.deep";toolVersion=`semgrep@${SEMGREP_VERSION}+osv-scanner@${OSV_SCANNER_VERSION}`;host;semgrepPath;osvScannerPath;active=new Map;async init(host){this.host=host}async ensureToolInstalled(){let ctx={dataDir:this.host?.getDataDir?.()??path.join(os.homedir(),".boff/vibecontrols"),log:{info:(m)=>this.host?.logger?.info?.(LOG_NAMESPACE,m),warn:(m)=>this.host?.logger?.warn?.(LOG_NAMESPACE,m),error:(m)=>this.host?.logger?.error?.(LOG_NAMESPACE,m)}};this.osvScannerPath=await resolveToolPath(ctx,"osv-scanner",TOOLS_MANIFEST["osv-scanner"]),this.semgrepPath=await this.resolveSemgrep(ctx.log)}async run(input){let startedAt=Date.now();try{if(!this.semgrepPath||!this.osvScannerPath)await this.ensureToolInstalled()}catch(err){return{runId:input.runId,status:"errored",findings:[],evidence:[],durationMs:Date.now()-startedAt,summary:{critical:0,high:0,medium:0,low:0,info:0},errorReason:`semgrep-osv-scanner: tool resolution failed: ${String(err)}`}}let cfg=input.config??{},timeoutMs=typeof cfg.toolTimeoutMs==="number"&&cfg.toolTimeoutMs>0?cfg.toolTimeoutMs:DEFAULT_TOOL_TIMEOUT_MS,findings=[],evidence=[],lastError;input.onProgress?.({pct:5,message:"Starting Semgrep scan"});try{let semgrepSarif=path.join(input.workdir,"semgrep.sarif"),semgrepArgs=["--config",cfg.semgrepConfig??"p/default","--sarif","--output",semgrepSarif,"--quiet","--no-rewrite-rule-ids","--disable-version-check","--metrics","off"];if(cfg.extraSemgrepArgs)semgrepArgs.push(...cfg.extraSemgrepArgs);semgrepArgs.push(input.repoLocalPath),input.onProgress?.({pct:10,message:"Running Semgrep (SAST)"});let semgrepRes=await this.spawnAndWait(input.runId,this.semgrepPath,semgrepArgs,{timeoutMs});if(semgrepRes.code!==0&&semgrepRes.code!==1)lastError=`semgrep exited ${semgrepRes.code}: ${semgrepRes.stderr.slice(0,500)}`,this.host?.logger?.warn?.(LOG_NAMESPACE,lastError);else input.onProgress?.({pct:30,message:"Parsing Semgrep SARIF"}),await this.ingestSarif(semgrepSarif,"semgrep","sast",findings,evidence,"no semgrep SARIF produced")}catch(err){lastError=`semgrep step failed: ${String(err)}`,this.host?.logger?.error?.(LOG_NAMESPACE,lastError)}input.onProgress?.({pct:55,message:"Running osv-scanner (SCA)"});try{let osvSarif=path.join(input.workdir,"osv.sarif"),osvArgs=["--format","sarif","--output",osvSarif];if(cfg.extraOsvScannerArgs)osvArgs.push(...cfg.extraOsvScannerArgs);osvArgs.push(input.repoLocalPath);let osvRes=await this.spawnAndWait(input.runId,this.osvScannerPath,osvArgs,{timeoutMs});if(osvRes.code!==0&&osvRes.code!==1&&osvRes.code!==128){let msg=`osv-scanner exited ${osvRes.code}: ${osvRes.stderr.slice(0,500)}`;if(this.host?.logger?.warn?.(LOG_NAMESPACE,msg),!lastError)lastError=msg}else input.onProgress?.({pct:80,message:"Parsing osv-scanner SARIF"}),await this.ingestSarif(osvSarif,"osv-scanner","vuln",findings,evidence,"no osv-scanner SARIF produced")}catch(err){let msg=`osv-scanner step failed: ${String(err)}`;if(this.host?.logger?.error?.(LOG_NAMESPACE,msg),!lastError)lastError=msg}input.onProgress?.({pct:100,message:"Scan complete"});let summary=summarize(findings),status=findings.length===0&&lastError?"errored":"succeeded";return{runId:input.runId,status,findings,evidence,durationMs:Date.now()-startedAt,summary,errorReason:status==="errored"?lastError:void 0}}async cancel(runId){let child=this.active.get(runId);if(!child)return;try{child.kill("SIGTERM"),setTimeout(()=>{try{child.kill("SIGKILL")}catch{}},5000)}finally{this.active.delete(runId)}}metadata(){return{stage:this.stage,supportedProfiles:["backend","frontend","cli","sdk","mcp","chrome-extension","vscode-extension"],toolVersion:this.toolVersion,description:"Semgrep (p/default ruleset) + osv-scanner for pull_request.deep"}}async ingestSarif(sarifPath,providerLabel,category,findings,evidence,missingMessage){try{let raw=await fs.readFile(sarifPath,"utf-8"),parsed=normalizeSarif(raw,providerLabel,category);for(let f of parsed)findings.push(f);let sha256=createHash("sha256").update(raw).digest("hex"),stat=await fs.stat(sarifPath);evidence.push({type:"sarif",localPath:sarifPath,sha256,sizeBytes:stat.size})}catch(err){this.host?.logger?.warn?.(LOG_NAMESPACE,`${missingMessage}: ${String(err)}`)}}spawnAndWait(runId,bin,args,opts){return new Promise((resolve)=>{let child=spawn(bin,args,{stdio:["ignore","pipe","pipe"]});this.active.set(runId,child);let stdout="",stderr="",timer=setTimeout(()=>{try{child.kill("SIGTERM")}catch{}setTimeout(()=>{try{child.kill("SIGKILL")}catch{}},5000)},opts.timeoutMs);child.stdout?.on("data",(b)=>stdout+=b.toString()),child.stderr?.on("data",(b)=>stderr+=b.toString()),child.on("close",(code)=>{clearTimeout(timer),this.active.delete(runId),resolve({code,stdout,stderr})}),child.on("error",(err)=>{clearTimeout(timer),this.active.delete(runId),resolve({code:-1,stdout,stderr:err.message})})})}async resolveSemgrep(log){let onPath=await this.whichBinary("semgrep");if(onPath){let ver=await this.binaryVersionOutput(onPath);if(ver.includes(SEMGREP_VERSION))return log.info?.(`semgrep found on PATH at ${onPath} (matches ${SEMGREP_VERSION})`),onPath;return log.info?.(`semgrep found on PATH at ${onPath} (version output: ${ver.slice(0,200)}); using it as-is`),onPath}let userBinDir=path.join(os.homedir(),".local","bin");if(await this.whichBinary("pipx")){log.info?.(`semgrep not on PATH; running 'pipx install semgrep==${SEMGREP_VERSION}'`);try{await this.runOneShot("pipx",["install","--force",`semgrep==${SEMGREP_VERSION}`],{timeoutMs:300000});let semgrep=path.join(userBinDir,"semgrep");try{return await fs.access(semgrep),semgrep}catch{let afterPath=await this.whichBinary("semgrep");if(afterPath)return afterPath}}catch(err){log.warn?.(`pipx install semgrep failed: ${String(err)}`)}}if(await this.whichBinary("python3")){log.info?.(`semgrep not on PATH; running 'python3 -m pip install --user semgrep==${SEMGREP_VERSION}'`);try{await this.runOneShot("python3",["-m","pip","install","--user",`semgrep==${SEMGREP_VERSION}`],{timeoutMs:300000});let semgrep=path.join(userBinDir,"semgrep");try{return await fs.access(semgrep),semgrep}catch{let afterPath=await this.whichBinary("semgrep");if(afterPath)return afterPath}}catch(err){log.warn?.(`pip install semgrep failed: ${String(err)}`)}}throw Error("semgrep not installed and no pipx/pip available. Install via 'pipx install semgrep' or 'pip install semgrep=="+SEMGREP_VERSION+"'.")}whichBinary(bin){return Promise.resolve(Bun.which(bin,{PATH:process.env.PATH}))}binaryVersionOutput(bin){return new Promise((resolve)=>{let child=spawn(bin,["--version"],{stdio:["ignore","pipe","pipe"]}),out="";child.stdout?.on("data",(b)=>out+=b.toString()),child.stderr?.on("data",(b)=>out+=b.toString()),child.on("close",()=>resolve(out)),child.on("error",()=>resolve(""))})}runOneShot(bin,args,opts){return new Promise((resolve,reject)=>{let child=spawn(bin,args,{stdio:["ignore","pipe","pipe"]}),stdout="",stderr="",timer=setTimeout(()=>{try{child.kill("SIGTERM")}catch{}},opts.timeoutMs);child.stdout?.on("data",(b)=>stdout+=b.toString()),child.stderr?.on("data",(b)=>stderr+=b.toString()),child.on("close",(code)=>{if(clearTimeout(timer),code===0)resolve({code,stdout,stderr});else reject(Error(`${bin} exited ${code}: ${stderr.slice(0,500)}`))}),child.on("error",(err)=>{clearTimeout(timer),reject(err)})})}}function summarize(findings){let s={critical:0,high:0,medium:0,low:0,info:0};for(let f of findings)s[f.severity]++;return s}var PLUGIN_NAME="security-sast-deep",PLUGIN_VERSION="2026.528.6",createPlugin=(_ctx)=>{let provider=new SemgrepOsvScannerProvider,telemetry=new TelemetryEmitter(PLUGIN_NAME,PLUGIN_VERSION),lifecycle=createLifecycleHooks({name:PLUGIN_NAME,telemetryEventName:"security.sast-deep.ready",onInit:async(host)=>{await provider.init(host),new ProviderRegistry(host).registerProvider("security.secrets","semgrep-osv-scanner",provider),telemetry.emit("security.sast-deep.registered",{provider:"semgrep-osv-scanner",toolVersion:provider.toolVersion})}});return{name:PLUGIN_NAME,version:PLUGIN_VERSION,description:"Full SAST + SCA sweep for the pull_request.deep lifecycle stage.",tags:["backend","provider","integration"],capabilities:{storage:"rw",subprocess:!0,audit:!0,telemetry:!0},onServerStart:lifecycle.onServerStart,onServerStop:lifecycle.onServerStop}},src_default=createPlugin;export{src_default as default,createPlugin,SemgrepOsvScannerProvider};
|
|
2
|
+
import{ProviderRegistry,TelemetryEmitter,createLifecycleHooks}from"@vibecontrols/plugin-sdk";import{spawn}from"child_process";import{createHash}from"crypto";import{promises as fs}from"fs";import*as os from"os";import*as path from"path";import{normalizeSarif}from"@vibecontrols/vibe-plugin-security/normalizer";import{resolveToolPath}from"@vibecontrols/vibe-plugin-security/tool-installer";var SEMGREP_VERSION="1.95.0",OSV_SCANNER_VERSION="1.9.2",TOOLS_MANIFEST={semgrep:{version:"1.95.0",binaryName:"semgrep",versionMatcher:"1.95.0".replace(/\./g,"\\."),downloads:{}},"osv-scanner":{version:"1.9.2",binaryName:"osv-scanner",versionMatcher:"1.9.2".replace(/\./g,"\\."),downloads:{"linux-x64":{url:"https://github.com/google/osv-scanner/releases/download/v1.9.2/osv-scanner_linux_amd64",sha256:"d6af4b67fa5de658598bd2d445efb99e90d1734b3146962418719c4350ecb74b",binaryWithinArchive:"osv-scanner",archive:"raw"},"linux-arm64":{url:"https://github.com/google/osv-scanner/releases/download/v1.9.2/osv-scanner_linux_arm64",sha256:"9c6160afb26c79449a1f1b667323b989a57dda8fc19f22936c9ff920fd97ddfa",binaryWithinArchive:"osv-scanner",archive:"raw"},"darwin-x64":{url:"https://github.com/google/osv-scanner/releases/download/v1.9.2/osv-scanner_darwin_amd64",sha256:"487ab433b2c2a8c80b737c0bd428a80e6d2e211b4adf775a52a6964163fa3249",binaryWithinArchive:"osv-scanner",archive:"raw"},"darwin-arm64":{url:"https://github.com/google/osv-scanner/releases/download/v1.9.2/osv-scanner_darwin_arm64",sha256:"393f2c7089d9431bd26a3804d6e46d417b1c05abd5d49c41c7dfc174c520acf0",binaryWithinArchive:"osv-scanner",archive:"raw"}}}};var DEFAULT_TOOL_TIMEOUT_MS=600000,LOG_NAMESPACE="semgrep-osv-scanner-provider";class SemgrepOsvScannerProvider{name="semgrep-osv-scanner";stage="pull_request.deep";toolVersion=`semgrep@${SEMGREP_VERSION}+osv-scanner@${OSV_SCANNER_VERSION}`;host;semgrepPath;osvScannerPath;active=new Map;async init(host){this.host=host}async ensureToolInstalled(){let ctx={dataDir:this.host?.getDataDir?.()??path.join(os.homedir(),".boff/vibecontrols"),log:{info:(m)=>this.host?.logger?.info?.(LOG_NAMESPACE,m),warn:(m)=>this.host?.logger?.warn?.(LOG_NAMESPACE,m),error:(m)=>this.host?.logger?.error?.(LOG_NAMESPACE,m)}},osvScannerEntry=TOOLS_MANIFEST["osv-scanner"];if(!osvScannerEntry)throw Error("osv-scanner entry missing from the tools manifest");this.osvScannerPath=await resolveToolPath(ctx,"osv-scanner",osvScannerEntry),this.semgrepPath=await this.resolveSemgrep(ctx.log)}async run(input){let startedAt=Date.now();try{if(!this.semgrepPath||!this.osvScannerPath)await this.ensureToolInstalled()}catch(err){return{runId:input.runId,status:"errored",findings:[],evidence:[],durationMs:Date.now()-startedAt,summary:{critical:0,high:0,medium:0,low:0,info:0},errorReason:`semgrep-osv-scanner: tool resolution failed: ${String(err)}`}}let cfg=input.config??{},timeoutMs=typeof cfg.toolTimeoutMs==="number"&&cfg.toolTimeoutMs>0?cfg.toolTimeoutMs:DEFAULT_TOOL_TIMEOUT_MS,findings=[],evidence=[],lastError;input.onProgress?.({pct:5,message:"Starting Semgrep scan"});try{let semgrepSarif=path.join(input.workdir,"semgrep.sarif"),semgrepArgs=["--config",cfg.semgrepConfig??"p/default","--sarif","--output",semgrepSarif,"--quiet","--no-rewrite-rule-ids","--disable-version-check","--metrics","off"];if(cfg.extraSemgrepArgs)semgrepArgs.push(...cfg.extraSemgrepArgs);semgrepArgs.push(input.repoLocalPath),input.onProgress?.({pct:10,message:"Running Semgrep (SAST)"});let semgrepRes=await this.spawnAndWait(input.runId,this.semgrepPath,semgrepArgs,{timeoutMs});if(semgrepRes.code!==0&&semgrepRes.code!==1)lastError=`semgrep exited ${semgrepRes.code}: ${semgrepRes.stderr.slice(0,500)}`,this.host?.logger?.warn?.(LOG_NAMESPACE,lastError);else input.onProgress?.({pct:30,message:"Parsing Semgrep SARIF"}),await this.ingestSarif(semgrepSarif,"semgrep","sast",findings,evidence,"no semgrep SARIF produced")}catch(err){lastError=`semgrep step failed: ${String(err)}`,this.host?.logger?.error?.(LOG_NAMESPACE,lastError)}input.onProgress?.({pct:55,message:"Running osv-scanner (SCA)"});try{let osvSarif=path.join(input.workdir,"osv.sarif"),osvArgs=["--format","sarif","--output",osvSarif];if(cfg.extraOsvScannerArgs)osvArgs.push(...cfg.extraOsvScannerArgs);osvArgs.push(input.repoLocalPath);let osvRes=await this.spawnAndWait(input.runId,this.osvScannerPath,osvArgs,{timeoutMs});if(osvRes.code!==0&&osvRes.code!==1&&osvRes.code!==128){let msg=`osv-scanner exited ${osvRes.code}: ${osvRes.stderr.slice(0,500)}`;if(this.host?.logger?.warn?.(LOG_NAMESPACE,msg),!lastError)lastError=msg}else input.onProgress?.({pct:80,message:"Parsing osv-scanner SARIF"}),await this.ingestSarif(osvSarif,"osv-scanner","vuln",findings,evidence,"no osv-scanner SARIF produced")}catch(err){let msg=`osv-scanner step failed: ${String(err)}`;if(this.host?.logger?.error?.(LOG_NAMESPACE,msg),!lastError)lastError=msg}input.onProgress?.({pct:100,message:"Scan complete"});let summary=summarize(findings),status=findings.length===0&&lastError?"errored":"succeeded";return{runId:input.runId,status,findings,evidence,durationMs:Date.now()-startedAt,summary,errorReason:status==="errored"?lastError:void 0}}async cancel(runId){let child=this.active.get(runId);if(!child)return;try{child.kill("SIGTERM"),setTimeout(()=>{try{child.kill("SIGKILL")}catch{}},5000)}finally{this.active.delete(runId)}}metadata(){return{stage:this.stage,supportedProfiles:["backend","frontend","cli","sdk","mcp","chrome-extension","vscode-extension"],toolVersion:this.toolVersion,description:"Semgrep (p/default ruleset) + osv-scanner for pull_request.deep"}}async ingestSarif(sarifPath,providerLabel,category,findings,evidence,missingMessage){try{let raw=await fs.readFile(sarifPath,"utf-8"),parsed=normalizeSarif(raw,providerLabel,category);for(let f of parsed)findings.push(f);let sha256=createHash("sha256").update(raw).digest("hex"),stat=await fs.stat(sarifPath);evidence.push({type:"sarif",localPath:sarifPath,sha256,sizeBytes:stat.size})}catch(err){this.host?.logger?.warn?.(LOG_NAMESPACE,`${missingMessage}: ${String(err)}`)}}spawnAndWait(runId,bin,args,opts){return new Promise((resolve)=>{let child=spawn(bin,args,{stdio:["ignore","pipe","pipe"]});this.active.set(runId,child);let stdout="",stderr="",timer=setTimeout(()=>{try{child.kill("SIGTERM")}catch{}setTimeout(()=>{try{child.kill("SIGKILL")}catch{}},5000)},opts.timeoutMs);child.stdout?.on("data",(b)=>stdout+=b.toString()),child.stderr?.on("data",(b)=>stderr+=b.toString()),child.on("close",(code)=>{clearTimeout(timer),this.active.delete(runId),resolve({code,stdout,stderr})}),child.on("error",(err)=>{clearTimeout(timer),this.active.delete(runId),resolve({code:-1,stdout,stderr:err.message})})})}async resolveSemgrep(log){let onPath=await this.whichBinary("semgrep");if(onPath){let ver=await this.binaryVersionOutput(onPath);if(ver.includes(SEMGREP_VERSION))return log.info?.(`semgrep found on PATH at ${onPath} (matches ${SEMGREP_VERSION})`),onPath;return log.info?.(`semgrep found on PATH at ${onPath} (version output: ${ver.slice(0,200)}); using it as-is`),onPath}let userBinDir=path.join(os.homedir(),".local","bin");if(await this.whichBinary("pipx")){log.info?.(`semgrep not on PATH; running 'pipx install semgrep==${SEMGREP_VERSION}'`);try{await this.runOneShot("pipx",["install","--force",`semgrep==${SEMGREP_VERSION}`],{timeoutMs:300000});let semgrep=path.join(userBinDir,"semgrep");try{return await fs.access(semgrep),semgrep}catch{let afterPath=await this.whichBinary("semgrep");if(afterPath)return afterPath}}catch(err){log.warn?.(`pipx install semgrep failed: ${String(err)}`)}}if(await this.whichBinary("python3")){log.info?.(`semgrep not on PATH; running 'python3 -m pip install --user semgrep==${SEMGREP_VERSION}'`);try{await this.runOneShot("python3",["-m","pip","install","--user",`semgrep==${SEMGREP_VERSION}`],{timeoutMs:300000});let semgrep=path.join(userBinDir,"semgrep");try{return await fs.access(semgrep),semgrep}catch{let afterPath=await this.whichBinary("semgrep");if(afterPath)return afterPath}}catch(err){log.warn?.(`pip install semgrep failed: ${String(err)}`)}}throw Error("semgrep not installed and no pipx/pip available. Install via 'pipx install semgrep' or 'pip install semgrep=="+SEMGREP_VERSION+"'.")}whichBinary(bin){return Promise.resolve(Bun.which(bin,{PATH:process.env.PATH}))}binaryVersionOutput(bin){return new Promise((resolve)=>{let child=spawn(bin,["--version"],{stdio:["ignore","pipe","pipe"]}),out="";child.stdout?.on("data",(b)=>out+=b.toString()),child.stderr?.on("data",(b)=>out+=b.toString()),child.on("close",()=>resolve(out)),child.on("error",()=>resolve(""))})}runOneShot(bin,args,opts){return new Promise((resolve,reject)=>{let child=spawn(bin,args,{stdio:["ignore","pipe","pipe"]}),stdout="",stderr="",timer=setTimeout(()=>{try{child.kill("SIGTERM")}catch{}},opts.timeoutMs);child.stdout?.on("data",(b)=>stdout+=b.toString()),child.stderr?.on("data",(b)=>stderr+=b.toString()),child.on("close",(code)=>{if(clearTimeout(timer),code===0)resolve({code,stdout,stderr});else reject(Error(`${bin} exited ${code}: ${stderr.slice(0,500)}`))}),child.on("error",(err)=>{clearTimeout(timer),reject(err)})})}}function summarize(findings){let s={critical:0,high:0,medium:0,low:0,info:0};for(let f of findings)s[f.severity]++;return s}var PLUGIN_NAME="security-sast-deep",PLUGIN_VERSION="2026.528.6",createPlugin=(_ctx)=>{let provider=new SemgrepOsvScannerProvider,telemetry=new TelemetryEmitter(PLUGIN_NAME,PLUGIN_VERSION),lifecycle=createLifecycleHooks({name:PLUGIN_NAME,telemetryEventName:"security.sast-deep.ready",onInit:async(host)=>{await provider.init(host),new ProviderRegistry(host).registerProvider("security.secrets","semgrep-osv-scanner",provider),telemetry.emit("security.sast-deep.registered",{provider:"semgrep-osv-scanner",toolVersion:provider.toolVersion})}});return{name:PLUGIN_NAME,version:PLUGIN_VERSION,description:"Full SAST + SCA sweep for the pull_request.deep lifecycle stage.",tags:["backend","provider","integration"],capabilities:{storage:"rw",subprocess:!0,audit:!0,telemetry:!0},onServerStart:lifecycle.onServerStart,onServerStop:lifecycle.onServerStop}},src_default=createPlugin;export{SemgrepOsvScannerProvider,createPlugin,src_default as default};
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibecontrols/vibe-plugin-security-sast-deep",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.1108.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"description": "Full SAST + SCA sweep for the pull_request.deep lifecycle stage. Semgrep with full ruleset (auto config) + osv-scanner against package manifests.",
|
|
8
8
|
"engines": {
|
|
9
|
-
"bun": ">=1.
|
|
9
|
+
"bun": ">=1.4.4"
|
|
10
10
|
},
|
|
11
11
|
"author": {
|
|
12
12
|
"name": "Vignesh T.V",
|
|
@@ -14,32 +14,31 @@
|
|
|
14
14
|
},
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"scripts": {
|
|
17
|
-
"build": "bun build ./src/index.ts --outdir ./dist --target bun --minify-syntax --minify-whitespace --external elysia --external @vibecontrols/vibe-plugin-security --external @vibecontrols/plugin-sdk && tsc
|
|
18
|
-
"dev": "tsc --watch",
|
|
19
|
-
"lint": "eslint
|
|
20
|
-
"format": "
|
|
21
|
-
"format:check": "
|
|
22
|
-
"type:check": "
|
|
23
|
-
"test": "bun test
|
|
17
|
+
"build": "bun build ./src/index.ts --outdir ./dist --target bun --minify-syntax --minify-whitespace --external elysia --external @vibecontrols/vibe-plugin-security --external @vibecontrols/plugin-sdk && tsc -p tsconfig.build.json",
|
|
18
|
+
"dev": "tsc -p tsconfig.build.json --watch",
|
|
19
|
+
"lint": "eslint .",
|
|
20
|
+
"format": "bun fmt",
|
|
21
|
+
"format:check": "bun fmt --check",
|
|
22
|
+
"type:check": "boff gate -- bun check --no-pretty",
|
|
23
|
+
"test": "bun test",
|
|
24
24
|
"clean": "rimraf dist",
|
|
25
25
|
"prebuild": "bun run clean",
|
|
26
26
|
"prepublishOnly": "bun run build",
|
|
27
|
-
"sanity": "
|
|
27
|
+
"sanity": "boff sanity",
|
|
28
|
+
"sanity:force": "boff sanity --force",
|
|
29
|
+
"audit": "bun audit --audit-level=high"
|
|
28
30
|
},
|
|
29
31
|
"dependencies": {
|
|
30
32
|
"@vibecontrols/plugin-sdk": "2026.527.1",
|
|
31
33
|
"@vibecontrols/vibe-plugin-security": "2026.528.1"
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@types/
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"rimraf": "^6.0.1",
|
|
41
|
-
"typescript": "^5.9.3",
|
|
42
|
-
"typescript-eslint": "^8.56.0"
|
|
36
|
+
"@burdenoff/toolchain": "2026.1107.14",
|
|
37
|
+
"@types/bun": "^1.4.4",
|
|
38
|
+
"eslint": "^9.39.5",
|
|
39
|
+
"knip": "^6.44.1",
|
|
40
|
+
"rimraf": "^6.1.4",
|
|
41
|
+
"typescript": "6.0.3"
|
|
43
42
|
},
|
|
44
43
|
"peerDependencies": {
|
|
45
44
|
"@vibecontrols/agent": ">=2026.428.0"
|
|
@@ -62,10 +61,10 @@
|
|
|
62
61
|
],
|
|
63
62
|
"repository": {
|
|
64
63
|
"type": "git",
|
|
65
|
-
"url": "git+https://github.com/
|
|
64
|
+
"url": "git+https://github.com/Algoshred/vibe-plugin-security-sast-deep.git"
|
|
66
65
|
},
|
|
67
66
|
"bugs": {
|
|
68
|
-
"url": "https://github.com/
|
|
67
|
+
"url": "https://github.com/Algoshred/vibe-plugin-security-sast-deep/issues"
|
|
69
68
|
},
|
|
70
69
|
"homepage": "https://vibecontrols.com",
|
|
71
70
|
"publishConfig": {
|
|
@@ -77,5 +76,24 @@
|
|
|
77
76
|
"!dist/**/*.map",
|
|
78
77
|
"README.md",
|
|
79
78
|
"LICENSE"
|
|
80
|
-
]
|
|
79
|
+
],
|
|
80
|
+
"packageManager": "bun@1.4.4",
|
|
81
|
+
"boff": {
|
|
82
|
+
"type": "plugin",
|
|
83
|
+
"sanity": {
|
|
84
|
+
"steps": [
|
|
85
|
+
"format",
|
|
86
|
+
"lint",
|
|
87
|
+
"typecheck",
|
|
88
|
+
"build",
|
|
89
|
+
"test",
|
|
90
|
+
"knip"
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"overrides": {
|
|
95
|
+
"brace-expansion": ">=5.0.12",
|
|
96
|
+
"minimatch": ">=3.1.3",
|
|
97
|
+
"elysia": "^1.4.29"
|
|
98
|
+
}
|
|
81
99
|
}
|