Граф коммитов

557 Коммитов

Автор SHA1 Сообщение Дата
William Durand 1fe12d6528
Make hidden and action/page_action/browser_action mutually exclusive (for privileged add-ons) (#4433) 2022-08-11 14:07:10 +02:00
Lucas Everett 57ba743789
Detect import.meta as module in .js files (#4399) 2022-07-25 10:43:57 +02:00
William Durand 17ec5db557
Add minProperties to experiment_apis in schema (#4363) 2022-06-14 18:06:04 +02:00
William Durand 26fc0e72e0
Detect (some) privileged APIs defined in the manifest.json (#4354) 2022-06-09 14:52:31 +02:00
Rob Wu 2703768768
feat: allow 'wasm-unsafe-eval' keyword (#4345) 2022-05-26 15:22:13 +02:00
William Durand 12b64da87e
Do not emit an error for update_url when --privileged is used (#4334) 2022-05-20 19:45:18 +02:00
Luca Greco ba3b667a13
feat: Detect and report permissions and properties requiring a privileged signature (#4307)
* chore: add validatePrivilegedPermissions to permissions properties schema data updated to be merged into the imported schema

* feat: Import subset of the Firefox schema chnages introduced by Bug 1739114 in Firefox 102

* feat: Introduce new validation rules to report privileged permissions and properties
2022-05-20 18:15:55 +02:00
William Durand 5985db05ee
Add a new --privileged CLI option (#4326) 2022-05-16 20:22:50 +02:00
William Durand 7411ebe454
Require extension ID for MV3+ (#4315) 2022-05-11 15:28:56 +02:00
renovate[bot] 0d5cdff22e
chore(deps): update jest monorepo to v28 (major) (#4282)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: William Durand <will+git@drnd.me>
2022-05-03 11:04:16 +02:00
Luca Greco 87280897c4
feat: import firefox 100 schema data (#4276)
* feat: Imported Firefox 100.0b8 API schema
* feat: Added MANIFEST_FIELD_PRIVILEGEDONLY warning on granted_host_permissions manifest property
* chore: added test case to explicitly verify that no warns or errors are collected on granted_host_permissions set to false
2022-04-28 17:12:58 +02:00
Luca Greco d10e01a9bd
fix: Migrate to addons-linter JSONSchema validator and Firefox JSONSchema import to ajv v8 (#4263)
* fix(deps): update dependency ajv to v8
* fix(deps): update dependency ajv-merge-patch to v5
* fix: Update JSONSchema based validation to ajv v8
* fix: Update Firefox JSONSchema import to ajv v8
* chore: Increase test coverage for localejson parser and rename the remaining dataPath properties into instancePath
* chore: fix missing instancePath in cryptominer validation errors
* chore: removed inline comment mentioning deprecated ajv options
* chore: rename collector.messagesAtDataPath into messagesAtInstancePath

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-28 11:18:44 +02:00
William Durand 03a67366f5
Prevent TypeError in opendialog-remote-uri rule (#4189) 2022-02-15 11:35:47 +01:00
William Durand d057474b4c
Check that background.scripts is an array before attempting to iterate over it (#4174) 2022-02-07 13:57:48 +01:00
Luca Greco 1a645f1d69
feat: Imported Firefox 97.0b8 API schema (#4151)
* feat: Imported Firefox 97.0b8 API schema

* feat: Added SitePermission addon type validation
2022-02-07 09:19:54 +01:00
William Durand fdc4da955f
(Re-)add rule for NO_DOCUMENT_WRITE (#4150) 2022-01-27 12:54:56 +01:00
Luca Greco b284b08ed7
fix: remove redundant and obsolete eslint rules (#4143)
* fix: Removed redundant deprecated-entities eslint rule
* fix: Removed unnecessary event-listener-fourth eslint rule
* chore: Remove inefficient getNodeReference utility method (was only used in the removed rules)
2022-01-24 13:59:35 +01:00
Luca Greco eeccf2547a
fix: Use ESLint Linter API to more directly control parser and rules module loading (#4078)
* fix: Use ESLint Linter API to more directly control parser and rules module loading
* chore: Add smoke test to verify conflicting eslint version do not break addons-linter
2021-12-13 18:09:43 +01:00
Mathieu Pillard 8915104a3e
Make install_origins error messages more user friendly (#4085)
Co-authored-by: William Durand <will+git@drnd.me>
2021-12-07 19:32:23 +01:00
William Durand 7b4495a1d3
Disable variable tracing because of a bug in the eslint plugin (#4066) 2021-11-24 21:27:39 +01:00
Mathieu Pillard 93b1d7e3a5
Validate install_origins (#4018)
* Validate install_origins if present

* Edge cases

* prettify

* stray unused variable

* TMP: inject install_origins definition from schema updates + tweak to test case

* Convert tests to it.each()

* lint

* Check protocol

* Bring isOrigin implementation closer to Firefox's

* lint

* Allow empty array

* Apply suggestions from code review

Co-authored-by: William Durand <will+git@drnd.me>

* Update src/schema/formats.js

Co-authored-by: William Durand <will+git@drnd.me>

Co-authored-by: Luca Greco <lgreco@mozilla.com>
Co-authored-by: William Durand <will+git@drnd.me>
2021-11-23 16:12:57 +01:00
William Durand 819adb30fd
Merge mozilla/dispensary into this project (#4006) 2021-11-09 12:10:07 +01:00
William Durand 563ad4ffa2
Add support and test coverage for /developer/{url,name} (#4002) 2021-11-08 14:31:29 +01:00
William Durand 2e9ab54473
Upgrade ESLint to v8 (#3984) 2021-11-03 13:22:06 +01:00
Rob Wu 44939f4cf9
fix: accept versions with buildid (#3999)
The TOOLKIT_VERSION_REGEX is both too permissive and too strict.
To fix #3998 while minimizing the chance of issues, accept the
format introduced in https://hg.mozilla.org/mozilla-central/rev/b19f06b6337a

This also adds some missing test coverage for formats that are
permitted.
2021-10-27 17:14:56 +02:00
William Durand 220b780468
Merge pull request from GHSA-2878-3q2m-xmvf 2021-10-11 12:03:52 +02:00
Luca Greco d1df958df3
fix: Add an INVALID_ZIPFILE lint error on zip file with invalid chars in filenames (#3940)
* fix(deps): update dependency addons-scanner-utils to v5

* fix: Add an INVALID_ZIPFILE lint error on zip file with invalid chars in filenames

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-05 15:18:46 +02:00
William Durand 99b5796750
Allow to enforce a strict_min_version for a given permission (#3941) 2021-10-01 12:05:10 +02:00
William Durand e5e5b5583a
Prevent error when strict_min_version is not a string value (#3913) 2021-09-14 13:36:34 +02:00
Luca Greco 65b4ed75bc
fix: Invalid host_permissions should be reported as warning in MV3 and filtered out in MV2 (#3891)
* fix: Invalid host_permissions should be reported as warning in MV3 and filtered out in MV2
* docs: Regenerated docs/index.html
2021-09-07 11:38:10 +02:00
William Durand 8c1d6b405e
Set ExtensionID > maxLength to 80 chars (#3898) 2021-09-07 10:41:21 +02:00
Luca Greco 227967e4f2
feat: Import API schema data for Firefox 92 (#3873)
* feat: Imported Firefox 92.0b7 API schema
* chore: Add some additional tests to cover the behaviors expected on host_permissions in MV2 and MV3
2021-08-24 22:46:26 +02:00
Luca Greco 842fb5ba3e
fix: Manifest keys unsupported in the current manifest version should be reported as warnings (#3838) 2021-08-02 11:50:34 +02:00
Luca Greco cca747d6cc test: Added coverage for the manifest and api calls expected behaviors on browserAction and action API namespaces 2021-07-28 19:18:26 +02:00
Luca Greco 2855de3e51 chore: Fix firefox-schemas-import issues on importing Firefox 91 browser_action.json schema data 2021-07-28 19:18:26 +02:00
Luca Greco a957033814
feat: Imported Firefox 90.0b7 api schemas (#3763)
* feat: Imported Firefox 90.0b7 API schema
* fix: Filter out in mv2 validations any linting error for JSONSchema entries marked as 'min_manifest_version: 3' (fixes #3738)
* chore: Add some additional tests for the validation of web_accessible_resources in MV3 format
* chore: Improve readability of the filterErrors helper function and tweak relevant errors filtering criteria
2021-06-21 15:04:23 +02:00
renovate[bot] dc03471799
chore(deps): update jest monorepo (major) (#3734)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: William Durand <will+git@drnd.me>
2021-06-01 11:34:12 +02:00
renovate[bot] 36ae8fe2dd
chore(deps): update dependency eslint-config-amo to v4.6.0 (#3715)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: William Durand <will+git@drnd.me>
2021-05-11 13:24:52 +02:00
renovate[bot] 47c3a119f0
chore(deps): update dependency prettier to v2.3.0 (#3714)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: William Durand <will+git@drnd.me>
2021-05-11 13:05:15 +02:00
Luca Greco 6886efcc8e chore: Show an explicit error if the requested manifest version range is invalid 2021-05-11 11:30:40 +02:00
Luca Greco 6e88dcfc5b chore: Propagate min/max_manifest_version from top level manifest to api specific manifest types definitions 2021-05-11 11:30:40 +02:00
Luca Greco 75cba1b720 feat: Added min/max_manifest_version handling in webextensions api eslint rules 2021-05-11 11:30:40 +02:00
Luca Greco c396d94c6a feat: Added min/max_manifest_version ajv keyword definition, --min/max-manifest-version cli options, refactored manifest schema validator internals 2021-05-11 11:30:40 +02:00
Luca Greco 874ca5a727
fix: Prefer parsing as a module on js scripts with .mjs extension (#3641) 2021-03-29 16:03:20 +02:00
Luca Greco 8fa42fa107
chore: Fix intermittent sinon spy callOrder assertion failure (#3642) 2021-03-29 13:00:55 +02:00
William Durand f8c7a6c554
Improve error message when there is a JS syntax error (#3556) 2021-03-09 21:41:37 +01:00
William Durand 88695297df
Add support for more JavaScript file extensions (#3579) 2021-02-17 15:45:13 +01:00
Luca Greco b23f939b5b
feat: Imported Firefox 86.0b5 API schema (#3562)
* feat: Imported Firefox 86.0b5 API schema
* chore: Removed explicit covered for content_security_policy sub-properties not anymore included in the API schema
* chore: Added explicit test coverage expected validation error on manifest_version 3
2021-02-04 19:45:37 +01:00
renovate[bot] 2d2a2818a2
fix(deps): update dependency @mdn/browser-compat-data to v3 (#3495)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: William Durand <will+git@drnd.me>
2021-02-02 16:00:44 +01:00
Michael T 31da884a45
Add Support for Numeric Separators (#3544) 2021-01-15 13:19:04 +01:00