hackerone-client 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/fixtures/vcr_cassettes/update_severity.yml +78 -0
- data/lib/hackerone/client/report.rb +29 -0
- data/lib/hackerone/client/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0819413f3285b7e89af03bb5fbee8f2e9f360b135c94942cf292b12777cfd7cd'
|
4
|
+
data.tar.gz: 375f398786433dadc34524b4b3752a0c1faa66fc2697458abe1c0e3c470797a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 950f84f02de53fa2c7634306c4a9b39615fd71406f0962062af3aa4c77c7a4a920d871c8b0d968dba2944ed790febde017f0fb2f1da478fe0d680e562a67cd76
|
7
|
+
data.tar.gz: 82aabc2ed7af83602a7e6a29ea284bdb1e58869c1638791748bd3efb5bba7c14905755607a15c8e7b7bda10244399e12e16eb5c1345e57fed9e23775e010b1b7
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
+
## [0.17.0] - 2020-03-23
|
2
|
+
|
3
|
+
[Add support for updating the severity of an issue](https://github.com/oreoshake/hackerone-client/pull/50) (@rzhade3)
|
4
|
+
|
1
5
|
## [0.16.0] - 2020-03-23
|
2
6
|
|
3
|
-
-
|
7
|
+
- Whooops, no change
|
4
8
|
|
5
9
|
## [0.15.0] - 2020-03-09
|
6
10
|
|
@@ -0,0 +1,78 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.hackerone.com/v1/reports/200/severities
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"data":{"type":"severity","attributes":{"rating":"high"}}}'
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- Basic NOPE
|
12
|
+
User-Agent:
|
13
|
+
- Faraday v1.0.0
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Date:
|
26
|
+
- Mon, 23 Mar 2020 22:11:50 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Set-Cookie:
|
34
|
+
- __cfduid=defc457f4849bd5da92f0d0a9e21f70cf1585001510; expires=Wed, 22-Apr-20
|
35
|
+
22:11:50 GMT; path=/; Domain=api.hackerone.com; HttpOnly; SameSite=Lax; Secure
|
36
|
+
X-Request-Id:
|
37
|
+
- bc58a27f-3140-4457-b7b0-12a3c86f4f03
|
38
|
+
Etag:
|
39
|
+
- W/"30c2790e73edc770a9ed3fea69f0e8ea"
|
40
|
+
Cache-Control:
|
41
|
+
- max-age=0, private, must-revalidate
|
42
|
+
Strict-Transport-Security:
|
43
|
+
- max-age=31536000; includeSubDomains; preload
|
44
|
+
X-Frame-Options:
|
45
|
+
- DENY
|
46
|
+
X-Content-Type-Options:
|
47
|
+
- nosniff
|
48
|
+
X-Xss-Protection:
|
49
|
+
- 1; mode=block
|
50
|
+
X-Download-Options:
|
51
|
+
- noopen
|
52
|
+
X-Permitted-Cross-Domain-Policies:
|
53
|
+
- none
|
54
|
+
Referrer-Policy:
|
55
|
+
- strict-origin-when-cross-origin
|
56
|
+
Expect-Ct:
|
57
|
+
- enforce, max-age=86400
|
58
|
+
Content-Security-Policy:
|
59
|
+
- 'default-src ''none''; base-uri ''self''; block-all-mixed-content; child-src
|
60
|
+
www.youtube-nocookie.com; connect-src ''self'' www.google-analytics.com errors.hackerone.net;
|
61
|
+
font-src ''self''; form-action ''self''; frame-ancestors ''none''; img-src
|
62
|
+
''self'' data: cover-photos.hackerone-user-content.com hackathon-photos.hackerone-user-content.com
|
63
|
+
profile-photos.hackerone-user-content.com hackerone-us-west-2-production-attachments.s3.us-west-2.amazonaws.com;
|
64
|
+
media-src ''self'' hackerone-us-west-2-production-attachments.s3.us-west-2.amazonaws.com;
|
65
|
+
script-src ''self'' www.google-analytics.com; style-src ''self'' ''unsafe-inline'';
|
66
|
+
report-uri https://errors.hackerone.net/api/30/csp-report/?sentry_key=61c1e2f50d21487c97a071737701f598'
|
67
|
+
Cf-Cache-Status:
|
68
|
+
- DYNAMIC
|
69
|
+
Server:
|
70
|
+
- cloudflare
|
71
|
+
Cf-Ray:
|
72
|
+
- 578b7d8e9faa3856-ATL
|
73
|
+
body:
|
74
|
+
encoding: ASCII-8BIT
|
75
|
+
string: '{"data":{"id":"668494","type":"severity","attributes":{"rating":"high","author_type":"Team","user_id":983615,"created_at":"2020-03-23T22:11:50.360Z"}}}'
|
76
|
+
http_version: null
|
77
|
+
recorded_at: Mon, 23 Mar 2020 22:11:50 GMT
|
78
|
+
recorded_with: VCR 5.1.0
|
@@ -26,6 +26,14 @@ module HackerOne
|
|
26
26
|
duplicate
|
27
27
|
).map(&:to_sym).freeze
|
28
28
|
|
29
|
+
SEVERITY_RATINGS = %w(
|
30
|
+
none
|
31
|
+
low
|
32
|
+
medium
|
33
|
+
high
|
34
|
+
critical
|
35
|
+
).freeze
|
36
|
+
|
29
37
|
class << self
|
30
38
|
def add_on_state_change_hook(proc)
|
31
39
|
on_state_change_hooks << proc
|
@@ -64,6 +72,10 @@ module HackerOne
|
|
64
72
|
attributes[:issue_tracker_reference_id]
|
65
73
|
end
|
66
74
|
|
75
|
+
def severity
|
76
|
+
attributes[:severity]
|
77
|
+
end
|
78
|
+
|
67
79
|
def state
|
68
80
|
attributes[:state]
|
69
81
|
end
|
@@ -161,6 +173,23 @@ module HackerOne
|
|
161
173
|
Swag.new(response_body, program)
|
162
174
|
end
|
163
175
|
|
176
|
+
def update_severity(rating:)
|
177
|
+
raise ArgumentError, "Invalid severity rating" unless SEVERITY_RATINGS.include?(rating)
|
178
|
+
|
179
|
+
request_body = {
|
180
|
+
type: "severity",
|
181
|
+
attributes: {
|
182
|
+
rating: rating
|
183
|
+
}
|
184
|
+
}
|
185
|
+
response_body = make_post_request(
|
186
|
+
"reports/#{id}/severities",
|
187
|
+
request_body: request_body
|
188
|
+
)
|
189
|
+
@report[:attributes][:severity] = { rating: rating }
|
190
|
+
Activities.build(response_body)
|
191
|
+
end
|
192
|
+
|
164
193
|
def suggest_bounty(message:, amount:, bonus_amount: nil)
|
165
194
|
request_body = {
|
166
195
|
message: message,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hackerone-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neil Matatall
|
@@ -159,6 +159,7 @@ files:
|
|
159
159
|
- fixtures/vcr_cassettes/traverse_through_all_activities.yml
|
160
160
|
- fixtures/vcr_cassettes/triage_and_hook_assign_report_to_user.yml
|
161
161
|
- fixtures/vcr_cassettes/update_policy.yml
|
162
|
+
- fixtures/vcr_cassettes/update_severity.yml
|
162
163
|
- fixtures/vcr_cassettes/user_find_fransrosen.yml
|
163
164
|
- hackerone-client.gemspec
|
164
165
|
- lib/hackerone/client.rb
|