Skip to content

Commit 0612499

Browse files
authored
Update packages (#91)
Signed-off-by: Prabhu Subramanian <[email protected]>
1 parent 8e574fa commit 0612499

File tree

28 files changed

+1635
-1676
lines changed

28 files changed

+1635
-1676
lines changed

.github/workflows/containers.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
workflow_dispatch: # allow to manually trigger this workflow
1010
pull_request:
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: false
15+
1216
env:
1317
REGISTRY: ghcr.io
1418
IMAGE_NAME: appthreat/chen-platform

.github/workflows/master.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches: [main]
66
tags: ["*"]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9+
cancel-in-progress: false
710
jobs:
811
test:
912
runs-on: ubuntu-latest

.github/workflows/pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: pr
22
on: pull_request
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
5+
cancel-in-progress: false
36
jobs:
47
pr-tests:
58
runs-on: ${{ matrix.os }}

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
tags:
66
- 'v*'
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9+
cancel-in-progress: false
710
jobs:
811
release:
912
if: github.repository_owner == 'appthreat'

.github/workflows/win_compat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: windows-latest
99
strategy:
1010
matrix:
11-
python-version: ['3.10','3.11','3.12']
11+
python-version: ['3.10','3.11','3.12','3.13']
1212
with-science: ["--download", "--download --with-science"]
1313
fail-fast: false
1414

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ chennai> help
182182
183183
This error is mostly due to missing python .so (linux), .dll (windows) or .dylib (mac) file. Ensure the environment variables below are set correctly.
184184
185-
- SCALAPY_PYTHON_LIBRARY - Use values such as python3.10, python3.11 based on the version installed. On Windows, there are no dots. python312
185+
- SCALAPY_PYTHON_LIBRARY - Use values such as python3.10, python3.11 based on the version installed. On Windows, there are no dots. python313
186186
- JAVA_TOOL_OPTIONS - jna.library.path must be set to the python lib directory
187187
- SCALAPY_PYTHON_PROGRAMNAME - Path to Python executable in case of virtual environments (Usually not required)
188188

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name := "chen"
22
ThisBuild / organization := "io.appthreat"
3-
ThisBuild / version := "2.1.9"
4-
ThisBuild / scalaVersion := "3.5.1"
3+
ThisBuild / version := "2.2.0"
4+
ThisBuild / scalaVersion := "3.5.2"
55

66
val cpgVersion = "1.0.0"
77

chenpy/cli.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,10 @@ def install_py_modules(pack="database"):
179179
)
180180
with Progress(transient=True) as progress:
181181
conda_install_script = """conda create --name chenpy-local python=3.12 -y
182-
conda install -n chenpy-local conda-libmamba-solver -y
183-
conda install -n chenpy-local -c conda-forge networkx --solver=libmamba -y
184-
conda install -n chenpy-local -c pytorch pytorch torchtext cpuonly --solver=libmamba -y
185-
conda install -n chenpy-local -c conda-forge numpy packageurl-python nbconvert jupyter_core jupyter_client notebook --solver=libmamba -y
186-
conda install -n chenpy-local -c conda-forge oras-py==0.1.26 httpx websockets orjson rich appdirs psutil gitpython --solver=libmamba -y"""
182+
conda install -n chenpy-local -c conda-forge networkx -y
183+
conda install -n chenpy-local -c pytorch pytorch torchtext cpuonly -y
184+
conda install -n chenpy-local -c conda-forge numpy packageurl-python nbconvert jupyter_core jupyter_client notebook -y
185+
conda install -n chenpy-local -c conda-forge oras-py==0.1.26 httpx websockets orjson rich appdirs psutil gitpython -y"""
187186
for line in conda_install_script.split("\n"):
188187
if line.strip():
189188
task = progress.add_task(line, start=False, total=100)

ci/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ LABEL maintainer="appthreat" \
44
org.opencontainers.image.authors="Team AppThreat <[email protected]>" \
55
org.opencontainers.image.source="https://github.com/appthreat/chen" \
66
org.opencontainers.image.url="https://github.com/appthreat/chen" \
7-
org.opencontainers.image.version="2.1.x" \
7+
org.opencontainers.image.version="2.2.x" \
88
org.opencontainers.image.vendor="appthreat" \
99
org.opencontainers.image.licenses="Apache-2.0" \
1010
org.opencontainers.image.title="chen" \
1111
org.opencontainers.image.description="Container image for AppThreat chen code analysis platform" \
1212
org.opencontainers.docker.cmd="docker run --rm -v /tmp:/tmp -v $HOME:$HOME -v $(pwd):/app:rw -it ghcr.io/appthreat/chen chennai"
1313

14-
ARG JAVA_VERSION=23-graalce
14+
ARG JAVA_VERSION=23.0.1-tem
1515
ARG MAVEN_VERSION=3.9.9
16-
ARG GRADLE_VERSION=8.10.1
16+
ARG GRADLE_VERSION=8.11
1717

1818
ENV JAVA_VERSION=$JAVA_VERSION \
1919
MAVEN_VERSION=$MAVEN_VERSION \
@@ -64,10 +64,10 @@ RUN set -e; \
6464
&& rm -rf /opt/miniconda3/miniconda.sh \
6565
&& ln -s /opt/miniconda3/etc/profile.d/conda.sh /etc/profile.d/conda.sh \
6666
&& echo ". /opt/miniconda3/etc/profile.d/conda.sh" >> ~/.bashrc \
67+
&& conda install python=3.12 -y \
68+
&& conda config --set solver classic \
6769
&& conda update -n base -c defaults conda -y \
6870
&& conda config --add channels conda-forge \
69-
&& conda install -n base conda-libmamba-solver -y \
70-
&& conda config --set solver libmamba \
7171
&& conda init bash \
7272
&& bash -c /opt/conda-install.sh \
7373
&& curl -LO https://repo.almalinux.org/almalinux/9/CRB/${ARCH_NAME}/os/Packages/graphviz-devel-2.44.0-26.el9.${ARCH_NAME}.rpm \

codemeta.json

Lines changed: 1 addition & 1 deletion
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.1.9",
10+
"version": "2.2.0",
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": [

console/build.sbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name := "console"
33
enablePlugins(JavaAppPackaging)
44

55
val ScoptVersion = "4.1.0"
6-
val CaskVersion = "0.9.4"
6+
val CaskVersion = "0.10.1"
77
val CirceVersion = "0.14.10"
88
val ZeroturnaroundVersion = "1.17"
99

@@ -24,13 +24,13 @@ libraryDependencies ++= Seq(
2424
"io.circe" %% "circe-generic" % CirceVersion,
2525
"io.circe" %% "circe-parser" % CirceVersion,
2626
"org.zeroturnaround" % "zt-zip" % ZeroturnaroundVersion,
27-
"com.lihaoyi" %% "os-lib" % "0.10.7",
27+
"com.lihaoyi" %% "os-lib" % "0.11.3",
2828
"com.lihaoyi" %% "pprint" % "0.9.0",
2929
"com.lihaoyi" %% "cask" % CaskVersion,
3030
"dev.scalapy" %% "scalapy-core" % "0.5.3",
3131
"org.scala-lang.modules" % "scala-asm" % "9.7.0-scala-2",
3232
"org.scalatest" %% "scalatest" % Versions.scalatest % Test,
33-
"org.scala-lang" %% "scala3-compiler" % "3.5.1"
33+
"org.scala-lang" %% "scala3-compiler" % "3.5.2"
3434
)
3535

3636

dataflowengineoss/src/main/scala/io/appthreat/dataflowengineoss/language/Path.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,17 @@ object Path:
4949
val method = cfgNode.method
5050
sinkCode = method.fullName
5151
caption = if srcNode.code != "this" then s"Source: ${srcNode.code}" else ""
52-
if srcTags.nonEmpty then caption += s"\nSource Tags: ${srcTags}"
53-
caption += s"\nSink: ${sinkCode}\n"
54-
if sinkTags.nonEmpty then caption += s"Sink Tags: ${sinkTags}\n"
55-
var hasCheckLike: Boolean = false;
52+
if srcTags.nonEmpty then caption += s"\nSource Tags: $srcTags"
53+
caption += s"\nSink: $sinkCode\n"
54+
if sinkTags.nonEmpty then caption += s"Sink Tags: $sinkTags\n"
55+
var hasCheckLike: Boolean = false
5656
val tableRows = ArrayBuffer[Array[String]]()
5757
val addedPaths = Set[String]()
5858
path.elements.foreach { astNode =>
5959
val nodeType = astNode.getClass.getSimpleName
6060
val lineNumber = astNode.lineNumber.getOrElse("").toString
6161
val fileName = astNode.file.name.headOption.getOrElse("").replace("<unknown>", "")
62-
var fileLocation = s"${fileName}#${lineNumber}"
62+
var fileLocation = s"$fileName#$lineNumber"
6363
var tags: String = tagAsString(astNode.tag)
6464
if fileLocation == "#" then fileLocation = "N/A"
6565
astNode match
@@ -96,7 +96,7 @@ object Path:
9696
then
9797
tags = tagAsString(identifier.inCall.head.tag)
9898
if !addedPaths.contains(
99-
s"${fileName}#${lineNumber}"
99+
s"$fileName#$lineNumber"
100100
) && identifier.inCall.nonEmpty
101101
then
102102
tableRows += Array[String](
@@ -185,13 +185,13 @@ object Path:
185185
)
186186
end match
187187
if isCheckLike(tags) then hasCheckLike = true
188-
addedPaths += s"${fileName}#${lineNumber}"
188+
addedPaths += s"$fileName#$lineNumber"
189189
}
190190
try
191191
if hasCheckLike then caption = s"This flow has mitigations in place.\n$caption"
192192
printFlows(tableRows, caption)
193193
catch
194-
case exc: Exception =>
194+
case _: Exception =>
195195
caption
196196

197197
private def addEmphasis(str: String, isCheckLike: Boolean): String =
@@ -217,7 +217,7 @@ object Path:
217217
val trow: Array[String] = row.tail
218218
if !trow(3).startsWith("<operator") && trow(3) != "<empty>" && trow(3) != "RET" then
219219
val tagsStr: String = if trow(4).nonEmpty then s"Tags: ${trow(4)}" else ""
220-
val methodStr = s"${trow(1)}\n${tagsStr}"
220+
val methodStr = s"${trow(1)}\n$tagsStr"
221221
table.add_row(
222222
simplifyFilePath(trow(0)),
223223
methodStr.stripMargin,

dataflowengineoss/src/main/scala/io/appthreat/dataflowengineoss/queryengine/SourcesToStartingPoints.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,10 @@ class SourceToStartingPoints(src: StoredNode) extends RecursiveTask[List[CfgNode
119119

120120
val usagesInOtherClasses = cpg.method.flatMap { m =>
121121
m.fieldAccess
122-
.where(_.argument(1).isIdentifier.typeFullNameExact(typeDecl.fullName))
122+
.or(
123+
_.argument(1).isIdentifier.typeFullNameExact(typeDecl.fullName),
124+
_.argument(1).isTypeRef.typeFullNameExact(typeDecl.fullName)
125+
)
123126
.where { x =>
124127
astNode match
125128
case identifier: Identifier =>

meta.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% set version = "2.1.9" %}
1+
{% set version = "2.2.0" %}
22

33
package:
44
name: chen
@@ -18,17 +18,17 @@ requirements:
1818
- pip
1919
- poetry
2020
run:
21-
- python>=3.10,<3.13
22-
- conda-forge::httpx>=0.27.0
23-
- conda-forge::websockets>=12.0
24-
- conda-forge::orjson>=3.10.1,<4.0.0
25-
- conda-forge::rich>=13.7.1,<14.0.0
21+
- python>=3.10,<3.14
22+
- conda-forge::httpx>=0.27.2
23+
- conda-forge::websockets>=14.1
24+
- conda-forge::orjson>=3.10.11,<4.0.0
25+
- conda-forge::rich>=13.9.4,<14.0.0
2626
- conda-forge::oras-py==0.1.26
2727
- conda-forge::appdirs>=1.4.4,<2.0.0
28-
- conda-forge::psutil>=5.9.8,<6.0.0
28+
- conda-forge::psutil>=6.1.0,<7.0.0
2929
- conda-forge::packageurl-python>=0.11.2,<0.12.0
3030
- conda-forge::gitpython>=3.1.43,<4.0.0
31-
- conda-forge::networkx>=3.3
31+
- conda-forge::networkx>=3.4.2
3232
build:
3333
include_recipe: False
3434
pin_depends: record

platform/frontends/c2cpg/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ libraryDependencies ++= Seq(
1010
ExclusionRule(organization = "org.eclipse.platform", name = "org.eclipse.jface"),
1111
ExclusionRule(organization = "org.eclipse.platform", name = "org.eclipse.jface.text")
1212
),
13-
"org.jline" % "jline" % "3.26.3",
13+
"org.jline" % "jline" % "3.27.1",
1414
"org.scalatest" %% "scalatest" % Versions.scalatest % Test
1515
)
1616

platform/frontends/javasrc2cpg/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ libraryDependencies ++= Seq(
66
"io.appthreat" %% "cpg2" % Versions.cpg,
77
"com.github.javaparser" % "javaparser-symbol-solver-core" % "3.26.2",
88
"org.scalatest" %% "scalatest" % Versions.scalatest % Test,
9-
"org.projectlombok" % "lombok" % "1.18.34",
9+
"org.projectlombok" % "lombok" % "1.18.36",
1010
"org.scala-lang.modules" %% "scala-parallel-collections" % "1.0.4",
1111
"org.scala-lang.modules" %% "scala-parser-combinators" % "2.4.0",
1212
"net.lingala.zip4j" % "zip4j" % "2.11.5"

platform/frontends/jimple2cpg/build.sbt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ name := "jimple2cpg"
33
dependsOn(Projects.dataflowengineoss, Projects.x2cpg % "compile->compile;test->test")
44

55
libraryDependencies ++= Seq(
6-
"io.appthreat" %% "cpg2" % Versions.cpg,
7-
"org.soot-oss" % "soot" % "4.5.0",
8-
"org.scala-lang.modules" % "scala-asm" % "9.7.0-scala-2",
9-
"org.ow2.asm" % "asm" % "9.7",
10-
"org.ow2.asm" % "asm-analysis" % "9.7",
11-
"org.ow2.asm" % "asm-util" % "9.7",
12-
"org.ow2.asm" % "asm-tree" % "9.7",
13-
"org.scalatest" %% "scalatest" % Versions.scalatest % Test
6+
"io.appthreat" %% "cpg2" % Versions.cpg,
7+
"org.soot-oss" % "soot" % "4.5.0",
8+
"org.scala-lang.modules" % "scala-asm" % "9.7.0-scala-2",
9+
"org.ow2.asm" % "asm" % "9.7.1",
10+
"org.ow2.asm" % "asm-analysis" % "9.7.1",
11+
"org.ow2.asm" % "asm-util" % "9.7.1",
12+
"org.ow2.asm" % "asm-tree" % "9.7.1",
13+
"org.scalatest" %% "scalatest" % Versions.scalatest % Test
1414
)
1515

1616
enablePlugins(JavaAppPackaging, LauncherJarPlugin)

platform/src/universal/schema-extender/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name := "schema-extender"
22

3-
ThisBuild / scalaVersion := "3.5.1"
3+
ThisBuild / scalaVersion := "3.5.2"
44

55
val cpgVersion = IO.read(file("cpg-version"))
66

0 commit comments

Comments
 (0)