Skip to content

Commit 732af3e

Browse files
committed
Tag the call nodes directly for python
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
1 parent ae0c4eb commit 732af3e

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name := "chen"
22
ThisBuild / organization := "io.appthreat"
3-
ThisBuild / version := "2.0.9"
3+
ThisBuild / version := "2.0.10"
44
ThisBuild / scalaVersion := "3.4.1"
55

66
val cpgVersion = "1.0.0"

codemeta.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"downloadUrl": "https://github.com/AppThreat/chen",
88
"issueTracker": "https://github.com/AppThreat/chen/issues",
99
"name": "chen",
10-
"version": "2.0.9",
10+
"version": "2.0.10",
1111
"description": "Code Hierarchy Exploration Net (chen) is an advanced exploration toolkit for your application source code and its dependency hierarchy.",
1212
"applicationCategory": "code-analysis",
1313
"keywords": [

meta.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% set version = "2.0.9" %}
1+
{% set version = "2.0.10" %}
22

33
package:
44
name: chen

platform/frontends/x2cpg/src/main/scala/io/appthreat/x2cpg/passes/taggers/CdxPass.scala

+11-9
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,17 @@ class CdxPass(atom: Cpg) extends CpgPass(atom):
110110
pkgName.replace("django_", ""),
111111
pkgName.replace("py", "")
112112
).foreach { ns =>
113-
val bpkg = toPyModuleForm(ns)
114-
if bpkg.nonEmpty && !donePkgs.contains(bpkg) then
115-
donePkgs.put(bpkg, true)
116-
atom.call.where(
117-
_.methodFullName(bpkg)
118-
).argument.newTagNode(compPurl).store()(dstGraph)
119-
atom.identifier.typeFullName(bpkg).newTagNode(
120-
compPurl
121-
).store()(dstGraph)
113+
Set(toPyModuleForm(ns), s"$ns${Pattern.quote(File.separator)}.*").foreach {
114+
bpkg =>
115+
if bpkg.nonEmpty && !donePkgs.contains(bpkg) then
116+
donePkgs.put(bpkg, true)
117+
atom.call.where(
118+
_.methodFullName(bpkg)
119+
).newTagNode(compPurl).store()(dstGraph)
120+
atom.identifier.typeFullName(bpkg).newTagNode(
121+
compPurl
122+
).store()(dstGraph)
123+
}
122124
}
123125
end if
124126
val properties = comp.hcursor.downField("properties").focus.flatMap(

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "appthreat-chen"
3-
version = "2.0.9"
3+
version = "2.0.10"
44
description = "Code Hierarchy Exploration Net (chen)"
55
authors = ["Team AppThreat <cloud@appthreat.com>"]
66
license = "Apache-2.0"

0 commit comments

Comments
 (0)