govuk_security_audit 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98b7fe0fb8b87cdd432d66f922aff024737d768c
4
- data.tar.gz: 815404bf280233fc01720d72df97d5d5d3486200
3
+ metadata.gz: 0186900431fcb7a64b6fa9b0eeb83217369f4c20
4
+ data.tar.gz: 3fbfaf078853329c17b6532d34031508f2f7580e
5
5
  SHA512:
6
- metadata.gz: 6354a9d85ff121085d903590dc10a8a51074eea27d96944aefddcbd37e2f0d380c29f02cb22ea73373d32f770054d9d38ed19d227b359dc6f47c10d436bfb6a6
7
- data.tar.gz: 7edd64c7a2c49ac6ee19d52506cfef0c832caa4e0444b388aa2949ef93ab890448949e4cd87b89836556746aced66d6cf1b503079965756c4b7d2352ccb72da4
6
+ metadata.gz: f29d3a8fbfe483d2a689bd69e11bfbf6fb121aeed5f0661697e07efd9a1ef71173bb594876bf0f6b9d8324d184fcb0eb141bb87bdb338398a7743df82259ba91
7
+ data.tar.gz: 9cc2aa8ffe989911c65a8a5a411c6fead2d152a0056f19ef095550cfb1fe4cb3e89146d79edba8be8581c5adebe1896767a92d4a3dc708c7af2a5b2ddc264a8b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.1.1
2
+
3
+ - Perform an update of the advisory DB before every check by default, disable with `--skip-update`
4
+
1
5
  ## 0.1.0
2
6
 
3
7
  - Initial gem release
@@ -7,8 +7,11 @@ require "govuk_security_audit/scanner"
7
7
 
8
8
  module GovukSecurityAudit
9
9
  class CLI < Thor
10
+ class_option :skip_update, type: :boolean, default: false
11
+
10
12
  desc "github USER REPO [REF]", "check the Github repo USER/REPO at an optional REF. Defaults to master."
11
13
  def github(user, repo, ref="master")
14
+ update unless options[:skip_update]
12
15
  uri = URI.parse("https://raw.githubusercontent.com/#{user}/#{repo}/#{ref}/Gemfile.lock")
13
16
  http = Net::HTTP.new(uri.host, uri.port)
14
17
  http.use_ssl = true
@@ -29,6 +32,7 @@ module GovukSecurityAudit
29
32
 
30
33
  desc "check [PATH]", "check the Gemfile at PATH, or the current directory."
31
34
  def check(path=Dir.pwd)
35
+ update unless options[:skip_update]
32
36
  scanner = Scanner.new(path)
33
37
  vulnerable = false
34
38
 
@@ -1,3 +1,3 @@
1
1
  module GovukSecurityAudit
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_security_audit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Government Digital Service