# nessus-api-helper

> Simple library to make requests to the Nessus API

Latest version **1.3.0** (published 2020-06-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install nessus-api-helper
pnpm add nessus-api-helper
yarn add nessus-api-helper
bun add nessus-api-helper
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2020-06-22 |
| First published | 2019-11-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | Jonathan Prince |
| Maintainers | jonathanprince |

## Links

- npm: https://www.npmjs.com/package/nessus-api-helper
- npm.io page: https://npm.io/package/nessus-api-helper

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.19.0

## Recent versions

- 1.3.0 (latest) — 2020-06-22
- 1.2.0 — 2020-06-22
- 1.1.0 — 2020-06-20
- 1.0.0 — 2019-11-08

## README

# Nessus API Helper

A simple module to help make requests to the Nessus API.

## Usage

Create a client instance:
```
  const nessus = new Nessus({
    host: 'localhost',
    user: 'username',
    pass: 'password'
  })
```

Authenticate:
```
  await nessus.authenticate()
```

Make requests:
```
  const scanData = await nessus.getScanById(<scanId>)
```

## Constructor Config

| key       | description                     | default     |
|-----------|---------------------------------|-------------|
| host      | Hostname or IP of Nessus server | localhost   |
| port      | Nessus port                     | 8834        |
| protocol  | http or https                   | https       |
| user      | Nessus username                 |             |
| password  | Nessus password                 |             |

## Methods

### .authenticate()
Uses the user and password supplied in the constructor to set auth headers for subsequent requests.

### .getFolders()
Returns the folder list

### .getScans([queryObject])
Returns a list of scans
Optional query object can be used to add the query parameters `folder_id` and/or `last_modification_date`

### .getScanById(scanId[, historyId])
Returns scan data for the given scan id

### .getScanHost(scanId, hostId[, historyId])
Returns host data for the the given scan and host id

### .getScanHostPlugin(scanId, hostId, pluginId[, historyId])
Returns the plugin data for the given scan, host and plugin id

### .getScanHostCompliance(scanId, hostId, complianceId[, historyId])
Returns the compliance plugin data for the given scan, host and compliance id

---
_Source: https://npm.io/package/nessus-api-helper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
