-
-
Notifications
You must be signed in to change notification settings - Fork 232
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_SEMGREP_RULESETS throws a v8r schema error #3152
Comments
https://github.com/oxsecurity/megalinter/blob/main/.automation/build.py#L2287-L2290 is where the JSON schema is generated when stuff is added |
Some parts of the json schema are manually added, and we forgot to add this variable, good catch :) Would u like to make a PR ? :) Meanwhile, you can use YAML_V8R_FILTER_REGEX_EXCLUDE |
Next, I started looking through the repo for instances of something that made it into the schema (
(including this so if someone else should come behind me, they might see what did (or didn't) work) |
"REPOSITORY_SEMGREP_ARGUMENTS": {
"$id": "#/properties/REPOSITORY_SEMGREP_ARGUMENTS",
"description": "REPOSITORY_SEMGREP: User custom arguments to add in linter CLI call",
"examples:": [
"--foo",
"bar"
],
"items": {
"type": "string"
},
"title": "REPOSITORY_SEMGREP: Custom arguments",
"type": [
"array",
"string"
]
}, ^ currently exists "REPOSITORY_SEMGREP_RULESETS": {
"$id": "#/properties/REPOSITORY_SEMGREP_RULESETS",
"description": "REPOSITORY_SEMGREP: Specify custom ruleset(s) for semgrep",
"examples:": [
"auto",
"p/ci"
],
"items": {
"type": "string"
},
"title": "REPOSITORY_SEMGREP: Custom arguments",
"type": [
"array",
"string"
]
}, ^ proposed addition @nvuillam something like that? |
see #3164 I didn't add an entry to the changelog as the update was a trivial bug fix. I can add something if you want. |
@wesley-dean-flexion i'll add it when releasing, that's ok :) |
Thank you. |
Describe the bug
v8r is throwing a validation error based on the megalinter configuration schema when encountering
REPOSITORY_SEMGREP_RULESETS
assering that it is an additional property.To Reproduce
Steps to reproduce the behavior:
REPOSITORY_SEMGREP_RULESETS
value in the.mega-linter.yml
configuration file (e.g.,REPOSITORY_SEMGREP_RULESETS: auto
)Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
...
Additional context
Per the repository_semgrep docs,
REPOSITORY_SEMGREP_RULESETS
is used to "List of semgrep rulesets identifiers that you want to enforce"I see https://github.com/oxsecurity/megalinter/blob/main/megalinter/descriptors/repository.megalinter-descriptor.yml#L436-L438 includes
REPOSITORY_SEMGREP_RULESETS
so I'm guessing that the the JSON schema is't generated directly from that file.The text was updated successfully, but these errors were encountered: