-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip filename properties in cdxpass. upstream fixes (#22)
* Skip properties with file names Signed-off-by: Prabhu Subramanian <[email protected]> * Upstream fixes Signed-off-by: Prabhu Subramanian <[email protected]> --------- Signed-off-by: Prabhu Subramanian <[email protected]>
- Loading branch information
Showing
13 changed files
with
105 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...ontends/jimple2cpg/src/main/scala/io/appthreat/jimple2cpg/passes/DeclarationRefPass.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package io.appthreat.jimple2cpg.passes | ||
|
||
import io.shiftleft.codepropertygraph.Cpg | ||
import io.shiftleft.codepropertygraph.generated.EdgeTypes | ||
import io.shiftleft.codepropertygraph.generated.nodes.{Declaration, Method} | ||
import io.shiftleft.passes.ConcurrentWriterCpgPass | ||
import io.shiftleft.semanticcpg.language.* | ||
|
||
/** Links declarations to their identifier nodes. Due to the flat AST of bytecode, we don't need to account for varying | ||
* scope. | ||
*/ | ||
class DeclarationRefPass(atom: Cpg) extends ConcurrentWriterCpgPass[Method](atom) { | ||
|
||
override def generateParts(): Array[Method] = atom.method.toArray | ||
|
||
override def runOnPart(builder: DiffGraphBuilder, part: Method): Unit = { | ||
val identifiers = part.ast.isIdentifier.toList | ||
val declarations = (part.parameter ++ part.block.astChildren.isLocal).collectAll[Declaration].l | ||
declarations.foreach(d => identifiers.nameExact(d.name).foreach(builder.addEdge(_, d, EdgeTypes.REF))) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 0 additions & 75 deletions
75
...orm/frontends/jssrc2cpg/src/main/scala/io/appthreat/jssrc2cpg/parser/JsValueVisitor.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "appthreat-chen" | ||
version = "0.0.20" | ||
version = "0.0.21" | ||
description = "Code Hierarchy Exploration Net (chen)" | ||
authors = ["Team AppThreat <[email protected]>"] | ||
license = "Apache-2.0" | ||
|