diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 13353706b..8359bf31c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,71 +1,8 @@ version: 2 updates: -- package-ecosystem: maven +- package-ecosystem: npm directory: "/" schedule: interval: daily open-pull-requests-limit: 10 - target-branch: dev - ignore: - - dependency-name: org.eclipse.jetty:jetty-maven-plugin - versions: - - 11.0.0 - - 11.0.1 - - dependency-name: com.eduworks:org.credentialengine - versions: - - 3.1.2 - - 3.1.3 - - 3.1.7 - - dependency-name: com.eduworks:cass.adapter - versions: - - 3.1.2 - - 3.1.3 - - 3.1.7 - - dependency-name: com.eduworks:cass.import - versions: - - 3.1.2 - - 3.1.3 - - 3.1.7 - - dependency-name: com.eduworks:cass.rollup - versions: - - 3.1.2 - - 3.1.3 - - 3.1.7 - - dependency-name: com.eduworks:ebac.identity - versions: - - 3.1.2 - - 3.1.3 - - 3.1.7 - - dependency-name: com.eduworks:cass.competency - versions: - - 3.1.2 - - 3.1.3 - - 3.1.7 - - dependency-name: com.eduworks:forge - versions: - - 3.1.2 - - 3.1.3 - - 3.1.7 - - dependency-name: com.eduworks:kbac.skyrepo - versions: - - 3.1.2 - - 3.1.3 - - 3.1.7 - - dependency-name: com.eduworks:ew.db.mapdb - versions: - - 5.16.4 - - dependency-name: com.eduworks:ew.levr.rdf - versions: - - 5.16.4 - - dependency-name: com.eduworks:ew.levr.net - versions: - - 5.16.4 - - dependency-name: com.eduworks:ew.levr.db.mapdb - versions: - - 5.16.4 - - dependency-name: com.eduworks:ew.levr.security - versions: - - 5.16.4 - - dependency-name: com.eduworks:ew.levr.base - versions: - - 5.16.4 + target-branch: "master" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/build.yml similarity index 51% rename from .github/workflows/codeql-analysis.yml rename to .github/workflows/build.yml index d20710e16..cb6aeb1b5 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/build.yml @@ -9,16 +9,16 @@ # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # -name: "CodeQL" +name: "Build and Analyze" on: push: - branches: [ master ] + branches: [ master,"1.5","1.6" ] pull_request: # The branches below must be a subset of the branches above - branches: [ master ] + branches: [ master,"1.5","1.6" ] schedule: - - cron: '36 13 * * 4' + - cron: '16 9 * * 1' jobs: analyze: @@ -28,9 +28,10 @@ jobs: actions: read contents: read security-events: write + pull-requests: write strategy: - fail-fast: false + fail-fast: true matrix: language: [ 'javascript' ] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] @@ -38,33 +39,36 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v3 - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + - name: Build lcov.info + uses: actions/setup-node@v4 + with: + cache: 'npm' + - run: npm ci + - run: docker compose up -d elasticsearch-cass + - run: npm run run:nyc - #- run: | - # make bootstrap - # make release + - name: Analyze with SonarCloud + uses: SonarSource/sonarcloud-github-action@v3.0.0 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) + with: + args: + -Dsonar.projectKey=cassproject_CASS + -Dsonar.organization=cassproject + -Dsonar.sources=src/main/ + -Dsonar.tests=src/test/ + projectBaseDir: . - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 0e72a00ef..6ea5e253d 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -1,20 +1,39 @@ # Dependency Review Action # -# This Action will scan dependency manifest files that change as part of a Pull Reqest, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. +# This Action will scan dependency manifest files that change as part of a Pull Request, +# surfacing known-vulnerable versions of the packages declared or updated in the PR. +# Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable +# packages will be blocked from merging. # # Source repository: https://github.com/actions/dependency-review-action # Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement -name: 'Dependency Review' -on: [pull_request] +name: 'Dependency review' +on: + pull_request: + branches: [ "master","1.5","1.6" ] +# If using a dependency submission action in this workflow this permission will need to be set to: +# +# permissions: +# contents: write +# +# https://docs.github.com/en/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api permissions: contents: read + # Write permissions for pull-requests are required for using the `comment-summary-in-pr` option, comment out if you aren't using this option + pull-requests: write jobs: dependency-review: runs-on: ubuntu-latest steps: - - name: 'Checkout Repository' - uses: actions/checkout@v3 + - name: 'Checkout repository' + uses: actions/checkout@v4 - name: 'Dependency Review' - uses: actions/dependency-review-action@v1 + uses: actions/dependency-review-action@v4 + # Commonly enabled options, see https://github.com/actions/dependency-review-action#configuration-options for all available options. + with: + comment-summary-in-pr: always + # fail-on-severity: moderate + deny-licenses: GPL-1.0-or-later, LGPL-2.0-or-later + # retry-on-snapshot-warnings: true diff --git a/Dockerfile b/Dockerfile index f5a59abbb..cf253a480 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,6 @@ FROM node:20.15.1-bullseye-slim WORKDIR /app COPY package*.json ./ -COPY pm2.test.config.js ./pm2.config.js RUN npm install --omit=dev COPY src src -CMD npm run run && npm run logs \ No newline at end of file +ENTRYPOINT ["node","src/main/server.js"] \ No newline at end of file diff --git a/coverage/lcov-report/index.html b/coverage/lcov-report/index.html index b53a334b9..c6eaaead6 100644 --- a/coverage/lcov-report/index.html +++ b/coverage/lcov-report/index.html @@ -23,30 +23,30 @@

All files

- 0.92% + 40.82% Statements - 65/7048 + 2442/5982
- 0.6% + 29.79% Branches - 25/4145 + 1148/3853
- 0% + 42.44% Functions - 0/513 + 177/417
- 0.95% + 41.35% Lines - 65/6782 + 2380/5755
@@ -79,213 +79,213 @@

All files

- main - -
+ main + +
- 20.13% - 29/144 - 32.25% - 20/62 - 0% - 0/17 - 20.42% - 29/142 + 65.1% + 97/149 + 39.06% + 25/64 + 38.88% + 7/18 + 65.98% + 97/147 - main/server - -
+ main/server + +
- 0% - 0/2071 - 0% - 0/1110 - 0% - 0/128 - 0% - 0/2009 + 56.33% + 1080/1917 + 47.15% + 531/1126 + 69.91% + 86/123 + 56.09% + 1040/1854 main/server/adapter/asn - -
+ +
- 0% - 0/460 - 0% - 0/330 - 0% - 0/17 - 0% - 0/448 + 23.28% + 88/378 + 18.75% + 51/272 + 27.27% + 3/11 + 23.22% + 85/366 - main/server/adapter/case - -
+ main/server/adapter/case + +
+ 72.18% + 340/471 + 54.66% + 123/225 + 43.47% + 20/46 + 73.46% + 335/456 + + + + main/server/adapter/ce + +
+ + 2.4% + 2/83 + 1.13% + 1/88 0% - 0/492 - 0% - 0/225 - 0% - 0/51 - 0% - 0/477 + 0/9 + 2.43% + 2/82 main/server/adapter/ceasn - -
+ +
- 0% - 0/1361 - 0% - 0/999 - 0% - 0/53 - 0% - 0/1304 + 30.08% + 392/1303 + 26.38% + 271/1027 + 41.46% + 17/41 + 30.55% + 381/1247 main/server/adapter/jsonLd - -
+ +
- 0% - 0/53 - 0% - 0/38 + 3.77% + 2/53 + 2.63% + 1/38 0% 0/1 - 0% - 0/53 + 3.77% + 2/53 main/server/adapter/openbadges - -
+ +
- 0% - 0/150 - 0% - 0/80 + 10.81% + 16/148 + 1.31% + 1/76 0% 0/9 - 0% - 0/149 + 10.88% + 16/147 main/server/adapter/replicate - -
+ +
- 0% - 0/81 - 0% - 0/27 - 0% - 0/8 - 0% - 0/79 + 20.98% + 17/81 + 18.51% + 5/27 + 12.5% + 1/8 + 21.51% + 17/79 main/server/adapter/scd - -
+ +
- 0% - 0/111 + 6.3% + 7/111 0% 0/72 0% 0/8 - 0% - 0/107 + 6.54% + 7/107 main/server/adapter/xapi - -
+ +
- 0% - 0/217 - 0% - 0/107 - 0% - 0/17 - 0% - 0/201 + 11.85% + 30/253 + 0.8% + 1/125 + 0% + 0/21 + 12.71% + 30/236 main/server/profile - -
- - 0% - 0/498 - 0% - 0/218 - 0% - 0/35 - 0% - 0/462 - - - - main/server/profile/coprocessors - -
+ +
- 0% - 0/517 - 0% - 0/268 - 0% - 0/56 - 0% - 0/496 + 15.54% + 23/148 + 0.96% + 1/104 + 9.09% + 1/11 + 17.42% + 23/132 main/server/shims - -
+ +
- 4.07% - 36/884 - 0.82% - 5/605 - 0% - 0/111 - 4.25% - 36/846 + 39.4% + 346/878 + 22.64% + 137/605 + 38.53% + 42/109 + 40.83% + 343/840 main/server/shims/util - -
+ +
- 0% - 0/9 + 22.22% + 2/9 0% 0/4 0% 0/2 - 0% - 0/9 + 22.22% + 2/9 @@ -296,7 +296,7 @@

All files