Skip to content

Commit

Permalink
🔖 Release v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidBakerEffendi committed Jan 6, 2022
1 parent cd01b7c commit 549cedb
Show file tree
Hide file tree
Showing 66 changed files with 203 additions and 157 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Documentation

on:
push:
tags: [ 'v*' ] # Push events to matching v*, i.e. v1.0, v20.15.10
tags: [ 'd*' ] # Temporarily disable this job

jobs:
publish:
Expand All @@ -12,15 +12,23 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
lfs: true
fetch-depth: 0

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Setup SSH Keys and known_hosts
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Build code
run: sbt stage
- name: Build and deploy Scala documentation
run: sbt makeSite ghpagesPushSite
- name: Build ScalaDoc website
run: sbt makeSite
- name: Deploy ScalaSite
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt ghpagesPushSite
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

on:
push:
tags: [ 'v*' ] # Push events to matching v*, i.e. v1.0, v20.15.10
tags: [ '[0-9]+.[0-9]+.[0-9]+' ] # Push events to matching v*, i.e. 1.0.0, 20.15.10

jobs:
publish:
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.0.0] - 2022-01-04

### Changed

- Whole project migrated to Scala
- Every transaction as far as possible is a bulk transaction
- Processing follows closely to layers used in other Joern frontends
- Package structure changed from io.github to com.github

### Removed

- JanusGraph support

## [0.6.3] - 2021-12-10

### Fixed
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ params:
txMax: 25
```
For more documentation and basic guides, check out the [project homepage](https://plume-oss.github.io/plume-docs/).
For more documentation and basic guides, check out the [project homepage](https://plume-oss.github.io/plume-docs/) or
the [ScalaDoc](https://plume-oss.github.io/plume/latest/api/io/github/plume/oss/index.html).
## Community
Expand All @@ -58,17 +59,14 @@ Replace `X.X.X` with the desired version on [JitPack](https://jitpack.io/#plume-

```sbt
libraryDependencies ++= Seq(
io.github.plume-oss %% plume % X.X.X
com.github.plume-oss % plume % X.X.X
)
```

Don't forget to include the JCenter and JitPack repository in your `build.sbt`.

```sbt
resolvers ++= Seq(
"jitpack" at "https://jitpack.io",
Resolver.JCenterRepository
)
resolvers += "jitpack" at "https://jitpack.io"
```

## Building from Source
Expand Down
10 changes: 6 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name := "Plume"
organization := "io.github.plume-oss"
organization := "com.github.plume-oss"
version := "1.0.0"

scalaVersion := "2.13.6"
Expand Down Expand Up @@ -65,8 +65,10 @@ enablePlugins(
)

scmInfo := Some(
ScmInfo(url("https://github.com/plume-oss/plume"), "scm:[email protected]:/plume-oss/plume.git")
ScmInfo(url("https://github.com/plume-oss/plume"), "[email protected]:plume-oss/plume.git")
)
git.remoteRepo := scmInfo.value.get.connection

homepage := Some(url("https://github.com/plume-oss/plume/"))
licenses := List("Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0"))
developers := List(
Expand All @@ -84,10 +86,10 @@ developers := List(
)
)

git.remoteRepo := "[email protected]:plume-oss/plume.git"

Global / onChangedBuildSource := ReloadOnSourceChanges

publishMavenStyle := true

lazy val root = (project in file("."))
.configs(NeoIntTest)
.settings(
Expand Down
2 changes: 2 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
jdk:
- openjdk11
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.5.5
sbt.version=1.5.7
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.plume.oss
package com.github.plume.oss

import net.jpountz.xxhash.{StreamingXXHash32, XXHashFactory}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
package io.github.plume.oss
package com.github.plume.oss

import io.github.plume.oss.drivers.{IDriver, OverflowDbDriver}
import io.github.plume.oss.passes._
import io.github.plume.oss.passes.concurrent.{
import com.github.plume.oss.drivers.{IDriver, OverflowDbDriver}
import com.github.plume.oss.passes.concurrent.{
PlumeCfgCreationPass,
PlumeContainsEdgePass,
PlumeDiffPass,
PlumeHashPass
}
import io.github.plume.oss.passes.parallel._
import com.github.plume.oss.passes.parallel.{
AstCreationPass,
PlumeCdgPass,
PlumeCfgDominatorPass,
PlumeMethodStubCreator,
PlumeReachingDefPass
}
import com.github.plume.oss.passes.{
IncrementalKeyPool,
PlumeCpgPassBase,
PlumeFileCreationPass,
PlumeMetaDataPass,
PlumeMethodDecoratorPass,
PlumeNamespaceCreator,
PlumeTypeDeclStubCreator,
PlumeTypeNodePass
}
import io.shiftleft.codepropertygraph.Cpg
import io.shiftleft.codepropertygraph.generated.{NodeTypes, PropertyNames}
import io.shiftleft.passes.CpgPassBase
Expand Down Expand Up @@ -71,7 +86,6 @@ class Jimple2Cpg {
val sourceCodePath = if (rawSourceCodeFile.isDirectory) {
rawSourceCodeFile.toPath.toAbsolutePath.normalize.toString
} else {
println(rawSourceCodeFile.getAbsolutePath)
Paths
.get(new JFile(rawSourceCodeFile.getAbsolutePath).getParentFile.getAbsolutePath)
.normalize
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
package io.github.plume.oss
package com.github.plume.oss

import better.files.File
import io.github.plume.oss.drivers._
import com.github.plume.oss.drivers.{
IDriver,
Neo4jDriver,
NeptuneDriver,
OverflowDbDriver,
TigerGraphDriver,
TinkerGraphDriver
}
import io.shiftleft.x2cpg.{X2Cpg, X2CpgConfig}
import scopt.OParser

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.plume.oss.drivers
package com.github.plume.oss.drivers

import io.shiftleft.codepropertygraph.generated.nodes.{AbstractNode, NewNode, StoredNode}
import io.shiftleft.codepropertygraph.generated.{EdgeTypes, NodeTypes, PropertyNames}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.plume.oss.drivers
package com.github.plume.oss.drivers

import io.shiftleft.codepropertygraph.generated.nodes.{AbstractNode, NewNode, StoredNode}
import io.shiftleft.codepropertygraph.generated.{EdgeTypes, NodeTypes, PropertyNames}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.github.plume.oss.drivers
import io.github.plume.oss.drivers.Neo4jDriver._
package com.github.plume.oss.drivers

import Neo4jDriver._
import io.shiftleft.codepropertygraph.generated.nodes.NewNode
import io.shiftleft.codepropertygraph.generated.{EdgeTypes, NodeTypes, PropertyNames}
import io.shiftleft.passes.AppliedDiffGraph
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.github.plume.oss.drivers
package com.github.plume.oss.drivers

import io.circe.generic.semiauto.deriveDecoder
import io.circe.{Decoder, jawn}
import io.github.plume.oss.drivers.NeptuneDriver.DEFAULT_PORT
import NeptuneDriver.DEFAULT_PORT
import org.apache.tinkerpop.gremlin.driver.Cluster
import org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteConnection
import org.apache.tinkerpop.gremlin.process.traversal.AnonymousTraversalSource
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.plume.oss.drivers
package com.github.plume.oss.drivers

import io.github.plume.oss.drivers.OverflowDbDriver.newOverflowGraph
import io.github.plume.oss.passes.PlumeDynamicCallLinker
import OverflowDbDriver.newOverflowGraph
import com.github.plume.oss.passes.PlumeDynamicCallLinker
import io.joern.dataflowengineoss.language.toExtendedCfgNode
import io.joern.dataflowengineoss.queryengine.{EngineConfig, EngineContext}
import io.joern.dataflowengineoss.semanticsloader.{Parser, Semantics}
Expand All @@ -16,6 +16,7 @@ import overflowdb.{Config, Node}

import java.io.{File => JFile}
import scala.collection.mutable
import scala.io.Source
import scala.jdk.CollectionConverters.IteratorHasAsScala
import scala.util.{Failure, Success, Try}

Expand All @@ -30,9 +31,10 @@ case class OverflowDbDriver(
maxCallDepth: Int = 2
) extends IDriver {

private val logger = LoggerFactory.getLogger(classOf[OverflowDbDriver])
private val semanticsParser = new Parser()
private val defaultSemantics = getClass.getClassLoader.getResource("default.semantics")
private val logger = LoggerFactory.getLogger(classOf[OverflowDbDriver])
private val semanticsParser = new Parser()
private val defaultSemantics =
Source.fromInputStream(getClass.getClassLoader.getResourceAsStream("default.semantics"))
implicit var context: EngineContext = loadDataflowContext(maxCallDepth)

private val odbConfig = Config
Expand All @@ -48,7 +50,7 @@ case class OverflowDbDriver(
def loadDataflowContext(maxCallDepth: Int): EngineContext = {
if (defaultSemantics != null) {
EngineContext(
Semantics.fromList(semanticsParser.parseFile(defaultSemantics.getFile)),
Semantics.fromList(semanticsParser.parse(defaultSemantics.getLines().mkString("\n"))),
EngineConfig(maxCallDepth)
)
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.github.plume.oss.drivers
package com.github.plume.oss.drivers

import io.circe
import io.circe.generic.auto._
import io.circe.syntax._
import io.circe.{Encoder, Json, JsonObject}
import io.github.plume.oss.drivers.TigerGraphDriver._
import TigerGraphDriver._
import io.shiftleft.codepropertygraph.generated.nodes._
import io.shiftleft.codepropertygraph.generated.{EdgeTypes, NodeTypes, PropertyNames}
import io.shiftleft.passes.AppliedDiffGraph
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.plume.oss.drivers
package com.github.plume.oss.drivers

import org.slf4j.{Logger, LoggerFactory}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.plume.oss.passes
package com.github.plume.oss.passes

import io.shiftleft.passes.KeyPool

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.plume.oss.passes
package com.github.plume.oss.passes

import io.github.plume.oss.drivers.IDriver
import com.github.plume.oss.drivers.IDriver
import io.shiftleft.codepropertygraph.Cpg
import io.shiftleft.codepropertygraph.generated.PropertyNames
import io.shiftleft.codepropertygraph.generated.nodes.{AbstractNode, NewNode, StoredNode}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.github.plume.oss.passes

import com.github.plume.oss.drivers.IDriver

trait PlumeCpgPassBase {

def createAndApply(driver: IDriver): Unit

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.plume.oss.passes
package com.github.plume.oss.passes

import io.shiftleft.codepropertygraph.Cpg
import io.shiftleft.codepropertygraph.generated.nodes.{Call, Method, TypeDecl}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.plume.oss.passes.concurrent
package com.github.plume.oss.passes.concurrent

import io.github.plume.oss.drivers.IDriver
import io.github.plume.oss.passes.PlumeCpgPassBase
import com.github.plume.oss.drivers.IDriver
import com.github.plume.oss.passes.PlumeCpgPassBase
import io.shiftleft.codepropertygraph.Cpg
import io.shiftleft.passes.DiffGraph
import io.shiftleft.semanticcpg.passes.controlflow.CfgCreationPass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.plume.oss.passes.concurrent
package com.github.plume.oss.passes.concurrent

import io.github.plume.oss.drivers.IDriver
import com.github.plume.oss.drivers.IDriver
import io.shiftleft.codepropertygraph.Cpg
import io.shiftleft.codepropertygraph.generated.nodes.AstNode
import io.shiftleft.passes.{ConcurrentWriterCpgPass, DiffGraph}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.plume.oss.passes.concurrent
package com.github.plume.oss.passes.concurrent

import io.github.plume.oss.drivers.IDriver
import com.github.plume.oss.drivers.IDriver
import io.shiftleft.codepropertygraph.Cpg
import io.shiftleft.passes.{CpgPass, DiffGraph}
import org.slf4j.{Logger, LoggerFactory}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.plume.oss.passes.concurrent
package com.github.plume.oss.passes.concurrent

import io.github.plume.oss.drivers.IDriver
import io.github.plume.oss.passes.PlumeCpgPassBase
import com.github.plume.oss.drivers.IDriver
import com.github.plume.oss.passes.PlumeCpgPassBase
import io.shiftleft.codepropertygraph.Cpg
import io.shiftleft.passes.DiffGraph
import io.shiftleft.semanticcpg.passes.base.ContainsEdgePass
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.plume.oss.passes.concurrent
package com.github.plume.oss.passes.concurrent

import io.github.plume.oss.HashUtil
import io.github.plume.oss.drivers.IDriver
import com.github.plume.oss.HashUtil
import com.github.plume.oss.drivers.IDriver
import io.shiftleft.codepropertygraph.generated.{NodeTypes, PropertyNames}
import org.slf4j.{Logger, LoggerFactory}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.plume.oss.passes.concurrent
package com.github.plume.oss.passes.concurrent

import io.github.plume.oss.HashUtil
import com.github.plume.oss.HashUtil
import io.shiftleft.codepropertygraph.Cpg
import io.shiftleft.codepropertygraph.generated.PropertyNames
import io.shiftleft.codepropertygraph.generated.nodes.File
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.plume.oss.passes.parallel
package com.github.plume.oss.passes.parallel

import io.github.plume.oss.Jimple2Cpg
import io.github.plume.oss.passes.IncrementalKeyPool
import com.github.plume.oss.Jimple2Cpg
import com.github.plume.oss.passes.IncrementalKeyPool
import io.shiftleft.codepropertygraph.Cpg
import io.shiftleft.passes.DiffGraph
import org.slf4j.LoggerFactory
Expand Down
Loading

0 comments on commit 549cedb

Please sign in to comment.