We already include legacy bugs: whatwg/html#619
The simplest possible implementation would be to check for links to the spec in open issues, as the bug filing tool already includes a link. If that becomes too error-prone, we could limit it to either URLs in the first comment, or have a format like loc:https://html.spec.whatwg.org/#html-vs-xhtml:mime-type
that's only for the bug scraping script.