Skip to content
This repository was archived by the owner on Mar 20, 2020. It is now read-only.

Contrast-Security-OSS/HapiTestBench

Repository files navigation

HapiTestBench

screener app for Hapi

Note: master branch will always test the latest @hapi npm packages.

If you're looking for a specific version:

Installation

npm install
node server.js

Requirements:

mongodb mysql

Adding a shared vulnerability

Once you have added shared functionality to @contrast/test-bench-utils and @contrast/test-bench-content, you are ready to add an endpoint in the test bench application.

Create a routes/ruleName/index.js file and call the controllerFactory method:

const controllerFactory = require('../../utils/controllerFactory');
exports.name = 'hapitestbench.ruleName';
exports.register = controllerFactory('ruleName');

Check the documentation for controllerFactory under utils/controllerFactory.js usage information.

Add a views/pages/ruleName.ejs file that includes the shared template from @contrast/test-bench-content:

<% include ../../../node_modules/@contrast/test-bench-content/views/ruleName.ejs %>

Now run the app and make sure everything works as expected!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7