hackerone-client 0.10.0 → 0.11.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
2
  SHA1:
3
- metadata.gz: 2b91319e3ef79be0342824f987e798e449db5fdf
4
- data.tar.gz: 2fd154ea2ebe5e91e44037339a57364c94e70ea1
3
+ metadata.gz: f9928eb29e4a1aee4c4d5a9882ee59775e2d6878
4
+ data.tar.gz: 4e6e6a2802e32269e6d8acbccd286af789014896
5
5
  SHA512:
6
- metadata.gz: a39f851dc4e54f092ef860166624adeaece7f56d2a8e8902d7d05c91194bf5a35c89dcd145e6134bf34f8d9aaea51bd42514482bdd50062ccf4793a514f93bd5
7
- data.tar.gz: 8a7afdf9d0b4b4dcc242647014ae0ddad0b7055011b9e8bcd686a11db9457cecbe8df8644c8a198489782e801dd269645472a2e5493a11c3609c3795e1f59bd3
6
+ metadata.gz: 30c69069ce41da3b78e17929f40a519b8d7cac7a0730b15b689800e33923662cc8f53abd828fa0278a90bfad4fc1acf632da6af6913ffdfdca8aba19eb8b2d55
7
+ data.tar.gz: b2273319805d488198fed32eae15baa5370f1520594cc22b5b05f39712a4140830dd4091581bc0e8c16a500314a9714f6616c73cfb5fbb5d3fea623bdb93aa98
@@ -1,3 +1,7 @@
1
+ ## [0.11.0] - 2017-11-03
2
+
3
+ - [Add state change hooks](https://github.com/oreoshake/hackerone-client/issues/25) (@esjee)
4
+
1
5
  ## [0.10.0] - 2017-11-03
2
6
 
3
7
  Oh no! I hate versions where one number is >= 10! We should figure out what's missing for a solid 1.0 release.
data/README.md CHANGED
@@ -47,6 +47,18 @@ program = HackerOne::Client::Program.find("insert-program-name-here")
47
47
  program.common_responses
48
48
  ```
49
49
 
50
+ ## State change hooks
51
+
52
+ You can add hooks that will be called for every state change. This can be useful e.g. for ensuring that reports always get assigned or calling out to external services for specific state changes.
53
+
54
+ ```ruby
55
+ # Initialization
56
+
57
+ HackerOne::Client::Report.add_state_change_hook ->(report, old_state, new_state) do
58
+ # ...
59
+ end
60
+ ```
61
+
50
62
  ## Usage
51
63
 
52
64
  ### Credential management
@@ -0,0 +1,381 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.hackerone.com/v1/reports/200/issue_tracker_reference_id
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"data":{"type":"issue-tracker-reference-id","attributes":{"reference":"fooooo"}}}'
9
+ headers:
10
+ Authorization:
11
+ - Basic Zm9vOmJhcg==
12
+ User-Agent:
13
+ - Faraday v0.13.1
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
+ - Thu, 16 Mar 2017 20:21:44 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=d4b57ca8890f7f0e1428003db73c2a8f41489695704; expires=Fri, 16-Mar-18
35
+ 20:21:44 GMT; path=/; Domain=api.hackerone.com; HttpOnly
36
+ X-Request-Id:
37
+ - 2c20eb84-1d41-48c2-a64a-6fffd601dce9
38
+ Etag:
39
+ - W/"e6e4cf756fbd434e3375eec1c1256611"
40
+ Cache-Control:
41
+ - max-age=0, private, must-revalidate
42
+ Strict-Transport-Security:
43
+ - max-age=31536000; includeSubDomains; preload
44
+ Content-Security-Policy:
45
+ - default-src 'none'; connect-src 'self' www.google-analytics.com errors.hackerone.net;
46
+ font-src 'self'; img-src 'self' data:; script-src 'self'; style-src 'self'
47
+ 'unsafe-inline'; form-action 'self'; frame-ancestors 'none'; report-uri https://errors.hackerone.net/api/30/csp-report/?sentry_key=61c1e2f50d21487c97a071737701f598
48
+ X-Content-Type-Options:
49
+ - nosniff
50
+ X-Download-Options:
51
+ - noopen
52
+ X-Frame-Options:
53
+ - DENY
54
+ X-Permitted-Cross-Domain-Policies:
55
+ - none
56
+ X-Xss-Protection:
57
+ - 1; mode=block
58
+ Public-Key-Pins-Report-Only:
59
+ - pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E=";
60
+ pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0=";
61
+ pin-sha256="cGuxAXyFXFkWm61cF4HPWX8S0srS9j0aSqN0k4AP+4A="; pin-sha256="bIlWcjiKq1mftH/xd7Hw1JO77Cr+Gv+XYcGUQWwO+A4=";
62
+ pin-sha256="tXD+dGAP8rGY4PW1be90cOYEwg7pZ4G+yPZmIZWPTSg="; max-age=600; includeSubDomains;
63
+ report-uri="https://hackerone.report-uri.io/r/default/hpkp/reportOnly"
64
+ Server:
65
+ - cloudflare-nginx
66
+ Cf-Ray:
67
+ - 340a6ba9fa5653a8-LAX
68
+ body:
69
+ encoding: ASCII-8BIT
70
+ string: '{"relationships":{"report":{"data":{"id":"200","type":"report","attributes":{"title":"ssss","state":"triaged","created_at":"2016-04-18T22:24:50.065Z","vulnerability_information":"sssss","triaged_at":"2017-03-16T19:53:49.939Z","closed_at":null,"last_reporter_activity_at":"2016-04-18T22:24:50.118Z","first_program_activity_at":"2017-03-16T18:36:40.650Z","last_program_activity_at":"2017-03-16T19:53:49.939Z","bounty_awarded_at":null,"swag_awarded_at":null,"disclosed_at":null,"last_activity_at":"2017-03-16T19:53:49.939Z","issue_tracker_reference_id":"fooooo"},"relationships":{"reporter":{"data":{"id":"57690","type":"user","attributes":{"username":"ndm-github","name":"Neil
71
+ Matatall","disabled":false,"created_at":"2016-02-24T01:33:01.258Z","profile_picture":{"62x62":"https://profile-photos.hackerone-user-content.com/production/000/057/690/1e0c9ef6fc8bcc17806ae82e6f73cdd4d0e74eb9_small.jpg?1469554487","82x82":"https://profile-photos.hackerone-user-content.com/production/000/057/690/f6a17c40a6c910ba801014d1498b55727ea858e3_medium.jpg?1469554487","110x110":"https://profile-photos.hackerone-user-content.com/production/000/057/690/2259dde15230756d99f68a9ca824af11081ab965_large.jpg?1469554487","260x260":"https://profile-photos.hackerone-user-content.com/production/000/057/690/6d2da33805fef8b8ac4cf513e1562699e79365e0_xtralarge.jpg?1469554487"}}}},"program":{"data":{"id":"11767","type":"program","attributes":{"handle":"github","created_at":"2016-04-15T17:10:31.261Z","updated_at":"2016-09-20T14:54:15.448Z"}}},"swag":{"data":[]},"attachments":{"data":[]},"vulnerability_types":{"data":[{"id":"107921","type":"vulnerability-type","attributes":{"name":"Cross-Site
72
+ Scripting (XSS)","description":"Failure of a site to validate, filter, or
73
+ encode user input before returning it to another user''s web client.\n","created_at":"2016-04-15T17:10:39.169Z"}}]},"activities":{"data":[{"type":"activity-reference-id-added","id":"1546419","attributes":{"message":"","created_at":"2017-03-16T20:21:44.883Z","updated_at":"2017-03-16T20:21:44.883Z","internal":true,"reference":"fooooo","reference_url":null},"relationships":{"actor":{"data":{"type":"user","id":"151303","attributes":{"username":"testingagain","name":null,"disabled":false,"created_at":"2017-03-16T00:35:19.472Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"type":"activity-bug-triaged","id":"1546376","attributes":{"message":"This
74
+ is has been triaged internally.","created_at":"2017-03-16T19:53:49.939Z","updated_at":"2017-03-16T19:53:49.939Z","internal":false},"relationships":{"actor":{"data":{"type":"user","id":"151303","attributes":{"username":"testingagain","name":null,"disabled":false,"created_at":"2017-03-16T00:35:19.472Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"type":"activity-reference-id-added","id":"1546123","attributes":{"message":"","created_at":"2017-03-16T18:36:49.045Z","updated_at":"2017-03-16T18:36:49.045Z","internal":true,"reference":"3476","reference_url":null},"relationships":{"actor":{"data":{"type":"user","id":"151303","attributes":{"username":"testingagain","name":null,"disabled":false,"created_at":"2017-03-16T00:35:19.472Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"type":"activity-bug-needs-more-info","id":"1546120","attributes":{"message":"This
75
+ is has been triaged internally.","created_at":"2017-03-16T18:36:40.650Z","updated_at":"2017-03-16T18:36:40.650Z","internal":false},"relationships":{"actor":{"data":{"type":"user","id":"151303","attributes":{"username":"testingagain","name":null,"disabled":false,"created_at":"2017-03-16T00:35:19.472Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}}]},"bounties":{"data":[]},"summaries":{"data":[]}}}}}}'
76
+ http_version:
77
+ recorded_at: Sat, 28 Oct 2017 18:29:20 GMT
78
+ - request:
79
+ method: post
80
+ uri: https://api.hackerone.com/v1/reports/200/state_changes
81
+ body:
82
+ encoding: UTF-8
83
+ string: '{"data":{"type":"state-change","attributes":{"message":"This is has
84
+ been triaged internally.","state":"triaged"}}}'
85
+ headers:
86
+ Authorization:
87
+ - Basic nope
88
+ User-Agent:
89
+ - Faraday v0.11.0
90
+ Content-Type:
91
+ - application/json
92
+ Accept-Encoding:
93
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
94
+ Accept:
95
+ - "*/*"
96
+ response:
97
+ status:
98
+ code: 201
99
+ message: Created
100
+ headers:
101
+ Date:
102
+ - Thu, 16 Mar 2017 19:53:50 GMT
103
+ Content-Type:
104
+ - application/json; charset=utf-8
105
+ Transfer-Encoding:
106
+ - chunked
107
+ Connection:
108
+ - keep-alive
109
+ Set-Cookie:
110
+ - __cfduid=d6abf05e4448cfd8e6f406e1fb105f1911489694029; expires=Fri, 16-Mar-18
111
+ 19:53:49 GMT; path=/; Domain=api.hackerone.com; HttpOnly
112
+ X-Request-Id:
113
+ - cd191af9-7666-4ed1-8a52-8a1305e29f5e
114
+ Etag:
115
+ - W/"ec64e6720b3ad3ce4838299e5a951f99"
116
+ Cache-Control:
117
+ - max-age=0, private, must-revalidate
118
+ Strict-Transport-Security:
119
+ - max-age=31536000; includeSubDomains; preload
120
+ Content-Security-Policy:
121
+ - default-src 'none'; connect-src 'self' www.google-analytics.com errors.hackerone.net;
122
+ font-src 'self'; img-src 'self' data:; script-src 'self'; style-src 'self'
123
+ 'unsafe-inline'; form-action 'self'; frame-ancestors 'none'; report-uri https://errors.hackerone.net/api/30/csp-report/?sentry_key=61c1e2f50d21487c97a071737701f598
124
+ X-Content-Type-Options:
125
+ - nosniff
126
+ X-Download-Options:
127
+ - noopen
128
+ X-Frame-Options:
129
+ - DENY
130
+ X-Permitted-Cross-Domain-Policies:
131
+ - none
132
+ X-Xss-Protection:
133
+ - 1; mode=block
134
+ Public-Key-Pins-Report-Only:
135
+ - pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E=";
136
+ pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0=";
137
+ pin-sha256="cGuxAXyFXFkWm61cF4HPWX8S0srS9j0aSqN0k4AP+4A="; pin-sha256="bIlWcjiKq1mftH/xd7Hw1JO77Cr+Gv+XYcGUQWwO+A4=";
138
+ pin-sha256="tXD+dGAP8rGY4PW1be90cOYEwg7pZ4G+yPZmIZWPTSg="; max-age=600; includeSubDomains;
139
+ report-uri="https://hackerone.report-uri.io/r/default/hpkp/reportOnly"
140
+ Server:
141
+ - cloudflare-nginx
142
+ Cf-Ray:
143
+ - 340a42c58e9553de-LAX
144
+ body:
145
+ encoding: UTF-8
146
+ string: '{"data":{"id":"200","type":"report","attributes":{"title":"ssss","state":"triaged","created_at":"2016-04-18T22:24:50.065Z","vulnerability_information":"sssss","triaged_at":"2017-03-16T19:53:49.939Z","closed_at":null,"last_reporter_activity_at":"2016-04-18T22:24:50.118Z","first_program_activity_at":"2017-03-16T18:36:40.650Z","last_program_activity_at":"2017-03-16T19:53:49.939Z","bounty_awarded_at":null,"swag_awarded_at":null,"disclosed_at":null,"last_activity_at":"2017-03-16T19:53:49.939Z","issue_tracker_reference_id":"3476"},"relationships":{"reporter":{"data":{"id":"57690","type":"user","attributes":{"username":"ndm-github","name":"Neil
147
+ Matatall","disabled":false,"created_at":"2016-02-24T01:33:01.258Z","profile_picture":{"62x62":"https://profile-photos.hackerone-user-content.com/production/000/057/690/1e0c9ef6fc8bcc17806ae82e6f73cdd4d0e74eb9_small.jpg?1469554487","82x82":"https://profile-photos.hackerone-user-content.com/production/000/057/690/f6a17c40a6c910ba801014d1498b55727ea858e3_medium.jpg?1469554487","110x110":"https://profile-photos.hackerone-user-content.com/production/000/057/690/2259dde15230756d99f68a9ca824af11081ab965_large.jpg?1469554487","260x260":"https://profile-photos.hackerone-user-content.com/production/000/057/690/6d2da33805fef8b8ac4cf513e1562699e79365e0_xtralarge.jpg?1469554487"}}}},"program":{"data":{"id":"11767","type":"program","attributes":{"handle":"github","created_at":"2016-04-15T17:10:31.261Z","updated_at":"2016-09-20T14:54:15.448Z"}}},"swag":{"data":[]},"attachments":{"data":[]},"vulnerability_types":{"data":[{"id":"107921","type":"vulnerability-type","attributes":{"name":"Cross-Site
148
+ Scripting (XSS)","description":"Failure of a site to validate, filter, or
149
+ encode user input before returning it to another user''s web client.\n","created_at":"2016-04-15T17:10:39.169Z"}}]},"activities":{"data":[{"type":"activity-bug-triaged","id":"1546376","attributes":{"message":"This
150
+ is has been triaged internally.","created_at":"2017-03-16T19:53:49.939Z","updated_at":"2017-03-16T19:53:49.939Z","internal":false},"relationships":{"actor":{"data":{"type":"user","id":"151303","attributes":{"username":"testingagain","name":null,"disabled":false,"created_at":"2017-03-16T00:35:19.472Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"type":"activity-reference-id-added","id":"1546123","attributes":{"message":"","created_at":"2017-03-16T18:36:49.045Z","updated_at":"2017-03-16T18:36:49.045Z","internal":true,"reference":"3476","reference_url":null},"relationships":{"actor":{"data":{"type":"user","id":"151303","attributes":{"username":"testingagain","name":null,"disabled":false,"created_at":"2017-03-16T00:35:19.472Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"type":"activity-bug-needs-more-info","id":"1546120","attributes":{"message":"This
151
+ is has been triaged internally.","created_at":"2017-03-16T18:36:40.650Z","updated_at":"2017-03-16T18:36:40.650Z","internal":false},"relationships":{"actor":{"data":{"type":"user","id":"151303","attributes":{"username":"testingagain","name":null,"disabled":false,"created_at":"2017-03-16T00:35:19.472Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}}]},"bounties":{"data":[]},"summaries":{"data":[]}}}}'
152
+ http_version:
153
+ recorded_at: Thu, 16 Mar 2017 19:53:50 GMT
154
+ - request:
155
+ method: get
156
+ uri: https://api.hackerone.com/v1/me/programs
157
+ body:
158
+ encoding: US-ASCII
159
+ string: ''
160
+ headers:
161
+ Authorization:
162
+ - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
163
+ User-Agent:
164
+ - Faraday v0.12.1
165
+ Accept-Encoding:
166
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
167
+ Accept:
168
+ - "*/*"
169
+ response:
170
+ status:
171
+ code: 200
172
+ message: OK
173
+ headers:
174
+ Date:
175
+ - Tue, 23 May 2017 20:38:17 GMT
176
+ Content-Type:
177
+ - application/json; charset=utf-8
178
+ Transfer-Encoding:
179
+ - chunked
180
+ Connection:
181
+ - keep-alive
182
+ Set-Cookie:
183
+ - __cfduid=d2b8b7e384a9c4dc463282bbbd01976b01495571896; expires=Wed, 23-May-18
184
+ 20:38:16 GMT; path=/; Domain=api.hackerone.com; HttpOnly
185
+ X-Request-Id:
186
+ - 03a1f5d2-97e5-4ab7-91fd-8c95cf3b68c7
187
+ Etag:
188
+ - W/"9329ef6b8f370e76d96d71977a6480c4"
189
+ Cache-Control:
190
+ - max-age=0, private, must-revalidate
191
+ Strict-Transport-Security:
192
+ - max-age=31536000; includeSubDomains; preload
193
+ Content-Security-Policy:
194
+ - 'default-src ''none''; base-uri ''self''; block-all-mixed-content; child-src
195
+ www.youtube-nocookie.com; connect-src ''self'' www.google-analytics.com errors.hackerone.net;
196
+ font-src ''self''; form-action ''self''; frame-ancestors ''none''; img-src
197
+ ''self'' data: cover-photos.hackerone-user-content.com profile-photos.hackerone-user-content.com
198
+ hackerone-attachments.s3.amazonaws.com; media-src ''self'' hackerone-attachments.s3.amazonaws.com;
199
+ script-src ''self'' www.google-analytics.com; style-src ''self'' ''unsafe-inline'';
200
+ report-uri https://errors.hackerone.net/api/30/csp-report/?sentry_key=61c1e2f50d21487c97a071737701f598'
201
+ X-Content-Type-Options:
202
+ - nosniff
203
+ X-Download-Options:
204
+ - noopen
205
+ X-Frame-Options:
206
+ - DENY
207
+ X-Permitted-Cross-Domain-Policies:
208
+ - none
209
+ X-Xss-Protection:
210
+ - 1; mode=block
211
+ Public-Key-Pins-Report-Only:
212
+ - pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E=";
213
+ pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0=";
214
+ pin-sha256="cGuxAXyFXFkWm61cF4HPWX8S0srS9j0aSqN0k4AP+4A="; pin-sha256="bIlWcjiKq1mftH/xd7Hw1JO77Cr+Gv+XYcGUQWwO+A4=";
215
+ pin-sha256="tXD+dGAP8rGY4PW1be90cOYEwg7pZ4G+yPZmIZWPTSg="; max-age=600; includeSubDomains;
216
+ report-uri="https://hackerone.report-uri.io/r/default/hpkp/reportOnly"
217
+ Server:
218
+ - cloudflare-nginx
219
+ Cf-Ray:
220
+ - 363ad1606996147f-AMS
221
+ body:
222
+ encoding: ASCII-8BIT
223
+ string: '{"data":[{"id":"18969","type":"program","attributes":{"handle":"github","created_at":"2017-03-08T19:22:41.884Z","updated_at":"2017-04-09T08:15:15.228Z"}}],"links":{}}'
224
+ http_version:
225
+ recorded_at: Tue, 23 May 2017 20:37:37 GMT
226
+ - request:
227
+ method: get
228
+ uri: https://api.hackerone.com/v1/programs/18969
229
+ body:
230
+ encoding: US-ASCII
231
+ string: ''
232
+ headers:
233
+ Authorization:
234
+ - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
235
+ User-Agent:
236
+ - Faraday v0.12.1
237
+ Accept-Encoding:
238
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
239
+ Accept:
240
+ - "*/*"
241
+ response:
242
+ status:
243
+ code: 200
244
+ message: OK
245
+ headers:
246
+ Date:
247
+ - Tue, 23 May 2017 20:38:18 GMT
248
+ Content-Type:
249
+ - application/json; charset=utf-8
250
+ Transfer-Encoding:
251
+ - chunked
252
+ Connection:
253
+ - keep-alive
254
+ Set-Cookie:
255
+ - __cfduid=dbf0ffc90aeef418237806a1a6410d2991495571897; expires=Wed, 23-May-18
256
+ 20:38:17 GMT; path=/; Domain=api.hackerone.com; HttpOnly
257
+ X-Request-Id:
258
+ - aabc9064-72af-4a6e-b453-7677a505ff30
259
+ Etag:
260
+ - W/"8d1031d8f8171c3865ad8115a3236cc4"
261
+ Cache-Control:
262
+ - max-age=0, private, must-revalidate
263
+ Strict-Transport-Security:
264
+ - max-age=31536000; includeSubDomains; preload
265
+ Content-Security-Policy:
266
+ - 'default-src ''none''; base-uri ''self''; block-all-mixed-content; child-src
267
+ www.youtube-nocookie.com; connect-src ''self'' www.google-analytics.com errors.hackerone.net;
268
+ font-src ''self''; form-action ''self''; frame-ancestors ''none''; img-src
269
+ ''self'' data: cover-photos.hackerone-user-content.com profile-photos.hackerone-user-content.com
270
+ hackerone-attachments.s3.amazonaws.com; media-src ''self'' hackerone-attachments.s3.amazonaws.com;
271
+ script-src ''self'' www.google-analytics.com; style-src ''self'' ''unsafe-inline'';
272
+ report-uri https://errors.hackerone.net/api/30/csp-report/?sentry_key=61c1e2f50d21487c97a071737701f598'
273
+ X-Content-Type-Options:
274
+ - nosniff
275
+ X-Download-Options:
276
+ - noopen
277
+ X-Frame-Options:
278
+ - DENY
279
+ X-Permitted-Cross-Domain-Policies:
280
+ - none
281
+ X-Xss-Protection:
282
+ - 1; mode=block
283
+ Public-Key-Pins-Report-Only:
284
+ - pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E=";
285
+ pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0=";
286
+ pin-sha256="cGuxAXyFXFkWm61cF4HPWX8S0srS9j0aSqN0k4AP+4A="; pin-sha256="bIlWcjiKq1mftH/xd7Hw1JO77Cr+Gv+XYcGUQWwO+A4=";
287
+ pin-sha256="tXD+dGAP8rGY4PW1be90cOYEwg7pZ4G+yPZmIZWPTSg="; max-age=600; includeSubDomains;
288
+ report-uri="https://hackerone.report-uri.io/r/default/hpkp/reportOnly"
289
+ Server:
290
+ - cloudflare-nginx
291
+ Cf-Ray:
292
+ - 363ad1664d9972e9-AMS
293
+ body:
294
+ encoding: ASCII-8BIT
295
+ string: '{"data":{"id":"18969","type":"program","attributes":{"handle":"github","created_at":"2017-03-08T19:22:41.884Z","updated_at":"2017-04-09T08:15:15.228Z"},"relationships":{"groups":{"data":[{"id":"23579","type":"group","attributes":{"name":"Standard","created_at":"2017-03-08T19:22:43.259Z","permissions":["report_management","reward_management"]}},{"id":"23578","type":"group","attributes":{"name":"Admin","created_at":"2017-03-08T19:22:43.243Z","permissions":["user_management","program_management"]}}]},"members":{"data":[{"id":"39241","type":"member","attributes":{"created_at":"2017-05-23T20:19:30.830Z","permissions":["program_management","report_management","reward_management","user_management"]},"relationships":{"user":{"data":{"id":"170310","type":"user","attributes":{"username":"esjee","name":null,"disabled":false,"created_at":"2017-05-23T20:19:30.805Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"id":"32557","type":"member","attributes":{"created_at":"2017-03-08T19:22:44.421Z","permissions":["program_management","report_management","reward_management","user_management"]},"relationships":{"user":{"data":{"id":"147515","type":"user","attributes":{"username":"esjee","name":"esjee","disabled":false,"created_at":"2017-03-04T16:31:33.595Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"id":"32556","type":"member","attributes":{"created_at":"2017-03-08T19:22:43.226Z","permissions":["program_management","report_management","reward_management","user_management"]},"relationships":{"user":{"data":{"id":"4954","type":"user","attributes":{"username":"demo-member","name":"Demo
296
+ Member","disabled":false,"created_at":"2014-04-14T11:45:00.949Z","profile_picture":{"62x62":"https://profile-photos.hackerone-user-content.com/production/000/004/954/76e628d12eaacde79878b890df02c065f740b1a4_small.png?1423472456","82x82":"https://profile-photos.hackerone-user-content.com/production/000/004/954/75e4cf2599f591e618646429db57d986e496ccee_medium.png?1423472456","110x110":"https://profile-photos.hackerone-user-content.com/production/000/004/954/25f5c8af70323cacb2c2ffa17d68cac2500dc410_large.png?1423472456","260x260":"https://profile-photos.hackerone-user-content.com/production/000/004/954/d903c042cdc7798ad76684563624ee7ea071aed8_xtralarge.png?1423472456"}}}}}}]}}}}'
297
+ http_version:
298
+ recorded_at: Tue, 23 May 2017 20:37:38 GMT
299
+ - request:
300
+ method: put
301
+ uri: https://api.hackerone.com/v1/reports/200/assignee
302
+ body:
303
+ encoding: UTF-8
304
+ string: '{"data":{"type":"user","id":"147515"}}'
305
+ headers:
306
+ Authorization:
307
+ - Basic c2pvcnM6cjNENlR0TDQrMDBMci9jTmxuaTF6cXFRVDZkbGx2c3F0RHVtTVlKZzNybz0=
308
+ User-Agent:
309
+ - Faraday v0.12.1
310
+ Content-Type:
311
+ - application/json
312
+ Accept-Encoding:
313
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
314
+ Accept:
315
+ - "*/*"
316
+ response:
317
+ status:
318
+ code: 200
319
+ message: OK
320
+ headers:
321
+ Date:
322
+ - Tue, 23 May 2017 20:38:19 GMT
323
+ Content-Type:
324
+ - application/json; charset=utf-8
325
+ Transfer-Encoding:
326
+ - chunked
327
+ Connection:
328
+ - keep-alive
329
+ Set-Cookie:
330
+ - __cfduid=dfd38950adaa825d473e6b4c2688620a91495571898; expires=Wed, 23-May-18
331
+ 20:38:18 GMT; path=/; Domain=api.hackerone.com; HttpOnly
332
+ X-Request-Id:
333
+ - 4664122f-23c3-4a0a-80e2-beb4ed9faa4f
334
+ Etag:
335
+ - W/"88c50921e82a8ac815e43ef219a80116"
336
+ Cache-Control:
337
+ - max-age=0, private, must-revalidate
338
+ Strict-Transport-Security:
339
+ - max-age=31536000; includeSubDomains; preload
340
+ Content-Security-Policy:
341
+ - 'default-src ''none''; base-uri ''self''; block-all-mixed-content; child-src
342
+ www.youtube-nocookie.com; connect-src ''self'' www.google-analytics.com errors.hackerone.net;
343
+ font-src ''self''; form-action ''self''; frame-ancestors ''none''; img-src
344
+ ''self'' data: cover-photos.hackerone-user-content.com profile-photos.hackerone-user-content.com
345
+ hackerone-attachments.s3.amazonaws.com; media-src ''self'' hackerone-attachments.s3.amazonaws.com;
346
+ script-src ''self'' www.google-analytics.com; style-src ''self'' ''unsafe-inline'';
347
+ report-uri https://errors.hackerone.net/api/30/csp-report/?sentry_key=61c1e2f50d21487c97a071737701f598'
348
+ X-Content-Type-Options:
349
+ - nosniff
350
+ X-Download-Options:
351
+ - noopen
352
+ X-Frame-Options:
353
+ - DENY
354
+ X-Permitted-Cross-Domain-Policies:
355
+ - none
356
+ X-Xss-Protection:
357
+ - 1; mode=block
358
+ Public-Key-Pins-Report-Only:
359
+ - pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E=";
360
+ pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0=";
361
+ pin-sha256="cGuxAXyFXFkWm61cF4HPWX8S0srS9j0aSqN0k4AP+4A="; pin-sha256="bIlWcjiKq1mftH/xd7Hw1JO77Cr+Gv+XYcGUQWwO+A4=";
362
+ pin-sha256="tXD+dGAP8rGY4PW1be90cOYEwg7pZ4G+yPZmIZWPTSg="; max-age=600; includeSubDomains;
363
+ report-uri="https://hackerone.report-uri.io/r/default/hpkp/reportOnly"
364
+ Server:
365
+ - cloudflare-nginx
366
+ Cf-Ray:
367
+ - 363ad16baa6e0c1d-AMS
368
+ body:
369
+ encoding: ASCII-8BIT
370
+ string: '{"data":{"id":"200","type":"report","attributes":{"title":"Serious
371
+ stuff","state":"triaged","created_at":"2017-03-16T19:44:16.334Z","vulnerability_information":"plz
372
+ fix","triaged_at":null,"closed_at":null,"last_reporter_activity_at":"2017-03-16T19:44:30.927Z","first_program_activity_at":"2017-03-16T19:44:16.385Z","last_program_activity_at":"2017-03-16T19:44:30.927Z","bounty_awarded_at":null,"swag_awarded_at":null,"disclosed_at":null,"last_public_activity_at":"2017-03-16T19:44:30.927Z","last_activity_at":"2017-05-23T20:38:18.851Z"},"relationships":{"reporter":{"data":{"id":"147515","type":"user","attributes":{"username":"esjee","name":"esjee","disabled":false,"created_at":"2017-03-04T16:31:33.595Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}},"assignee":{"data":{"type":"user","id":"147515","attributes":{"username":"esjee","name":"esjee","disabled":false,"created_at":"2017-03-04T16:31:33.595Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}},"program":{"data":{"id":"18969","type":"program","attributes":{"handle":"github","created_at":"2017-03-08T19:22:41.884Z","updated_at":"2017-04-09T08:15:15.228Z"}}},"severity":{"data":{"id":"31671","type":"severity","attributes":{"rating":"high","author_type":"User","user_id":147515,"created_at":"2017-03-16T19:44:16.371Z"}}},"swag":{"data":[]},"attachments":{"data":[]},"vulnerability_types":{"data":[{"id":"249255","type":"vulnerability-type","attributes":{"name":"Cross-Site
373
+ Scripting (XSS)","description":"Failure of a site to validate, filter, or
374
+ encode user input before returning it to another user''s web client.\n","created_at":"2017-03-08T19:22:43.582Z"}}]},"weakness":{"data":{"id":"60","type":"weakness","attributes":{"name":"Cross-site
375
+ Scripting (XSS) - Generic","description":"The software does not neutralize
376
+ or incorrectly neutralizes user-controllable input before it is placed in
377
+ output that is used as a web page that is served to other users.","created_at":"2017-01-05T01:51:19.000Z"}}},"activities":{"data":[{"type":"activity-user-assigned-to-bug","id":"1696130","attributes":{"message":null,"created_at":"2017-05-23T20:38:18.851Z","updated_at":"2017-05-23T20:38:18.851Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"170310","attributes":{"username":"esjee","name":null,"disabled":false,"created_at":"2017-05-23T20:19:30.805Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}},"assigned_user":{"data":{"id":"147515","type":"user","attributes":{"username":"esjee","name":"esjee","disabled":false,"created_at":"2017-03-04T16:31:33.595Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"type":"activity-nobody-assigned-to-bug","id":"1696106","attributes":{"message":null,"created_at":"2017-05-23T20:32:57.765Z","updated_at":"2017-05-23T20:32:57.765Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"170310","attributes":{"username":"esjee","name":null,"disabled":false,"created_at":"2017-05-23T20:19:30.805Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"type":"activity-group-assigned-to-bug","id":"1696105","attributes":{"message":null,"created_at":"2017-05-23T20:32:55.460Z","updated_at":"2017-05-23T20:32:55.460Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"170310","attributes":{"username":"esjee","name":null,"disabled":false,"created_at":"2017-05-23T20:19:30.805Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}},"group":{"data":{"id":"23578","type":"group","attributes":{"name":"Admin","created_at":"2017-03-08T19:22:43.243Z","permissions":["user_management","program_management"]}}}}},{"type":"activity-user-assigned-to-bug","id":"1696104","attributes":{"message":null,"created_at":"2017-05-23T20:32:54.570Z","updated_at":"2017-05-23T20:32:54.570Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"170310","attributes":{"username":"esjee","name":null,"disabled":false,"created_at":"2017-05-23T20:19:30.805Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}},"assigned_user":{"data":{"id":"147515","type":"user","attributes":{"username":"esjee","name":"esjee","disabled":false,"created_at":"2017-03-04T16:31:33.595Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"type":"activity-nobody-assigned-to-bug","id":"1696093","attributes":{"message":null,"created_at":"2017-05-23T20:31:17.683Z","updated_at":"2017-05-23T20:31:17.683Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"170310","attributes":{"username":"esjee","name":null,"disabled":false,"created_at":"2017-05-23T20:19:30.805Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"type":"activity-nobody-assigned-to-bug","id":"1696068","attributes":{"message":null,"created_at":"2017-05-23T20:22:49.781Z","updated_at":"2017-05-23T20:22:49.781Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"170310","attributes":{"username":"esjee","name":null,"disabled":false,"created_at":"2017-05-23T20:19:30.805Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"type":"activity-group-assigned-to-bug","id":"1696061","attributes":{"message":null,"created_at":"2017-05-23T20:21:32.579Z","updated_at":"2017-05-23T20:21:32.579Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"170310","attributes":{"username":"esjee","name":null,"disabled":false,"created_at":"2017-05-23T20:19:30.805Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}},"group":{"data":{"id":"23579","type":"group","attributes":{"name":"Standard","created_at":"2017-03-08T19:22:43.259Z","permissions":["report_management","reward_management"]}}}}},{"type":"activity-user-assigned-to-bug","id":"1696058","attributes":{"message":null,"created_at":"2017-05-23T20:21:22.192Z","updated_at":"2017-05-23T20:21:22.192Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"170310","attributes":{"username":"esjee","name":null,"disabled":false,"created_at":"2017-05-23T20:19:30.805Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}},"assigned_user":{"data":{"id":"147515","type":"user","attributes":{"username":"esjee","name":"esjee","disabled":false,"created_at":"2017-03-04T16:31:33.595Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"type":"activity-nobody-assigned-to-bug","id":"1675616","attributes":{"message":null,"created_at":"2017-05-15T20:25:30.334Z","updated_at":"2017-05-15T20:25:30.334Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"160844","attributes":{"username":"api_o02mvnt8nty324wn0w5al","name":"","disabled":true,"created_at":"2017-04-20T19:25:29.165Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"type":"activity-group-assigned-to-bug","id":"1675604","attributes":{"message":null,"created_at":"2017-05-15T20:21:26.628Z","updated_at":"2017-05-15T20:21:26.628Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"160844","attributes":{"username":"api_o02mvnt8nty324wn0w5al","name":"","disabled":true,"created_at":"2017-04-20T19:25:29.165Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}},"group":{"data":{"id":"23578","type":"group","attributes":{"name":"Admin","created_at":"2017-03-08T19:22:43.243Z","permissions":["user_management","program_management"]}}}}},{"type":"activity-nobody-assigned-to-bug","id":"1675418","attributes":{"message":null,"created_at":"2017-05-15T19:16:39.244Z","updated_at":"2017-05-15T19:16:39.244Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"160844","attributes":{"username":"api_o02mvnt8nty324wn0w5al","name":"","disabled":true,"created_at":"2017-04-20T19:25:29.165Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"type":"activity-nobody-assigned-to-bug","id":"1675409","attributes":{"message":null,"created_at":"2017-05-15T19:14:03.281Z","updated_at":"2017-05-15T19:14:03.281Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"160844","attributes":{"username":"api_o02mvnt8nty324wn0w5al","name":"","disabled":true,"created_at":"2017-04-20T19:25:29.165Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"type":"activity-nobody-assigned-to-bug","id":"1675324","attributes":{"message":null,"created_at":"2017-05-15T18:56:31.322Z","updated_at":"2017-05-15T18:56:31.322Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"160844","attributes":{"username":"api_o02mvnt8nty324wn0w5al","name":"","disabled":true,"created_at":"2017-04-20T19:25:29.165Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}},{"type":"activity-group-assigned-to-bug","id":"1675321","attributes":{"message":null,"created_at":"2017-05-15T18:55:34.311Z","updated_at":"2017-05-15T18:55:34.311Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"160844","attributes":{"username":"api_o02mvnt8nty324wn0w5al","name":"","disabled":true,"created_at":"2017-04-20T19:25:29.165Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}},"group":{"data":{"id":"23578","type":"group","attributes":{"name":"Admin","created_at":"2017-03-08T19:22:43.243Z","permissions":["user_management","program_management"]}}}}},{"type":"activity-group-assigned-to-bug","id":"1675310","attributes":{"message":null,"created_at":"2017-05-15T18:52:38.454Z","updated_at":"2017-05-15T18:52:38.454Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"160844","attributes":{"username":"api_o02mvnt8nty324wn0w5al","name":"","disabled":true,"created_at":"2017-04-20T19:25:29.165Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}},"group":{"data":{"id":"23578","type":"group","attributes":{"name":"Admin","created_at":"2017-03-08T19:22:43.243Z","permissions":["user_management","program_management"]}}}}},{"type":"activity-group-assigned-to-bug","id":"1675302","attributes":{"message":null,"created_at":"2017-05-15T18:51:19.929Z","updated_at":"2017-05-15T18:51:19.929Z","internal":true},"relationships":{"actor":{"data":{"type":"user","id":"160844","attributes":{"username":"api_o02mvnt8nty324wn0w5al","name":"","disabled":true,"created_at":"2017-04-20T19:25:29.165Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}},"group":{"data":{"id":"23578","type":"group","attributes":{"name":"Admin","created_at":"2017-03-08T19:22:43.243Z","permissions":["user_management","program_management"]}}}}},{"type":"activity-comment","id":"1546353","attributes":{"message":"no
378
+ fix?","created_at":"2017-03-16T19:44:30.927Z","updated_at":"2017-03-16T19:44:30.927Z","internal":false},"relationships":{"actor":{"data":{"type":"user","id":"147515","attributes":{"username":"esjee","name":"esjee","disabled":false,"created_at":"2017-03-04T16:31:33.595Z","profile_picture":{"62x62":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","82x82":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","110x110":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png","260x260":"/assets/avatars/default-71a302d706457f3d3a31eb30fa3e73e6cf0b1d677b8fa218eaeaffd67ae97918.png"}}}}}}]},"bounties":{"data":[]},"summaries":{"data":[]}}}}'
379
+ http_version:
380
+ recorded_at: Tue, 23 May 2017 20:37:39 GMT
381
+ recorded_with: VCR 3.0.3
@@ -24,6 +24,20 @@ module HackerOne
24
24
  duplicate
25
25
  ).map(&:to_sym).freeze
26
26
 
27
+ class << self
28
+ def add_on_state_change_hook(proc)
29
+ on_state_change_hooks << proc
30
+ end
31
+
32
+ def clear_on_state_change_hooks
33
+ @on_state_change_hooks = []
34
+ end
35
+
36
+ def on_state_change_hooks
37
+ @on_state_change_hooks ||= []
38
+ end
39
+ end
40
+
27
41
  def initialize(report)
28
42
  @report = report
29
43
  end
@@ -48,6 +62,10 @@ module HackerOne
48
62
  attributes[:issue_tracker_reference_id]
49
63
  end
50
64
 
65
+ def state
66
+ attributes[:state]
67
+ end
68
+
51
69
  def reporter
52
70
  relationships
53
71
  .fetch(:reporter, {})
@@ -55,6 +73,14 @@ module HackerOne
55
73
  .fetch(:attributes, {})
56
74
  end
57
75
 
76
+ def assignee
77
+ if assignee_relationship = relationships[:assignee]
78
+ HackerOne::Client::User.new(assignee_relationship[:data])
79
+ else
80
+ nil
81
+ end
82
+ end
83
+
58
84
  def payment_total
59
85
  payments.reduce(0) { |total, payment| total + payment_amount(payment) }
60
86
  end
@@ -157,6 +183,7 @@ module HackerOne
157
183
  def state_change(state, message = nil, attributes = {})
158
184
  raise ArgumentError, "state (#{state}) must be one of #{STATES}" unless STATES.include?(state)
159
185
 
186
+ old_state = self.state
160
187
  body = {
161
188
  type: "state-change",
162
189
  attributes: {
@@ -176,6 +203,9 @@ module HackerOne
176
203
  end
177
204
  response_json = make_post_request("reports/#{id}/state_changes", request_body: body)
178
205
  @report = response_json
206
+ self.class.on_state_change_hooks.each do |hook|
207
+ hook.call(self, old_state.to_s, state.to_s)
208
+ end
179
209
  self
180
210
  end
181
211
 
@@ -281,6 +311,8 @@ module HackerOne
281
311
  unless response.success?
282
312
  fail("Unable to assign report #{id} to #{assignee_type} with id '#{assignee_id}'. Response status: #{response.status}, body: #{response.body}")
283
313
  end
314
+
315
+ @report = parse_response response
284
316
  end
285
317
  end
286
318
  end
@@ -1,5 +1,5 @@
1
1
  module Hackerone
2
2
  module Client
3
- VERSION = "0.10.0"
3
+ VERSION = "0.11.0"
4
4
  end
5
5
  end
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.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neil Matatall
@@ -151,6 +151,7 @@ files:
151
151
  - fixtures/vcr_cassettes/server_error_when_assigning_report_to_user.yml
152
152
  - fixtures/vcr_cassettes/stage_change.yml
153
153
  - fixtures/vcr_cassettes/suggest_a_bounty.yml
154
+ - fixtures/vcr_cassettes/triage_and_hook_assign_report_to_user.yml
154
155
  - fixtures/vcr_cassettes/user_find_fransrosen.yml
155
156
  - hackerone-client.gemspec
156
157
  - lib/hackerone/client.rb