Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
giterlizzi committed Mar 2, 2021
2 parents 3351eaa + 210a664 commit b9812d1
Show file tree
Hide file tree
Showing 41 changed files with 861 additions and 155 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: linux
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
jobs:
perl:
runs-on: ubuntu-latest
strategy:
matrix:
perl-version:
- '5.16'
- '5.18'
- '5.20'
- '5.22'
- '5.30'
- '5.32'
include:
- perl-version: '5.30'
os: ubuntu-latest
release-test: true
coverage: true
container:
image: perl:${{ matrix.perl-version }}
steps:
- uses: actions/checkout@v2
- name: Platform check
run: uname -a
- name: Perl version check
run: perl -V
- name: Install cpanm and multiple modules
run: |
curl -L https://cpanmin.us | perl - App::cpanminus
cpanm --notest IO::Socket::SSL
cpanm --notest App::Cpan
cpan -M https://www.cpan.org -T ExtUtils::MakeMaker
- name: Install dependencies
run: |
cpan -M https://www.cpan.org -T .
- name: Run tests
run: |
perl Makefile.PL
make test
- name: Coverage
if: ${{ matrix.coverage }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cpanm -n Devel::Cover::Report::Coveralls
cover -test -report Coveralls
30 changes: 30 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: macos
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
jobs:
perl:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Platform check
run: uname -a
- name: Set up Perl
run: brew install perl
- name: Perl version check
run: perl -V
- name: Prepare cpan
run: |
openssl version
cpan -M https://www.cpan.org -T Net::SSLeay IO::Socket::SSL ExtUtils::MakeMaker
- name: Install dependencies
run: |
cpan -M https://www.cpan.org -T .
- name: Run tests
run: |
perl Makefile.PL
make test
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
Revision history for Net::SecurityCenter

0.310 2021-03-01
- Added "Net::SecurityCenter::API::Ticket" class
- Fixed "ssl_opts" param in "Net::SecurityCenter::REST"
- Added array return context in "Net::SecurityCenter::API::Scan->list"
- sc-api: Added Two-Way SSL/TLS Mutual Authentication
- sc-api: Improved CSV output (thanks to SFUX)

0.300 2020-10-30
- Added support for API Authentication (added in Tenable.sc 5.13)
- Added "Net::SecurityCenter::API::Notification" class
Expand Down
11 changes: 9 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ that should be provided before the module is installed.

## INSTALLATION

To install this module, run the following commands:
Using Makefile.PL:

To install this module, run the following commands.

perl Makefile.PL
make
make test
make install

Using App::cpanminus:

cpanm Net::SecurityCenter

## SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the
Expand All @@ -39,6 +45,7 @@ perldoc command.
perldoc Net::SecurityCenter::API::ScanResult
perldoc Net::SecurityCenter::API::Scanner
perldoc Net::SecurityCenter::API::System
perldoc Net::SecurityCenter::API::Ticket
perldoc Net::SecurityCenter::API::User
perldoc Net::SecurityCenter::API::Zone

Expand All @@ -57,7 +64,7 @@ You can also look for information at:

## LICENSE AND COPYRIGHT

Copyright (C) 2018-2020 Giuseppe Di Terlizzi
Copyright (C) 2018-2021 Giuseppe Di Terlizzi

This program is free software; you can redistribute it and/or modify it
under the terms of the the Artistic License (2.0). You may obtain a
Expand Down
5 changes: 4 additions & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ lib/Net/SecurityCenter/API/Scanner.pm
lib/Net/SecurityCenter/API/ScanResult.pm
lib/Net/SecurityCenter/API/Status.pm
lib/Net/SecurityCenter/API/System.pm
lib/Net/SecurityCenter/API/Ticket.pm
lib/Net/SecurityCenter/API/User.pm
lib/Net/SecurityCenter/API/Zone.pm
lib/Net/SecurityCenter/Base.pm
Expand All @@ -30,7 +31,7 @@ lib/Net/SecurityCenter/REST.pm
lib/Net/SecurityCenter/Utils.pm
LICENSE
Makefile.PL
MANIFEST This list of files
MANIFEST
README.md
t/00-load.t
t/10-rest.t
Expand Down Expand Up @@ -67,6 +68,8 @@ t/mock/rest-status-get.json
t/mock/rest-system-debug-get.json
t/mock/rest-system-diagnostics-get.json
t/mock/rest-system-get.json
t/mock/rest-ticket-6-get.json
t/mock/rest-ticket-get.json
t/mock/rest-token-delete.json
t/mock/rest-token-post.json
t/mock/rest-zone-5-get.json
Expand Down
1 change: 1 addition & 0 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ WriteMakefile(
PREREQ_PM => {
'JSON' => '0',
'Time::Piece' => '0',
'Term::ReadKey' => '0',
'LWP::UserAgent' => '6.04',
'version' => '0.77'
},
Expand Down
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Release](https://img.shields.io/github/release/giterlizzi/perl-Net-SecurityCenter.svg)](https://github.com/giterlizzi/perl-Net-SecurityCenter/releases) [![Build Status](https://travis-ci.org/giterlizzi/perl-Net-SecurityCenter.svg)](https://travis-ci.org/giterlizzi/perl-Net-SecurityCenter) [![License](https://img.shields.io/github/license/giterlizzi/perl-Net-SecurityCenter.svg)](https://github.com/giterlizzi/perl-Net-SecurityCenter) [![Starts](https://img.shields.io/github/stars/giterlizzi/perl-Net-SecurityCenter.svg)](https://github.com/giterlizzi/perl-Net-SecurityCenter) [![Forks](https://img.shields.io/github/forks/giterlizzi/perl-Net-SecurityCenter.svg)](https://github.com/giterlizzi/perl-Net-SecurityCenter) [![Issues](https://img.shields.io/github/issues/giterlizzi/perl-Net-SecurityCenter.svg)](https://github.com/giterlizzi/perl-Net-SecurityCenter/issues) [![Coverage Status](https://coveralls.io/repos/github/giterlizzi/perl-Net-SecurityCenter/badge.svg)](https://coveralls.io/github/giterlizzi/perl-Net-SecurityCenter)
[![Release](https://img.shields.io/github/release/giterlizzi/perl-Net-SecurityCenter.svg)](https://github.com/giterlizzi/perl-Net-SecurityCenter/releases) [![Actions Status](https://github.com/giterlizzi/perl-Net-SecurityCenter/workflows/linux/badge.svg)](https://github.com/giterlizzi/perl-Net-SecurityCenter/actions) [![Actions Status](https://github.com/giterlizzi/perl-Net-SecurityCenter/workflows/macos/badge.svg)](https://github.com/giterlizzi/perl-Net-SecurityCenter/actions) [![License](https://img.shields.io/github/license/giterlizzi/perl-Net-SecurityCenter.svg)](https://github.com/giterlizzi/perl-Net-SecurityCenter) [![Starts](https://img.shields.io/github/stars/giterlizzi/perl-Net-SecurityCenter.svg)](https://github.com/giterlizzi/perl-Net-SecurityCenter) [![Forks](https://img.shields.io/github/forks/giterlizzi/perl-Net-SecurityCenter.svg)](https://github.com/giterlizzi/perl-Net-SecurityCenter) [![Issues](https://img.shields.io/github/issues/giterlizzi/perl-Net-SecurityCenter.svg)](https://github.com/giterlizzi/perl-Net-SecurityCenter/issues) [![Coverage Status](https://coveralls.io/repos/github/giterlizzi/perl-Net-SecurityCenter/badge.svg)](https://coveralls.io/github/giterlizzi/perl-Net-SecurityCenter)

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

Expand Down Expand Up @@ -28,14 +28,28 @@ $sc->logout();

## Install

To install `Net::SecurityCenter` distribution, run the following commands:
Using Makefile.PL:

To install `Net::SecurityCenter` distribution, run the following commands.

perl Makefile.PL
make
make test
make install

Using App::cpanminus:

cpanm Net::SecurityCenter


## Documentation

- `perldoc Net::SecurityCenter`
- https://metacpan.org/release/Net-SecurityCenter
- https://giterlizzi.github.io/perl-Net-SecurityCenter


## Copyright

- Copyright 2018-2020 © Giuseppe Di Terlizzi
- Copyright 2018-2021 © Giuseppe Di Terlizzi
- Nessus®, Tenable.sc® and SecurityCenter® is a Registered Trademark of Tenable®, Inc.
22 changes: 20 additions & 2 deletions bin/sc-api
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ sc-api - Tenable.sc (SecurityCenter) API command line interface

--access_key Access Key
--secrey_key Secret Key


--ssl_cert_file Certificate file
--ssl_cert_key Certificate private key
--ssl_password Private key password (optional)

--config [FILE] Configuration file

--format [TYPE] Output format (default: json)
Expand Down Expand Up @@ -149,6 +153,10 @@ See L<Net::SecurityCenter::API::Scanner> class.

See L<Net::SecurityCenter::API::System> class.

=head2 ticket

See L<Net::SecurityCenter::API::Ticket> class.

=head2 user

See L<Net::SecurityCenter::API::User> class.
Expand Down Expand Up @@ -177,13 +185,23 @@ Sample configuration file with API Authentication:
secret_key = <SECRET KEY>
access_key = <ACCESS KEY>

Sample configuration file with SSL Mutual-Auth:

[SecurityCenter]
hostname = tenable-sc.example.org:443
username = secman
password = mypass
ssl_cert_file = /path/my-cert.crt
ssl_key_file = /path/my-private.key
ssl_password = <SECRET>

=head1 AUTHOR

L<Giuseppe Di Terlizzi|https://metacpan.org/author/gdt>

=head1 COPYRIGHT AND LICENSE

Copyright © 2018-2020 L<Giuseppe Di Terlizzi|https://metacpan.org/author/gdt>
Copyright © 2018-2021 L<Giuseppe Di Terlizzi|https://metacpan.org/author/gdt>

You may use and distribute this module according to the same terms
that Perl is distributed under.
Loading

0 comments on commit b9812d1

Please sign in to comment.