Javascript client for Passmarked API that can be used from the browser
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Javascript API

Passmarked is a suite of tests that can be run against any page/website to identify issues with parity to most online tools in one package.

The Terminal Client is intended for use by developers to integrate into their workflow/CI servers but also integrate into their own application that might need to test websites and provide realtime feedback.

All of the checks on Passmarked can be voted on importance and are open-sourced, to encourage community involvement in fixing and adding new rules. We are building the living Web Standard and love any contributions.


To install just add the library as part of your HTML:

<script src="//"></script>

The page will now have a global passmarked object that can be used

Running a report with the API

* Create a report
var report = passmarked.create({

  url:    '',
  token:  '<token-here>'


* Start the report
report.start(function(err, code) {

  if(err) {
    /** Something with the network went terribly wrong **/
  } else if(code) {
    /** Validation code returned **/


* Listen when the report is done
report.on('done', function() {

  // get the data
  var page = report.getResult();
  // output done !
  console.log('Page scored ' + page.getScore() + '!');
  // get the screenshot
  console.log('preview of desktop: ' + page.getPreview('desktop'));
  // check if a certain rule is broken
  if(page.hasRule('heartbleed')) {
    // output that the server is in trouble ...
    console.log('Server is vunerable to HeartBleed !');



Rules represent checks that occur in this module, all of these rules have a UID which can be used to check for specific rules. For the structure and more details see the Wiki page on Rules.

Rules also include a type which could be critical, error, warning or notice giving a better view on the importance of the rule.

See for all the rules.


git clone
npm install
gulp build / gulp watch

Pull requests have a prerequisite of passing tests. If your contribution is accepted, it will be merged into develop (and then master after staging tests by the team) which will then be deployed live to and on NPM for everyone to download and test.


To learn more visit:


Copyright 2016 Passmarked Inc

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.