Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
cookbook-postgresql CHANGELOG
===============

## 0.5.4

- manegron
- [3bed88c] Fix script rb_ingest_vuln_cve_pg

## 0.5.3

- manegron
Expand Down
2 changes: 1 addition & 1 deletion resources/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
maintainer_email 'git@redborder.com'
license 'AGPL-3.0'
description 'Installs/Configures cookbook-logstash'
version '0.5.3'
version '0.5.4'
7 changes: 4 additions & 3 deletions resources/scripts/rb_ingest_vuln_cve_pg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,16 @@ def import_cve_files
# https://nvd.nist.gov/feeds/json/cve/2.0/nvdcve-2.0-#{year}.meta
# sha256sum = `curl -s #{url.sub('.json.gz', '.meta')} | grep 'sha256' | awk '{print $2}'`.strip

unless download_gz_file_with_retries(url, filename)
# Full paths: the script can be run from any directory
filepath = File.join(@download_path, filename)
unless download_gz_file_with_retries(url, filepath)
puts "ERROR: Could not download #{filename} after multiple attempts."
complete_download = false
break
end

filepath = @download_path + filename
`gzip -dkf #{filepath}`
file_json = filename.sub(/\.gz$/, '')
file_json = filepath.sub(/\.gz$/, '')

if File.exist?(file_json)
system("dos2unix #{file_json}")
Expand Down
Loading