{"ava":{"failFast":false,"files":["dist/tests/**/*.js","!dist/tests/**/fixtures/**/*.js"],"timeout":"1m"},"dependencies":{"@hint/utils-debug":"^1.0.2","@hint/utils-i18n":"^1.0.5","@hint/utils-network":"^1.0.6","@hint/utils-string":"^1.0.5","@hint/utils-types":"^1.1.0"},"description":"hint that that checks if protocol relative URLs are used","devDependencies":{"@hint/utils-create-server":"^3.4.6","@hint/utils-tests-helpers":"^6.3.0","@types/node":"^14.0.26","@typescript-eslint/eslint-plugin":"^1.13.0","@typescript-eslint/parser":"^1.12.0","ava":"^3.10.1","cpx":"^1.5.0","eslint":"^7.6.0","eslint-plugin-import":"^2.18.2","eslint-plugin-markdown":"^1.0.2","npm-run-all":"^4.1.5","nyc":"^15.1.0","rimraf":"^3.0.2","typescript":"^3.9.7"},"homepage":"https://webhint.io/","keywords":["no-protocol-relative-urls","no-protocol-relative-urls-hint","webhint","webhint-hint","webhint-recommended"],"license":"Apache-2.0","main":"dist/src/hint.js","name":"@hint/hint-no-protocol-relative-urls","nyc":{"extends":"../../.nycrc"},"peerDependencies":{"hint":"^6.0.0"},"repository":{"directory":"packages/hint-no-protocol-relative-urls","type":"git","url":"git+https://github.com/webhintio/hint.git"},"scripts":{"build":"npm run i18n && npm-run-all build:*","build-release":"npm run clean && npm run i18n && npm run build:assets && tsc --inlineSourceMap false --removeComments true","build:assets":"cpx \"./{src,tests}/**/{!(*.ts),.!(ts)}\" dist","build:ts":"tsc -b","clean":"rimraf dist","i18n":"node ../../scripts/create-i18n.js","lint":"npm-run-all lint:*","lint:js":"eslint . --cache --ext .js,.md,.ts --ignore-path ../../.eslintignore","lint:dependencies":"node ../../scripts/lint-dependencies.js","lint:md":"node ../../scripts/lint-markdown.js","test":"npm run i18n && npm run lint && npm run build && npm run test-only","test-only":"nyc ava","test-release":"npm run i18n && npm run lint && npm run build-release && ava","watch":"npm run build && npm-run-all --parallel -c watch:*","watch:assets":"npm run build:assets -- -w --no-initial","watch:test":"ava --watch","watch:ts":"npm run build:ts -- --watch"},"version":"3.0.2","bugs":{"url":"https://github.com/webhintio/hint/issues"},"_id":"@hint/hint-no-protocol-relative-urls@3.0.2","_nodeVersion":"10.22.0","_npmVersion":"6.14.6","dist":{"integrity":"sha512-acGwf5d3exnyLlQkzuM7GBMi9T3p9x6Q6JUc9kWtR3s7CwEQ9GY2cFqQ+6GiYAE1GJbfo9SVoF5hptziu/YaLg==","shasum":"85551f92558801bd5853a5a9189391d7bc04348b","tarball":"http://registry-npm.ywwl.com/@hint/hint-no-protocol-relative-urls/download/@hint/hint-no-protocol-relative-urls-3.0.2.tgz","fileCount":14,"unpackedSize":47032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRDegCRA9TVsSAnZWagAAowgP/1RIhFfmi6DLFdBc0Q2R\nc2C385HD6ngcipI5/1oz6b6zT9xjznKAfh3HruUgzT4Oh2cwobZ4yAZwrxLt\nHOo+GzICT6JtXtv8DEbWWHBsl4Vtde/6Y4xXiBlXLDsUIJGBmlKttXRmROUa\nqv8rWZHQPs53A+AJtdhrNOao9+i9p5VRn0wPPT9TXAmtdYXB14nOTEkpzxWj\nuEK9PjF1RYymEreiAeB0itpvNZG9zyV6eI/Et0vRlIrnQSvE7+0Diq+c7RnI\nhu4eV68FmiFAzlEKVnOC2aKoQ/HYe8bGiAUzRaaSJvTtCQgIX6goDFwQuX2n\nfL0iZZgsJC3acQ6t50piKk9P23v9Sbyusb3rSbK7CYn8X3Kob6Jq23Z9dysw\nJfQtbX7JRRSAyhKZiS30uKaQw3l1uBq7YpR4MbtVd+KCmE4oBvE08XYmxc2h\nGL5CLAfSBL/LNV8QfKvb/opcRXpuZTXEsDv1MjK8AMlb3GD0JNZIWJjFCB1/\nRFBUwAZVxzxkhv7t15HkmDaV5lhM7Y/KO248fDASodTHouPjgp0zzuPC9WR7\nLZL4OR0Zvlx1wbgof/nhwOUHi/wcoy19eJrYbjqz0ZbsEYpX6/NP+CQqyA5m\nIHUkzUiSVLCZfg6wWIAZwRd0fGUzEZ0GBecPxRV/je9okNxvTiwQGUT8av+5\nyVqJ\r\n=d214\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF5M8RabsMVHX5Y9qKL1tAKjTdJPHozVwNV7JLPM36ygAiEA59tuvSsqMHZPSxmxFciWU26EF/t40bl8I3OZcN58+W0="}],"size":14446,"noattachment":false,"key":"/@hint/hint-no-protocol-relative-urls/-/@hint/hint-no-protocol-relative-urls-3.0.2.tgz"},"maintainers":[{"email":"antross@gmail.com","name":"antross"},{"email":"John.Emau@microsoft.com","name":"johnatms"},{"email":"amolleda@gmail.com","name":"molant"},{"email":"jdgarcia@outlook.com","name":"sarvaje"}],"_npmUser":{"name":"sarvaje","email":"jdgarcia@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hint-no-protocol-relative-urls_3.0.2_1598306208010_0.46857415122369517"},"_hasShrinkwrap":false,"readme":"# No protocol-relative URLs (`no-protocol-relative-urls`)\n\n`no-protocol-relative-urls` warns against using scheme-relative URLs\n(commonly known as protocol-relative URLs).\n\n## Why is this important?\n\nA shorthand way of specifying URLs is to remove the protocol and\nlet the browser determine the relative protocol based on the current\nconnection to the resource.\n\nAs the web moves [towards HTTPS everywhere][https only web],\nthe use of [protocol-relative URLs][protocol-relative urls] has\nbecome an anti-pattern, exposing some sites to man in the middle\ncompromises and is therefore best avoided.\n\nParticularly for web sites/apps served over HTTP, other drawbacks\nwhen using protocol relative URLs include:\n\n* Performance\n\n  * If the web site/app is served over HTTP, for every\n    protocol-relative URL that does support HTTPS and:\n\n    * does a redirect to it (i.e. most CDNs), the load time will take\n      longer than if the request was made directly to the `https://`\n      version of the URL.\n\n    * does not redirect to it, you may be missing out on things\n      such as Brotli compression and HTTP/2 that are only supported\n      by browsers over HTTPS.\n\n* Security\n\n  If protocol-relative URLs are used for CDN links, their\n  domain is not in the browser’s [HSTS preload list][hsts preload\n  list], and the first request is not made over HTTP, there is a\n  high risk of man-in-the-middle attacks.\n\n  Of course, if the web site/app is served over HTTP it is already\n  exposed to those types of attacks, but in general CDNs constitute\n  a high-value target, and therefore, are much more likely to be\n  attacked than most of the individual sites that use them.\n\n## What does the hint check?\n\nThe hint checks for protocol-relative URLs.\n\nNote: Currently the hint does not check for protocol-relative URLs\ninside of stylesheets and scripts.\n\nLet’s presume `example1.com` does not support HTTPS and `example2.com`\ndoes.\n\n### Examples that **trigger** the hint\n\n```html\n<link rel=\"stylesheet\" href=\"//example1.com/style.css\">\n```\n\n```html\n<script src=\"//example2.com/script.js\"></script>\n```\n\n### Examples that **pass** the hint\n\n```html\n<link rel=\"stylesheet\" href=\"http://example1.com/style.css\">\n```\n\n```html\n<script src=\"https://example2.com/script.js\"></script>\n```\n\n## How to use this hint?\n\nThis package is installed automatically by webhint:\n\n```bash\nnpm install hint --save-dev\n```\n\nTo use it, activate it via the [`.hintrc`][hintrc] configuration file:\n\n```json\n{\n    \"connector\": {...},\n    \"formatters\": [...],\n    \"hints\": {\n        \"no-protocol-relative-urls\": \"error\",\n        ...\n    },\n    \"parsers\": [...],\n    ...\n}\n```\n\n**Note**: The recommended way of running webhint is as a `devDependency` of\nyour project.\n\n## Further Reading\n\n* [The protocol-relative URL][protocol-relative urls]\n* [Moving CDNs to HTTPS](https://github.com/konklone/cdns-to-https#readme)\n\n<!-- Link labels: -->\n\n[hsts preload list]: https://hstspreload.org\n[https only web]: https://w3ctag.github.io/web-https/#h-motivating-a-secure-web\n[ie issue]: https://www.stevesouders.com/blog/2010/02/10/5a-missing-schema-double-download/\n[protocol-relative urls]: https://www.paulirish.com/2010/the-protocol-relative-url/\n[hintrc]: https://webhint.io/docs/user-guide/configuring-webhint/summary/\n","publish_time":1598306208162,"_cnpm_publish_time":1598306208162,"dist-tags":{"latest":"3.1.7"}}