Skip to content

Conversation

pyth0n1c
Copy link
Contributor

@pyth0n1c pyth0n1c commented Aug 28, 2024

Add annotated type definitions for commonly used Annotated Strings. This avoid redefining them in multiple places.
It also ensures that if we need to make an update, it only happens in one place.

The MITRE CVE Type annotations were wrong in a number of places - because they were not defined correctly, (notable, they were missing the Field() around the pattern) they were not working. For example:
id: Annotated[str, r"^CVE-[1|2]\d{3}-\d+$"] is WRONG and should be
id: Annotated[str, Field(pattern=r"^CVE-[1|2]\d{3}-\d+$")] if used directly

…his avoid redefining them in multiple places
@ljstella ljstella self-requested a review August 29, 2024 19:31
@ljstella
Copy link
Contributor

@pyth0n1c none of the CI tests run with --enrichments - have you tested running this with that?

Copy link
Contributor

@ljstella ljstella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pyth0n1c pyth0n1c merged commit 39f1d94 into main Aug 29, 2024
36 checks passed
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

Successfully merging this pull request may close these issues.

2 participants