circle-ir 3.190.0 → 3.192.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/analysis/config-loader.d.ts.map +1 -1
- package/dist/analysis/config-loader.js +18 -0
- package/dist/analysis/config-loader.js.map +1 -1
- package/dist/analysis/passes/language-sources-pass.d.ts.map +1 -1
- package/dist/analysis/passes/language-sources-pass.js +64 -0
- package/dist/analysis/passes/language-sources-pass.js.map +1 -1
- package/dist/browser/circle-ir.js +48 -1
- package/dist/core/circle-ir-core.cjs +18 -0
- package/dist/core/circle-ir-core.js +18 -0
- package/package.json +1 -1
|
@@ -11291,6 +11291,24 @@ var DEFAULT_SOURCES = [
|
|
|
11291
11291
|
{ method: "text", class: "Request", type: "http_body", severity: "high", return_tainted: true },
|
|
11292
11292
|
{ property: "query", object: "request", type: "http_param", severity: "high", property_tainted: true },
|
|
11293
11293
|
{ property: "match_info", object: "request", type: "http_path", severity: "high", property_tainted: true },
|
|
11294
|
+
//
|
|
11295
|
+
// Extended aiohttp coverage (cognium-dev #213 eleventh slice):
|
|
11296
|
+
// request.rel_url — parsed URL; rel_url.query.get('q') is
|
|
11297
|
+
// the modern idiom for query params
|
|
11298
|
+
// request.remote — client IP (untrusted; can be spoofed
|
|
11299
|
+
// via X-Forwarded-For without proxy)
|
|
11300
|
+
// request.raw_headers — raw byte-tuple header pairs
|
|
11301
|
+
// request.transport — connection metadata (peer_name)
|
|
11302
|
+
{ property: "rel_url", object: "request", type: "http_body", severity: "high", property_tainted: true },
|
|
11303
|
+
{ property: "remote", object: "request", type: "network_input", severity: "high", property_tainted: true },
|
|
11304
|
+
{ property: "raw_headers", object: "request", type: "http_header", severity: "high", property_tainted: true },
|
|
11305
|
+
{ property: "transport", object: "request", type: "network_input", severity: "medium", property_tainted: true },
|
|
11306
|
+
// Quart (async Flask) — shares Flask idioms (request.args/form/json)
|
|
11307
|
+
// covered above, plus these method-based accessors:
|
|
11308
|
+
{ method: "get_json", class: "Request", type: "http_body", severity: "high", return_tainted: true },
|
|
11309
|
+
{ method: "get_data", class: "Request", type: "http_body", severity: "high", return_tainted: true },
|
|
11310
|
+
{ method: "form", class: "Request", type: "http_param", severity: "high", return_tainted: true },
|
|
11311
|
+
{ method: "files", class: "Request", type: "file_input", severity: "high", return_tainted: true },
|
|
11294
11312
|
// =========================================================================
|
|
11295
11313
|
// Rust Sources (Actix-web, Rocket, Axum)
|
|
11296
11314
|
// =========================================================================
|
|
@@ -26090,7 +26108,15 @@ var PYTHON_TAINTED_PATTERNS2 = [
|
|
|
26090
26108
|
// and produce spurious sources on every `x = q.receive()` in the wild.
|
|
26091
26109
|
{ pattern: /\.receive_text\s*\(/, type: "network_input" },
|
|
26092
26110
|
{ pattern: /\.receive_bytes\s*\(/, type: "network_input" },
|
|
26093
|
-
{ pattern: /\.receive_json\s*\(/, type: "http_body" }
|
|
26111
|
+
{ pattern: /\.receive_json\s*\(/, type: "http_body" },
|
|
26112
|
+
// Async Python framework request-URL / async body accessors
|
|
26113
|
+
// (cognium-dev #213 eleventh slice). Regex layer so
|
|
26114
|
+
// `data = await request.get_json()` adds `data` to pyTaintedVars.
|
|
26115
|
+
{ pattern: /\brequest\.rel_url\b/, type: "http_body" },
|
|
26116
|
+
{ pattern: /\brequest\.remote\b/, type: "network_input" },
|
|
26117
|
+
{ pattern: /\brequest\.match_info\b/, type: "http_path" },
|
|
26118
|
+
{ pattern: /\.get_json\s*\(/, type: "http_body" },
|
|
26119
|
+
{ pattern: /\.get_data\s*\(/, type: "http_body" }
|
|
26094
26120
|
];
|
|
26095
26121
|
var LanguageSourcesPass = class {
|
|
26096
26122
|
name = "language-sources";
|
|
@@ -26174,6 +26200,7 @@ var LanguageSourcesPass = class {
|
|
|
26174
26200
|
}
|
|
26175
26201
|
additionalSanitizers.push(...findBashRegexAllowlistSanitizers(code));
|
|
26176
26202
|
additionalSanitizers.push(...findBashRealpathPrefixGuardSanitizers(code));
|
|
26203
|
+
additionalSanitizers.push(...findBashShellQuoteSanitizers(code));
|
|
26177
26204
|
}
|
|
26178
26205
|
if (language === "go") {
|
|
26179
26206
|
additionalSanitizers.push(...findGoMapAllowlistGuardSanitizers(code));
|
|
@@ -27579,6 +27606,26 @@ function hasIntegrityVerifierAnywhere(lines) {
|
|
|
27579
27606
|
}
|
|
27580
27607
|
return false;
|
|
27581
27608
|
}
|
|
27609
|
+
function findBashShellQuoteSanitizers(code) {
|
|
27610
|
+
const sanitizers = [];
|
|
27611
|
+
const lines = code.split("\n");
|
|
27612
|
+
const PRINTF_Q_RE = /\$\(\s*printf\s+['"]%q['"]\s+["']?\$/;
|
|
27613
|
+
const AT_Q_RE = /\$\{[A-Za-z_][A-Za-z0-9_]*@Q\}/;
|
|
27614
|
+
for (let i2 = 0; i2 < lines.length; i2++) {
|
|
27615
|
+
const line = lines[i2];
|
|
27616
|
+
if (line.trimStart().startsWith("#")) continue;
|
|
27617
|
+
if (!PRINTF_Q_RE.test(line) && !AT_Q_RE.test(line)) continue;
|
|
27618
|
+
for (let l = i2 + 1; l <= lines.length; l++) {
|
|
27619
|
+
sanitizers.push({
|
|
27620
|
+
type: "shell_quote",
|
|
27621
|
+
method: PRINTF_Q_RE.test(line) ? "printf '%q'" : "${var@Q}",
|
|
27622
|
+
line: l,
|
|
27623
|
+
sanitizes: ["command_injection", "code_injection"]
|
|
27624
|
+
});
|
|
27625
|
+
}
|
|
27626
|
+
}
|
|
27627
|
+
return sanitizers;
|
|
27628
|
+
}
|
|
27582
27629
|
function findBashRegexAllowlistSanitizers(code) {
|
|
27583
27630
|
const sanitizers = [];
|
|
27584
27631
|
const lines = code.split("\n");
|
|
@@ -10686,6 +10686,24 @@ var DEFAULT_SOURCES = [
|
|
|
10686
10686
|
{ method: "text", class: "Request", type: "http_body", severity: "high", return_tainted: true },
|
|
10687
10687
|
{ property: "query", object: "request", type: "http_param", severity: "high", property_tainted: true },
|
|
10688
10688
|
{ property: "match_info", object: "request", type: "http_path", severity: "high", property_tainted: true },
|
|
10689
|
+
//
|
|
10690
|
+
// Extended aiohttp coverage (cognium-dev #213 eleventh slice):
|
|
10691
|
+
// request.rel_url — parsed URL; rel_url.query.get('q') is
|
|
10692
|
+
// the modern idiom for query params
|
|
10693
|
+
// request.remote — client IP (untrusted; can be spoofed
|
|
10694
|
+
// via X-Forwarded-For without proxy)
|
|
10695
|
+
// request.raw_headers — raw byte-tuple header pairs
|
|
10696
|
+
// request.transport — connection metadata (peer_name)
|
|
10697
|
+
{ property: "rel_url", object: "request", type: "http_body", severity: "high", property_tainted: true },
|
|
10698
|
+
{ property: "remote", object: "request", type: "network_input", severity: "high", property_tainted: true },
|
|
10699
|
+
{ property: "raw_headers", object: "request", type: "http_header", severity: "high", property_tainted: true },
|
|
10700
|
+
{ property: "transport", object: "request", type: "network_input", severity: "medium", property_tainted: true },
|
|
10701
|
+
// Quart (async Flask) — shares Flask idioms (request.args/form/json)
|
|
10702
|
+
// covered above, plus these method-based accessors:
|
|
10703
|
+
{ method: "get_json", class: "Request", type: "http_body", severity: "high", return_tainted: true },
|
|
10704
|
+
{ method: "get_data", class: "Request", type: "http_body", severity: "high", return_tainted: true },
|
|
10705
|
+
{ method: "form", class: "Request", type: "http_param", severity: "high", return_tainted: true },
|
|
10706
|
+
{ method: "files", class: "Request", type: "file_input", severity: "high", return_tainted: true },
|
|
10689
10707
|
// =========================================================================
|
|
10690
10708
|
// Rust Sources (Actix-web, Rocket, Axum)
|
|
10691
10709
|
// =========================================================================
|
|
@@ -10620,6 +10620,24 @@ var DEFAULT_SOURCES = [
|
|
|
10620
10620
|
{ method: "text", class: "Request", type: "http_body", severity: "high", return_tainted: true },
|
|
10621
10621
|
{ property: "query", object: "request", type: "http_param", severity: "high", property_tainted: true },
|
|
10622
10622
|
{ property: "match_info", object: "request", type: "http_path", severity: "high", property_tainted: true },
|
|
10623
|
+
//
|
|
10624
|
+
// Extended aiohttp coverage (cognium-dev #213 eleventh slice):
|
|
10625
|
+
// request.rel_url — parsed URL; rel_url.query.get('q') is
|
|
10626
|
+
// the modern idiom for query params
|
|
10627
|
+
// request.remote — client IP (untrusted; can be spoofed
|
|
10628
|
+
// via X-Forwarded-For without proxy)
|
|
10629
|
+
// request.raw_headers — raw byte-tuple header pairs
|
|
10630
|
+
// request.transport — connection metadata (peer_name)
|
|
10631
|
+
{ property: "rel_url", object: "request", type: "http_body", severity: "high", property_tainted: true },
|
|
10632
|
+
{ property: "remote", object: "request", type: "network_input", severity: "high", property_tainted: true },
|
|
10633
|
+
{ property: "raw_headers", object: "request", type: "http_header", severity: "high", property_tainted: true },
|
|
10634
|
+
{ property: "transport", object: "request", type: "network_input", severity: "medium", property_tainted: true },
|
|
10635
|
+
// Quart (async Flask) — shares Flask idioms (request.args/form/json)
|
|
10636
|
+
// covered above, plus these method-based accessors:
|
|
10637
|
+
{ method: "get_json", class: "Request", type: "http_body", severity: "high", return_tainted: true },
|
|
10638
|
+
{ method: "get_data", class: "Request", type: "http_body", severity: "high", return_tainted: true },
|
|
10639
|
+
{ method: "form", class: "Request", type: "http_param", severity: "high", return_tainted: true },
|
|
10640
|
+
{ method: "files", class: "Request", type: "file_input", severity: "high", return_tainted: true },
|
|
10623
10641
|
// =========================================================================
|
|
10624
10642
|
// Rust Sources (Actix-web, Rocket, Axum)
|
|
10625
10643
|
// =========================================================================
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "circle-ir",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.192.0",
|
|
4
4
|
"description": "High-performance Static Application Security Testing (SAST) library for detecting security vulnerabilities through taint analysis",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|