hackerone-client 0.14.2 → 0.15.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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +4 -1
- data/fixtures/vcr_cassettes/update_policy.yml +80 -0
- data/lib/hackerone/client/program.rb +10 -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: f62ef7d9e2b28623a67a832dcff10032799de7de3f22977cbc3f15165809a819
|
4
|
+
data.tar.gz: b4203d5e1f0fd4beb6faebf08c7a9937fdf75512e9d75d8de1153af5c4c35664
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d960366891f9f7188140a984f9ad6c5a55aae2e9aa0d640165819021c2eeebb02ac59c883d8509466cc2a167c524b0940528b707af8b9beadb58ff58e75f6bbc
|
7
|
+
data.tar.gz: ef27ffb39ce4baa945a2af8e4ba85a1e0fdbfcebcd8a1cbd88780862b1385964461a88a2391041517ef1e69eb24384fa22cf171fb6360d02829782e053120220
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## [0.15.0] - 2020-03-09
|
2
|
+
|
3
|
+
- [Add 'update program policy' API support](https://github.com/oreoshake/hackerone-client/pull/47) (@rzhade3)
|
4
|
+
|
1
5
|
## [0.14.2] - 2020-03-09
|
2
6
|
|
3
7
|
- [Don't lock development dependency versions](https://github.com/oreoshake/hackerone-client/pull/45) (@oreoshake)
|
data/README.md
CHANGED
@@ -45,6 +45,9 @@ program = HackerOne::Client::Program.find("insert-program-name-here")
|
|
45
45
|
|
46
46
|
# returns all common responses
|
47
47
|
program.common_responses
|
48
|
+
|
49
|
+
# Updates a program's policy
|
50
|
+
program.update_policy(policy: "Please submit valid vulnerabilities")
|
48
51
|
```
|
49
52
|
|
50
53
|
## State change hooks
|
@@ -95,7 +98,7 @@ HackerOne::Client.critical_range = 5000...100_000_000
|
|
95
98
|
|
96
99
|
In order to configure whether error handling is strict or lenient, set the `HACKERONE_CLIENT_LENIENT_MODE` variable.
|
97
100
|
|
98
|
-
Setting this variable will make the client try to absorb errors, like a malformed bounty or bonus amount. Not setting this variable will cause the client to raise errors.
|
101
|
+
Setting this variable will make the client try to absorb errors, like a malformed bounty or bonus amount. Not setting this variable will cause the client to raise errors.
|
99
102
|
|
100
103
|
## Contributing
|
101
104
|
|
@@ -0,0 +1,80 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://api.hackerone.com/v1/programs/18969/policy
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"data":{"type":"program-policy","attributes":{"policy":"Hello World,
|
9
|
+
updating policy"}}}'
|
10
|
+
headers:
|
11
|
+
Authorization:
|
12
|
+
- Basic NOPE
|
13
|
+
User-Agent:
|
14
|
+
- Faraday v1.0.0
|
15
|
+
Content-Type:
|
16
|
+
- application/json
|
17
|
+
Accept-Encoding:
|
18
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
19
|
+
Accept:
|
20
|
+
- "*/*"
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 200
|
24
|
+
message: OK
|
25
|
+
headers:
|
26
|
+
Date:
|
27
|
+
- Mon, 09 Mar 2020 20:21:52 GMT
|
28
|
+
Content-Type:
|
29
|
+
- application/json; charset=utf-8
|
30
|
+
Transfer-Encoding:
|
31
|
+
- chunked
|
32
|
+
Connection:
|
33
|
+
- keep-alive
|
34
|
+
Set-Cookie:
|
35
|
+
- __cfduid=d945343ceedab8854528404d5a2d2e02c1583785311; expires=Wed, 08-Apr-20
|
36
|
+
20:21:51 GMT; path=/; Domain=api.hackerone.com; HttpOnly; SameSite=Lax; Secure
|
37
|
+
X-Request-Id:
|
38
|
+
- d092d577-a1c3-4c26-a958-184f1712c016
|
39
|
+
Etag:
|
40
|
+
- W/"350f99241c904a842cf99ff4f20f5abb"
|
41
|
+
Cache-Control:
|
42
|
+
- max-age=0, private, must-revalidate
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=31536000; includeSubDomains; preload
|
45
|
+
X-Frame-Options:
|
46
|
+
- DENY
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Xss-Protection:
|
50
|
+
- 1; mode=block
|
51
|
+
X-Download-Options:
|
52
|
+
- noopen
|
53
|
+
X-Permitted-Cross-Domain-Policies:
|
54
|
+
- none
|
55
|
+
Referrer-Policy:
|
56
|
+
- strict-origin-when-cross-origin
|
57
|
+
Expect-Ct:
|
58
|
+
- enforce, max-age=86400
|
59
|
+
Content-Security-Policy:
|
60
|
+
- 'default-src ''none''; base-uri ''self''; block-all-mixed-content; child-src
|
61
|
+
www.youtube-nocookie.com; connect-src ''self'' www.google-analytics.com errors.hackerone.net;
|
62
|
+
font-src ''self''; form-action ''self''; frame-ancestors ''none''; img-src
|
63
|
+
''self'' data: cover-photos.hackerone-user-content.com hackathon-photos.hackerone-user-content.com
|
64
|
+
profile-photos.hackerone-user-content.com hackerone-us-west-2-production-attachments.s3.us-west-2.amazonaws.com;
|
65
|
+
media-src ''self'' hackerone-us-west-2-production-attachments.s3.us-west-2.amazonaws.com;
|
66
|
+
script-src ''self'' www.google-analytics.com; style-src ''self'' ''unsafe-inline'';
|
67
|
+
report-uri https://errors.hackerone.net/api/30/csp-report/?sentry_key=61c1e2f50d21487c97a071737701f598'
|
68
|
+
Cf-Cache-Status:
|
69
|
+
- DYNAMIC
|
70
|
+
Server:
|
71
|
+
- cloudflare
|
72
|
+
Cf-Ray:
|
73
|
+
- 571781356864e39e-ATL
|
74
|
+
body:
|
75
|
+
encoding: ASCII-8BIT
|
76
|
+
string: '{"data":{"id":"18969","type":"program","attributes":{"handle":"github","policy":"Hello
|
77
|
+
World, updating policy","created_at":"2016-04-15T17:10:31.261Z","updated_at":"2020-03-09T20:21:51.983Z"}}}'
|
78
|
+
http_version: null
|
79
|
+
recorded_at: Mon, 09 Mar 2020 20:21:52 GMT
|
80
|
+
recorded_with: VCR 5.1.0
|
@@ -49,6 +49,16 @@ module HackerOne
|
|
49
49
|
groups.find { |group| group.name == groupname }
|
50
50
|
end
|
51
51
|
|
52
|
+
def update_policy(policy:)
|
53
|
+
body = {
|
54
|
+
type: "program-policy",
|
55
|
+
attributes: {
|
56
|
+
policy: policy
|
57
|
+
}
|
58
|
+
}
|
59
|
+
make_put_request("programs/#{id}/policy", request_body: body)
|
60
|
+
end
|
61
|
+
|
52
62
|
def common_responses(page_number: 1, page_size: 100)
|
53
63
|
make_get_request(
|
54
64
|
"programs/#{id}/common_responses",
|
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.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neil Matatall
|
@@ -157,6 +157,7 @@ files:
|
|
157
157
|
- fixtures/vcr_cassettes/traverse_through_3_activities.yml
|
158
158
|
- fixtures/vcr_cassettes/traverse_through_all_activities.yml
|
159
159
|
- fixtures/vcr_cassettes/triage_and_hook_assign_report_to_user.yml
|
160
|
+
- fixtures/vcr_cassettes/update_policy.yml
|
160
161
|
- fixtures/vcr_cassettes/user_find_fransrosen.yml
|
161
162
|
- hackerone-client.gemspec
|
162
163
|
- lib/hackerone/client.rb
|