Thinking along the lines of T330427: Add a way for skins and extensions to feed into "Installed client-side libraries" on Special:Version, T330429: Document best practice for skins/extensions that have external JS/CSS etc to include a foreign-resources.yaml file and T330430: Proliferate usage of foreign-resources.yaml in WMF deployed and MW bundled skins and extensions... It seems to make sense to have some CI validation of the foreign-resources.yaml files.
It could be done on a case by case basis in each skin/extension, but it would mostly be boiler plate, so if the right information is stored via T330427: Add a way for skins and extensions to feed into "Installed client-side libraries" on Special:Version (ie specifically the path to the library dir, as as well as the path to the foreign-resources.yaml file), doing it in core would be relatively trivial; just needing to iterate over all the things in the config var/attribute/whatever it ends up being, which should make it easier...
- Add ability for adding ForeignResourcesDir entry to extension/skin manifests
- Add ability to update individual or all extensions/skins's foreign resources from maintenance/manageForeignResources.php
- Read ForeignResourcesDir for installed extensions/skins for Special:Version (T330427)
- Read ForeignResourcesDir for installed extensions/skins in ForeignResourceStructureTest