conjur-cli 6.2.1 → 6.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0520b947529d571863374704ce0b613a07b6e63fa1e9cb37932e0d254e17353
4
- data.tar.gz: 490b04289eb77fdbb1c7d56fc317ac6266111af4cde3fb6a655c92e48cf50cf3
3
+ metadata.gz: e1e8bd9b3f0492516bb7636d952ef5b9d8019aecedf93b4cb32ca0060417dd06
4
+ data.tar.gz: 0c51275a1eab0e47724036a0ddcf76e55eac4b9298c703b85ad0393346ac597a
5
5
  SHA512:
6
- metadata.gz: 726d627c741a1a7ae611316dd482e6b2d6633e8d193fef1879f1acd5d8a86e68f8f5a0e5f0d6679085b7f15a86930a2a747c6a43c307ebedcd31494d52b1714e
7
- data.tar.gz: 0424f34f72f7b625270eb42cbfe432160ab4a063a2600d82b7a8efe51d07df5e95a42d85b5dc3138d4074e63d2e28b8fc2a448d6c6ffe61f1715cd477269b2a2
6
+ metadata.gz: 9f8a5b7f4e9030008e7557e9c68ec661f4d03ee9a17ce78e59c806ca4fa71e99746f700630ec397e0066e6b0519e95e6c951583621d93d6ae1cf70a27db23303
7
+ data.tar.gz: 8f541da5d129e2e6ba4a0ac3e544b595041c4708d258708f8914ea4c6fdf37218f651a9d4fc022578dbee15d81e077c8745c105d57392c61bbfa1916261e1cd3
@@ -0,0 +1,10 @@
1
+ * @cyberark/community-and-integrations-team @conjurinc/community-and-integrations-team @conjurdemos/community-and-integrations-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,42 @@
1
+ ---
2
+ name: Bug
3
+ about: Create a bug report to help us improve
4
+ title: ''
5
+ labels: component/cli, kind/bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ ## Summary
11
+ A clear and concise description of what the bug is.
12
+
13
+ ## Steps to Reproduce
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ ## Expected Results
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ ## Actual Results (including error logs, if applicable)
24
+ A clear and concise description of what actually did happen.
25
+
26
+ ## Reproducible
27
+ * [ ] Always
28
+ * [ ] Sometimes
29
+ * [ ] Non-Reproducible
30
+
31
+ ## Version/Tag number
32
+ What version of the product are you running? Any version info that you can share is helpful.
33
+ For example, you might give the version from Docker logs, the Docker tag, a specific download URL,
34
+ the output of the `/info` route, etc.
35
+
36
+ ## Environment setup
37
+ Can you describe the environment in which this product is running? Is it running on a VM / in a container / in a cloud?
38
+ Which cloud provider? Which container orchestrator (including version)?
39
+ The more info you can share about your runtime environment, the better we may be able to reproduce the issue.
40
+
41
+ ## Additional Information
42
+ Add any other context about the problem here.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: kind/enhancement, component/cli
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ ## Is your feature request related to a problem? Please describe.
11
+
12
+ A clear and concise description of what the problem is. Ex. `I would like to see [...] because [...]`.
13
+ Please include the intended use case and what the feature would improve on so that we can prioritize
14
+ the feature accordingly.
15
+
16
+ ## Describe the solution you would like
17
+
18
+ A clear and concise description of what the desired end result(s) would be.
19
+
20
+ ## Describe alternatives you have considered
21
+
22
+ A clear and concise description of any alternative solutions or features that may be related to this that
23
+ you have considered.
24
+
25
+ ## Additional context
26
+
27
+ Add any other context information about the feature request here.
@@ -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
+ Resolves #[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
data/.gitleaks.toml ADDED
@@ -0,0 +1,216 @@
1
+ title = "Secretless Broker gitleaks config"
2
+
3
+ # This is the config file for gitleaks. You can configure gitleaks what to search for and what to whitelist.
4
+ # If GITLEAKS_CONFIG environment variable
5
+ # is set, gitleaks will load configurations from that path. If option --config-path is set, gitleaks will load
6
+ # configurations from that path. Gitleaks does not whitelist anything by default.
7
+ # - https://www.ndss-symposium.org/wp-content/uploads/2019/02/ndss2019_04B-3_Meli_paper.pdf
8
+ # - https://github.com/dxa4481/truffleHogRegexes/blob/master/truffleHogRegexes/regexes.json
9
+ [[rules]]
10
+ description = "AWS Client ID"
11
+ regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'''
12
+ tags = ["key", "AWS"]
13
+
14
+ [[rules]]
15
+ description = "AWS Secret Key"
16
+ regex = '''(?i)aws(.{0,20})?(?-i)['\"][0-9a-zA-Z\/+]{40}['\"]'''
17
+ tags = ["key", "AWS"]
18
+
19
+ [[rules]]
20
+ description = "AWS MWS key"
21
+ regex = '''amzn\.mws\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'''
22
+ tags = ["key", "AWS", "MWS"]
23
+
24
+ [[rules]]
25
+ description = "PKCS8"
26
+ regex = '''-----BEGIN PRIVATE KEY-----'''
27
+ tags = ["key", "PKCS8"]
28
+
29
+ [[rules]]
30
+ description = "RSA"
31
+ regex = '''-----BEGIN RSA PRIVATE KEY-----'''
32
+ tags = ["key", "RSA"]
33
+
34
+ [[rules]]
35
+ description = "SSH"
36
+ regex = '''-----BEGIN OPENSSH PRIVATE KEY-----'''
37
+ tags = ["key", "SSH"]
38
+
39
+ [[rules]]
40
+ description = "PGP"
41
+ regex = '''-----BEGIN PGP PRIVATE KEY BLOCK-----'''
42
+ tags = ["key", "PGP"]
43
+
44
+ [[rules]]
45
+ description = "Facebook Secret Key"
46
+ regex = '''(?i)(facebook|fb)(.{0,20})?(?-i)['\"][0-9a-f]{32}['\"]'''
47
+ tags = ["key", "Facebook"]
48
+
49
+ [[rules]]
50
+ description = "Facebook Client ID"
51
+ regex = '''(?i)(facebook|fb)(.{0,20})?['\"][0-9]{13,17}['\"]'''
52
+ tags = ["key", "Facebook"]
53
+
54
+ [[rules]]
55
+ description = "Facebook access token"
56
+ regex = '''EAACEdEose0cBA[0-9A-Za-z]+'''
57
+ tags = ["key", "Facebook"]
58
+
59
+ [[rules]]
60
+ description = "Twitter Secret Key"
61
+ regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{35,44}['\"]'''
62
+ tags = ["key", "Twitter"]
63
+
64
+ [[rules]]
65
+ description = "Twitter Client ID"
66
+ regex = '''(?i)twitter(.{0,20})?['\"][0-9a-z]{18,25}['\"]'''
67
+ tags = ["client", "Twitter"]
68
+
69
+ [[rules]]
70
+ description = "Github"
71
+ regex = '''(?i)github(.{0,20})?(?-i)['\"][0-9a-zA-Z]{35,40}['\"]'''
72
+ tags = ["key", "Github"]
73
+
74
+ [[rules]]
75
+ description = "LinkedIn Client ID"
76
+ regex = '''(?i)linkedin(.{0,20})?(?-i)['\"][0-9a-z]{12}['\"]'''
77
+ tags = ["client", "Twitter"]
78
+
79
+ [[rules]]
80
+ description = "LinkedIn Secret Key"
81
+ regex = '''(?i)linkedin(.{0,20})?['\"][0-9a-z]{16}['\"]'''
82
+ tags = ["secret", "Twitter"]
83
+
84
+ [[rules]]
85
+ description = "Slack"
86
+ regex = '''xox[baprs]-([0-9a-zA-Z]{10,48})?'''
87
+ tags = ["key", "Slack"]
88
+
89
+ [[rules]]
90
+ description = "EC"
91
+ regex = '''-----BEGIN EC PRIVATE KEY-----'''
92
+ tags = ["key", "EC"]
93
+
94
+ [[rules]]
95
+ description = "Generic API key"
96
+ regex = '''(?i)(api_key|apikey)(.{0,20})?['|"][0-9a-zA-Z]{32,45}['|"]'''
97
+ tags = ["key", "API", "generic"]
98
+
99
+ [[rules]]
100
+ description = "Generic Secret"
101
+ regex = '''(?i)secret(.{0,20})?['|"][0-9a-zA-Z]{32,45}['|"]'''
102
+ tags = ["key", "Secret", "generic"]
103
+
104
+ [[rules]]
105
+ description = "Google API key"
106
+ regex = '''AIza[0-9A-Za-z\\-_]{35}'''
107
+ tags = ["key", "Google"]
108
+
109
+ [[rules]]
110
+ description = "Google Cloud Platform API key"
111
+ regex = '''(?i)(google|gcp|youtube|drive|yt)(.{0,20})?['\"][AIza[0-9a-z\\-_]{35}]['\"]'''
112
+ tags = ["key", "Google", "GCP"]
113
+
114
+ [[rules]]
115
+ description = "Google OAuth"
116
+ regex = '''(?i)(google|gcp|auth)(.{0,20})?['"][0-9]+-[0-9a-z_]{32}\.apps\.googleusercontent\.com['"]'''
117
+ tags = ["key", "Google", "OAuth"]
118
+
119
+ [[rules]]
120
+ description = "Google OAuth access token"
121
+ regex = '''ya29\.[0-9A-Za-z\-_]+'''
122
+ tags = ["key", "Google", "OAuth"]
123
+
124
+ [[rules]]
125
+ description = "Heroku API key"
126
+ regex = '''(?i)heroku(.{0,20})?['"][0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}['"]'''
127
+ tags = ["key", "Heroku"]
128
+
129
+ [[rules]]
130
+ description = "MailChimp API key"
131
+ regex = '''(?i)(mailchimp|mc)(.{0,20})?['"][0-9a-f]{32}-us[0-9]{1,2}['"]'''
132
+ tags = ["key", "Mailchimp"]
133
+
134
+ [[rules]]
135
+ description = "Mailgun API key"
136
+ regex = '''(?i)(mailgun|mg)(.{0,20})?['"][0-9a-z]{32}['"]'''
137
+ tags = ["key", "Mailgun"]
138
+
139
+ [[rules]]
140
+ description = "Password in URL"
141
+ regex = '''[a-zA-Z]{3,10}:\/\/[^\/\s:@]{3,20}:[^\/\s:@]{3,20}@.{1,100}\/?.?'''
142
+ tags = ["key", "URL", "generic"]
143
+
144
+ [[rules]]
145
+ description = "PayPal Braintree access token"
146
+ regex = '''access_token\$production\$[0-9a-z]{16}\$[0-9a-f]{32}'''
147
+ tags = ["key", "Paypal"]
148
+
149
+ [[rules]]
150
+ description = "Picatic API key"
151
+ regex = '''sk_live_[0-9a-z]{32}'''
152
+ tags = ["key", "Picatic"]
153
+
154
+ [[rules]]
155
+ description = "Slack Webhook"
156
+ regex = '''https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8}/[a-zA-Z0-9_]{24}'''
157
+ tags = ["key", "slack"]
158
+
159
+ [[rules]]
160
+ description = "Stripe API key"
161
+ regex = '''(?i)stripe(.{0,20})?['\"][sk|rk]_live_[0-9a-zA-Z]{24}'''
162
+ tags = ["key", "Stripe"]
163
+
164
+ [[rules]]
165
+ description = "Square access token"
166
+ regex = '''sq0atp-[0-9A-Za-z\-_]{22}'''
167
+ tags = ["key", "square"]
168
+
169
+ [[rules]]
170
+ description = "Square OAuth secret"
171
+ regex = '''sq0csp-[0-9A-Za-z\\-_]{43}'''
172
+ tags = ["key", "square"]
173
+
174
+ [[rules]]
175
+ description = "Twilio API key"
176
+ regex = '''(?i)twilio(.{0,20})?['\"][0-9a-f]{32}['\"]'''
177
+ tags = ["key", "twilio"]
178
+
179
+ [whitelist]
180
+ files = [
181
+ # "(.*?)(jpg|gif|doc|pdf|bin)$",
182
+ ".gitleaks.toml"
183
+ ]
184
+ regexes = [
185
+ "3a4rb19rpjejr89h6r29kd2fb3808cpy" # sample host API key in test data
186
+ ]
187
+
188
+ # Additional Examples
189
+
190
+ # [[rules]]
191
+ # description = "Generic Key"
192
+ # regex = '''(?i)key(.{0,6})?(:|=|=>|:=)'''
193
+ # entropies = [
194
+ # "4.1-4.3",
195
+ # "5.5-6.3",
196
+ # ]
197
+ # entropyROI = "line"
198
+ # filetypes = [".go", ".py", ".c"]
199
+ # tags = ["key"]
200
+ # severity = "8"
201
+ #
202
+ #
203
+ # [[rules]]
204
+ # description = "Generic Key"
205
+ # regex = '''(?i)key(.{0,6})?(:|=|=>|:=)'''
206
+ # entropies = ["4.1-4.3"]
207
+ # filetypes = [".gee"]
208
+ # entropyROI = "line"
209
+ # tags = ["key"]
210
+ # severity = "medium"
211
+
212
+ # [[rules]]
213
+ # description = "Any pem file"
214
+ # filetypes = [".key"]
215
+ # tags = ["pem"]
216
+ # severity = "high"
data/CHANGELOG.md CHANGED
@@ -1,34 +1,75 @@
1
- # 6.2.1
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
2
3
 
3
- * Pin to xdg gem v2.2.3 due to a [crashing CLI](https://github.com/cyberark/conjur-cli/issues/243).
4
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
4
6
 
5
- # 6.2.0
7
+ ## [Unreleased]
6
8
 
7
- * Add `ldap-sync` subcommand.
9
+ ## [6.2.5] - 2021-09-29
8
10
 
9
- # 6.1.1
11
+ ### Fixed
12
+ - Upgraded `highline` dependency to fix deprecation warning.
13
+ [cyberark/conjur-cli#330](https://github.com/cyberark/conjur-cli/pull/330)
10
14
 
11
- * No longer displaying error stack traces by default when an exception occurs duing CLI
12
- initialization (e.g when trying to open a missing conjur certificate file). Stack traces
13
- can be enabled for all errors in the CLI by setting the environment variable `GLI_DEBUG=true`.
15
+ ## [6.2.4] - 2021-07-01
16
+ ### Changed
17
+ - Upgraded `conjur-api` dependency to 5.3.5.
18
+ [cyberark/conjur-cli#310](https://github.com/cyberark/conjur-cli/issues/310)
14
19
 
15
- # [6.1.0](https://github.com/cyberark/conjur-cli/releases/tag/v6.1.0)
20
+ ## [6.2.3] - 2020-12-22
21
+ ### Fixed
22
+ - The Conjur CLI now raises a proper error when trying to rotate a non-existing
23
+ user's API key.
24
+ [cyberark/conjur#979](https://github.com/cyberark/conjur/issues/979)
16
25
 
17
- * Pin dependency 'conjur-api' to '~> 5.1'. This update adds authn-local support to the API. [conjur-api PR #131](https://github.com/cyberark/conjur-api-ruby/pull/131)
26
+ ## [6.2.2] - 2020-04-02
27
+ ### Changed
28
+ - Docker image updated to flatten to a single layer and reduce the image
29
+ size ([cyberark/conjur-cli#253](https://github.com/cyberark/conjur-cli/issues/253))
18
30
 
19
- # [6.0.1](https://github.com/cyberark/conjur-cli/releases/tag/v6.0.1)
31
+ ### Fixed
32
+ - CLI image is only updated in DockerHub when the project has a new tag
33
+ ([cyberark/conjur-cli#270](https://github.com/cyberark/conjur-cli/issues/270))
20
34
 
21
- * Pushes to `cyberark/conjur-cli:5` on DockerHub when tests pass
22
- * Use SNI when fetching certificate with `conjur init`.
23
- * Correctly specify dependency versions in gemspec.
24
- * Allow ActiveSupport v5 as a dependency.
35
+ ### Security
36
+ - Update rake for CVE-2020-8130 ([cyberark/conjur-cli#263](https://github.com/cyberark/conjur-cli/issues/263))
25
37
 
26
- # [6.0.0](https://github.com/cyberark/conjur-cli/releases/tag/v6.0.0)
38
+ ## [6.2.1] - 2019-05-22
39
+ ### Added
40
+ - Pin to xdg gem v2.2.3 due to a [crashing CLI](https://github.com/cyberark/conjur-cli/issues/243).
27
41
 
28
- * Provides compatibility with [cyberark/conjur](https://github.com/cyberark/conjur), Conjur 5 CE.
29
- * License changed to Apache 2.0.
30
- * **Codebase forked: for changes to the 5.x (API [v4][v4-branch]) series, see
31
- [CHANGELOG in `v4` branch][v4-changelog]**
42
+ ## 6.2.0 - 2018-06-22
43
+ ### Added
44
+ - Add `ldap-sync` subcommand.
32
45
 
33
- [v4-branch]: https://github.com/cyberark/conjur-cli/tree/v4
34
- [v4-changelog]: https://github.com/cyberark/conjur-cli/blob/v4/CHANGELOG.md
46
+ ## 6.1.1 - 0000-00-00
47
+ ### Added
48
+ - No longer displaying error stack traces by default when an exception occurs duing CLI initialization (e.g when trying to open a missing conjur certificate file). Stack traces can be enabled for all errors in the CLI by setting the environment variable `GLI_DEBUG=true`.
49
+
50
+ ## [6.1.0] - 2018-04-09
51
+ ### Added
52
+ - Pin dependency 'conjur-api' to '~> 5.1'. This update adds authn-local support to the API. [conjur-api PR #131](https://github.com/cyberark/conjur-api-ruby/pull/131)
53
+
54
+ ## [6.0.1] - 2018-04-09
55
+ ### Added
56
+ - Pushes to `cyberark/conjur-cli:5` on DockerHub when tests pass
57
+ - Use SNI when fetching certificate with `conjur init`.
58
+ - Correctly specify dependency versions in gemspec.
59
+ - Allow ActiveSupport v5 as a dependency.
60
+
61
+ ## [6.0.0] - 2017-10-13
62
+ ### Added
63
+ - Provides compatibility with [cyberark/conjur](https://github.com/cyberark/conjur), Conjur 5 CE.
64
+ - License changed to Apache 2.0.
65
+ - **Codebase forked: for changes to the 5.x (API [v4](https://github.com/cyberark/conjur-cli/tree/v4)) series, see
66
+ [CHANGELOG in `v4` branch][v4-changelog](https://github.com/cyberark/conjur-cli/blob/v4/CHANGELOG.md)**
67
+
68
+ [Unreleased]: https://github.com/cyberark/conjur-cli/compare/v6.2.4...HEAD
69
+ [6.2.4]: https://github.com/cyberark/conjur-cli/compare/v6.2.3...v6.2.4
70
+ [6.2.3]: https://github.com/cyberark/conjur-cli/compare/v6.2.2...v6.2.3
71
+ [6.2.2]: https://github.com/cyberark/conjur-cli/compare/v6.2.1...v6.2.2
72
+ [6.2.1]: https://github.com/cyberark/conjur-cli/compare/v6.2.0...v6.2.1
73
+ [6.1.0]: https://github.com/cyberark/conjur-cli/compare/v6.0.1...v6.1.0
74
+ [6.0.1]: https://github.com/cyberark/conjur-cli/compare/v6.0.0...v6.0.1
75
+ [6.0.0]: https://github.com/cyberark/conjur-cli/compare/v5.6.6...v6.0.0
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,81 @@
1
+ # Contributing
2
+
3
+ For general contribution and community guidelines, please see the [community repo](https://github.com/cyberark/community).
4
+
5
+ ## Contributing
6
+
7
+ 1. [Fork the project](https://help.github.com/en/github/getting-started-with-github/fork-a-repo)
8
+ 2. [Clone your fork](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository)
9
+ 3. Make local changes to your fork by editing files
10
+ 3. [Commit your changes](https://help.github.com/en/github/managing-files-in-a-repository/adding-a-file-to-a-repository-using-the-command-line)
11
+ 4. [Push your local changes to the remote server](https://help.github.com/en/github/using-git/pushing-commits-to-a-remote-repository)
12
+ 5. [Create new Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork)
13
+
14
+ From here your pull request will be reviewed and once you've responded to all
15
+ feedback it will be merged into the project. Congratulations, you're a
16
+ contributor!
17
+
18
+ ## Development
19
+
20
+ Create a sandbox environment in Docker using the `./dev` folder:
21
+
22
+ ```sh-session
23
+ $ cd dev
24
+ dev $ ./start.sh
25
+ ```
26
+
27
+ This will drop you into a bash shell in a container called `cli`.
28
+
29
+ The sandbox also includes a Postgres container and Conjur server container. The
30
+ environment is already setup to connect the CLI to the server:
31
+
32
+ * **CONJUR_APPLIANCE_URL** `http://conjur`
33
+ * **CONJUR_ACCOUNT** `cucumber`
34
+
35
+ To login to conjur, type the following and you'll be prompted for a password:
36
+
37
+ ```sh-session
38
+ root@2b5f618dfdcb:/# conjur authn login admin
39
+ Please enter admin's password (it will not be echoed):
40
+ ```
41
+
42
+ The required password is the API key at the end of the output from the
43
+ `start.sh` script. It looks like this:
44
+
45
+ ```
46
+ =============== LOGIN WITH THESE CREDENTIALS ===============
47
+
48
+ username: admin
49
+ api key : 9j113d35wag023rq7tnv201rsym1jg4pev1t1nb4419767ms1cnq00n
50
+
51
+ ============================================================
52
+ ```
53
+
54
+ At this point, you can use any CLI command you like.
55
+
56
+ ## Running Cucumber
57
+
58
+ To install dev packages, run `bundle` from within the container:
59
+
60
+ ```sh-session
61
+ root@2b5f618dfdcb:/# cd /usr/src/cli-ruby/
62
+ root@2b5f618dfdcb:/usr/src/cli-ruby# bundle
63
+ ```
64
+
65
+ Then you can run the cucumber tests:
66
+
67
+ ```sh-session
68
+ root@2b5f618dfdcb:/usr/src/cli-ruby# cucumber
69
+ ...
70
+ ```
71
+
72
+ ## Releasing
73
+
74
+ To create a new release, follow the instructions in our general release
75
+ guidelines [here](https://github.com/cyberark/community/blob/main/Conjur/CONTRIBUTING.md#release-process).
76
+
77
+ Note: this project documents the version in two places:
78
+ - The [VERSION](./VERSION) file
79
+ - In [`lib/conjur/version.rb`](./lib/conjur/version.rb)
80
+
81
+ Both version files must be updated when this project is preparing for a release.
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- #ruby=ruby-2.2.5
3
+ #ruby=ruby-2.7.0
4
4
  #ruby-gemset=conjur-cli
5
5
 
6
6
  # Specify your gem's dependencies in conjur.gemspec
data/Jenkinsfile CHANGED
@@ -13,13 +13,16 @@ pipeline {
13
13
  }
14
14
 
15
15
  stages {
16
- stage('Test 2.4') {
17
- environment {
18
- RUBY_VERSION = '2.4'
19
- }
16
+ stage('Validate Changelog') {
17
+ steps { sh './bin/parse-changelog.sh' }
18
+ }
19
+
20
+ stage('Prepare CC Report Dir'){
20
21
  steps {
21
- sh './test.sh'
22
- junit 'spec/reports/*.xml, features/reports/*.xml'
22
+ script {
23
+ ccCoverage.dockerPrep()
24
+ sh 'mkdir -p coverage'
25
+ }
23
26
  }
24
27
  }
25
28
 
@@ -27,9 +30,15 @@ pipeline {
27
30
  environment {
28
31
  RUBY_VERSION = '2.5'
29
32
  }
33
+
30
34
  steps {
31
35
  sh './test.sh'
32
- junit 'spec/reports/*.xml, features/reports/*.xml'
36
+ }
37
+
38
+ post {
39
+ always {
40
+ junit 'spec/reports/*.xml, features/reports/*.xml'
41
+ }
33
42
  }
34
43
  }
35
44
 
@@ -37,9 +46,44 @@ pipeline {
37
46
  environment {
38
47
  RUBY_VERSION = '2.6'
39
48
  }
49
+
50
+ steps {
51
+ sh './test.sh'
52
+ }
53
+
54
+ post {
55
+ always {
56
+ junit 'spec/reports/*.xml, features/reports/*.xml'
57
+ }
58
+ }
59
+ }
60
+
61
+ stage('Test 2.7') {
62
+ environment {
63
+ RUBY_VERSION = '2.7'
64
+ }
65
+
40
66
  steps {
41
67
  sh './test.sh'
42
- junit 'spec/reports/*.xml, features/reports/*.xml'
68
+ }
69
+
70
+ post {
71
+ always {
72
+ junit 'spec/reports/*.xml, features/reports/*.xml'
73
+ }
74
+ }
75
+ }
76
+
77
+ stage('Submit Coverage Report'){
78
+ steps{
79
+ sh 'ci/submit-coverage'
80
+ publishHTML([reportDir: 'coverage', reportFiles: 'index.html', reportName: 'Coverage Report', reportTitles: '', allowMissing: false, alwaysLinkToLastBuild: true, keepAll: true])
81
+ }
82
+
83
+ post {
84
+ always {
85
+ archiveArtifacts artifacts: "coverage/.resultset.json", fingerprint: false
86
+ }
43
87
  }
44
88
  }
45
89
 
@@ -49,10 +93,23 @@ pipeline {
49
93
  }
50
94
  }
51
95
 
52
- stage('Push standalone image to DockerHub') {
53
- when {
54
- branch 'master'
96
+ stage('Scan Docker image') {
97
+ parallel {
98
+ stage('Scan Docker image for fixable vulns') {
99
+ steps {
100
+ scanAndReport("cyberark/conjur-cli:latest", "HIGH", false)
101
+ }
102
+ }
103
+ stage('Scan Docker image for total vulns') {
104
+ steps {
105
+ scanAndReport("cyberark/conjur-cli:latest", "NONE", true)
106
+ }
107
+ }
55
108
  }
109
+ }
110
+
111
+ stage('Push standalone image to DockerHub') {
112
+ when { tag "v*" }
56
113
 
57
114
  steps {
58
115
  sh './push-image'
@@ -62,15 +119,9 @@ pipeline {
62
119
  // Only publish to RubyGems if the HEAD is
63
120
  // tagged with the same version as in version.rb
64
121
  stage('Publish to RubyGems') {
65
- agent { label 'releaser-v2' }
66
-
67
122
  when {
68
123
  expression { currentBuild.resultIsBetterOrEqualTo('SUCCESS') }
69
- branch "master"
70
- expression {
71
- def exitCode = sh returnStatus: true, script: './needs-publishing'
72
- return exitCode == 0
73
- }
124
+ tag "v*"
74
125
  }
75
126
 
76
127
  steps {