@clear-capabilities/agentic-security-scanner 0.149.0 → 0.149.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/CHANGELOG.md +17 -0
- package/dist/agentic-security.mjs +1 -1
- package/dist/agentic-security.mjs.sha256 +1 -1
- package/package.json +1 -1
- package/src/engine.js +12 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
355c84ce589f5528668e3a998ac7d3881acd362a59e75de241cb84088b7c42e5 agentic-security.mjs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clear-capabilities/agentic-security-scanner",
|
|
3
|
-
"version": "0.149.
|
|
3
|
+
"version": "0.149.1",
|
|
4
4
|
"description": "Scanner engine for the agentic-security Claude Code plugin — SAST, SCA (function-level reachability + CISA KEV), secrets, IaC, prompt-injection, MCP/agent-tool audit, auth/authZ deep analysis, attack chains, PoC generation, business logic, toxic-combinations scoring, SBOM, pipeline integrity, compliance attestation, and more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
package/src/engine.js
CHANGED
|
@@ -8206,11 +8206,12 @@ async function queryOSV(components,allFileContents){
|
|
|
8206
8206
|
}
|
|
8207
8207
|
}
|
|
8208
8208
|
|
|
8209
|
-
|
|
8209
|
+
const _osvOffline=process.env.AGENTIC_SECURITY_OFFLINE==='1';
|
|
8210
|
+
if(queries.length&&!_osvOffline){
|
|
8210
8211
|
for(let i=0;i<queries.length;i+=1000){
|
|
8211
8212
|
const chunkQ=queries.slice(i,i+1000),chunkC=uncached.slice(i,i+1000);
|
|
8212
8213
|
try{
|
|
8213
|
-
const resp=await fetch('https://api.osv.dev/v1/querybatch',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({queries:chunkQ})});
|
|
8214
|
+
const resp=await fetch('https://api.osv.dev/v1/querybatch',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({queries:chunkQ}),signal:AbortSignal.timeout(8000)});
|
|
8214
8215
|
const data=await resp.json();
|
|
8215
8216
|
for(let idx=0;idx<(data.results||[]).length;idx++){
|
|
8216
8217
|
const{comp,ck}=chunkC[idx];
|
|
@@ -8243,8 +8244,9 @@ async function queryOSV(components,allFileContents){
|
|
|
8243
8244
|
}
|
|
8244
8245
|
// Then fetch uncached vulns with bounded concurrency.
|
|
8245
8246
|
async function _fetchOneVuln(vid){
|
|
8247
|
+
if(_osvOffline)return null;
|
|
8246
8248
|
try {
|
|
8247
|
-
const resp = await fetch(`https://api.osv.dev/v1/vulns/${vid}
|
|
8249
|
+
const resp = await fetch(`https://api.osv.dev/v1/vulns/${vid}`,{signal:AbortSignal.timeout(8000)});
|
|
8248
8250
|
const d = await resp.json();
|
|
8249
8251
|
const fixedVersions = new Set();
|
|
8250
8252
|
const osvVulnFunctions = [];
|
|
@@ -8337,7 +8339,7 @@ async function queryRegistries(components){
|
|
|
8337
8339
|
for(let i=0;i<npmNames.length;i+=CHUNK){
|
|
8338
8340
|
await Promise.all(npmNames.slice(i,i+CHUNK).map(async name=>{
|
|
8339
8341
|
try{
|
|
8340
|
-
const resp=await fetch('https://registry.npmjs.org/'+name);
|
|
8342
|
+
const resp=await fetch('https://registry.npmjs.org/'+name,{signal:AbortSignal.timeout(8000)});
|
|
8341
8343
|
if(!resp.ok)return;
|
|
8342
8344
|
const d=await resp.json();
|
|
8343
8345
|
const latest=d['dist-tags']?.latest||'';const lic=d.license||(latest&&d.versions?.[latest]?.license)||'';infoMap.set('npm:'+name,{latestVersion:latest,license:lic,versions:d.versions||{}});
|
|
@@ -8347,7 +8349,7 @@ async function queryRegistries(components){
|
|
|
8347
8349
|
for(let i=0;i<pypiNames.length;i+=CHUNK){
|
|
8348
8350
|
await Promise.all(pypiNames.slice(i,i+CHUNK).map(async name=>{
|
|
8349
8351
|
try{
|
|
8350
|
-
const resp=await fetch('https://pypi.org/pypi/'+encodeURIComponent(name)+'/json');
|
|
8352
|
+
const resp=await fetch('https://pypi.org/pypi/'+encodeURIComponent(name)+'/json',{signal:AbortSignal.timeout(8000)});
|
|
8351
8353
|
if(!resp.ok)return;
|
|
8352
8354
|
const d=await resp.json();
|
|
8353
8355
|
const info=d.info||{};
|
|
@@ -8377,7 +8379,7 @@ async function queryRegistries(components){
|
|
|
8377
8379
|
for(let i=0;i<packagistNames.length;i+=CHUNK){
|
|
8378
8380
|
await Promise.all(packagistNames.slice(i,i+CHUNK).map(async name=>{
|
|
8379
8381
|
try{
|
|
8380
|
-
const resp=await fetch('https://packagist.org/packages/'+name+'.json');
|
|
8382
|
+
const resp=await fetch('https://packagist.org/packages/'+name+'.json',{signal:AbortSignal.timeout(8000)});
|
|
8381
8383
|
if(!resp.ok)return;
|
|
8382
8384
|
const d=await resp.json();
|
|
8383
8385
|
const pkg=d.package||{};
|
|
@@ -8398,7 +8400,7 @@ async function queryRegistries(components){
|
|
|
8398
8400
|
for(let i=0;i<cargoNames.length;i+=CHUNK){
|
|
8399
8401
|
await Promise.all(cargoNames.slice(i,i+CHUNK).map(async name=>{
|
|
8400
8402
|
try{
|
|
8401
|
-
const resp=await fetch('https://crates.io/api/v1/crates/'+encodeURIComponent(name),{headers:CRATES_UA});
|
|
8403
|
+
const resp=await fetch('https://crates.io/api/v1/crates/'+encodeURIComponent(name),{headers:CRATES_UA,signal:AbortSignal.timeout(8000)});
|
|
8402
8404
|
if(!resp.ok)return;
|
|
8403
8405
|
const d=await resp.json();
|
|
8404
8406
|
const versions={};
|
|
@@ -8415,7 +8417,7 @@ async function queryRegistries(components){
|
|
|
8415
8417
|
for(let i=0;i<gemNames.length;i+=CHUNK){
|
|
8416
8418
|
await Promise.all(gemNames.slice(i,i+CHUNK).map(async name=>{
|
|
8417
8419
|
try{
|
|
8418
|
-
const resp=await fetch('https://rubygems.org/api/v1/versions/'+encodeURIComponent(name)+'.json');
|
|
8420
|
+
const resp=await fetch('https://rubygems.org/api/v1/versions/'+encodeURIComponent(name)+'.json',{signal:AbortSignal.timeout(8000)});
|
|
8419
8421
|
if(!resp.ok)return;
|
|
8420
8422
|
const list=await resp.json();
|
|
8421
8423
|
const versions={};
|
|
@@ -8433,7 +8435,7 @@ async function queryRegistries(components){
|
|
|
8433
8435
|
for(let i=0;i<pubNames.length;i+=CHUNK){
|
|
8434
8436
|
await Promise.all(pubNames.slice(i,i+CHUNK).map(async name=>{
|
|
8435
8437
|
try{
|
|
8436
|
-
const resp=await fetch('https://pub.dev/api/packages/'+encodeURIComponent(name),{headers:{Accept:'application/vnd.pub.v2+json'}});
|
|
8438
|
+
const resp=await fetch('https://pub.dev/api/packages/'+encodeURIComponent(name),{headers:{Accept:'application/vnd.pub.v2+json'},signal:AbortSignal.timeout(8000)});
|
|
8437
8439
|
if(!resp.ok)return;
|
|
8438
8440
|
const d=await resp.json();
|
|
8439
8441
|
const versions={};
|
|
@@ -8453,7 +8455,7 @@ async function queryRegistries(components){
|
|
|
8453
8455
|
await Promise.all(mavenComps.slice(i,i+CHUNK).map(async c=>{
|
|
8454
8456
|
try{
|
|
8455
8457
|
const q=encodeURIComponent(`g:"${c.group}" AND a:"${c.name}"`);
|
|
8456
|
-
const resp=await fetch(`https://search.maven.org/solrsearch/select?q=${q}&rows=1&wt=json
|
|
8458
|
+
const resp=await fetch(`https://search.maven.org/solrsearch/select?q=${q}&rows=1&wt=json`,{signal:AbortSignal.timeout(8000)});
|
|
8457
8459
|
if(!resp.ok)return;
|
|
8458
8460
|
const d=await resp.json();
|
|
8459
8461
|
const doc=(d.response?.docs||[])[0];
|