hackerone-client 0.9.1 → 0.10.0

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
  SHA1:
3
- metadata.gz: 99df14a3f06a97423f8ad23a232d854d25d14fe8
4
- data.tar.gz: 72fea7788fd9f63ed6d5dd8f312eaa879d6d6b58
3
+ metadata.gz: 2b91319e3ef79be0342824f987e798e449db5fdf
4
+ data.tar.gz: 2fd154ea2ebe5e91e44037339a57364c94e70ea1
5
5
  SHA512:
6
- metadata.gz: 3ab82cb959541eef3c4bf6904f42cedbfa8ca95370649d629edb9be63fcdd4a10b7865cab0df4c4c2ee8ca38ffb195b2311eb235d4767456f9f9301c4ae45741
7
- data.tar.gz: 5220a780f3c96f351411b9ac541c78f8ee81bc98529ca9862c553f06305ba15de6723b515f48d13ef563bbdd43ae657675bf770512e64f309ad9347c485c5f6b
6
+ metadata.gz: a39f851dc4e54f092ef860166624adeaece7f56d2a8e8902d7d05c91194bf5a35c89dcd145e6134bf34f8d9aaea51bd42514482bdd50062ccf4793a514f93bd5
7
+ data.tar.gz: 8a7afdf9d0b4b4dcc242647014ae0ddad0b7055011b9e8bcd686a11db9457cecbe8df8644c8a198489782e801dd269645472a2e5493a11c3609c3795e1f59bd3
@@ -1,3 +1,10 @@
1
+ ## [0.10.0] - 2017-11-03
2
+
3
+ Oh no! I hate versions where one number is >= 10! We should figure out what's missing for a solid 1.0 release.
4
+
5
+ - `HackerOne::Client::User.find(user_id)` returns an instance of `User` (@esjee)
6
+ - Add "original report ID" field when marking things as duplicate. This invites the reporter to the original issue.
7
+
1
8
  ## [0.9.1] - 2017-10-24
2
9
 
3
10
  - Misc: loosen version restrictions on activesupport
data/README.md CHANGED
@@ -20,7 +20,8 @@ report.add_comment(message, internal: false) # internal is true by default
20
20
 
21
21
  # POST '/report/{id}/state_change change the state of a report
22
22
  # `state` can be one of new, triaged, needs-more-info, resolved, not-applicable, informative, duplicate, spam
23
- report.state_change(state)
23
+ # when marking as duplicate, you can supply the original report ID
24
+ report.state_change(:duplicate, "Your issue has been marked as X", original_report_id: 12345)
24
25
 
25
26
  # POST '/report/{id}/add_report_reference add a "reference" e.g. internal issue number
26
27
  report.add_report_reference(reference)
@@ -0,0 +1,197 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.hackerone.com/v1/reports/200
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - Basic Nope
12
+ User-Agent:
13
+ - Faraday v0.11.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
+ - Tue, 24 Oct 2017 22:53:40 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=; expires=Wed, 24-Oct-18
35
+ 22:53:39 GMT; path=/; Domain=api.hackerone.com; HttpOnly; Secure
36
+ X-Request-Id:
37
+ - 4db0ef19-2256-4ace-b3c8-06abf32f6f0f
38
+ Etag:
39
+ - W/"48d77e13622d03735f1a72ea94e8838a"
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''; base-uri ''self''; block-all-mixed-content; child-src
46
+ www.youtube-nocookie.com; connect-src ''self'' www.google-analytics.com errors.hackerone.net;
47
+ font-src ''self''; form-action ''self''; frame-ancestors ''none''; img-src
48
+ ''self'' data: cover-photos.hackerone-user-content.com hackathon-photos.hackerone-user-content.com
49
+ profile-photos.hackerone-user-content.com hackerone-attachments.s3.amazonaws.com;
50
+ media-src ''self'' hackerone-attachments.s3.amazonaws.com; script-src ''self''
51
+ www.google-analytics.com; style-src ''self'' ''unsafe-inline''; report-uri
52
+ https://errors.hackerone.net/api/30/csp-report/?sentry_key=61c1e2f50d21487c97a071737701f598'
53
+ Referrer-Policy:
54
+ - strict-origin-when-cross-origin
55
+ X-Content-Type-Options:
56
+ - nosniff
57
+ X-Download-Options:
58
+ - noopen
59
+ X-Frame-Options:
60
+ - DENY
61
+ X-Permitted-Cross-Domain-Policies:
62
+ - none
63
+ X-Xss-Protection:
64
+ - 1; mode=block
65
+ Public-Key-Pins-Report-Only:
66
+ - pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E=";
67
+ pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0=";
68
+ pin-sha256="cGuxAXyFXFkWm61cF4HPWX8S0srS9j0aSqN0k4AP+4A="; pin-sha256="bIlWcjiKq1mftH/xd7Hw1JO77Cr+Gv+XYcGUQWwO+A4=";
69
+ pin-sha256="tXD+dGAP8rGY4PW1be90cOYEwg7pZ4G+yPZmIZWPTSg="; max-age=600; includeSubDomains;
70
+ report-uri="https://hackerone.report-uri.io/r/default/hpkp/reportOnly"
71
+ Server:
72
+ - cloudflare-nginx
73
+ Cf-Ray:
74
+ - 3b3083747ba8793c-LAX
75
+ body:
76
+ encoding: UTF-8
77
+ string: "{\"data\":{\"id\":\"200\",\"type\":\"report\",\"attributes\":{\"title\":\"another
78
+ attempt\",\"state\":\"triaged\",\"created_at\":\"2017-10-10T23:29:35.200Z\",\"vulnerability_information\":\"blehhh\",\"triaged_at\":\"2017-10-10T23:29:49.700Z\",\"closed_at\":null,\"last_reporter_activity_at\":\"2017-10-10T23:29:35.265Z\",\"first_program_activity_at\":\"2017-10-10T23:29:35.265Z\",\"last_program_activity_at\":\"2017-10-10T23:29:49.700Z\",\"bounty_awarded_at\":null,\"swag_awarded_at\":\"2017-10-10T23:30:28.501Z\",\"disclosed_at\":null,\"last_public_activity_at\":\"2017-10-10T23:30:28.501Z\",\"last_activity_at\":\"2017-10-10T23:30:28.501Z\",\"issue_tracker_reference_id\":\"reference\"},\"relationships\":{\"reporter\":{\"data\":{\"id\":\"57690\",\"type\":\"user\",\"attributes\":{\"username\":\"ndm-github\",\"name\":\"Neil
79
+ 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\"}}}},\"assignee\":{\"data\":{\"type\":\"user\",\"id\":\"57690\",\"attributes\":{\"username\":\"ndm-github\",\"name\":\"Neil
80
+ 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\":\"2017-10-03T12:58:34.637Z\"}}},\"swag\":{\"data\":[{\"id\":\"2158\",\"type\":\"swag\",\"attributes\":{\"sent\":false,\"created_at\":\"2017-10-10T23:30:28.494Z\"},\"relationships\":{\"address\":{\"data\":{\"id\":\"235\",\"type\":\"address\",\"attributes\":{\"name\":\"neil
81
+ matatall\",\"street\":\"\",\"city\":\"Kailua
82
+ Kona\",\"postal_code\":\"96740\",\"state\":\"HI\",\"country\":\"USA\",\"created_at\":\"2016-04-15T02:34:17.252Z\",\"tshirt_size\":\"XLarge\",\"phone_number\":\"8082091148\"}}}}},{\"id\":\"2157\",\"type\":\"swag\",\"attributes\":{\"sent\":false,\"created_at\":\"2017-10-10T23:30:07.259Z\"},\"relationships\":{\"address\":{\"data\":{\"id\":\"235\",\"type\":\"address\",\"attributes\":{\"name\":\"neil
83
+ matatall\",\"street\":\"\",\"city\":\"Kailua
84
+ Kona\",\"postal_code\":\"96740\",\"state\":\"HI\",\"country\":\"USA\",\"created_at\":\"2016-04-15T02:34:17.252Z\",\"tshirt_size\":\"XLarge\",\"phone_number\":\"8082091148\"}}}}}]},\"attachments\":{\"data\":[]},\"activities\":{\"data\":[{\"type\":\"activity-swag-awarded\",\"id\":\"2057701\",\"attributes\":{\"message\":\"\",\"created_at\":\"2017-10-10T23:30:28.501Z\",\"updated_at\":\"2017-10-10T23:30:28.501Z\",\"internal\":false},\"relationships\":{\"actor\":{\"data\":{\"type\":\"program\",\"id\":\"11767\",\"attributes\":{\"handle\":\"github\",\"created_at\":\"2016-04-15T17:10:31.261Z\",\"updated_at\":\"2017-10-03T12:58:34.637Z\"}}},\"swag\":{\"data\":{\"id\":\"2158\",\"type\":\"swag\",\"attributes\":{\"sent\":false,\"created_at\":\"2017-10-10T23:30:28.494Z\"},\"relationships\":{\"address\":{\"data\":{\"id\":\"235\",\"type\":\"address\",\"attributes\":{\"name\":\"neil
85
+ matatall\",\"street\":\"\",\"city\":\"Kailua
86
+ Kona\",\"postal_code\":\"96740\",\"state\":\"HI\",\"country\":\"USA\",\"created_at\":\"2016-04-15T02:34:17.252Z\",\"tshirt_size\":\"XLarge\",\"phone_number\":\"8082091148\"}}}}}}}},{\"type\":\"activity-swag-awarded\",\"id\":\"2057700\",\"attributes\":{\"message\":\"\",\"created_at\":\"2017-10-10T23:30:07.266Z\",\"updated_at\":\"2017-10-10T23:30:07.266Z\",\"internal\":false},\"relationships\":{\"actor\":{\"data\":{\"type\":\"program\",\"id\":\"11767\",\"attributes\":{\"handle\":\"github\",\"created_at\":\"2016-04-15T17:10:31.261Z\",\"updated_at\":\"2017-10-03T12:58:34.637Z\"}}},\"swag\":{\"data\":{\"id\":\"2157\",\"type\":\"swag\",\"attributes\":{\"sent\":false,\"created_at\":\"2017-10-10T23:30:07.259Z\"},\"relationships\":{\"address\":{\"data\":{\"id\":\"235\",\"type\":\"address\",\"attributes\":{\"name\":\"neil
87
+ matatall\",\"street\":\"\",\"city\":\"Kailua
88
+ Kona\",\"postal_code\":\"96740\",\"state\":\"HI\",\"country\":\"USA\",\"created_at\":\"2016-04-15T02:34:17.252Z\",\"tshirt_size\":\"XLarge\",\"phone_number\":\"8082091148\"}}}}}}}},{\"type\":\"activity-bounty-suggested\",\"id\":\"2057699\",\"attributes\":{\"message\":\"Suggested
89
+ by oreoshake in https://github.slack.com/archives//p\",\"created_at\":\"2017-10-10T23:29:55.239Z\",\"updated_at\":\"2017-10-10T23:29:55.239Z\",\"internal\":true,\"bounty_amount\":\"100\",\"bonus_amount\":\"0\"},\"relationships\":{\"actor\":{\"data\":{\"type\":\"user\",\"id\":\"185283\",\"attributes\":{\"username\":\"oreoshake-test-token-4\",\"name\":null,\"disabled\":false,\"created_at\":\"2017-07-20T19:22:56.881Z\",\"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\":\"2057697\",\"attributes\":{\"message\":\"\",\"created_at\":\"2017-10-10T23:29:49.700Z\",\"updated_at\":\"2017-10-10T23:29:49.700Z\",\"internal\":false},\"relationships\":{\"actor\":{\"data\":{\"type\":\"user\",\"id\":\"185283\",\"attributes\":{\"username\":\"oreoshake-test-token-4\",\"name\":null,\"disabled\":false,\"created_at\":\"2017-07-20T19:22:56.881Z\",\"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\":\"2057696\",\"attributes\":{\"message\":\"\",\"created_at\":\"2017-10-10T23:29:49.101Z\",\"updated_at\":\"2017-10-10T23:29:49.101Z\",\"internal\":true,\"reference\":\"reference\",\"reference_url\":null},\"relationships\":{\"actor\":{\"data\":{\"type\":\"user\",\"id\":\"185283\",\"attributes\":{\"username\":\"oreoshake-test-token-4\",\"name\":null,\"disabled\":false,\"created_at\":\"2017-07-20T19:22:56.881Z\",\"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-comment\",\"id\":\"2057695\",\"attributes\":{\"message\":\"For
90
+ better or worse, the design of HTTP cookies means that no single website can
91
+ prevent its users from being logged out; consequently, application-specific
92
+ ways of achieving this goal will likely not qualify. You may be interested
93
+ in personal blog posts from Chris Evans (https://scarybeastsecurity.blogspot.com/2010/01/logout-xsrf-significant-web-app-bug.html)
94
+ and Michal Zalewski (https://lcamtuf.blogspot.com/2010/10/http-cookies-or-how-not-to-design.html)
95
+ for more background.\\n\",\"created_at\":\"2017-10-10T23:29:48.618Z\",\"updated_at\":\"2017-10-10T23:29:48.618Z\",\"internal\":false},\"relationships\":{\"actor\":{\"data\":{\"type\":\"user\",\"id\":\"185283\",\"attributes\":{\"username\":\"oreoshake-test-token-4\",\"name\":null,\"disabled\":false,\"created_at\":\"2017-07-20T19:22:56.881Z\",\"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-user-assigned-to-bug\",\"id\":\"2057694\",\"attributes\":{\"message\":null,\"created_at\":\"2017-10-10T23:29:46.939Z\",\"updated_at\":\"2017-10-10T23:29:46.939Z\",\"internal\":true},\"relationships\":{\"actor\":{\"data\":{\"type\":\"user\",\"id\":\"185283\",\"attributes\":{\"username\":\"oreoshake-test-token-4\",\"name\":null,\"disabled\":false,\"created_at\":\"2017-07-20T19:22:56.881Z\",\"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\":\"57690\",\"type\":\"user\",\"attributes\":{\"username\":\"ndm-github\",\"name\":\"Neil
96
+ 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\"}}}}}}]},\"bounties\":{\"data\":[]},\"summaries\":{\"data\":[]}}}}"
97
+ http_version:
98
+ recorded_at: Tue, 24 Oct 2017 22:53:40 GMT
99
+ - request:
100
+ method: post
101
+ uri: https://api.hackerone.com/v1/reports/200/state_changes
102
+ body:
103
+ encoding: UTF-8
104
+ string: "{\"data\":{\"type\":\"state-change\",\"attributes\":{\"original_report_id\":\"302\",\"state\":\"duplicate\",\"message\":\"totally
105
+ a dup\"}}}"
106
+ headers:
107
+ Authorization:
108
+ - Basic Nope==
109
+ User-Agent:
110
+ - Faraday v0.11.0
111
+ Content-Type:
112
+ - application/json
113
+ Accept-Encoding:
114
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
115
+ Accept:
116
+ - "*/*"
117
+ response:
118
+ status:
119
+ code: 201
120
+ message: Created
121
+ headers:
122
+ Date:
123
+ - Tue, 24 Oct 2017 22:53:49 GMT
124
+ Content-Type:
125
+ - application/json; charset=utf-8
126
+ Transfer-Encoding:
127
+ - chunked
128
+ Connection:
129
+ - keep-alive
130
+ Set-Cookie:
131
+ - __cfduid=; expires=Wed, 24-Oct-18
132
+ 22:53:48 GMT; path=/; Domain=api.hackerone.com; HttpOnly; Secure
133
+ X-Request-Id:
134
+ - cd376b1b-99ab-4fdb-bf6b-a07561818cb2
135
+ Etag:
136
+ - W/"c4b760035f20d5c8f9e48569e0297d7f"
137
+ Cache-Control:
138
+ - max-age=0, private, must-revalidate
139
+ Strict-Transport-Security:
140
+ - max-age=31536000; includeSubDomains; preload
141
+ Content-Security-Policy:
142
+ - 'default-src ''none''; base-uri ''self''; block-all-mixed-content; child-src
143
+ www.youtube-nocookie.com; connect-src ''self'' www.google-analytics.com errors.hackerone.net;
144
+ font-src ''self''; form-action ''self''; frame-ancestors ''none''; img-src
145
+ ''self'' data: cover-photos.hackerone-user-content.com hackathon-photos.hackerone-user-content.com
146
+ profile-photos.hackerone-user-content.com hackerone-attachments.s3.amazonaws.com;
147
+ media-src ''self'' hackerone-attachments.s3.amazonaws.com; script-src ''self''
148
+ www.google-analytics.com; style-src ''self'' ''unsafe-inline''; report-uri
149
+ https://errors.hackerone.net/api/30/csp-report/?sentry_key=61c1e2f50d21487c97a071737701f598'
150
+ Referrer-Policy:
151
+ - strict-origin-when-cross-origin
152
+ X-Content-Type-Options:
153
+ - nosniff
154
+ X-Download-Options:
155
+ - noopen
156
+ X-Frame-Options:
157
+ - DENY
158
+ X-Permitted-Cross-Domain-Policies:
159
+ - none
160
+ X-Xss-Protection:
161
+ - 1; mode=block
162
+ Public-Key-Pins-Report-Only:
163
+ - pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="r/mIkG3eEpVdm+u/ko/cwxzOMo1bk4TyHIlByibiA5E=";
164
+ pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0=";
165
+ pin-sha256="cGuxAXyFXFkWm61cF4HPWX8S0srS9j0aSqN0k4AP+4A="; pin-sha256="bIlWcjiKq1mftH/xd7Hw1JO77Cr+Gv+XYcGUQWwO+A4=";
166
+ pin-sha256="tXD+dGAP8rGY4PW1be90cOYEwg7pZ4G+yPZmIZWPTSg="; max-age=600; includeSubDomains;
167
+ report-uri="https://hackerone.report-uri.io/r/default/hpkp/reportOnly"
168
+ Server:
169
+ - cloudflare-nginx
170
+ Cf-Ray:
171
+ - 3b3083ac7b09776c-LAX
172
+ body:
173
+ encoding: UTF-8
174
+ string: "{\"data\":{\"id\":\"200\",\"type\":\"report\",\"attributes\":{\"title\":\"another
175
+ attempt\",\"state\":\"duplicate\",\"created_at\":\"2017-10-10T23:29:35.200Z\",\"vulnerability_information\":\"blehhh\",\"triaged_at\":\"2017-10-10T23:29:49.700Z\",\"closed_at\":\"2017-10-24T22:53:49.007Z\",\"last_reporter_activity_at\":\"2017-10-10T23:29:35.265Z\",\"first_program_activity_at\":\"2017-10-10T23:29:35.265Z\",\"last_program_activity_at\":\"2017-10-24T22:53:49.007Z\",\"bounty_awarded_at\":null,\"swag_awarded_at\":\"2017-10-10T23:30:28.501Z\",\"disclosed_at\":null,\"last_public_activity_at\":\"2017-10-24T22:53:49.007Z\",\"last_activity_at\":\"2017-10-24T22:53:49.007Z\",\"issue_tracker_reference_id\":\"reference\"},\"relationships\":{\"reporter\":{\"data\":{\"id\":\"57690\",\"type\":\"user\",\"attributes\":{\"username\":\"ndm-github\",\"name\":\"Neil
176
+ 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\"}}}},\"assignee\":{\"data\":{\"type\":\"user\",\"id\":\"57690\",\"attributes\":{\"username\":\"ndm-github\",\"name\":\"Neil
177
+ 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\":\"2017-10-03T12:58:34.637Z\"}}},\"swag\":{\"data\":[{\"id\":\"2158\",\"type\":\"swag\",\"attributes\":{\"sent\":false,\"created_at\":\"2017-10-10T23:30:28.494Z\"},\"relationships\":{\"address\":{\"data\":{\"id\":\"235\",\"type\":\"address\",\"attributes\":{\"name\":\"neil
178
+ matatall\",\"street\":\"\",\"city\":\"Kailua
179
+ Kona\",\"postal_code\":\"96740\",\"state\":\"HI\",\"country\":\"USA\",\"created_at\":\"2016-04-15T02:34:17.252Z\",\"tshirt_size\":\"XLarge\",\"phone_number\":\"8082091148\"}}}}},{\"id\":\"2157\",\"type\":\"swag\",\"attributes\":{\"sent\":false,\"created_at\":\"2017-10-10T23:30:07.259Z\"},\"relationships\":{\"address\":{\"data\":{\"id\":\"235\",\"type\":\"address\",\"attributes\":{\"name\":\"neil
180
+ matatall\",\"street\":\"\",\"city\":\"Kailua
181
+ Kona\",\"postal_code\":\"96740\",\"state\":\"HI\",\"country\":\"USA\",\"created_at\":\"2016-04-15T02:34:17.252Z\",\"tshirt_size\":\"XLarge\",\"phone_number\":\"8082091148\"}}}}}]},\"attachments\":{\"data\":[]},\"activities\":{\"data\":[{\"type\":\"activity-bug-duplicate\",\"id\":\"2100521\",\"attributes\":{\"message\":\"totally
182
+ a dup\",\"created_at\":\"2017-10-24T22:53:49.007Z\",\"updated_at\":\"2017-10-24T22:53:49.007Z\",\"internal\":false,\"original_report_id\":302},\"relationships\":{\"actor\":{\"data\":{\"type\":\"user\",\"id\":\"211530\",\"attributes\":{\"username\":\"oreoshake-testing-dups\",\"name\":null,\"disabled\":false,\"created_at\":\"2017-10-24T22:44:55.280Z\",\"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-swag-awarded\",\"id\":\"2057701\",\"attributes\":{\"message\":\"\",\"created_at\":\"2017-10-10T23:30:28.501Z\",\"updated_at\":\"2017-10-10T23:30:28.501Z\",\"internal\":false},\"relationships\":{\"actor\":{\"data\":{\"type\":\"program\",\"id\":\"11767\",\"attributes\":{\"handle\":\"github\",\"created_at\":\"2016-04-15T17:10:31.261Z\",\"updated_at\":\"2017-10-03T12:58:34.637Z\"}}},\"swag\":{\"data\":{\"id\":\"2158\",\"type\":\"swag\",\"attributes\":{\"sent\":false,\"created_at\":\"2017-10-10T23:30:28.494Z\"},\"relationships\":{\"address\":{\"data\":{\"id\":\"235\",\"type\":\"address\",\"attributes\":{\"name\":\"neil
183
+ matatall\",\"street\":\"\",\"city\":\"Kailua
184
+ Kona\",\"postal_code\":\"96740\",\"state\":\"HI\",\"country\":\"USA\",\"created_at\":\"2016-04-15T02:34:17.252Z\",\"tshirt_size\":\"XLarge\",\"phone_number\":\"8082091148\"}}}}}}}},{\"type\":\"activity-swag-awarded\",\"id\":\"2057700\",\"attributes\":{\"message\":\"\",\"created_at\":\"2017-10-10T23:30:07.266Z\",\"updated_at\":\"2017-10-10T23:30:07.266Z\",\"internal\":false},\"relationships\":{\"actor\":{\"data\":{\"type\":\"program\",\"id\":\"11767\",\"attributes\":{\"handle\":\"github\",\"created_at\":\"2016-04-15T17:10:31.261Z\",\"updated_at\":\"2017-10-03T12:58:34.637Z\"}}},\"swag\":{\"data\":{\"id\":\"2157\",\"type\":\"swag\",\"attributes\":{\"sent\":false,\"created_at\":\"2017-10-10T23:30:07.259Z\"},\"relationships\":{\"address\":{\"data\":{\"id\":\"235\",\"type\":\"address\",\"attributes\":{\"name\":\"neil
185
+ matatall\",\"street\":\"\",\"city\":\"Kailua
186
+ Kona\",\"postal_code\":\"96740\",\"state\":\"HI\",\"country\":\"USA\",\"created_at\":\"2016-04-15T02:34:17.252Z\",\"tshirt_size\":\"XLarge\",\"phone_number\":\"8082091148\"}}}}}}}},{\"type\":\"activity-bounty-suggested\",\"id\":\"2057699\",\"attributes\":{\"message\":\"Suggested
187
+ by oreoshake in https://github.slack.com/archives//p\",\"created_at\":\"2017-10-10T23:29:55.239Z\",\"updated_at\":\"2017-10-10T23:29:55.239Z\",\"internal\":true,\"bounty_amount\":\"100\",\"bonus_amount\":\"0\"},\"relationships\":{\"actor\":{\"data\":{\"type\":\"user\",\"id\":\"185283\",\"attributes\":{\"username\":\"oreoshake-test-token-4\",\"name\":null,\"disabled\":false,\"created_at\":\"2017-07-20T19:22:56.881Z\",\"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\":\"2057697\",\"attributes\":{\"message\":\"\",\"created_at\":\"2017-10-10T23:29:49.700Z\",\"updated_at\":\"2017-10-10T23:29:49.700Z\",\"internal\":false},\"relationships\":{\"actor\":{\"data\":{\"type\":\"user\",\"id\":\"185283\",\"attributes\":{\"username\":\"oreoshake-test-token-4\",\"name\":null,\"disabled\":false,\"created_at\":\"2017-07-20T19:22:56.881Z\",\"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\":\"2057696\",\"attributes\":{\"message\":\"\",\"created_at\":\"2017-10-10T23:29:49.101Z\",\"updated_at\":\"2017-10-10T23:29:49.101Z\",\"internal\":true,\"reference\":\"reference\",\"reference_url\":null},\"relationships\":{\"actor\":{\"data\":{\"type\":\"user\",\"id\":\"185283\",\"attributes\":{\"username\":\"oreoshake-test-token-4\",\"name\":null,\"disabled\":false,\"created_at\":\"2017-07-20T19:22:56.881Z\",\"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-comment\",\"id\":\"2057695\",\"attributes\":{\"message\":\"For
188
+ better or worse, the design of HTTP cookies means that no single website can
189
+ prevent its users from being logged out; consequently, application-specific
190
+ ways of achieving this goal will likely not qualify. You may be interested
191
+ in personal blog posts from Chris Evans (https://scarybeastsecurity.blogspot.com/2010/01/logout-xsrf-significant-web-app-bug.html)
192
+ and Michal Zalewski (https://lcamtuf.blogspot.com/2010/10/http-cookies-or-how-not-to-design.html)
193
+ for more background.\\n\",\"created_at\":\"2017-10-10T23:29:48.618Z\",\"updated_at\":\"2017-10-10T23:29:48.618Z\",\"internal\":false},\"relationships\":{\"actor\":{\"data\":{\"type\":\"user\",\"id\":\"185283\",\"attributes\":{\"username\":\"oreoshake-test-token-4\",\"name\":null,\"disabled\":false,\"created_at\":\"2017-07-20T19:22:56.881Z\",\"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-user-assigned-to-bug\",\"id\":\"2057694\",\"attributes\":{\"message\":null,\"created_at\":\"2017-10-10T23:29:46.939Z\",\"updated_at\":\"2017-10-10T23:29:46.939Z\",\"internal\":true},\"relationships\":{\"actor\":{\"data\":{\"type\":\"user\",\"id\":\"185283\",\"attributes\":{\"username\":\"oreoshake-test-token-4\",\"name\":null,\"disabled\":false,\"created_at\":\"2017-07-20T19:22:56.881Z\",\"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\":\"57690\",\"type\":\"user\",\"attributes\":{\"username\":\"ndm-github\",\"name\":\"Neil
194
+ 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\"}}}}}}]},\"bounties\":{\"data\":[]},\"summaries\":{\"data\":[]}}}}"
195
+ http_version:
196
+ recorded_at: Tue, 24 Oct 2017 22:53:49 GMT
197
+ recorded_with: VCR 3.0.3
@@ -0,0 +1,93 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.hackerone.com/v1/users/fransrosen
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - Basic NOPE
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, 02 Nov 2017 23:24:03 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=dd872fd23fa7ae9529e3bb8b35adcf44d1509665042; expires=Fri, 02-Nov-18
35
+ 23:24:02 GMT; path=/; Domain=api.hackerone.com; HttpOnly; Secure
36
+ X-Request-Id:
37
+ - eb927f4f-43e8-4232-8bb9-b2651c88a0ca
38
+ Etag:
39
+ - W/"3894f47342d0f403fb014db76fe89448"
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''; base-uri ''self''; block-all-mixed-content; child-src
46
+ www.youtube-nocookie.com; connect-src ''self'' www.google-analytics.com errors.hackerone.net;
47
+ font-src ''self''; form-action ''self''; frame-ancestors ''none''; img-src
48
+ ''self'' data: cover-photos.hackerone-user-content.com hackathon-photos.hackerone-user-content.com
49
+ profile-photos.hackerone-user-content.com hackerone-attachments.s3.amazonaws.com;
50
+ media-src ''self'' hackerone-attachments.s3.amazonaws.com; script-src ''self''
51
+ www.google-analytics.com; style-src ''self'' ''unsafe-inline''; report-uri
52
+ https://errors.hackerone.net/api/30/csp-report/?sentry_key=61c1e2f50d21487c97a071737701f598'
53
+ Referrer-Policy:
54
+ - strict-origin-when-cross-origin
55
+ X-Content-Type-Options:
56
+ - nosniff
57
+ X-Download-Options:
58
+ - noopen
59
+ X-Frame-Options:
60
+ - DENY
61
+ X-Permitted-Cross-Domain-Policies:
62
+ - none
63
+ X-Xss-Protection:
64
+ - 1; mode=block
65
+ Server:
66
+ - cloudflare-nginx
67
+ Cf-Ray:
68
+ - 3b7ad855990492ac-SJC
69
+ body:
70
+ encoding: ASCII-8BIT
71
+ string: !binary |-
72
+ eyJkYXRhIjp7ImF0dHJpYnV0ZXMiOnsic2lnbmFsIjo2LjQ3NzgyMjU4MDY0
73
+ NTE2LCJpbXBhY3QiOjIyLjYyNjk1MzEyNSwicmVwdXRhdGlvbiI6MTUwMzMs
74
+ InVzZXJuYW1lIjoiZnJhbnNyb3NlbiIsIm5hbWUiOiJGcmFucyBSb3PDqW4i
75
+ LCJkaXNhYmxlZCI6ZmFsc2UsImNyZWF0ZWRfYXQiOiIyMDEzLTExLTIwVDIx
76
+ OjE1OjI5Ljc3MVoiLCJwcm9maWxlX3BpY3R1cmUiOnsiNjJ4NjIiOiJodHRw
77
+ czovL3Byb2ZpbGUtcGhvdG9zLmhhY2tlcm9uZS11c2VyLWNvbnRlbnQuY29t
78
+ L3Byb2R1Y3Rpb24vMDAwLzAwMS82MzQvNmUwMjI0MmI1ZDFkODkzY2VmNjk4
79
+ MTQ0ZmFhNzA2ZmQxZDc1ZmVhMF9zbWFsbC5qcGc/MTM5NjQ2ODU3NiIsIjgy
80
+ eDgyIjoiaHR0cHM6Ly9wcm9maWxlLXBob3Rvcy5oYWNrZXJvbmUtdXNlci1j
81
+ b250ZW50LmNvbS9wcm9kdWN0aW9uLzAwMC8wMDEvNjM0LzU2NTI4NzgwZGRk
82
+ ZTY3ZGVjMmU2ZjlkMTIxMjg3OWFiMTZiYzhmNGFfbWVkaXVtLmpwZz8xMzk2
83
+ NDY4NTc2IiwiMTEweDExMCI6Imh0dHBzOi8vcHJvZmlsZS1waG90b3MuaGFj
84
+ a2Vyb25lLXVzZXItY29udGVudC5jb20vcHJvZHVjdGlvbi8wMDAvMDAxLzYz
85
+ NC80MDQ1YjY2NmQyYWRiMDZjYzc0ZmJhZWQ2NTViN2UzZjM5YjM0Yjc1X2xh
86
+ cmdlLmpwZz8xMzk2NDY4NTc2IiwiMjYweDI2MCI6Imh0dHBzOi8vcHJvZmls
87
+ ZS1waG90b3MuaGFja2Vyb25lLXVzZXItY29udGVudC5jb20vcHJvZHVjdGlv
88
+ bi8wMDAvMDAxLzYzNC9hYmU2YjFlYzJkN2I4YjcxNmVjYmM1M2FjMDkyMDE1
89
+ MTM4Y2Y5YmY3X3h0cmFsYXJnZS5qcGc/MTM5NjQ2ODU3NiJ9fSwiaWQiOiIx
90
+ NjM0IiwidHlwZSI6InVzZXIifX0=
91
+ http_version:
92
+ recorded_at: Thu, 02 Nov 2017 23:24:02 GMT
93
+ recorded_with: VCR 3.0.3
@@ -154,7 +154,7 @@ module HackerOne
154
154
  #
155
155
  # returns an HackerOne::Client::Report object or raises an error if
156
156
  # no report is found.
157
- def state_change(state, message = nil)
157
+ def state_change(state, message = nil, attributes = {})
158
158
  raise ArgumentError, "state (#{state}) must be one of #{STATES}" unless STATES.include?(state)
159
159
 
160
160
  body = {
@@ -164,6 +164,8 @@ module HackerOne
164
164
  }
165
165
  }
166
166
 
167
+ body[:attributes] = body[:attributes].reverse_merge(attributes)
168
+
167
169
  if message
168
170
  body[:attributes][:message] = message
169
171
  elsif STATES_REQUIRING_STATE_CHANGE_MESSAGE.include?(state)
@@ -172,7 +174,6 @@ module HackerOne
172
174
  # message is in theory optional, but a value appears to be required.
173
175
  body[:attributes][:message] = ""
174
176
  end
175
-
176
177
  response_json = make_post_request("reports/#{id}/state_changes", request_body: body)
177
178
  @report = response_json
178
179
  self
@@ -1,6 +1,10 @@
1
1
  module HackerOne
2
2
  module Client
3
3
  module ResourceHelper
4
+ def self.included(base)
5
+ base.extend(self)
6
+ end
7
+
4
8
  def parse_response(response)
5
9
  HackerOne::Client::Api.parse_response(response)
6
10
  end
@@ -1,7 +1,14 @@
1
1
  module HackerOne
2
2
  module Client
3
3
  class User
4
- delegate :username, to: :attributes
4
+ include ResourceHelper
5
+
6
+ delegate :username, :signal, :impact, :reputation, to: :attributes
7
+
8
+ def self.find(username_we_want)
9
+ user_json = make_get_request("users/#{username_we_want}")
10
+ new(user_json)
11
+ end
5
12
 
6
13
  def initialize(user)
7
14
  @user = user
@@ -1,5 +1,5 @@
1
1
  module Hackerone
2
2
  module Client
3
- VERSION = "0.9.1"
3
+ VERSION = "0.10.0"
4
4
  end
5
5
  end
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.9.1
4
+ version: 0.10.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-10-24 00:00:00.000000000 Z
11
+ date: 2017-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -140,6 +140,7 @@ files:
140
140
  - fixtures/vcr_cassettes/award_a_bounty.yml
141
141
  - fixtures/vcr_cassettes/award_swag.yml
142
142
  - fixtures/vcr_cassettes/common_responses.yml
143
+ - fixtures/vcr_cassettes/dup.yml
143
144
  - fixtures/vcr_cassettes/empty_report_list.yml
144
145
  - fixtures/vcr_cassettes/missing_report.yml
145
146
  - fixtures/vcr_cassettes/programs.yml
@@ -150,6 +151,7 @@ files:
150
151
  - fixtures/vcr_cassettes/server_error_when_assigning_report_to_user.yml
151
152
  - fixtures/vcr_cassettes/stage_change.yml
152
153
  - fixtures/vcr_cassettes/suggest_a_bounty.yml
154
+ - fixtures/vcr_cassettes/user_find_fransrosen.yml
153
155
  - hackerone-client.gemspec
154
156
  - lib/hackerone/client.rb
155
157
  - lib/hackerone/client/activity.rb
@@ -185,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
187
  version: '0'
186
188
  requirements: []
187
189
  rubyforge_project:
188
- rubygems_version: 2.2.0
190
+ rubygems_version: 2.4.5.1
189
191
  signing_key:
190
192
  specification_version: 4
191
193
  summary: A limited client for the HackerOne API