NOTE: This repo contains some, but not all, of the code backing Blacklight. It may not be very useful on its own. We're thinking about ways to move more of the functionality into this package in order to make it more generally useful.
For more information about the blacklight-collector
please read our methodology.
blacklight-collector
is available on npm. You can add it to your own project with the following command.
npm i @themarkup/blacklight-collector
If you are interested in running it locally you can clone this repository and follow the instructions below.
nvm use
npm install
npm run build
npm run example
.
Results are stored in demo-dir
by default
collect
takes the following arguments:
inUrl
required
outDir
blTests
numPages
headless
emulateDevice
captureHar
outDir
if you want to see the captured filecaptureLinks
enableAdBlock
clearCache
saveBrowsingProfile
outDir
quiet
title
saveScreenshots
headers
{}
(expects { "[HTTP header]": "[value]", ... }
)defaultTimeout
defaultWaitUntil
puppeteerExecutablePath
extraChromiumArgs
blacklight-collector
creates a few different assets at the end of an inspection, these include:
browser
: Details of the browser version used.browsing_history
: List of pages that were visited.config
: Inspection configuration.deviceEmulated
: Information about the device that was emulated for this inspection.end_time
: When the inspection ended.host
: The hostname of the visited website.hosts
: A list of first-party and third-party hosts visited on this inspection.reports
: The initial results of the tests blacklight runs. For more information please read the methodology.script
: Details about the NodeJS version, host and this package version.start_time
: When the inspection began.uri_ins
: The URL that was entered by the user.uri_dest
: The final url that was visited after any redirects.uri_redirects
: The redirect chain.Blacklight would not be possible without the work of OpenWPM and the EU-EDPS's website evidence collector