diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d1534c..9bb4bae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,12 +11,14 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Commit Lint uses: webiny/action-conventional-commits@v1.0.5 - name: Secrets Scan - uses: max/secret-scan@master - with: - exclude_path: 'secret-scan-exclude.txt' + uses: gitleaks/gitleaks-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Shell Lint uses: luizm/action-sh-checker@master env: diff --git a/README.md b/README.md index 86366e0..51e1e63 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ on the merge request. - [Installation](#installation) - [Options](#options) +- [GitLab](#gitlab) - [Local Development](#local-development) - [Testing](#testing) - [Conventional Commits](#conventional-commits) @@ -86,6 +87,24 @@ The following command line options are available for configuration: | -o, --output \ | ./gl-code-quality-report.json | Filepath for the GitLab Code Quality report output | | -h, --help | | display help for command | +## GitLab + +`gl-code-quality-openapi-validator` is intended to be used as part of a GitLab CI/CD pipeline job. The following code +snippet provides an example job declaration. + +```yaml +openapi-validation: + stage: code-quality + image: node:latest + script: + - npm install -g ibm-openapi-validator @ibm-cloud/openapi-ruleset gl-code-quality-openapi-validator + - lint-openapi --json ./openapi-specification.yml >> openapi-validator-report.json + - gl-code-quality-openapi-validator -s ./openapi-specification.yml + artifacts: + reports: + codequality: gl-code-quality-report.json +``` + ## Local Development ### Prerequisites diff --git a/package-lock.json b/package-lock.json index c76dd30..074a990 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-security": "^1.5.0", "jest": "^28.1.1", - "prettier": "^2.6.2" + "prettier": "^2.7.1" }, "engines": { "node": ">=14.0.0" @@ -4610,9 +4610,9 @@ } }, "node_modules/prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", - "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -8894,9 +8894,9 @@ "dev": true }, "prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", - "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "dev": true }, "prettier-linter-helpers": { diff --git a/package.json b/package.json index 4d288c0..5aec634 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,6 @@ "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-security": "^1.5.0", "jest": "^28.1.1", - "prettier": "^2.6.2" + "prettier": "^2.7.1" } } diff --git a/secret-scan-exclude.txt b/secret-scan-exclude.txt deleted file mode 100644 index a71e337..0000000 --- a/secret-scan-exclude.txt +++ /dev/null @@ -1,4 +0,0 @@ -CHANGELOG.md -package-lock.json -test/lib/generator.test.js -test/bin/data/expected-gl-code-quality-report.json