Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag the call nodes directly for python #72

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := "chen"
ThisBuild / organization := "io.appthreat"
ThisBuild / version := "2.0.9"
ThisBuild / version := "2.0.10"
ThisBuild / scalaVersion := "3.4.1"

val cpgVersion = "1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"downloadUrl": "https://github.com/AppThreat/chen",
"issueTracker": "https://github.com/AppThreat/chen/issues",
"name": "chen",
"version": "2.0.9",
"version": "2.0.10",
"description": "Code Hierarchy Exploration Net (chen) is an advanced exploration toolkit for your application source code and its dependency hierarchy.",
"applicationCategory": "code-analysis",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = "2.0.9" %}
{% set version = "2.0.10" %}

package:
name: chen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,17 @@ class CdxPass(atom: Cpg) extends CpgPass(atom):
pkgName.replace("django_", ""),
pkgName.replace("py", "")
).foreach { ns =>
val bpkg = toPyModuleForm(ns)
if bpkg.nonEmpty && !donePkgs.contains(bpkg) then
donePkgs.put(bpkg, true)
atom.call.where(
_.methodFullName(bpkg)
).argument.newTagNode(compPurl).store()(dstGraph)
atom.identifier.typeFullName(bpkg).newTagNode(
compPurl
).store()(dstGraph)
Set(toPyModuleForm(ns), s"$ns${Pattern.quote(File.separator)}.*").foreach {
bpkg =>
if bpkg.nonEmpty && !donePkgs.contains(bpkg) then
donePkgs.put(bpkg, true)
atom.call.where(
_.methodFullName(bpkg)
).newTagNode(compPurl).store()(dstGraph)
atom.identifier.typeFullName(bpkg).newTagNode(
compPurl
).store()(dstGraph)
}
}
end if
val properties = comp.hcursor.downField("properties").focus.flatMap(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "appthreat-chen"
version = "2.0.9"
version = "2.0.10"
description = "Code Hierarchy Exploration Net (chen)"
authors = ["Team AppThreat <cloud@appthreat.com>"]
license = "Apache-2.0"
Expand Down