Registry / devops / hackerone-report-formatter

hackerone-report-formatter

JSON →
library0.0.6jsnpmunverified

A Node.js library (v0.0.6) that transforms raw JSON data from the HackerOne API's report endpoint (e.g., https://hackerone.com/reports/{id}.json) into a simpler, more human-readable format. It strips redundant fields, normalizes nested objects, and provides a clean output suitable for display or further processing. The package is in early development, with no recent updates, and should be considered experimental for production use. Unlike full HackerOne API clients, this focuses solely on report formatting.

npm install hackerone-report-formatter
INSTALL
IMPORT
SIG · HACKERONE-REPORT-F
H
hackerone-report-formatter
devopsjavascriptv0.0.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

format
import format from 'hackerone-report-formatter'
const format = require('hackerone-report-formatter')
ESM-only; no CommonJS support. Must use import statement.
default
import format from 'hackerone-report-formatter'
import { format } from 'hackerone-report-formatter'
The package exports a single default function, not a named export.
any
import format from 'hackerone-report-formatter'
import * as formatter from 'hackerone-report-formatter'
Namespace import is unnecessary; just use default import.

Demonstrates importing the default function and formatting a raw HackerOne report JSON object.

import format from 'hackerone-report-formatter'; const raw = { id: 807448, title: 'Test report', state: 'Closed', substate: 'resolved', severity_rating: 'high', readable_substate: 'Resolved', created_at: '2020-02-28T23:15:43.015Z', reporter: { username: 'test' }, team: { handle: 'security', profile: { name: 'HackerOne' } }, vulnerability_information: '## Summary: This is a test.', }; try { const report = format(raw); console.log(report); } catch (e) { console.error('Error occurred', e); }
Debug
Known issues
gotchaPackage is ESM-only; using require() will throw a TypeError.
fix
Use dynamic import() or switch to ESM context.
affects: >=0.0.0
breakingInput must conform to HackerOne API JSON structure; malformed input throws an error.
fix
Validate input before passing or wrap in try/catch.
affects: >=0.0.0
deprecatedThe package has not been updated since initial release (0.0.6) and may not reflect current HackerOne API changes.
fix
Consider forking or using a more maintained alternative.
affects: 0.0.6
Errors
Common errors & fixes
Error: Missing or invalid fields in report JSON
Input lacks required properties (e.g., id, reporter, team).
fix
Ensure the input object contains all fields from the HackerOne report endpoint.
TypeError: format is not a function
Incorrect import method (e.g., using require or named import).
fix
Use import format from 'hackerone-report-formatter' (ESM only).
SyntaxError: Cannot use import statement outside a module
Running in a CommonJS context without ESM enabled.
fix
Add "type": "module" to package.json or use .mjs extension.
Upgrade
Version history
0.0.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
hackerone-report-formatter — npm install hackerone-report-formatter · libregistry