This package provides an implementation of the Bugcrowd api.
To install simply run
pip install bug-crowd-api-client
from bug_crowd.client import BugcrowdClient
client = BugcrowdClient('API_TOKEN')
from bug_crowd.client import BugcrowdClient
client = BugcrowdClient('API_TOKEN')
bounties = client.get_bounties()
from bug_crowd.client import BugcrowdClient
client = BugcrowdClient('API_TOKEN')
bounty = client.get_bounties()[0]
submissions = list(client.get_submissions(bounty))
import datetime
from bug_crowd.client import BugcrowdClient
client = BugcrowdClient('API_TOKEN')
bounty = client.get_bounties()[0]
submission_fields = {
'substate': 'unresolved',
'title': 'Example submission',
'submitted_at': datetime.datetime.utcnow(),
'description_markdown': 'Example description',
}
resp = client.create_submission(bounty, submission_fields).result()
resp.raise_for_status()
submission = resp.json()
from bug_crowd.client import BugcrowdClient
client = BugcrowdClient('API_TOKEN')
bounty = client.get_bounties()[0]
submission = client.get_submissions(bounty)[0]
resp = client.update_submission(
submission,
title='A new title',
vrt_id='cross_site_scripting_xss',
custom_fields={'example': 'value'},
).result()
resp.raise_for_status()
updated_submission = resp.json()
from bug_crowd.client import BugcrowdClient
client = BugcrowdClient('API_TOKEN')
bounty = client.get_bounties()[0]
submission = client.get_submissions(bounty)[0]
resp = client.comment_on_submission(
submission,
'A comment',
comment_type='tester_message',
).result()
resp.raise_for_status()
comment = resp.json()
from bug_crowd.client import BugcrowdClient
client = BugcrowdClient('API_TOKEN')
bounty = client.get_bounties()[0]
submission = client.get_submissions(bounty)[0]
resp = client.transition_submission(
submission,
'triaged',
).result()
resp.raise_for_status()
from bug_crowd.client import BugcrowdClient
client = BugcrowdClient('API_TOKEN')
bounty = client.get_bounties()[0]
submission = client.get_submissions(bounty)[0]
attachments = client.get_attachments_for_submission(submission)