Why host permission is added automatically even i have not requested it in my manifest.json file in chroem extension?

30 Views Asked by At

I have developed an chrome extension and tried to deploy it in chrome web-store in developer dashboard.

In the package tab , there upload new package button to upload the zip file of our extension.

After uploading it, the details will be listed below under package section. In that the permissions will be listed we requisted in manifest.json file.

But in my manifest.json file, I have not requested the host permission but in the package section it is available. Why it happens?

manifest.json:

{
  "name": "zypher",
  "description": "An AI companion.",
  "version": "1.0.0",
  "manifest_version": 3,
  "action": {
    "default_icon": "/assets/icons/ZYPHER_ICON.png",
    "default_title": "Click me!"
  },
  "permissions": ["activeTab"],
  "icons": {
    "16": "/assets/icons/ZYPHER_ICON.png",
    "32": "/assets/icons/ZYPHER_ICON.png",
    "48": "/assets/icons/ZYPHER_ICON.png",
    "128": "/assets/icons/ZYPHER_ICON.png"
  },
  "background": {
    "service_worker": "background.js"
  },
  "content_scripts": [
    {
      "matches": ["<all_urls>"],
      "js": ["content.js"],
      "css": ["content.css"]
    }
  ],
  "content_security_policy": {
    "extension_pages": "script-src 'self'; object-src 'self'"
  },
  "web_accessible_resources": [
    {
      "resources": [
        "index.html",
        "toolbar.html",
        "toolbar.scss",
        "toolbar.js",
        "/assets/icons/ZYPHER_ICON.png",
        "main.ts"
      ],
      "matches": ["<all_urls>"]
    }
  ]
}

The package section after uploading the zip file:

enter image description here

I want to why it happens ? Is it an issue / default behaviour ? Wheater it will cause issues in publishing extension?

0

There are 0 best solutions below