cognium-dev 3.103.0 → 3.104.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 +40 -2
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -29903,6 +29903,33 @@ function mapReturnValueToCorsRule(returnValue) {
|
|
|
29903
29903
|
};
|
|
29904
29904
|
}
|
|
29905
29905
|
|
|
29906
|
+
// ../circle-ir/dist/analysis/passes/_fp-allowlists.js
|
|
29907
|
+
var PEM_BODY_RE = /[A-Za-z0-9+/]{30,}/;
|
|
29908
|
+
function pemHasInlineBody(lines, hitLineIdx) {
|
|
29909
|
+
const end = Math.min(hitLineIdx + 5, lines.length);
|
|
29910
|
+
for (let l = hitLineIdx;l < end; l++) {
|
|
29911
|
+
if (PEM_BODY_RE.test(lines[l] ?? ""))
|
|
29912
|
+
return true;
|
|
29913
|
+
}
|
|
29914
|
+
return false;
|
|
29915
|
+
}
|
|
29916
|
+
var CLI_OPTION_KEY_RE = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)+$/;
|
|
29917
|
+
function isCliOptionKeyValue(value) {
|
|
29918
|
+
return value.length <= 48 && CLI_OPTION_KEY_RE.test(value);
|
|
29919
|
+
}
|
|
29920
|
+
var PROTOCOL_MANDATED_PATH_RE = /(?:^|[\\/])(?:ntlm|kerberos|krb5|smb1?|sasl[\\/]cram-md5?|digest)(?:[\\/]|$)/i;
|
|
29921
|
+
var PROTOCOL_MANDATED_CLASS_RE = /\b(?:N[Tt][Ll][Mm](?:Scheme|Engine|AuthHandler|AuthScheme)|Krb5\w+|KerberosClient|Smb\w*Signing|CramMd5\w*|DigestScheme)\b/;
|
|
29922
|
+
var PROTOCOL_MANDATED_CITATION_RE = /\b(?:MS-NLMP|RFC\s*4757|RFC\s*3961|RFC\s*2617|RFC\s*2195|CRAM-MD5)\b/i;
|
|
29923
|
+
function isProtocolMandatedCryptoFile(file, code) {
|
|
29924
|
+
if (PROTOCOL_MANDATED_PATH_RE.test(file))
|
|
29925
|
+
return true;
|
|
29926
|
+
if (PROTOCOL_MANDATED_CLASS_RE.test(code))
|
|
29927
|
+
return true;
|
|
29928
|
+
if (PROTOCOL_MANDATED_CITATION_RE.test(code))
|
|
29929
|
+
return true;
|
|
29930
|
+
return false;
|
|
29931
|
+
}
|
|
29932
|
+
|
|
29906
29933
|
// ../circle-ir/dist/analysis/passes/scan-secrets-pass.js
|
|
29907
29934
|
var TEST_PATH_RE3 = /(?:^|[\\/])(?:test|tests|spec|specs|__tests?__|__mocks?__|fixtures?|testdata)(?:[\\/]|$)/i;
|
|
29908
29935
|
var TEST_FILENAME_RE = /(?:\.(?:test|spec)\.[cm]?[jt]sx?|_test\.go|_test\.py|Test\.java|Tests\.java)$/i;
|
|
@@ -30069,6 +30096,8 @@ function isLikelyCredentialAssignment(line) {
|
|
|
30069
30096
|
return null;
|
|
30070
30097
|
if (/^[0-9]+$/.test(value) && value.length < 16)
|
|
30071
30098
|
return null;
|
|
30099
|
+
if (isCliOptionKeyValue(value))
|
|
30100
|
+
return null;
|
|
30072
30101
|
return { name: name2, value };
|
|
30073
30102
|
}
|
|
30074
30103
|
var STRING_LITERAL_RE = /(["'`])((?:\\.|(?!\1).){8,200})\1/g;
|
|
@@ -30275,6 +30304,9 @@ class ScanSecretsPass {
|
|
|
30275
30304
|
const m = pattern.regex.exec(lineText);
|
|
30276
30305
|
if (!m)
|
|
30277
30306
|
continue;
|
|
30307
|
+
if (pattern.name === "PEM private key" && !pemHasInlineBody(lines, i2)) {
|
|
30308
|
+
continue;
|
|
30309
|
+
}
|
|
30278
30310
|
const key = `${lineNum}:hardcoded-credential`;
|
|
30279
30311
|
if (seen.has(key))
|
|
30280
30312
|
continue;
|
|
@@ -31149,6 +31181,9 @@ class WeakCryptoPass {
|
|
|
31149
31181
|
run(ctx) {
|
|
31150
31182
|
const { graph, language, code } = ctx;
|
|
31151
31183
|
const file = graph.ir.meta.file;
|
|
31184
|
+
if (isProtocolMandatedCryptoFile(file, code)) {
|
|
31185
|
+
return { findings: [] };
|
|
31186
|
+
}
|
|
31152
31187
|
const findings = [];
|
|
31153
31188
|
const constProp = ctx.hasResult("constant-propagation") ? ctx.getResult("constant-propagation") : null;
|
|
31154
31189
|
const literalBindings = scanLiteralBindings(code, language);
|
|
@@ -31679,8 +31714,11 @@ class WeakPasswordHashPass {
|
|
|
31679
31714
|
name = "weak-password-hash";
|
|
31680
31715
|
category = "security";
|
|
31681
31716
|
run(ctx) {
|
|
31682
|
-
const { graph, language } = ctx;
|
|
31717
|
+
const { graph, language, code } = ctx;
|
|
31683
31718
|
const file = graph.ir.meta.file;
|
|
31719
|
+
if (isProtocolMandatedCryptoFile(file, code)) {
|
|
31720
|
+
return { findings: [] };
|
|
31721
|
+
}
|
|
31684
31722
|
const findings = [];
|
|
31685
31723
|
for (const call of graph.ir.calls) {
|
|
31686
31724
|
const detection = this.detect(call, language);
|
|
@@ -35015,7 +35053,7 @@ var colors = {
|
|
|
35015
35053
|
};
|
|
35016
35054
|
|
|
35017
35055
|
// src/version.ts
|
|
35018
|
-
var version = "3.
|
|
35056
|
+
var version = "3.104.0";
|
|
35019
35057
|
|
|
35020
35058
|
// src/formatters.ts
|
|
35021
35059
|
var SINK_SEVERITY = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cognium-dev",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.104.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.104.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@types/node": "^25.5.0",
|