slosilo 2.2.1 → 2.2.2

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
  SHA256:
3
- metadata.gz: 8723a6eff81a1e81b1e8f8a3b4998c202b4a36b042d2c3b33d830232f800e45e
4
- data.tar.gz: 22abadf8b5edca4b2ad971be894e54a906e9b84f166098a95fbfa8cf8401a046
3
+ metadata.gz: eee5855bf8948e460edebcc7e04399ad32ea9085f101860ddddb4687139a0bf8
4
+ data.tar.gz: 415fa1a618fbffda2ebf1dcb59abc42285d11d01afbc4697299708bbe3bd01fb
5
5
  SHA512:
6
- metadata.gz: 937190eaf606924682f14850313aeedf6b852f7cc0e88669451d6b0d147fcd61a485d4089ccdce35bb188fc057a750c82f01bd43118da104735efc264386caa7
7
- data.tar.gz: 6e3b22a70e85c036932bb15b309e45d28d4b9f2eeaa59cdd2aa9f3db5b580b9d23e3844eaf71a59667acc99706b55e2100d1e4a1f6f0b70bafae117459babff3
6
+ metadata.gz: '098214ef9bbb3ac810a28425e943fe81528573d54e7cdf85261c45cd1ab95fdc57a2387c629adc246339bc04488ff01a04d5655163bf8f423c2edacbb60f7a80'
7
+ data.tar.gz: 163a3a8097d4bafc592718d1bb37f1f2f8e25cbb5b637ba68c6478d787f131e08cc5d2a017f9d80bb5127c757d8f817b0a39c0e7c77557b45fc9e01206139305
@@ -0,0 +1,10 @@
1
+ * @cyberark/conjur-core-team @conjurinc/conjur-core-team @conjurdemos/conjur-core-team
2
+
3
+ # Changes to .trivyignore require Security Architect approval
4
+ .trivyignore @cyberark/security-architects @conjurinc/security-architects @conjurdemos/security-architects
5
+
6
+ # Changes to .codeclimate.yml require Quality Architect approval
7
+ .codeclimate.yml @cyberark/quality-architects @conjurinc/quality-architects @conjurdemos/quality-architects
8
+
9
+ # Changes to SECURITY.md require Security Architect approval
10
+ SECURITY.md @cyberark/security-architects @conjurinc/security-architects @conjurdemos/security-architects
@@ -0,0 +1,21 @@
1
+ ### What does this PR do?
2
+ - _What's changed? Why were these changes made?_
3
+ - _How should the reviewer approach this PR, especially if manual tests are required?_
4
+ - _Are there relevant screenshots you can add to the PR description?_
5
+
6
+ ### What ticket does this PR close?
7
+ Connected to #[relevant GitHub issues, eg 76]
8
+
9
+ ### Checklists
10
+
11
+ #### Change log
12
+ - [ ] The CHANGELOG has been updated, or
13
+ - [ ] This PR does not include user-facing changes and doesn't require a CHANGELOG update
14
+
15
+ #### Test coverage
16
+ - [ ] This PR includes new unit and integration tests to go with the code changes, or
17
+ - [ ] The changes in this PR do not require tests
18
+
19
+ #### Documentation
20
+ - [ ] Docs (e.g. `README`s) were updated in this PR, and/or there is a follow-on issue to update docs, or
21
+ - [ ] This PR does not require updating any documentation
@@ -1,3 +1,8 @@
1
+ # v2.2.2
2
+
3
+ * Add rake task `slosilo:recalculate_fingerprints` which rehashes the fingerprints in the keystore.
4
+ **Note**: After migrating the slosilo keystore, run the above rake task to ensure the fingerprints are correctly hashed.
5
+
1
6
  # v2.2.1
2
7
 
3
8
  * Use SHA256 algorithm instead of MD5 for public key fingerprints.
@@ -14,11 +14,14 @@ pipeline {
14
14
  sh './test.sh'
15
15
 
16
16
  junit 'spec/reports/*.xml'
17
+ cobertura coberturaReportFile: 'spec/coverage/coverage.xml'
18
+ sh 'cp spec/coverage/coverage.xml cobertura.xml'
19
+ ccCoverage("cobertura", "github.com/cyberark/slosilo")
17
20
  }
18
21
  }
19
22
 
20
23
  stage('Publish to RubyGems') {
21
- agent { label 'releaser-v2' }
24
+ agent { label 'executor-v2' }
22
25
  when {
23
26
  allOf {
24
27
  branch 'master'
@@ -0,0 +1,42 @@
1
+ # Security Policies and Procedures
2
+
3
+ This document outlines security procedures and general policies for the CyberArk Conjur
4
+ suite of tools and products.
5
+
6
+ * [Reporting a Bug](#reporting-a-bug)
7
+ * [Disclosure Policy](#disclosure-policy)
8
+ * [Comments on this Policy](#comments-on-this-policy)
9
+
10
+ ## Reporting a Bug
11
+
12
+ The CyberArk Conjur team and community take all security bugs in the Conjur suite seriously.
13
+ Thank you for improving the security of the Conjur suite. We appreciate your efforts and
14
+ responsible disclosure and will make every effort to acknowledge your
15
+ contributions.
16
+
17
+ Report security bugs by emailing the lead maintainers at security@conjur.org.
18
+
19
+ The maintainers will acknowledge your email within 2 business days. Subsequently, we will
20
+ send a more detailed response within 2 business days of our acknowledgement indicating
21
+ the next steps in handling your report. After the initial reply to your report, the security
22
+ team will endeavor to keep you informed of the progress towards a fix and full
23
+ announcement, and may ask for additional information or guidance.
24
+
25
+ Report security bugs in third-party modules to the person or team maintaining
26
+ the module.
27
+
28
+ ## Disclosure Policy
29
+
30
+ When the security team receives a security bug report, they will assign it to a
31
+ primary handler. This person will coordinate the fix and release process,
32
+ involving the following steps:
33
+
34
+ * Confirm the problem and determine the affected versions.
35
+ * Audit code to find any potential similar problems.
36
+ * Prepare fixes for all releases still under maintenance. These fixes will be
37
+ released as fast as possible.
38
+
39
+ ## Comments on this Policy
40
+
41
+ If you have suggestions on how this process could be improved please submit a
42
+ pull request.
@@ -49,6 +49,17 @@ module Slosilo
49
49
  end
50
50
  end
51
51
 
52
+ def recalculate_fingerprints
53
+ # Use a transaction to ensure that all fingerprints are updated together. If any update fails,
54
+ # we want to rollback all updates.
55
+ model.db.transaction do
56
+ model.each do |m|
57
+ m.update fingerprint: Slosilo::Key.new(m.key).fingerprint
58
+ end
59
+ end
60
+ end
61
+
62
+
52
63
  def migrate!
53
64
  unless fingerprint_in_db?
54
65
  model.db.transaction do
@@ -59,9 +70,7 @@ module Slosilo
59
70
  # reload the schema
60
71
  model.set_dataset model.dataset
61
72
 
62
- model.each do |m|
63
- m.update fingerprint: Slosilo::Key.new(m.key).fingerprint
64
- end
73
+ recalculate_fingerprints
65
74
 
66
75
  model.db.alter_table :slosilo_keystore do
67
76
  set_column_not_null :fingerprint
@@ -1,3 +1,3 @@
1
1
  module Slosilo
2
- VERSION = "2.2.1"
2
+ VERSION = "2.2.2"
3
3
  end
@@ -24,4 +24,9 @@ namespace :slosilo do
24
24
  task :migrate => :environment do |t|
25
25
  Slosilo.adapter.migrate!
26
26
  end
27
+
28
+ desc "Recalculate fingerprints in keystore"
29
+ task :recalculate_fingerprints => :environment do |t|
30
+ Slosilo.adapter.recalculate_fingerprints
31
+ end
27
32
  end
@@ -23,11 +23,12 @@ Gem::Specification.new do |gem|
23
23
  gem.require_paths = ["lib"]
24
24
  gem.version = Slosilo::VERSION
25
25
  gem.required_ruby_version = '>= 1.9.3'
26
-
26
+
27
27
  gem.add_development_dependency 'rake'
28
28
  gem.add_development_dependency 'rspec', '~> 3.0'
29
29
  gem.add_development_dependency 'ci_reporter_rspec'
30
30
  gem.add_development_dependency 'simplecov'
31
+ gem.add_development_dependency 'simplecov-cobertura'
31
32
  gem.add_development_dependency 'io-grab', '~> 0.0.1'
32
33
  gem.add_development_dependency 'sequel' # for sequel tests
33
34
  gem.add_development_dependency 'sqlite3' # for sequel tests
@@ -1,4 +1,7 @@
1
1
  require "simplecov"
2
+ require "simplecov-cobertura"
3
+
4
+ SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
2
5
  SimpleCov.start
3
6
 
4
7
  require 'slosilo'
@@ -74,7 +77,7 @@ ooQ2FuL0K6ukQfHPjuMswqi41lmVH8gIVqVC+QnImUCrGxH9WXWy
74
77
  -----END RSA PRIVATE KEY-----
75
78
  """
76
79
  end
77
-
80
+
78
81
  def self.mock_own_key
79
82
  before { allow(Slosilo).to receive(:[]).with(:own).and_return key }
80
83
  end
data/test.sh CHANGED
@@ -17,6 +17,8 @@ docker run --cidfile $cidfile -v /app/spec/reports $iid bundle exec rake jenkins
17
17
  cid=$(cat $cidfile)
18
18
 
19
19
  docker cp $cid:/app/spec/reports spec/
20
+ docker cp $cid:/app/coverage spec
21
+
20
22
  docker rm $cid
21
23
 
22
24
  # untag, will use cache next time if available but no junk will be left
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slosilo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafał Rzepecki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-14 00:00:00.000000000 Z
11
+ date: 2020-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov-cobertura
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: io-grab
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -131,6 +145,8 @@ extensions: []
131
145
  extra_rdoc_files: []
132
146
  files:
133
147
  - ".dockerignore"
148
+ - ".github/CODEOWNERS"
149
+ - ".github/PULL_REQUEST_TEMPLATE.md"
134
150
  - ".gitignore"
135
151
  - ".gitleaks.toml"
136
152
  - ".kateproject"
@@ -141,6 +157,7 @@ files:
141
157
  - LICENSE
142
158
  - README.md
143
159
  - Rakefile
160
+ - SECURITY.md
144
161
  - lib/slosilo.rb
145
162
  - lib/slosilo/adapters/abstract_adapter.rb
146
163
  - lib/slosilo/adapters/file_adapter.rb