NAME

NIST::NVD::Store::SQLite3 - SQLite3 store for NIST::NVD

VERSION

Version 1.00.00

SYNOPSIS

$q = eval { NIST::NVD::Query->new( store => 'SQLite3', database => $db_file, ); };

SUBROUTINES/METHODS

new

my $NVD_Storage_SQLite3 = NIST::NVD::Store::SQLite3->new(
    store     => 'SQLite3',
    database  => '/path/to/database.sqlite',
);

get_cve_for_cpe

get_cwe_for_cpe

get_cve

get_cwe

my $cwe_dump = $self->get_cwe( id => $cwe_row->{id} );
or
my $cwe_dump = $self->get_cwe( cwe_id => $cwe_row->{cwe_id} );

put_cve_idx_cpe

my %vuln_software = ( $cpe_urn0 => [ $cve_id0,$cve_id42,... ],
                      $cpe_urn1 => [ $cve_id1,$cve_id24,... ],
#                     ...,
                      $cpe_urnN => [ $cve_id2,$cve_id3,... ],
                     );
$Updater->put_cve_idx_cpe( \%vuln_software );

put_cwe_idx_cpe

my %vuln_software = ( $cpe_urn0 => [ $cwe_id0,$cwe_id42,... ],
                      $cpe_urn1 => [ $cwe_id1,$cwe_id24,... ],
#                     ...,
                      $cpe_urnN => [ $cwe_id2,$cwe_id3,... ],
                     );
$Updater->put_cwe_idx_cpe( \%weaknesses );

update_websec_idx_cpe

$Updater->update_websec_idx_cpe({ cpe_urn[$i] => [ $cwe_id[20], $cwe_id[7], $cwe_id[235], ... $cwe_id[$n], ],
                                  cpe_urn[$j] => [ $cwe_id[42], $cwe_id[$k], $cwe_id[72], ... $cwe_id[$j], ],
                                  ... => });

put_cpe

put_cve

put_nvd_entries

put_cwe

$result = $self->put_cwe( cwe_id   => 'CWE-42',
                          cwe_dump => $cwe_dump );

put_cwe_idx_cve

$result = $store->put_cwe_idx_cve({ $cve_id[0] => $entry[0],
                                    $cve_id[1] => $entry[1],
                                    # ...
                                    $cve_id[$n] => $entry[$n],
                                   });

get_websec_by_cpe

my $result = $store->get_websec_by_cpe( 'cpe:/a:apache:tomcat:6.0.28' );
while( my $websec = shift( @{$result->{websec_results}} ) ){
  print( "$websec->{key} - $websec->{category}: ".
         "$websec->{score}\n" );
}

get_cwe_ids

$result = $self->get_cwe_ids();
while( my( $cwe_id, $cwe_pkey_id ) = each %$result ){
  ...
}

put_cwe_data

$cwe_data = { View => $view_data, Category => $category_data, Weakness => $weakness_data, Compound_Element => $compound_data, };

$NVD_Updater->put_cwe_data($cwe_data);

AUTHOR

C.J. Adams-Collier, <cjac at f5.com>

BUGS

Please report any bugs or feature requests to bug-nist-nvd-store-sqlite3 at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=NIST-NVD-Store-SQLite3. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc NIST::NVD::Store::SQLite3

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2012 F5 Networks, Inc.

CVE(r) and CWE(tm) are marks of The MITRE Corporation and used here with permission. The information in CVE and CWE are copyright of The MITRE Corporation and also used here with permission.

Please include links for CVE(r) <http://cve.mitre.org/> and CWE(tm) <http://cwe.mitre.org/> in all reproductions of these materials.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.