All Projects → oreoshake → hackerone-client

oreoshake / hackerone-client

Licence: MIT license
An unofficial wrapper for the HackerOne API

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to hackerone-client

cpAPI
A Flask API that gives updates about the upcoming contests on various Coding Platforms.
Stars: ✭ 13 (-76.36%)
Mutual labels:  api-wrapper
epicstore api
Epic Games Store Web API Wrapper written in Python
Stars: ✭ 48 (-12.73%)
Mutual labels:  api-wrapper
valorant.py
Complete Python interface for the Valorant API. Works right out of the box!
Stars: ✭ 84 (+52.73%)
Mutual labels:  api-wrapper
HackerOne-Lessons
Transcribed video lessons of HackerOne to pdf's
Stars: ✭ 104 (+89.09%)
Mutual labels:  hackerone
powershellwrapper
This PowerShell module acts as a wrapper for the IT Glue API.
Stars: ✭ 96 (+74.55%)
Mutual labels:  api-wrapper
newsapi-php
A PHP client for the News API (https://newsapi.org/docs/get-started)
Stars: ✭ 21 (-61.82%)
Mutual labels:  api-wrapper
knowledgeworks api
The API utils for querying CN-DBpedia & CN-Probase, the biggest Chinese knowledge bases
Stars: ✭ 24 (-56.36%)
Mutual labels:  api-wrapper
article-downloader
Uses publisher APIs to programmatically retrieve scientific journal articles for text mining.
Stars: ✭ 81 (+47.27%)
Mutual labels:  api-wrapper
chess-web-api
Chess.com public data API wrapper with "isChanged" and priority queue functionality.
Stars: ✭ 83 (+50.91%)
Mutual labels:  api-wrapper
pjbank-js-sdk
PJBank SDK para Javascript! ⚡ ⚡ ⚡
Stars: ✭ 24 (-56.36%)
Mutual labels:  api-wrapper
Sudomy
Sudomy is a subdomain enumeration tool to collect subdomains and analyzing domains performing automated reconnaissance (recon) for bug hunting / pentesting
Stars: ✭ 1,572 (+2758.18%)
Mutual labels:  hackerone
ruby-ambassador
Ambassador API v2 wrapper for Ruby
Stars: ✭ 20 (-63.64%)
Mutual labels:  api-wrapper
libdrizzle-redux
The next generation of Libdrizzle with a simplified API and support for more features of the protocol
Stars: ✭ 14 (-74.55%)
Mutual labels:  api-wrapper
messages
A python package designed to make sending messages easy and efficient!
Stars: ✭ 38 (-30.91%)
Mutual labels:  api-wrapper
cf-mailchimp
ColdFusion wrapper for the MailChimp 3.0 API
Stars: ✭ 17 (-69.09%)
Mutual labels:  api-wrapper
h1-search
Tool that will request the public disclosures on a specific HackerOne program and show them in a localhost webserver.
Stars: ✭ 58 (+5.45%)
Mutual labels:  hackerone
Pyrez
(ON REWRITE) An easy to use (a)sync wrapper for Hi-Rez Studios API (Paladins, Realm Royale, and Smite), written in Python. 🐍
Stars: ✭ 23 (-58.18%)
Mutual labels:  api-wrapper
ZmopSharp
ZMOP (芝麻信用开放平台) SDK for .NET
Stars: ✭ 11 (-80%)
Mutual labels:  api-wrapper
bookops-worldcat
BookOps WorldCat Metadata API wrapper
Stars: ✭ 21 (-61.82%)
Mutual labels:  api-wrapper
AniList-Node
A lightweight Node.js wrapper for the AniList API
Stars: ✭ 36 (-34.55%)
Mutual labels:  api-wrapper

Hackerone::Client

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

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

# POST '/reports' creates a new report
client.create_report(title: "hi", summary: "hi", impact: "string", severity_rating: :high, source: "api")

# GET '/reports' returns all reports in a given state for a program, by default :new
client.reports(since: 10.days.ago, before: 1.day.ago, state: :new)

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

# PUT '/reports/{id}/assignee'
report.assign_to_user("username")
report.assign_to_group("groupname")

# POST '/reports/#{id}/activities'
report.add_comment(message, internal: false) # internal is true by default

# 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
# when marking as duplicate, you can supply the original report ID
report.state_change(:duplicate, "Your issue has been marked as X", original_report_id: 12345)

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

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

# Set the severity on a report (rating can be :none, :low, :medium, :high or :critical)
report.update_severity(rating: :high)

# POST /reports/{id}/bounty_suggestions
report.suggest_bounty(message: "I suggest $500 with a small bonus. Report is well-written.", amount: 500, bonus_amount: 50)

# POST /reports/{id}/bounties
report.award_bounty(message: "Here's your bounty!", amount: 500, bonus_amount: 50)

# POST /reports/{id}/swags
report.award_swag(message: "Here's your T-Shirt")

# GET `/{program}/reporters` returns a list of unique reporters that have reported to your program
client.reporters

program = HackerOne::Client::Program.find("insert-program-name-here")

# returns all common responses
program.common_responses

# Updates a program's policy
program.update_policy(policy: "Please submit valid vulnerabilities")

# Gets a program's balance
program.balance

State change hooks

You can add hooks that will be called for every state change. This can be useful e.g. for ensuring that reports always get assigned or calling out to external services for specific state changes.

# Initialization

HackerOne::Client::Report.add_state_change_hook ->(report, old_state, new_state) do
  # ...
end

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

Configuration

In order to configure whether error handling is strict or lenient, set the HACKERONE_CLIENT_LENIENT_MODE variable.

Setting this variable will make the client try to absorb errors, like a malformed bounty or bonus amount. Not setting this variable will cause the client to raise errors.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].