{"id":13583696,"url":"https://github.com/voorhoede/lighthouse-security","last_synced_at":"2025-04-06T21:32:45.666Z","repository":{"id":71076033,"uuid":"100022216","full_name":"voorhoede/lighthouse-security","owner":"voorhoede","description":"Runs the default Google Lighthouse tests with additional security tests","archived":true,"fork":false,"pushed_at":"2018-12-09T23:27:24.000Z","size":211,"stargazers_count":198,"open_issues_count":28,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T08:33:32.470Z","etag":null,"topics":["audit","cli","developer-tools","lighthouse","reporting","security","web-security"],"latest_commit_sha":null,"homepage":"https://github.com/voorhoede/lighthouse-security#readme","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voorhoede.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audits/cookie-httponly.js","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-08-11T10:49:18.000Z","updated_at":"2023-11-03T08:34:53.000Z","dependencies_parsed_at":"2023-03-11T09:53:04.151Z","dependency_job_id":null,"html_url":"https://github.com/voorhoede/lighthouse-security","commit_stats":{"total_commits":57,"total_committers":7,"mean_commits":8.142857142857142,"dds":0.3508771929824561,"last_synced_commit":"f3bffe247ab6f63f130cba74a4502c5fe5cac0df"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voorhoede%2Flighthouse-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voorhoede%2Flighthouse-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voorhoede%2Flighthouse-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voorhoede%2Flighthouse-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voorhoede","download_url":"https://codeload.github.com/voorhoede/lighthouse-security/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246925206,"owners_count":20855857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audit","cli","developer-tools","lighthouse","reporting","security","web-security"],"created_at":"2024-08-01T15:03:42.442Z","updated_at":"2025-04-06T21:32:45.413Z","avatar_url":"https://github.com/voorhoede.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# [Lighthouse](https://github.com/GoogleChrome/lighthouse) Security [![Linux Build Status](https://travis-ci.org/voorhoede/lighthouse-security.svg?branch=master)](https://travis-ci.org/voorhoede/lighthouse-security) [![Coverage Status](https://coveralls.io/repos/github/voorhoede/lighthouse-security/badge.svg?branch=master)](https://coveralls.io/github/voorhoede/lighthouse-security?branch=master) [![npm lighthouse-security package](https://img.shields.io/npm/v/lighthouse-security.svg)](https://npmjs.org/package/lighthouse-security)\n\n**Runs the default Google Lighthouse tests with additional security tests.**\n\n\u003cimg width=\"100%\" alt=\"Lighthouse Security metrics\" src=\"https://github.com/voorhoede/lighthouse-security/raw/master/docs/metrics.png\"\u003e\n\u003cimg width=\"100%\" alt=\"Lighthouse Security audits\" src=\"https://github.com/voorhoede/lighthouse-security/raw/master/docs/audits.png\"\u003e\n\n## Installation\n\n```sh\nnpm install -g lighthouse-security\n```\n\n## Run from CLI\n\nRun the command from CLI like displayed below. The options are the same as for\nthe [default Lighthouse CLI options](https://github.com/GoogleChrome/lighthouse#cli-options).\n\n```sh\nlighthouse-security \u003curl\u003e [options]\n```\n\nTo run security audits only, use the `--security` flag:\n\n```sh\nlighthouse-security \u003curl\u003e --security [options]\n```\n\n## Use in code\n\nThe extension can also be used within your code. A short example is given below.\nTo render reports etc. it is recommended to import functionality from Lighthouse.\n\n```javascript\nconst runLighthouse = require('lighthouse-security')\n\nrunLighthouse(url, flags)\n  .then(results =\u003e console.log(results))\n```\n\nAlternatively you can import just the `lighthouse-security` configuration and use it in your own runner:\n\n```javascript\nconst lighthouse = require('lighthouse')\nconst chromeLauncher = require('lighthouse/chrome-launcher')\n\n// import one or more lighthouse configs:\nconst securityConfig = require('lighthouse-security/config')\n\n// combine configs into one:\nconst config = Object.assign({},\n  pageSecurityConfig,\n  { extends: 'lighthouse:default' }\n)\n\n// run lighthouse as usual:\nasync function run(url, flags = {}) {\n    const chrome = await chromeLauncher.launch()\n    flags.port = chrome.port\n    const results = await lighthouse(url, flags, config)\n    const stopped = await chrome.kill()\n    return results\n}\n```\n\n## Contributing\n\nContributions are always welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for [guidelines](CONTRIBUTING.md#guidelines) and [development scripts](CONTRIBUTING.md#scripts).\n\n\n## License\n\n[Apache 2.0 Licensed](LICENSE) by [De Voorhoede](https://www.voorhoede.nl/)\n\n[↑ back to top](#readme)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoorhoede%2Flighthouse-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoorhoede%2Flighthouse-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoorhoede%2Flighthouse-security/lists"}