Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
arkadiyt committed Oct 28, 2024
1 parent 1074eff commit cff6e73
Show file tree
Hide file tree
Showing 4 changed files with 230 additions and 82 deletions.
7 changes: 6 additions & 1 deletion lib/bounty-targets/intigriti.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

module BountyTargets
class Intigriti
include Retryable

STATUSES = %w[_ wizard draft open suspended closing closed archived].freeze
CONFIDENTIALITY_LEVELS = %w[_ inviteonly application registered public].freeze
TYPES = %w[_ url android ios iprange device other wildcard].freeze
Expand Down Expand Up @@ -61,7 +63,10 @@ def directory_index

def program_scopes(program)
url = "https://app.intigriti.com/api/core/public/programs/#{encode(program[:company_handle])}/#{encode(program[:handle])}"
json = JSON.parse(SsrfFilter.get(url).body)
json = nil
retryable do
json = JSON.parse(SsrfFilter.get(url).body)
end

targets = json['domains'].max_by do |domains|
domains['createdAt']
Expand Down
24 changes: 8 additions & 16 deletions spec/bounty-targets/intigriti_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,12 @@
[
{
company_handle: 'doccle',
confidentiality_level: 'application',
handle: 'doccle',
id: '12715f4b-d10e-415f-a309-6ab042f6158a',
status: 'open',
tacRequired: true,
twoFactorRequired: nil,
url: 'https://www.intigriti.com/programs/doccle/doccle/detail',
max_bounty: {'currency' => 'EUR', 'value' => 2500},
min_bounty: {'currency' => 'EUR', 'value' => 0},
name: 'Doccle'
},
{
company_handle: 'bpost',
confidentiality_level: 'application',
handle: 'e-tracker',
id: 'a09e497e-fd75-4b56-afa0-7a6689389b76',
tacRequired: false,
twoFactorRequired: nil,
max_bounty: {'currency' => 'EUR', 'value' => 0},
min_bounty: {'currency' => 'EUR', 'value' => 0},
name: 'e-tracker',
status: 'open',
url: 'https://www.intigriti.com/programs/bpost/e-tracker/detail'
}
]
Expand All @@ -57,6 +41,14 @@
status: "open",
tacRequired: false,
twoFactorRequired: false,
max_bounty: {
"currency"=>"USD",
"value"=>100000.0
},
min_bounty: {
"currency"=>"USD",
"value"=>500.0
},
targets: {
in_scope: [
{
Expand Down
216 changes: 216 additions & 0 deletions spec/fixtures/intigriti/programs.html

Large diffs are not rendered by default.

65 changes: 0 additions & 65 deletions spec/fixtures/intigriti/programs.json

This file was deleted.

0 comments on commit cff6e73

Please sign in to comment.