Skip to content

Conversation

TristanCacqueray
Copy link
Collaborator

This PR enables using CWE names instead of their number to improve advisory visibility.

@TristanCacqueray
Copy link
Collaborator Author

If that looks good to you, I'll update the other advisories.

Comment on lines 20 to 26
-- | A map to lookup CWE names.
cweNames :: Map CWEID Text
cweNames = Map.fromList (coerce cweData)

-- | A map to lookup CWEID.
cweIds :: Map Text CWEID
cweIds = Map.fromList $ (\(k, v) -> (v, k)) <$> (coerce cweData)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Eventually I would like to add all the parent / child / category membership data as well. But this is good for now.

@TristanCacqueray
Copy link
Collaborator Author

Thank you for the review @frasertweedale! I'll address the rest of the comments tomorrow.

Comment on lines +1 to +4
#!/usr/bin/env cabal
{- cabal:
build-depends: base, xml
-}
Copy link
Collaborator

Choose a reason for hiding this comment

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

That's unusual

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since it's just for one-shot codegen I figured it was not necessary to add this to the cabal file.

@TristanCacqueray
Copy link
Collaborator Author

@frasertweedale I'm tempted to close this PR, though I think it can be useful to quickly lookup the name. What do you think, should I rebase it instead?

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.

3 participants