circle-ir 3.212.0 → 3.214.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/passes/language-sources-pass.d.ts.map +1 -1
- package/dist/analysis/passes/language-sources-pass.js +83 -4
- package/dist/analysis/passes/language-sources-pass.js.map +1 -1
- package/dist/analysis/taint-matcher.d.ts.map +1 -1
- package/dist/analysis/taint-matcher.js +37 -26
- package/dist/analysis/taint-matcher.js.map +1 -1
- package/dist/browser/circle-ir.js +74 -25
- package/dist/core/circle-ir-core.cjs +25 -23
- package/dist/core/circle-ir-core.js +25 -23
- package/package.json +1 -1
|
@@ -13725,29 +13725,31 @@ function findSources(calls, types, patterns, sourceLines, language) {
|
|
|
13725
13725
|
}
|
|
13726
13726
|
}
|
|
13727
13727
|
const RUST_EXTRACTOR_KIND = /(?:^|::)(Json|Form|Query|Path|Extension|Multipart|Body|Bytes)(?:<|$)/;
|
|
13728
|
-
|
|
13729
|
-
for (const
|
|
13730
|
-
for (const
|
|
13731
|
-
|
|
13732
|
-
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
|
|
13736
|
-
|
|
13737
|
-
|
|
13738
|
-
|
|
13739
|
-
|
|
13740
|
-
|
|
13741
|
-
|
|
13742
|
-
|
|
13743
|
-
|
|
13744
|
-
|
|
13745
|
-
|
|
13746
|
-
|
|
13747
|
-
|
|
13748
|
-
|
|
13749
|
-
|
|
13750
|
-
|
|
13728
|
+
if (language === "rust") {
|
|
13729
|
+
for (const type of types) {
|
|
13730
|
+
for (const method of type.methods) {
|
|
13731
|
+
for (const param of method.parameters) {
|
|
13732
|
+
if (!param.type) continue;
|
|
13733
|
+
const kindMatch = RUST_EXTRACTOR_KIND.exec(param.type);
|
|
13734
|
+
if (!kindMatch) continue;
|
|
13735
|
+
const kind = kindMatch[1];
|
|
13736
|
+
if (kind === "Extension") continue;
|
|
13737
|
+
const sourceType = kind === "Form" || kind === "Query" || kind === "Path" ? "http_param" : "http_body";
|
|
13738
|
+
const paramLine = param.line ?? method.start_line;
|
|
13739
|
+
const alreadyExists = sources.some(
|
|
13740
|
+
(s) => s.line === paramLine && s.variable === param.name
|
|
13741
|
+
);
|
|
13742
|
+
if (alreadyExists) continue;
|
|
13743
|
+
sources.push({
|
|
13744
|
+
type: sourceType,
|
|
13745
|
+
location: `${param.type} ${param.name} in ${method.name}`,
|
|
13746
|
+
severity: "high",
|
|
13747
|
+
line: paramLine,
|
|
13748
|
+
confidence: 1,
|
|
13749
|
+
variable: param.name,
|
|
13750
|
+
in_method: method.name
|
|
13751
|
+
});
|
|
13752
|
+
}
|
|
13751
13753
|
}
|
|
13752
13754
|
}
|
|
13753
13755
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "circle-ir",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.214.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",
|