diff --git a/.github/workflows/datree-validation.yml b/.github/workflows/datree-validation.yml new file mode 100644 index 000000000..2192f4a36 --- /dev/null +++ b/.github/workflows/datree-validation.yml @@ -0,0 +1,53 @@ +# |=========================== Datree Policy Check ===================================| +# | This workflow will verify that all committed config files in the PR are valid. | +# | If one of the config files is happened to be a K8s config file (manifest), | +# | It will also automatically be tested for schema validation and misconfigurations. | +# | For more info visit: https://github.com/marketplace/datree | +# |===================================================================================| + +name: Datree Workflow + +on: + pull_request: + types: [opened, edited, synchronize, reopened] + +jobs: + configs-validation: + runs-on: ubuntu-latest + env: + DATREE_TOKEN: ${{ secrets.DATREE_TOKEN }} + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v19 + with: + files: | + *.yaml + *.yml + - name: List all changed files + run: echo ${{ steps.changed-files.outputs.all_changed_files }} + + - name: Install Datree's CLI + if: steps.changed-files.outputs.any_changed == 'true' + run: curl https://get.datree.io | /bin/bash -s + + # |=========================== Datree Policy Check ===================================| + # | Prevent Kubernetes misconfigurations from reaching production! | + # | Datree is a CLI tool to ensure K8s configs follow stability & security | + # | best practices as well as your organization’s policies. | + # | For more info visit: https://github.com/datreeio/datree | + # |===================================================================================| + + - name: Datree validate config files + if: steps.changed-files.outputs.any_changed == 'true' + uses: datreeio/action-datree@main # For more info about this Actions visit 👉 https://github.com/datreeio/action-datree + with: + path: ${{ steps.changed-files.outputs.all_changed_files }} + cliArguments: --only-k8s-files + isHelmChart: false + isKustomization: false diff --git a/package.json b/package.json index 5fadb3c9a..fd3915210 100644 --- a/package.json +++ b/package.json @@ -22,23 +22,23 @@ }, "dependencies": { "@golevelup/nestjs-modules": "^0.5.0", - "@nestjs/platform-express": "8.4.2", + "@nestjs/platform-express": "10.1.3", "bitcoin-address-validation": "^2.2.1", "esbuild": "^0.17.10", "esbuild-runner": "^2.2.1", "file-system-cache": "^1.0.5", "fs-extra": "^10.0.1", - "inquirer": "^8.2.2", + "inquirer": "^9.2.9", "lodash": "^4.17.21", - "rimraf": "^3.0.2" + "rimraf": "^5.0.1" }, "devDependencies": { "@ethersproject/abi": "^5.5.0", "@ethersproject/bytes": "^5.5.0", "@ethersproject/contracts": "^5.5.0", "@ethersproject/providers": "^5.5.0", - "@nestjs/cli": "8.2.4", - "@nestjs/common": "8.4.2", + "@nestjs/cli": "9.3.0", + "@nestjs/common": "10.1.3", "@nestjs/config": "^1.1.0", "@nestjs/core": "9.0.5", "@nestjs/swagger": "^5.2.1", @@ -51,17 +51,17 @@ "@types/express": "^4.17.13", "@types/fs-extra": "^9.0.13", "@types/inquirer": "^8.2.0", - "@types/jest": "^27.4.1", + "@types/jest": "^29.4.0", "@types/lodash": "^4.14.180", - "@types/node": "16.11.7", - "@typescript-eslint/eslint-plugin": "^5.16.0", + "@types/node": "18.14.2", + "@typescript-eslint/eslint-plugin": "^6.2.0", "@typescript-eslint/parser": "^5.16.0", - "axios": "^0.26.1", + "axios": "^1.4.0", "bignumber.js": "^9.0.2", "cache-manager": "^3.6.0", "chalk": "4", "class-transformer": "^0.5.1", - "class-validator": "^0.13.2", + "class-validator": "^0.14.0", "conventional-changelog-conventionalcommits": "^4.6.3", "copyfiles": "^2.4.1", "dataloader": "^2.1.0", @@ -71,12 +71,12 @@ "eslint-plugin-import": "^2.25.4", "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-unused-imports": "^2.0.0", - "ethers": "^5.5.1", + "ethers": "^6.0.8", "graphql": "^15.5.1", - "graphql-request": "^3.7.0", + "graphql-request": "^5.1.0", "jest": "^27.5.1", "moment": "^2.29.2", - "nodemon": "^2.0.15", + "nodemon": "^3.0.0", "prettier": "^2.6.0", "qs": "^6.10.3", "recast": "^0.20.5", @@ -85,14 +85,14 @@ "source-map-support": "^0.5.20", "swagger-ui-express": "^4.3.0", "ts-generator": "^0.1.1", - "ts-jest": "^27.1.4", + "ts-jest": "^29.1.1", "ts-loader": "^9.2.3", "ts-node": "^10.7.0", "tsc-alias": "^1.6.5", "tsconfig-paths": "^3.14.1", "type-fest": "^2.12.1", "typechain": "^8.0.0", - "typescript": "^4.6.2", + "typescript": "^5.0.4", "web3": "^1.5.1", "webpack": "^5.0.0" }, @@ -105,7 +105,7 @@ "bignumber.js": "^9.0.1", "cache-manager": "^3.4.1", "class-transformer": "^0.4.0", - "class-validator": "^0.13.2", + "class-validator": "^0.14.0", "dataloader": "^2.1.0", "ethers": "^5.5.1", "graphql": "14 || 15 || 16", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 894e8cd63..5e840358d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1472,7 +1472,7 @@ packages: axios: 0.26.1 cache-manager: 3.6.0 class-transformer: 0.5.1 - class-validator: 0.13.2 + class-validator: 0.14.0 iterare: 1.2.1 reflect-metadata: 0.1.13 rxjs: 7.5.5 @@ -1544,7 +1544,7 @@ packages: dependencies: '@nestjs/common': 8.4.2(cache-manager@3.6.0)(class-transformer@0.5.1)(class-validator@0.13.2)(reflect-metadata@0.1.13)(rxjs@7.5.5) class-transformer: 0.5.1 - class-validator: 0.13.2 + class-validator: 0.14.0 reflect-metadata: 0.1.13 dev: true @@ -3068,7 +3068,8 @@ packages: /class-validator@0.13.2: resolution: {integrity: sha512-yBUcQy07FPlGzUjoLuUfIOXzgynnQPPruyK1Ge2B74k9ROwnle1E+NxLWnUv5OLU8hA/qL5leAE9XnXq3byaBw==} dependencies: - libphonenumber-js: 1.9.50 + '@types/validator': 13.7.17 + libphonenumber-js: 1.10.36 validator: 13.7.0 /clean-stack@3.0.1: