marocchino / validate-dependabot

validate dependabot yaml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error while running action

kislyuk opened this issue · comments

Error: request to https://dependabot-badges.githubapp.com/config_files/validate failed, reason: Hostname/IP does not match certificate's altnames: Host: api.dependabot.com. is not in the cert's altnames: DNS:*.gist.githubusercontent.com, DNS:gist.githubusercontent.com

Thank you for the report.
They must have noticed about stealing traffic.
It is easy to imitate IP and address and fix it, but it would be better to implement it in a different way. Let's take a look to see if there are any reusable parts of the code they've released.

Subscribing, was trying to add this today and sad face

Hi folks any update / workaround on this?

TL;DR sorry but, there is not clear answer here yet.

after research, It looks clear they use json schema but, there dose not opensource that schema.

I found the json schema but I am not sure it is officially maintained one.

I've saw Jetbrains products use similar schema

Issue is logged with upstream dependabot/dependabot-core#4605

Following worked:

Migrate dependabot-2.0.json to newest version ajv migrate -s dependabot-2.0.json -o new-dependabot-2.0.json and run ajv validate in such a way that it ignores the undefined x-intellij attributes.

mark_stopka@mark-asus-zenbook-s:~> ajv validate --strict=log -s dependabot-2.0.json -d dependabot.yml && echo ok
strict mode: unknown keyword: "x-intellij-enum-metadata"
strict mode: missing type "number" for keyword "minimum" at "http://json-schema.org/draft-04/schema#/properties/assignees" (strictTypes)
strict mode: unknown keyword: "x-intellij-enum-metadata"
strict mode: missing type "number" for keyword "minimum" at "http://json-schema.org/draft-04/schema#/properties/reviewers" (strictTypes)
strict mode: unknown keyword: "x-intellij-enum-metadata"
schema dependabot-2.0.json is invalid
error: schema is invalid: data must have required property 'version'

ajv migrate -s dependabot-2.0.json -o new-dependabot-2.0.json

mark_stopka@mark-asus-zenbook-s:~> ajv validate --strict=log -s new-dependabot-2.0.json -d dependabot.yml && echo ok
strict mode: unknown keyword: "x-intellij-enum-metadata"
strict mode: missing type "number" for keyword "minimum" at "http://json-schema.org/draft-04/schema#/properties/assignees" (strictTypes)
strict mode: unknown keyword: "x-intellij-enum-metadata"
strict mode: missing type "number" for keyword "minimum" at "http://json-schema.org/draft-04/schema#/properties/reviewers" (strictTypes)
strict mode: unknown keyword: "x-intellij-enum-metadata"
dependabot.yml valid
ok
mark_stopka@mark-asus-zenbook-s:~>

I reimplement this with schema-json and tag as v2.