-
Notifications
You must be signed in to change notification settings - Fork 145
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
fix: Invalid host_permissions should be reported as warning in MV3 and filtered out in MV2 #3891
Conversation
1893ae8
to
3948963
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks.
An additional question: should we update the (generated) docs?
@willdurand eh that's a good point, they should... which is making me think: shouldn't we check as part of the CI job that the rules docs are updated with the content of rules.md and there is no pending change that should have been part of the PR? |
I thought that was the case already... |
Looking to the CI job, that should be the case: addons-linter/.circleci/config.yml Lines 106 to 113 in 69a4a95
@willdurand I'll double-check why that step isn't making this PR to fail as we assume it should. |
bah, if I run the job locally (using circleci cli tools and docker) it does fail as expected if changes to docs/index.html were not committed. I'm going to giving another look into why it doesn't seem to fail on circleci as part of the jobs triggered by the pull requests. |
52a7e65
to
2e5c512
Compare
ebc16ec
to
2e5c512
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
2e5c512
to
134c23e
Compare
Followup to #3873, Fixes #3888
This PR includes the following changes:
MANIFEST_HOST_PERMISSIONS
(used to report invalid permission as a warning) andMANIFEST_BAD_HOST_PERMISSION
(reported as error, only used when a permission doesn't have the expected type string), as the ones we already have for thepermissions
andoptional_permissions
manifest keyspermissions
andoptional_permissions
)As a side note, the
ManifestJSONParser
'serrorLookup
method could use a refactoring, it has never been that much readable, but it is also increasing in complexity and it would be good to reorganize it to make it easier to read and maintain over the time, but it may be reasonable to defer that to a separate follow up (e.g. to keep this incremental change to fix the permissions validations smaller).