octo-deno/README.md

98 lines
3.4 KiB
Markdown
Raw Permalink Normal View History

2018-02-06 02:03:36 +00:00
<p align="center">
<img src="https://github.com/posidron/posidron.github.io/raw/master/static/images/octo.png" alt="Logo" />
</p>
2017-04-07 15:08:49 +00:00
2018-02-06 02:03:36 +00:00
<p align="center">
A unified shared library which aids in building fuzzers for browsers or as complement for an already existing fuzzing framework.
</p>
2017-06-08 03:04:42 +00:00
2018-02-06 02:03:36 +00:00
<p align="center">
<a href="https://standardjs.com"><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg" alt="JavaScript Style Guide"></a>
2018-09-18 01:53:01 +00:00
<a href="https://travis-ci.org/MozillaSecurity/octo"><img src="https://api.travis-ci.org/MozillaSecurity/octo.svg?branch=master" alt="Build Status"></a>
<a href="https://img.shields.io/github/release/mozillasecurity/octo.svg"><img src="https://img.shields.io/github/release/mozillasecurity/octo.svg" alt="Current Release"></a>
2018-09-18 05:16:44 +00:00
<a href="https://coveralls.io/github/MozillaSecurity/octo?branch=master"><img src="https://coveralls.io/repos/github/MozillaSecurity/octo/badge.svg?branch=master" alt="Coverage Status"></a> <a href="https://david-dm.org/mozillasecurity/octo"><img src="https://img.shields.io/david/mozillasecurity/electron-genesis.svg?style=flat-square" alt="Dependencies Status"></a> <a href="https://david-dm.org/mozillasecurity/octo.svg?style=flat-square?type=dev"><img src="https://img.shields.io/david/dev/mozillasecurity/octo.svg?style=flat-square.svg?style=flat-square" alt="Dev Dependencies Status"></a> <a href="https://www.irccloud.com/invite?channel=%23fuzzing&amp;hostname=irc.mozilla.org&amp;port=6697&amp;ssl=1"><img src="https://img.shields.io/badge/IRC-%23fuzzing-1e72ff.svg?style=flat" alt="IRC"></a>
2018-02-06 02:03:36 +00:00
</p>
2017-04-25 23:06:13 +00:00
2018-02-06 02:03:36 +00:00
Octo.js bundles core functions and generic boilerplate code commonly used in most frameworks for fuzzing browsers. It is designed for the sharing of improvements between our individual fuzzers, and with the purpose of reducing the maintainability of those core features with minimal effort.
2017-04-07 15:08:49 +00:00
2018-02-06 02:03:36 +00:00
Octo's future aims to be a stable, well-tested and well-documented standard library for fuzzing in a JavaScript environment.
2017-04-23 00:59:55 +00:00
## Table of Contents
2018-09-18 01:53:01 +00:00
- [Table of Contents](#table-of-contents)
- [Playbook](#playbook)
- [Usage in Node](#usage-in-node)
- [Usage in Browser](#usage-in-browser)
2018-09-18 01:53:01 +00:00
- [Development](#development)
- [Testing](#testing)
- [API Documentation](#api-documentation)
2018-09-18 16:22:17 +00:00
- [What do the developers say?](#what-do-the-developers-say)
### Playbook
2018-03-22 17:32:29 +00:00
2018-09-18 05:59:54 +00:00
https://npm.runkit.com/@mozillasecurity/octo
2018-03-22 17:32:29 +00:00
### Usage in Node
2018-03-19 06:05:35 +00:00
```
yarn add @mozillasecurity/octo
2018-03-19 06:05:35 +00:00
```
2018-09-18 06:20:26 +00:00
```js
2018-09-18 16:22:17 +00:00
const { random, make } = require("@mozillasecurity/octo");
random.init();
2018-09-18 06:14:22 +00:00
2018-09-18 06:24:56 +00:00
// Common Operations
2018-09-18 16:22:17 +00:00
make.number.any();
make.text.any();
2018-09-18 06:14:22 +00:00
2018-09-18 06:24:56 +00:00
// WebCrypto
2018-09-18 16:22:17 +00:00
make.crypto.randomAlgorithm();
2018-09-18 06:14:22 +00:00
2018-09-18 06:24:56 +00:00
// WebGL
2018-09-18 16:22:17 +00:00
make.webgl.randomSamplerParameter();
2018-03-19 06:05:35 +00:00
```
2018-09-18 06:14:22 +00:00
Take a look into the API documentation for further use cases.
2018-09-18 01:53:01 +00:00
### Usage in the Browser
2018-03-19 06:05:35 +00:00
```
2018-09-18 01:53:01 +00:00
yarn install
yarn build
```
2018-03-19 06:05:35 +00:00
2018-09-18 01:53:01 +00:00
A bundled production build (`octo.js`) is placed into the local `dist` directory.
### Development
2017-06-10 11:00:08 +00:00
2018-09-18 06:20:26 +00:00
```
yarn lint
yarn test
yarn build
2018-02-06 02:03:36 +00:00
```
### Testing
2017-06-10 11:00:08 +00:00
Octo.js uses Jest for testing. Each directory should contain a `__tests__` folder containing the tests.
2017-06-10 11:00:08 +00:00
2018-09-18 06:20:26 +00:00
```
yarn test
2017-06-10 11:00:08 +00:00
```
2017-04-23 00:59:55 +00:00
### API Documentation
2017-04-07 15:08:49 +00:00
2018-09-18 01:55:25 +00:00
- https://mozillasecurity.github.io/octo
2017-04-07 15:08:49 +00:00
or
```
yarn docs
2017-06-10 11:00:08 +00:00
```
2018-09-18 16:22:17 +00:00
### What do the developers say?
- [Divide-by-zero in [@webrtc::I420Buffer::CropAndScaleFrom]](https://bugzilla.mozilla.org/show_bug.cgi?id=1490700#c1)
> Impressive that the fuzzer found such a high multiple of 65536. I'd expect it to start with common edge cases like -1, 0, 1, etc.