diff --git a/.github/workflows/build-base-images.yaml b/.github/workflows/build-base-images.yaml index bbf8522bd4..6df4003c38 100644 --- a/.github/workflows/build-base-images.yaml +++ b/.github/workflows/build-base-images.yaml @@ -57,7 +57,7 @@ jobs: - name: Prepare formatted tags run: | echo FORMATTED_TAG=${{ matrix.base_image_tag }} | sed -e "s/-focal$//" | sed -e "s/20.04$/latest/" >> $GITHUB_ENV - - uses: docker/build-push-action@v4 + - uses: docker/build-push-action@v6 with: context: save-deploy/base-images push: true @@ -83,7 +83,7 @@ jobs: registry: ghcr.io username: saveourtool password: ${{ secrets.GITHUB_TOKEN }} - - uses: docker/build-push-action@v4 + - uses: docker/build-push-action@v6 with: context: save-demo-cpg/builder push: true diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 02c2494171..3e43844921 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -45,7 +45,7 @@ jobs: with: fetch-depth: 2 - id: git-changed-files - uses: tj-actions/changed-files@v40 + uses: tj-actions/changed-files@v45 with: files_yaml: | root_gradle: diff --git a/.github/workflows/helm_push.yml b/.github/workflows/helm_push.yml index 3f9bface11..f70809da1b 100644 --- a/.github/workflows/helm_push.yml +++ b/.github/workflows/helm_push.yml @@ -42,10 +42,10 @@ jobs: name: Prepare to build from branch run: | git switch --force-create ${{ inputs.branch }} origin/${{ inputs.branch }} - - uses: gittools/actions/gitversion/setup@v0.10.2 + - uses: gittools/actions/gitversion/setup@v3.0.0 with: versionSpec: 5.x - - uses: gittools/actions/gitversion/execute@v0.10.2 + - uses: gittools/actions/gitversion/execute@v3.0.0 id: calculate-semver with: targetPath: ${{ env.CHARTS_DIR }} diff --git a/README.md b/README.md index e2b41c1a2a..495ab992b8 100644 --- a/README.md +++ b/README.md @@ -13,24 +13,28 @@ Our key focus is to make life of developers who analyze code easier. - Use SAVE to create an **online demo for your analyzer** and set it up for your community's use; - Benchmarks Archive with the **list of popular benchmarks** (with a reference to [awesome-benchmarks](https://github.com/saveourtool/awesome-benchmarks)). -2. **VULN** - A platform designed for the **reporting**, aggregation, and deduplication of one-day **vulnerabilities**. +2. **COSV** - A platform designed for the **reporting**, aggregation, and deduplication of one-day **vulnerabilities**. -Additionally, on our platform we host **contests** in the field of code analysis. +Additionally, on our platform we host **contests** in the field of code analysis. This provides an opportunity for you to submit your automated solutions for bug detection, and compete with other innovative projects. ## Links - Collection of Code Analyzers Demo: [Demo](https://saveourtool.com/demo) - Benchmarks Archive: [Benchmarks](https://saveourtool.com/awesome-benchmarks) - CI projects: [CI Projects](https://saveourtool.com/projects) -- Vulnerabilities Collection: [1-day Vulnerabilities](https://saveourtool.com/vuln/list) +- Vulnerabilities Collection: [1-day Vulnerabilities](https://cosv.gitlink.org.cn) ## Motivation - [Motivation of **SAVE** and more details](info/SaveMotivation.md) - Motivation of **VULN** and more details: TBD ## High-level perspective +#### SAVE ![SAVE processing](https://user-images.githubusercontent.com/58667063/146387903-24ba9c91-a2a3-45e7-a07a-cb7bc388e4aa.jpg) +#### COSV +image + ## Build and deploy To build the project and run all tests, execute `./gradlew build`. @@ -44,4 +48,10 @@ For more detailed instructions, including **deployment instructions**, see [save proxied as configured in [dev-server.js](../save-frontend/webpack.config.d/dev-server.js). User will be hardcoded with `admin` user. ## Architecture and design - +Save: + + + +COSV: + + diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8c3b1d6d20..02dbaa3961 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,12 +1,12 @@ [versions] -kotlin = "1.9.10" -jetbrains-annotations = "24.0.1" +kotlin = "1.9.25" +jetbrains-annotations = "26.0.1" save-cli = "0.3.10" ktor = "2.3.6" okio = "3.3.0" -serialization = "1.6.0" -kotlinx-datetime = "0.4.1" -kotlinx-coroutines = "1.7.3" +serialization = "1.6.3" +kotlinx-datetime = "0.5.0" +kotlinx-coroutines = "1.8.1" kotlin-wrappers = "1.0.0-pre.634" spring-boot = "2.7.17" spring-cloud = "3.1.9" @@ -18,7 +18,7 @@ diktat = "2.0.0" detekt = "1.23.3" liquibase-core = "4.24.0" docker-java = "3.3.4" -jgit = "6.7.0.202309050840-r" +jgit = "7.0.0.202409031743-r" mockito = "5.3.1" mockito-kotlin = "5.0.0" # only in save-cli @@ -36,7 +36,7 @@ kotlinx-cli = "0.3.6" spotless = "6.22.0" fabric8 = "6.9.2" arrow-kt = "1.2.1" -publish = "1.3.0" +publish = "2.0.0" cpg = "7.1.2" # should be taken from cpg cpg-neo4j-ogm = { strictly = "4.0.6" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 46671acb6e..df97d72b8b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionSha256Sum=3e1af3ae886920c3ac87f7a91f816c0c7c436f276a6eefdb3da152100fef72ae -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/info/img/cosv-diagram.PNG b/info/img/cosv-diagram.PNG new file mode 100644 index 0000000000..143b21c37a Binary files /dev/null and b/info/img/cosv-diagram.PNG differ diff --git a/save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt b/save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt index 0d5ff19117..a85fc06e7f 100644 --- a/save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt +++ b/save-cloud-common/src/nativeMain/kotlin/com/saveourtool/save/utils/PlatformUtils.kt @@ -8,7 +8,7 @@ import kotlinx.cinterop.ExperimentalForeignApi import kotlinx.cinterop.toKString actual class AtomicLong actual constructor(value: Long) { - private val kotlinAtomicLong = kotlin.native.concurrent.AtomicLong(value) + private val kotlinAtomicLong = kotlin.concurrent.AtomicLong(value) actual fun get(): Long = kotlinAtomicLong.value diff --git a/save-cosv-frontend/src/main/resources/index.html b/save-cosv-frontend/src/main/resources/index.html index ff5236cb6b..9c3629c0af 100644 --- a/save-cosv-frontend/src/main/resources/index.html +++ b/save-cosv-frontend/src/main/resources/index.html @@ -23,7 +23,7 @@ - + diff --git a/save-demo-agent/src/nativeTest/kotlin/com/saveoourtool/save/demo/agent/ServerTest.kt b/save-demo-agent/src/nativeTest/kotlin/com/saveoourtool/save/demo/agent/ServerTest.kt index cf82d3c44f..63dfb52d8d 100644 --- a/save-demo-agent/src/nativeTest/kotlin/com/saveoourtool/save/demo/agent/ServerTest.kt +++ b/save-demo-agent/src/nativeTest/kotlin/com/saveoourtool/save/demo/agent/ServerTest.kt @@ -10,6 +10,7 @@ import io.ktor.utils.io.core.* import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch +import kotlin.experimental.ExperimentalNativeApi import kotlin.test.* class ServerTest { @@ -27,6 +28,7 @@ class ServerTest { server.stop() } + @OptIn(ExperimentalNativeApi::class) @Test fun testServerStartup() { httpClient().use { client -> diff --git a/save-frontend-common/karma.config.d/custom-config.js b/save-frontend-common/karma.config.d/custom-config.js index 0c88d3dc9c..25274c721d 100644 --- a/save-frontend-common/karma.config.d/custom-config.js +++ b/save-frontend-common/karma.config.d/custom-config.js @@ -8,7 +8,7 @@ test: /\.js$/, use: {loader: 'istanbul-instrumenter-loader'}, // fixme: need to exclude Kotlin dependencies - include: [path.resolve(__dirname, '../save-cloud-save-frontend-common/kotlin/')] + include: [path.resolve(__dirname, '../save-cloud-frontend-common/kotlin/')] } ) config.coverageIstanbulReporter = { @@ -24,12 +24,12 @@ config.set({ } }, proxies: { - // serving mockServiceWorker.js.js from location relative to base url + // serving mockServiceWorker.js from location relative to base url // the file should be included into Karma's `files` to be served by server at all - '/mockServiceWorker.js': '/base/mockServiceWorker.js', + '/mockServiceWorker.js': '/base/node_modules/mockServiceWorker.js', }, }) // http://karma-runner.github.io/6.3/config/files.html -// 'All of the relative patterns will get resolved using the basePath first.', where basePath is set by KGP to `node_modules` -config.files.push('./mockServiceWorker.js') +// 'All of the relative patterns will get resolved using the basePath first.', where basePath is NOT set by KGP to `node_modules` after migration to 1.9 +config.files.push('./node_modules/mockServiceWorker.js') diff --git a/save-frontend/karma.config.d/custom-config.js b/save-frontend/karma.config.d/custom-config.js index 89c1081706..f84f21137a 100644 --- a/save-frontend/karma.config.d/custom-config.js +++ b/save-frontend/karma.config.d/custom-config.js @@ -24,12 +24,12 @@ config.set({ } }, proxies: { - // serving mockServiceWorker.js.js from location relative to base url + // serving mockServiceWorker.js from location relative to base url // the file should be included into Karma's `files` to be served by server at all - '/mockServiceWorker.js': '/base/mockServiceWorker.js', + '/mockServiceWorker.js': '/base/node_modules/mockServiceWorker.js', }, }) // http://karma-runner.github.io/6.3/config/files.html -// 'All of the relative patterns will get resolved using the basePath first.', where basePath is set by KGP to `node_modules` -config.files.push('./mockServiceWorker.js') +// 'All of the relative patterns will get resolved using the basePath first.', where basePath is NOT set by KGP to `node_modules` after migration to 1.9 +config.files.push('./node_modules/mockServiceWorker.js') diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/sigma/layouts/LayoutCircular.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/sigma/layouts/LayoutCircular.kt index e032f7ee0b..e02f3ffa18 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/sigma/layouts/LayoutCircular.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/sigma/layouts/LayoutCircular.kt @@ -1,15 +1,12 @@ @file:Suppress("FILE_NAME_MATCH_CLASS", "HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -@file:JsModule("@react-sigma/layout-circular") -@file:JsNonModule package com.saveourtool.save.frontend.externals.graph.sigma.layouts -import react.* - /** * @param settings * @return [LayoutInstance] with positions and assign functions */ -@JsName("useLayoutCircular") +@JsModule("@react-sigma/layout-circular") +@JsNonModule @JsExport external fun useLayoutCircular(settings: dynamic = definedExternally): LayoutInstance diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/sigma/layouts/LayoutForceAtlas2.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/sigma/layouts/LayoutForceAtlas2.kt index 2a1b490b77..76008bc9c1 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/sigma/layouts/LayoutForceAtlas2.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/sigma/layouts/LayoutForceAtlas2.kt @@ -1,14 +1,12 @@ @file:Suppress("FILE_NAME_MATCH_CLASS", "HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -@file:JsModule("@react-sigma/layout-forceatlas2") -@file:JsNonModule package com.saveourtool.save.frontend.externals.graph.sigma.layouts -import react.* - /** * @param settings * @return [LayoutInstance] with positions and assign functions */ -@JsName("useLayoutForceAtlas2") +@JsModule("@react-sigma/layout-forceatlas2") +@JsNonModule +@JsExport external fun useLayoutForceAtlas2(settings: dynamic = definedExternally): LayoutInstance diff --git a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/sigma/layouts/LayoutRandom.kt b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/sigma/layouts/LayoutRandom.kt index 8b229d530a..305b38a7da 100644 --- a/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/sigma/layouts/LayoutRandom.kt +++ b/save-frontend/src/main/kotlin/com/saveourtool/save/frontend/externals/graph/sigma/layouts/LayoutRandom.kt @@ -1,15 +1,12 @@ @file:Suppress("FILE_NAME_MATCH_CLASS", "HEADER_MISSING_IN_NON_SINGLE_CLASS_FILE") -@file:JsModule("@react-sigma/layout-random") -@file:JsNonModule package com.saveourtool.save.frontend.externals.graph.sigma.layouts -import react.* - /** * @param settings * @return [LayoutInstance] with positions and assign functions */ -@JsName("useLayoutRandom") +@JsModule("@react-sigma/layout-random") +@JsNonModule @JsExport external fun useLayoutRandom(settings: dynamic = definedExternally): LayoutInstance diff --git a/save-frontend/src/main/resources/index.html b/save-frontend/src/main/resources/index.html index ff5236cb6b..9c3629c0af 100644 --- a/save-frontend/src/main/resources/index.html +++ b/save-frontend/src/main/resources/index.html @@ -23,7 +23,7 @@ - +