mozilla/foundation-security-advisories

Add an extra syntax check in check_advisories.py

Closed this issue · 1 comments

For the 71 release, bedrock failed to parse our yaml files and put them in their database, yet no error was reported by our linter.

I found that we had this syntax in the new files

bugs:
      - url: 1449736, 1533957, 1560667, 1567209, 1580288, 1585760, 1592502
      - desc: Memory safety bugs fixed in Firefox 71 and Firefox ESR 68.3

While in older released we had:

bugs:
      - url: 1558522, 1577061, 1548044, 1571223, 1573048, 1578933, 1575217, 1583684, 1586845, 1581950, 1583463, 1586599
        desc: Memory safety bugs fixed in Firefox 70 and Firefox ESR 68.2

Note the extra dash in front of the desc key.

We should have a check that the desc key should not have a dash in front or something like that.

pmac commented

The issue reported by bedrock was due to there not being a url field for a bug entry, which is what happened above since the 2nd line that started with a dash started a new entry. So what bedrock saw was one "bug" with no description, and one with no "url". Since it expects "url" to be there for all bugs it threw an error. I'm adding a check for this now.