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 @@