Skip to content

Commit

Permalink
[datasets] updated naming on securibench to follow standards of bench…
Browse files Browse the repository at this point in the history
…marking tool
  • Loading branch information
AndreiDreyer committed Jun 12, 2024
1 parent b58e5cd commit 1ee3de3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
- name: Rename
run: |
mv workspace/ichnaea.zip ichnaea.zip
mv workspace/securibench-micro-JAVA_BYTECODE.zip securibench-micro-JAVA_BYTECODE.zip
mv workspace/securibench-micro-JAVA_SRC.zip securibench-micro-JAVA_SRC.zip
mv workspace/securibench-micro-JAVA.zip securibench-micro-JAVA.zip
mv workspace/securibench-micro-JAVASRC.zip securibench-micro-JAVASRC.zip
- name: Set next release version
id: taggerFinal
uses: anothrNick/github-tag-action@1.61.0
Expand All @@ -56,5 +56,5 @@ jobs:
tag_name: ${{ steps.taggerDryRun.outputs.new_tag }}
files: |
ichnaea.zip
securibench-micro-JAVA_BYTECODE.zip
securibench-micro-JAVA_SRC.zip
securibench-micro-JAVA.zip
securibench-micro-JAVASRC.zip
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,9 @@ object BenchmarkDataset {
// (AvailableBenchmarks.OWASP_JAVA, x => new OWASPJavaDownloader(x.datasetDir)),
(
AvailableBenchmarks.SECURIBENCH_MICRO_JAVASRC,
x => new SecuribenchMicroDownloader(x.datasetDir, JavaCpgTypes.JAVA_SRC)
),
(
AvailableBenchmarks.SECURIBENCH_MICRO_JAVA,
x => new SecuribenchMicroDownloader(x.datasetDir, JavaCpgTypes.JAVA_BYTECODE)
x => new SecuribenchMicroDownloader(x.datasetDir, JavaCpgTypes.JAVASRC)
),
(AvailableBenchmarks.SECURIBENCH_MICRO_JAVA, x => new SecuribenchMicroDownloader(x.datasetDir, JavaCpgTypes.JAVA)),
(AvailableBenchmarks.ICHNAEA_JSSRC, x => new IchnaeaDownloader(x.datasetDir))
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ object AvailableBenchmarks extends Enumeration {
}

object JavaCpgTypes extends Enumeration {
val JAVA_SRC = Value
val JAVA_BYTECODE = Value
val JAVASRC = Value
val JAVA = Value
}

object OutputFormat extends Enumeration {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SecuribenchMicroDownloader(datasetDir: File, cpgCreatorType: JavaCpgTypes.
downloadBenchmarkAndUnarchive(CompressionTypes.ZIP)
downloadFile(apacheJdo, benchmarkBaseDir / "lib" / "jdo-api-3.1.jar")
if (
cpgCreatorType == JavaCpgTypes.JAVA_BYTECODE && (benchmarkBaseDir / "classes")
cpgCreatorType == JavaCpgTypes.JAVA && (benchmarkBaseDir / "classes")
.walk()
.count(_.`extension`.contains(".class")) < 1
) {
Expand Down

0 comments on commit 1ee3de3

Please sign in to comment.