Skip to content
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

Categories : is there a term/name inversion ? #178

Open
AppSecAmael opened this issue Aug 10, 2022 · 0 comments
Open

Categories : is there a term/name inversion ? #178

AppSecAmael opened this issue Aug 10, 2022 · 0 comments

Comments

@AppSecAmael
Copy link

AppSecAmael commented Aug 10, 2022

Describe the bug
Hello,

we are using your library to generate json and rss feeds about github security advisories. I tried to add the severity of each vulnerability to the feeds in the form of a "category" but get inconsistent results in rss VS json feeds.

Testing with name="severity" and term = "CRITICAL"

 feed.addCategory("CRITICAL");
feed.addCategory("HIGH");
...
 feed.addItem({
...
 category: [
                {
                    term: item.severity,
                    name: "severity"
                }
            ],
....

XML Result shows that the categories are taken in account in the feed with a term representing the level of criticity.

<feed xmlns="http://www.w3.org/2005/Atom">
    ...
    <category term="CRITICAL"/>
    <category term="HIGH"/>
    <category term="MODERATE"/>
    <category term="LOW"/>

And each entry gets a category with both a label and a term, consistent with the categories displayed in the flow.

<category label="severity" term="MODERATE"/>

But in the JSON flow this category is transformed to a "tag" and this one is displaying the "label" instead of the "term" :

"tags": [
                "severity"
            ]

I expected to get the term here, not the label. Am I interpreting this wrongly ?

Versions :

  • NodeJS: v16.16.0
  • npm/yarn: yarn 1.22.19
  • feed: 4.2.2

Additional context

You can see the flows here : https://azu.github.io/github-advisory-database-rss/

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

1 participant