πŸ› οΈ Custom Plugins Development

This guide explains how to send your security scan data (from tools like Nessus, OpenVAS, or CIS Benchmarks) into ThreatVault. It’s written simply β€” even non-technical users can follow it.

You’ll learn:

  • The difference between VAPT and Compliance data

  • Which fields ThreatVault expects

  • How to map your tool’s data

  • Example plugins you can use


🧩 What Is a Plugin?

A plugin is a small Python module that transforms your uploaded scan file (usually CSV) into a format ThreatVault understands.

Workflow:

  1. You upload a CSV/JSON scan file.

  2. ThreatVault calls your plugin’s process() function.

  3. The plugin converts your data into the required schema.

  4. ThreatVault validates the output and saves your findings.


πŸ” Two Types of Data

Type
What It Does
Example

VAPT

Finds vulnerabilities (bugs, weak configurations)

β€œTLS 1.0 is enabled”

Compliance

Checks if rules or policies are followed

β€œPassword must be 8+ chars β€” ❌ FAILED”

Quick rules:

  • VAPT: β€œWhat’s broken?” β†’ Use risk (Critical, High…)

  • Compliance: β€œDid we follow the rule?” β†’ Use status (PASSED, FAILED)


🧭 ThreatVault Field Requirements

1️⃣ VAPT (Vulnerability Scan) Fields

Used for tools like Nessus, OpenVAS, Invicti:

  • βœ… Required: risk, host, port, name, description, remediation

  • πŸ”Ή Optional: cve, evidence, vpr_score


2️⃣ Compliance (Rule Check) Fields

Used for CIS, ISO 27001, and internal policy checks:

  • βœ… Required: risk, host, port, name, description, remediation, status

  • πŸ”Ή Optional: evidence

Notes:

  • Nessus compliance scans don’t use severity levels. risk values are mapped to status.

  • If risk is empty, the plugin assigns Medium automatically.

  • cve and vpr_score are not used for compliance scans.


πŸ—ΊοΈ Mapping Scan Data to ThreatVault

Source Field
β†’
ThreatVault Field
Notes

Risk

β†’

risk

Use Critical/High/Medium/Low. Leave empty for compliance β†’ auto Medium

Host

β†’

host

IP or hostname

Port

β†’

port

Use 0 if not applicable

Name

β†’

name

Issue title

Description

β†’

description

Full explanation

Solution

β†’

remediation

How to fix

Plugin Output / Actual Value

β†’

evidence

Proof from scan

VPR Score

β†’

vpr_score

Only for VAPT

(none)

β†’

status

Only for Compliance (copy from risk)


🧩 Real Examples

πŸ”Ή VAPT Scan (Nessus)

CSV Header: CVE,Risk,Host,Port,Name,Description,Solution,Plugin Output,VPR Score

Mapped to ThreatVault JSON:


πŸ”Ή Compliance Scan (Nessus)

CSV Header: CVE,Risk,Host,Port,Name,Description,Solution,Plugin Output,VPR Score

Mapped to ThreatVault JSON:


βœ… Acceptable Values

Risk (Severity)

Value
Notes

CRITICAL

Only for VAPT

HIGH

Both

MEDIUM

Both

LOW

Both

None

Only Compliance β†’ auto Medium

Status

Scan Type
Allowed Values

VAPT

NEW, OPEN, CLOSED, EXEMPTION, OTHERS

Compliance

PASSED, FAILED, WARNING


🧰 Plugin Examples

1️⃣ Compliance Plugin (Python + Polars)


2️⃣ VAPT Plugin (Python + Polars)


πŸš€ Quick Steps to Build Your Plugin

  1. Decide: VAPT or Compliance

  2. Read your CSV/JSON file

  3. Rename columns to match ThreatVault

  4. Fill in required fields

  5. For Compliance (Nessus): status = risk

  6. Remove unused fields (e.g., cve in Compliance)

  7. Return Polars LazyFrame or DataFrame

  8. Upload to ThreatVault β†’ Test β†’ Done


🏁 Summary Table

Field
VAPT
Compliance

cve

βœ…

❌

risk

βœ…

βœ…

status

❌

βœ…

host

βœ…

βœ…

port

βœ…

βœ…

name

βœ…

βœ…

description

βœ…

βœ…

remediation

βœ…

βœ…

evidence

βœ…

βœ…

vpr_score

βœ…

❌

Last updated