From 8b4bd93751a9ea5475cd6f8dce049103fb443747 Mon Sep 17 00:00:00 2001 From: TommyE123 Date: Wed, 19 Jun 2024 14:01:27 +0100 Subject: [PATCH 1/4] GitLeaks - Added missing schema properties --- CHANGELOG.md | 1 + .../megalinter-configuration.jsonschema.json | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f926422f39..7db2e137d2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - [Powershell](https://github.com/PowerShell/PSScriptAnalyzer#readme) Error table truncation improvements - [yamllint](https://github.com/adrienverge/yamllint) fix error/warning count to work with different log output formats - Improve support for single argument in `get_list_args` function + - [GitLeaks]( https://github.com/gitleaks/gitleaks) Add missing schema properties - Doc diff --git a/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json b/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json index 6ab30919f1a..4762edeff7b 100644 --- a/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json +++ b/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json @@ -15712,6 +15712,22 @@ "title": "REPOSITORY_GITLEAKS: Define or override a list of bash commands to run after the linter", "type": "array" }, + "REPOSITORY_GITLEAKS_PR_COMMITS_SCAN": { + "$id": "#/properties/REPOSITORY_GITLEAKS_PR_COMMITS_SCAN", + "default": false, + "title": "REPOSITORY_GITLEAKS: Scan only commits in the current Pull Request/Merge Request", + "type": "boolean" + }, + "REPOSITORY_GITLEAKS_PR_SOURCE_SHA":{ + "$id": "#/properties/REPOSITORY_GITLEAKS_PR_SOURCE_SHA", + "title": "REPOSITORY_GITLEAKS: Source SHA of the Pull Request/Merge Request", + "type": "string" + }, + "REPOSITORY_GITLEAKS_PR_TARGET_SHA":{ + "$id": "#/properties/REPOSITORY_GITLEAKS_PR_TARGET_SHA", + "title": "REPOSITORY_GITLEAKS: Target SHA of the Pull Request/Merge Request", + "type": "string" + }, "REPOSITORY_GITLEAKS_PRE_COMMANDS": { "$id": "#/properties/REPOSITORY_GITLEAKS_PRE_COMMANDS", "examples": [ From 869d959baf57d9a963cec162167991fcf977d6c9 Mon Sep 17 00:00:00 2001 From: TommyE123 Date: Wed, 19 Jun 2024 14:07:17 +0100 Subject: [PATCH 2/4] cosmetic --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7db2e137d2b..2af7ddc3e65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - [Powershell](https://github.com/PowerShell/PSScriptAnalyzer#readme) Error table truncation improvements - [yamllint](https://github.com/adrienverge/yamllint) fix error/warning count to work with different log output formats - Improve support for single argument in `get_list_args` function - - [GitLeaks]( https://github.com/gitleaks/gitleaks) Add missing schema properties + - [GitLeaks](https://github.com/gitleaks/gitleaks) add missing schema properties - Doc From 56e196168b93fda5590684edaa2ff72ce417b0ce Mon Sep 17 00:00:00 2001 From: TommyE123 Date: Thu, 20 Jun 2024 12:44:09 +0100 Subject: [PATCH 3/4] Reordered and added missing default --- .../megalinter-configuration.jsonschema.json | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json b/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json index 4762edeff7b..31d38ead569 100644 --- a/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json +++ b/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json @@ -15712,22 +15712,6 @@ "title": "REPOSITORY_GITLEAKS: Define or override a list of bash commands to run after the linter", "type": "array" }, - "REPOSITORY_GITLEAKS_PR_COMMITS_SCAN": { - "$id": "#/properties/REPOSITORY_GITLEAKS_PR_COMMITS_SCAN", - "default": false, - "title": "REPOSITORY_GITLEAKS: Scan only commits in the current Pull Request/Merge Request", - "type": "boolean" - }, - "REPOSITORY_GITLEAKS_PR_SOURCE_SHA":{ - "$id": "#/properties/REPOSITORY_GITLEAKS_PR_SOURCE_SHA", - "title": "REPOSITORY_GITLEAKS: Source SHA of the Pull Request/Merge Request", - "type": "string" - }, - "REPOSITORY_GITLEAKS_PR_TARGET_SHA":{ - "$id": "#/properties/REPOSITORY_GITLEAKS_PR_TARGET_SHA", - "title": "REPOSITORY_GITLEAKS: Target SHA of the Pull Request/Merge Request", - "type": "string" - }, "REPOSITORY_GITLEAKS_PRE_COMMANDS": { "$id": "#/properties/REPOSITORY_GITLEAKS_PRE_COMMANDS", "examples": [ @@ -15745,6 +15729,24 @@ "title": "REPOSITORY_GITLEAKS: Define or override a list of bash commands to run before the linter", "type": "array" }, + "REPOSITORY_GITLEAKS_PR_COMMITS_SCAN": { + "$id": "#/properties/REPOSITORY_GITLEAKS_PR_COMMITS_SCAN", + "default": false, + "title": "REPOSITORY_GITLEAKS: Scan only commits in the current Pull Request/Merge Request", + "type": "boolean" + }, + "REPOSITORY_GITLEAKS_PR_SOURCE_SHA": { + "$id": "#/properties/REPOSITORY_GITLEAKS_PR_SOURCE_SHA", + "default": "", + "title": "REPOSITORY_GITLEAKS: Source SHA of the Pull Request/Merge Request", + "type": "string" + }, + "REPOSITORY_GITLEAKS_PR_TARGET_SHA": { + "$id": "#/properties/REPOSITORY_GITLEAKS_PR_TARGET_SHA", + "default": "", + "title": "REPOSITORY_GITLEAKS: Target SHA of the Pull Request/Merge Request", + "type": "string" + }, "REPOSITORY_GITLEAKS_RULES_PATH": { "$id": "#/properties/REPOSITORY_GITLEAKS_RULES_PATH", "description": "REPOSITORY_GITLEAKS: Path where to find linter configuration file", From ea8e8eae849a316d2c8b3d2d792b24bc21b7db99 Mon Sep 17 00:00:00 2001 From: TommyE123 Date: Thu, 20 Jun 2024 12:57:15 +0100 Subject: [PATCH 4/4] Wording change --- megalinter/descriptors/repository.megalinter-descriptor.yml | 6 +++--- .../schemas/megalinter-configuration.jsonschema.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/megalinter/descriptors/repository.megalinter-descriptor.yml b/megalinter/descriptors/repository.megalinter-descriptor.yml index 5b7c26e84cb..090ea70e2d5 100644 --- a/megalinter/descriptors/repository.megalinter-descriptor.yml +++ b/megalinter/descriptors/repository.megalinter-descriptor.yml @@ -252,13 +252,13 @@ linters: - COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ variables: - name: REPOSITORY_GITLEAKS_PR_COMMITS_SCAN - description: Scan only PR commits on Pull Request + description: Scan only commits in the current Pull Request/Merge Request default_value: "false" - name: REPOSITORY_GITLEAKS_PR_SOURCE_SHA - description: Pull Request source commit sha (N/A to supported scenarios) + description: Source commit SHA of the Pull Request/Merge Request default_value: "" - name: REPOSITORY_GITLEAKS_PR_TARGET_SHA - description: Pull Request target commit sha (N/A to supported scenarios) + description: Target commit SHA of the Pull Request/Merge Request default_value: "" # GRYPE diff --git a/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json b/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json index 31d38ead569..34962e67b90 100644 --- a/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json +++ b/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json @@ -15738,13 +15738,13 @@ "REPOSITORY_GITLEAKS_PR_SOURCE_SHA": { "$id": "#/properties/REPOSITORY_GITLEAKS_PR_SOURCE_SHA", "default": "", - "title": "REPOSITORY_GITLEAKS: Source SHA of the Pull Request/Merge Request", + "title": "REPOSITORY_GITLEAKS: Source commit SHA of the Pull Request/Merge Request", "type": "string" }, "REPOSITORY_GITLEAKS_PR_TARGET_SHA": { "$id": "#/properties/REPOSITORY_GITLEAKS_PR_TARGET_SHA", "default": "", - "title": "REPOSITORY_GITLEAKS: Target SHA of the Pull Request/Merge Request", + "title": "REPOSITORY_GITLEAKS: Target commit SHA of the Pull Request/Merge Request", "type": "string" }, "REPOSITORY_GITLEAKS_RULES_PATH": {