Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPOSITORY_GITLEAKS_PR_COMMITS_SCAN missing from the configuration schme #3064

Closed
finnlander opened this issue Nov 2, 2023 · 2 comments · Fixed by #3675
Closed

REPOSITORY_GITLEAKS_PR_COMMITS_SCAN missing from the configuration schme #3064

finnlander opened this issue Nov 2, 2023 · 2 comments · Fixed by #3675
Labels
bug Something isn't working O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity

Comments

@finnlander
Copy link

Describe the bug
Hi,

First of all, thank you for the great work and effort you put in this great tool 🙇 .

In the latest MegaLinter release version (v7.5.0), when one uses the Gitleaks linter related configuration value REPOSITORY_GITLEAKS_PR_COMMITS_SCAN, added earlier this year and described in the documentation in the .megalinter.yml configuration file, it will make the v8r linter produce validation error as the configuration value key is not included in the MegaLinter config schema

The produced error from the output (MegaLinter executed in GitHub):

  ℹ Processing ./.mega-linter.yml
  ℹ Found schema in https://www.schemastore.org/api/json/catalog.json ...
  ℹ Validating ./.mega-linter.yml against schema from https://raw.githubusercontent.com/megalinter/megalinter/main/megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json ...
  ✖ ./.mega-linter.yml is invalid
  
  ./.mega-linter.yml# must NOT have additional properties

I know there is a workaround to put the configuration directly as an environment variable, but I'd prefer storing all configurations in the same place (i.e. the config file).

To Reproduce
Steps to reproduce the behavior:

  • Define Megalinter configuration file (.mega-linter.yml) to the repository root
  • Include REPOSITORY_GITLEAKS_PR_COMMITS_SCAN: true and enable v8r linter for YAML files.
  • Run the linter to see v8r failing stating .mega-linter.yml has extra parameters:
     ./.mega-linter.yml# must NOT have additional properties
    

Expected behavior
The source schema file should include the REPOSITORY_GITLEAKS_PR_COMMITS_SCAN parameter (if the parameter if still valid; if not then the documentation should be updated).

@finnlander finnlander added the bug Something isn't working label Nov 2, 2023
@nvuillam
Copy link
Member

nvuillam commented Nov 2, 2023

Oh it's just we forgot to add the variable REPOSITORY_GITLEAKS_PR_COMMITS_SCAN in the JSON schema :)

Would you like to make a PR ? :)

Copy link
Contributor

github-actions bot commented Dec 3, 2023

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

@github-actions github-actions bot added the O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity label Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working O: stale 🤖 This issue or pull request is stale, it will be closed if there is no activity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants