GithubHelp home page GithubHelp logo

kryndex / hackerone-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oreoshake/hackerone-client

0.0 2.0 0.0 44 KB

An unofficial wrapper for the HackerOne API

Home Page: https://api.hackerone.com/docs/v1

License: MIT License

Ruby 99.26% Shell 0.74%

hackerone-client's Introduction

Hackerone::Client

A limited client library for interacting with HackerOne. Currently only supports a few operations:

client = HackerOne::Client::Api.new("github")

# GET`/reports` returns all reports in the "new" state for a given program
client.reports

# GET `/report/{id}` returns report data for a given report
client.report(id)

# POST '/report/{id}/state_change change the state of a report
# `state` can be one of  new, triaged, needs-more-info, resolved, not-applicable, informative, duplicate, spam
client.state_change(id, state)

# POST '/report/{id}/add_report_reference add a "reference" e.g. internal issue number
client.add_report_reference(id, reference)

# Triage an issue (add a reference and set state to :triaged)
client.triage(id, reference)

Usage

Credential management

You'll need to generate an API token at https://hackerone.com/<program>/api.

  • Click "Create API token"
  • Name the token
  • Click "Create"
  • Copy down the value

Set the HACKERONE_TOKEN and HACKERONE_TOKEN_NAME environment variables.

Program name

In order to retrieve all reports for a given program, you need to supply a default program:

HackerOne::Client.program = "github"

Risk classification

Configure the low/med/high/crit ranges for easier classification based on payouts:

HackerOne::Client.low_range = 1..999
HackerOne::Client.medium_range = 1000...2500
HackerOne::Client.high_range = 2500...5000
HackerOne::Client.critical_range = 5000...100_000_000

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/oreoshake/hackerone-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

hackerone-client's People

Contributors

oreoshake avatar jobertabma avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.