cognium-dev 3.93.0 → 3.95.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/dist/cli.js +21 -4
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -17897,6 +17897,16 @@ function applyPerFileFindingCap(filePath, findings, cap) {
|
|
|
17897
17897
|
return [advisory];
|
|
17898
17898
|
}
|
|
17899
17899
|
|
|
17900
|
+
// ../circle-ir/dist/analysis/confidence-filter.js
|
|
17901
|
+
function applyConfidenceFilter(findings, includeSpeculative) {
|
|
17902
|
+
if (includeSpeculative)
|
|
17903
|
+
return findings;
|
|
17904
|
+
return findings.filter(isHighConfidence);
|
|
17905
|
+
}
|
|
17906
|
+
function isHighConfidence(finding) {
|
|
17907
|
+
return finding.confidence === undefined || finding.confidence === "high";
|
|
17908
|
+
}
|
|
17909
|
+
|
|
17900
17910
|
// ../circle-ir/dist/languages/registry.js
|
|
17901
17911
|
class DefaultLanguageRegistry {
|
|
17902
17912
|
plugins = new Map;
|
|
@@ -25205,6 +25215,10 @@ function shouldGateInterproceduralParam(sourceType, enclosingMethod, enclosingTy
|
|
|
25205
25215
|
class InterproceduralPass {
|
|
25206
25216
|
name = "interprocedural";
|
|
25207
25217
|
category = "security";
|
|
25218
|
+
enableEntryPointGate;
|
|
25219
|
+
constructor(options) {
|
|
25220
|
+
this.enableEntryPointGate = options?.enableEntryPointGate ?? true;
|
|
25221
|
+
}
|
|
25208
25222
|
run(ctx) {
|
|
25209
25223
|
const { graph } = ctx;
|
|
25210
25224
|
const constProp = ctx.getResult("constant-propagation");
|
|
@@ -25263,7 +25277,7 @@ class InterproceduralPass {
|
|
|
25263
25277
|
continue;
|
|
25264
25278
|
if (source.type === "interprocedural_param" && source.confidence < 0.6)
|
|
25265
25279
|
continue;
|
|
25266
|
-
if (source.type === "interprocedural_param" && source.in_method) {
|
|
25280
|
+
if (this.enableEntryPointGate && source.type === "interprocedural_param" && source.in_method) {
|
|
25267
25281
|
const enclosing = methodNameIndex.get(source.in_method);
|
|
25268
25282
|
if (shouldGateInterproceduralParam(source.type, enclosing?.method, enclosing?.type, { language, types: graph.ir.types })) {
|
|
25269
25283
|
continue;
|
|
@@ -34253,7 +34267,9 @@ async function analyze(code, filePath, language, options = {}) {
|
|
|
34253
34267
|
pipeline.add(new LanguageSourcesPass);
|
|
34254
34268
|
pipeline.add(new SinkFilterPass);
|
|
34255
34269
|
pipeline.add(new TaintPropagationPass);
|
|
34256
|
-
pipeline.add(new InterproceduralPass
|
|
34270
|
+
pipeline.add(new InterproceduralPass({
|
|
34271
|
+
enableEntryPointGate: options.enableEntryPointGate ?? true
|
|
34272
|
+
}));
|
|
34257
34273
|
if (!disabledPasses.has("scan-secrets"))
|
|
34258
34274
|
pipeline.add(new ScanSecretsPass);
|
|
34259
34275
|
if (!disabledPasses.has("dead-code"))
|
|
@@ -34383,7 +34399,8 @@ async function analyze(code, filePath, language, options = {}) {
|
|
|
34383
34399
|
unresolvedItems: unresolved.length
|
|
34384
34400
|
});
|
|
34385
34401
|
emitFindingsInstrumentation(filePath, findings, taint);
|
|
34386
|
-
const
|
|
34402
|
+
const verifiedFindings = applyConfidenceFilter(findings, options.includeSpeculative === true);
|
|
34403
|
+
const cappedFindings = applyPerFileFindingCap(filePath, verifiedFindings, options.perFileFindingCap ?? DEFAULT_PER_FILE_FINDING_CAP);
|
|
34387
34404
|
return {
|
|
34388
34405
|
meta,
|
|
34389
34406
|
types,
|
|
@@ -34562,7 +34579,7 @@ var colors = {
|
|
|
34562
34579
|
};
|
|
34563
34580
|
|
|
34564
34581
|
// src/version.ts
|
|
34565
|
-
var version = "3.
|
|
34582
|
+
var version = "3.95.0";
|
|
34566
34583
|
|
|
34567
34584
|
// src/formatters.ts
|
|
34568
34585
|
var SINK_SEVERITY = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cognium-dev",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.95.0",
|
|
4
4
|
"description": "Static Application Security Testing CLI for detecting security vulnerabilities via taint tracking",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"registry": "https://registry.npmjs.org/"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"circle-ir": "^3.
|
|
68
|
+
"circle-ir": "^3.95.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@types/node": "^25.5.0",
|