hackerone-client 0.12.0 → 0.13.0

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
- SHA1:
3
- metadata.gz: 20ceb82c10eef16b973775c0f72824dc7f580d4a
4
- data.tar.gz: 2376bdfa40c9e3bdc23858d6648dee1351b5879d
2
+ SHA256:
3
+ metadata.gz: 2370cf42a3dcd4313a377a530f46fd704334f4a3ce1c4e3dce4ac62f16751b47
4
+ data.tar.gz: 129b9b5b1cfe2cccb7919f57ff44491486c2379344374fe4072a4185244e081d
5
5
  SHA512:
6
- metadata.gz: 9c39a1b3caa22f7bbeb431d49cca0f68a378ff2b65c0c3aa270bad9ca984b45158767741276308a876899529eb8cebd054cd63367fbfa8f39ed64eaa4e8ed3c3
7
- data.tar.gz: 490a108988775ec10d819f82c177c132f0b6f4c1c05d5e3c0f71f2cdeebf9e046c4929d1ce57fe10679d7812eb74daa88d6b9ca0b11060659a112dec3d07ec0a
6
+ metadata.gz: a4f9b5ffbae89c6e089ad8bae84372941629e50de704c693913467483e564479bf4be7ac0183e2293cc30709832dd2c2fc656b40fd46b5ce57b62428900c0484
7
+ data.tar.gz: 5d1a11a5d9fd315a48f29327410207c7e6d6aa6cea806ab6bab74f6f79642fdaee5255156955772e77496176f01fa4f8bb796ba54ce84612e3f023b6b3fe696b
@@ -1,3 +1,7 @@
1
+ ## [0.13.0] - 2018-10-19
2
+
3
+ - [Fix issue with `#to_owasp` which would raise an error if an issue classification started with `CAPEC-`](https://github.com/oreoshake/hackerone-client/pull/39) (@rzhade3)
4
+
1
5
  ## [0.12.0] - 2017-12-07
2
6
 
3
7
  - [Incremental activities](https://github.com/oreoshake/hackerone-client/pull/36) - iterate over actions in a program (@esjee)
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  Authorization:
11
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
11
+ - Basic nope=
12
12
  User-Agent:
13
13
  - Faraday v0.12.1
14
14
  Accept-Encoding:
@@ -80,7 +80,7 @@ http_interactions:
80
80
  string: ''
81
81
  headers:
82
82
  Authorization:
83
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
83
+ - Basic nope=
84
84
  User-Agent:
85
85
  - Faraday v0.12.1
86
86
  Accept-Encoding:
@@ -153,7 +153,7 @@ http_interactions:
153
153
  string: '{"data":{"type":"group","id":"23578"}}'
154
154
  headers:
155
155
  Authorization:
156
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
156
+ - Basic nope=
157
157
  User-Agent:
158
158
  - Faraday v0.12.1
159
159
  Content-Type:
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  Authorization:
11
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
11
+ - Basic nope=
12
12
  User-Agent:
13
13
  - Faraday v0.12.1
14
14
  Accept-Encoding:
@@ -80,7 +80,7 @@ http_interactions:
80
80
  string: ''
81
81
  headers:
82
82
  Authorization:
83
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
83
+ - Basic nope=
84
84
  User-Agent:
85
85
  - Faraday v0.12.1
86
86
  Accept-Encoding:
@@ -153,7 +153,7 @@ http_interactions:
153
153
  string: '{"data":{"type":"group","id":"23578"}}'
154
154
  headers:
155
155
  Authorization:
156
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
156
+ - Basic nope=
157
157
  User-Agent:
158
158
  - Faraday v0.12.1
159
159
  Content-Type:
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: '{"data":{"type":"nobody"}}'
9
9
  headers:
10
10
  Authorization:
11
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
11
+ - Basic nope=
12
12
  User-Agent:
13
13
  - Faraday v0.12.1
14
14
  Content-Type:
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: '{"data":{"type":"nobody"}}'
9
9
  headers:
10
10
  Authorization:
11
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
11
+ - Basic nope=
12
12
  User-Agent:
13
13
  - Faraday v0.12.1
14
14
  Content-Type:
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  Authorization:
11
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
11
+ - Basic nope=
12
12
  User-Agent:
13
13
  - Faraday v0.12.1
14
14
  Accept-Encoding:
@@ -80,7 +80,7 @@ http_interactions:
80
80
  string: ''
81
81
  headers:
82
82
  Authorization:
83
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
83
+ - Basic nope=
84
84
  User-Agent:
85
85
  - Faraday v0.12.1
86
86
  Accept-Encoding:
@@ -153,7 +153,7 @@ http_interactions:
153
153
  string: '{"data":{"type":"user","id":"147515"}}'
154
154
  headers:
155
155
  Authorization:
156
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
156
+ - Basic nope=
157
157
  User-Agent:
158
158
  - Faraday v0.12.1
159
159
  Content-Type:
@@ -8,7 +8,7 @@ http_interactions:
8
8
  string: ''
9
9
  headers:
10
10
  Authorization:
11
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
11
+ - Basic nope=
12
12
  User-Agent:
13
13
  - Faraday v0.12.1
14
14
  Accept-Encoding:
@@ -80,7 +80,7 @@ http_interactions:
80
80
  string: ''
81
81
  headers:
82
82
  Authorization:
83
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
83
+ - Basic nope=
84
84
  User-Agent:
85
85
  - Faraday v0.12.1
86
86
  Accept-Encoding:
@@ -153,7 +153,7 @@ http_interactions:
153
153
  string: '{"data":{"type":"user","id":"147515"}}'
154
154
  headers:
155
155
  Authorization:
156
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
156
+ - Basic nope=
157
157
  User-Agent:
158
158
  - Faraday v0.12.1
159
159
  Content-Type:
@@ -145,7 +145,7 @@ http_interactions:
145
145
  string: ''
146
146
  headers:
147
147
  Authorization:
148
- - Basic c2pvcnM6czZhdGxtTGFZT1RZbXhMMXlrRHpoT3Z2SHRXbEhlK1praUg4SHpJWEtEZz0=
148
+ - Basic nope=
149
149
  User-Agent:
150
150
  - Faraday v0.12.0.1
151
151
  Accept-Encoding:
@@ -213,7 +213,7 @@ http_interactions:
213
213
  string: ''
214
214
  headers:
215
215
  Authorization:
216
- - Basic c2pvcnM6czZhdGxtTGFZT1RZbXhMMXlrRHpoT3Z2SHRXbEhlK1praUg4SHpJWEtEZz0=
216
+ - Basic nope=
217
217
  User-Agent:
218
218
  - Faraday v0.12.0.1
219
219
  Accept-Encoding:
@@ -159,7 +159,7 @@ http_interactions:
159
159
  string: ''
160
160
  headers:
161
161
  Authorization:
162
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
162
+ - Basic nope=
163
163
  User-Agent:
164
164
  - Faraday v0.12.1
165
165
  Accept-Encoding:
@@ -231,7 +231,7 @@ http_interactions:
231
231
  string: ''
232
232
  headers:
233
233
  Authorization:
234
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
234
+ - Basic nope=
235
235
  User-Agent:
236
236
  - Faraday v0.12.1
237
237
  Accept-Encoding:
@@ -304,7 +304,7 @@ http_interactions:
304
304
  string: '{"data":{"type":"user","id":"147515"}}'
305
305
  headers:
306
306
  Authorization:
307
- - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
307
+ - Basic nope=
308
308
  User-Agent:
309
309
  - Faraday v0.12.1
310
310
  Content-Type:
@@ -1,5 +1,5 @@
1
1
  module Hackerone
2
2
  module Client
3
- VERSION = "0.12.0"
3
+ VERSION = "0.13.0"
4
4
  end
5
5
  end
@@ -2,14 +2,25 @@ module HackerOne
2
2
  module Client
3
3
  class Weakness
4
4
  class << self
5
+ def validate_cwe!(cwe)
6
+ fail NotAnOwaspWeaknessError if cwe.upcase.start_with?('CAPEC-')
7
+ fail StandardError::ArgumentError unless cwe.upcase.start_with?('CWE-')
8
+ end
9
+
5
10
  def extract_cwe_number(cwe)
6
11
  return if cwe.nil?
7
- fail StandardError::ArgumentError unless cwe.upcase.start_with?('CWE-')
12
+ validate_cwe!(cwe)
8
13
 
9
14
  cwe.split('CWE-').last.to_i
10
15
  end
11
16
  end
12
17
 
18
+ class NotAnOwaspWeaknessError < StandardError
19
+ def message
20
+ "CAPEC labels do not describe OWASP weaknesses"
21
+ end
22
+ end
23
+
13
24
  CLASSIFICATION_MAPPING = {
14
25
  "None Applicable" => "A0-Other",
15
26
  "Denial of Service" => "A0-Other",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hackerone-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neil Matatall
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-07 00:00:00.000000000 Z
11
+ date: 2018-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  version: '0'
192
192
  requirements: []
193
193
  rubyforge_project:
194
- rubygems_version: 2.2.0
194
+ rubygems_version: 2.7.6
195
195
  signing_key:
196
196
  specification_version: 4
197
197
  summary: A limited client for the HackerOne API