Skip to content

Fix validation of indicators #37

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

Open
fdiblen opened this issue Apr 28, 2025 · 4 comments
Open

Fix validation of indicators #37

fdiblen opened this issue Apr 28, 2025 · 4 comments

Comments

@fdiblen
Copy link
Contributor

fdiblen commented Apr 28, 2025

In #25 I added a validation workflow. Some of the existing indicator entries are not passing the validation.

FAILED tests/test_dimensions_and_indicators.py::test_indicators_validation - AssertionError: The schema validation failed for one or more files:
indicators/no_critical_vulnerability.json: Schema validation failed - Path: - Message: '@type' is a required property
indicators/no_leaked_credential.json: Schema validation failed - Path: - Message: '@type' is a required property

See the link below for the full log.
https://github.com/EVERSE-ResearchSoftware/indicators/actions/runs/14704818907/job/41262462934

@dgarijo
Copy link
Contributor

dgarijo commented Apr 29, 2025

You are right. They all should be type "indicator". Will create a PR for that. Thanks!

dgarijo added a commit to dgarijo/indicators that referenced this issue Apr 29, 2025
@dgarijo
Copy link
Contributor

dgarijo commented Apr 29, 2025

A PR is ready for your review.

@dgarijo dgarijo reopened this Apr 29, 2025
@dgarijo
Copy link
Contributor

dgarijo commented Apr 29, 2025

@fdiblen reopening due to issues: https://github.com/EVERSE-ResearchSoftware/indicators/actions/runs/14732708751. Some thoughts:

  • Created is a required field. Maybe it's too much of a requirement? We can make it optional.
  • Source fails because it needs to be of type string. And we collect them as an object with a url, a name and possibly an @id. This needs to be better reflected in the schemas. I think it's nice to have source with name and id, it makes it easier to display rather than just a URL (plus if the URL fails at some point, we can get a little context). We can make it String or schema:CreativeWork. Or make it just schema:CreativeWork (but then people will always have to provide a dict). Thoughts?

@fdiblen
Copy link
Contributor Author

fdiblen commented Apr 30, 2025

I agree with making "created" optional.
For the source field, my preference would be using schema:CreativeWork. I don't think providing a dict is an issue.

see #39 for the implemented changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants