perl-Net-SecurityCenter

Perl interface to Tenable.sc (SecurityCenter) REST API

View the Project on GitHub giterlizzi/perl-Net-SecurityCenter

Net::SecurityCenter::API::Scan

NAME

Net::SecurityCenter::API::Scan - Perl interface to Tenable.sc (SecurityCenter) Scan REST API

SYNOPSIS

use Net::SecurityCenter::REST;
use Net::SecurityCenter::API::Scan;

my $sc = Net::SecurityCenter::REST->new('sc.example.org');

$sc->login('secman', 'password');

my $api = Net::SecurityCenter::API::Scan->new($sc);

my $scan_id = $api->add(
    name        => 'Test API scan',
    target      => [ '192.168.1.2', '192.168.1.3' ],
    description => 'Test from Net::SecurityCenter Perl module',
    policy      => 1,
    repository  => 2,
    zone        => 1
);

$sc->logout();

DESCRIPTION

This module provides Perl scripts easy way to interface the Scan REST API of Tenable.sc (SecurityCenter).

For more information about the Tenable.sc (SecurityCenter) REST API follow the online documentation:

https://docs.tenable.com/sccv/api/index.html

CONSTRUCTOR

Net::SecurityCenter::API::Scan->new ( $client )

Create a new instance of Net::SecurityCenter::API::Scan using Net::SecurityCenter::REST class.

METHODS

list

Get list of scans.

Params:

add

Create a new scan on Tenable.sc (SecurityCenter) and return the scan_id (or scan_result_id for schedule=now argument).

my $scan_id = $scan->add(
    name        => 'Test API scan',
    target      => [ '192.168.1.2', '192.168.1.3' ],
    description => 'Test from Net::SecurityCenter Perl module',
    policy      => 1,
    repository  => 2,
    zone        => 1
);

Params:

launch

Launches the scan associated with id to Nessus scanner.

Params:

execute

This is a facility for run immediatly a scan in Tenable.sc (SecurityCenter) using Nessus Scanner without create a scan.

NOTE: This method is an alias for $sc->add ( schedule => 'now', ... ).

See $sc->add paragraph for information about the allowed params.

delete

Delete the scan associated with id.

Params:

SUPPORT

Bugs / Feature Requests

Please report any bugs or feature requests through the issue tracker at https://github.com/giterlizzi/perl-Net-SecurityCenter/issues. You will be notified automatically of any progress on your issue.

Source Code

This is open source software. The code repository is available for public review and contribution under the terms of the license.

https://github.com/giterlizzi/perl-Net-SecurityCenter

git clone https://github.com/giterlizzi/perl-Net-SecurityCenter.git

AUTHOR

LICENSE AND COPYRIGHT

This software is copyright (c) 2018-2021 by Giuseppe Di Terlizzi.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.