For the complete documentation index, see llms.txt. This page is also available as Markdown.

Bugcrowd

Create Vulnerability on Bugcrowd Submission

The purpose of this example is to create a vulnerability on a new a Bugcrowd submission.

This example Flow can be downloaded from our Flows GitHub Repository and imported into your AttackForge.

Initial Set Up

  • HTTP Trigger

    • Method: POST

    • Authentication: None

  • Secrets:

    • bugcrowd_authorization_token - your Bugcrowd API token

    • bugcrowd_engagement_name - your Bugcrowd engagement name

    • bugcrowd_secret - your Bugcrowd secret

    • af_tenant - your AttackForge tenant e.g. acmecorp.attackforge.com

    • af_project_id - your AttackForge Project Id

    • logging_level - logging verbosity level. Supports debug

Action 1 - Get Bugcrowd Submission

  • Method: GET

  • URL: https://api.bugcrowd.com/submissions/{id}?include=target,file_attachments&fields[target]=name,category&fields[submission]=remediation_advice,description,bug_url,severity,source,state,title,vrt_id,vulnerability_references

  • Headers:

    • Key = Authorization; Type = Secret; Value = bugcrowd_authorization_token

    • Key = Accept; Type = Value; Value = application/vnd.bugcrowd+json

    • Key = Content-Type; Type = Value; Value = application/json

  • Request Script:

  • Response Script:

Action 2 - Prepare Vuln Data from Bugcrowd Submission

  • Script:

Action 3 - Get CWE Information

  • Method: GET

  • URL: https://cwe-api.mitre.org/api/v1/cwe/weakness/{id}

  • Request Script:

  • Response Script:

Action 4 - Create Vulnerability

  • Method: POST

  • URL: https://{{af_tenant}}/api/ss/vulnerability

  • Headers:

    • Key = X-SSAPI-KEY; Type = Secret; Value = af_apikey

    • Key = Content-Type; Type = Value; Value = application/json

  • Request Script:

  • Response Script:

Action 5 - Download Evidence from Bugcrowd Submission

  • Method: GET

  • URL: https://defined-in-script

  • Request Script:

  • Response Script:

Action 6 - Upload Vulnerability Evidence

  • Method: POST

  • URL: https://{{af_tenant}}/api/ss/vulnerability/{id}/evidence

  • Headers:

    • Key = Content-Type; Type = Value; Value = multipart/form-data

    • Key = X-SSAPI-KEY; Type = Secret; Value = af_apikey

  • Request Script:

  • Response Script:

Update Vulnerability on Bugcrowd Submission Update

The purpose of this example is to update a vulnerability when a Bugcrowd submission is updated.

This example Flow can be downloaded from our Flows GitHub Repository and imported into your AttackForge.

Initial Set Up

  • HTTP Trigger

    • Method: POST

    • Authentication: None

  • Secrets:

Action 1 - Determine Update Details

  • Script:

Action 2 - Get Bugcrowd Target Information

  • Method: GET

  • URL: https://api.bugcrowd.com/submissions/{id}?include=target,cvss_vector

  • Headers:

    • Key = Authorization; Type = Secret; Value = bugcrowd_authorization_token

    • Key = Accept; Type = Value; Value = application/vnd.bugcrowd+json

    • Key = Content-Type; Type = Value; Value = application/json

  • Request Script:

  • Response Script:

Action 3 - Find Original Vulnerability

  • Method: GET

  • URL: https://{{af_tenant}}/api/ss/vulnerabilities?q={custom_fields:{$elemMatch:{name:{$eq:"bugcrowd_submission_id"},value:{$eq:{bc_sub_id}}}}

  • Headers:

    • Key = Content-Type; Type = Value; Value = application/json

    • Key = X-SSAPI-KEY; Type = Secret; Value = af_apikey

  • Request Script:

  • Response Script:

Action 4 - Get Bugcrowd CVSS Vector

  • Method: POST

  • URL: https://api.bugcrowd.com/submissions/{id}?include=cvss_vector

  • Headers:

    • Key = Authorization; Type = Secret; Value = bugcrowd_authorization_token

    • Key = Accept; Type = Value; Value = application/vnd.bugcrowd+json

    • Key = Content-Type; Type = Value; Value = application/json

  • Request Script:

  • Response Script:

Action 5 - Convert Remediation Note to Rich-Text

  • Method: POST

  • URL: https://{{af_tenant}}/api/ss/utils/markdown-to-richtext

  • Headers:

    • Key = Content-Type; Type = Value; Value = application/json

    • Key = X-SSAPI-KEY; Type = Secret; Value = af_apikey

  • Request Script:

  • Response Script:

Action 6 - Get CWE information

  • Method: GET

  • URL: https://cwe-api.mitre.org/api/v1/cwe/weakness/{id}

  • Headers:

    • Key = Content-Type; Type = Value; Value = application/json

  • Request Script:

  • Response Script:

Action 7 - Get Vuln Id for Duplicate

  • Method: GET

  • URL: https://{{af_tenant}}/api/ss/vulnerabilities?q={custom_fields:{$elemMatch:{name:{$eq:"bugcrowd_submission_id"},value:{$eq:{bc_sub_id}}}}

  • Headers:

    • Key = Content-Type; Type = Value; Value = application/json

    • Key = X-SSAPI-KEY; Type = Secret; Value = af_apikey

  • Request Script:

  • Response Script:

Action 8 - Update Vulnerability on AttackForge

  • Method: PUT

  • URL: https://{{af_tenant}}/api/ss/vulnerability/{id}

  • Headers:

    • Key = Content-Type; Type = Value; Value = application/json

    • Key = X-SSAPI-KEY; Type = Secret; Value = af_apikey

  • Request Script:

  • Response Script:

Create Bugcrowd Comment on New Remediation Note

The purpose of this example is to create a comment in Bugcrowd when a remediation note is created.

This example Flow can be downloaded from our Flows GitHub Repository and imported into your AttackForge.

Initial Set Up

  • Event:

    • vulnerability-remediation-note-created

  • Secrets:

    • bugcrowd_authorization_token - your Bugcrowd API token

    • bugcrowd_visibility - must be one of the following: everyone, bugcrowd_and_researcher, bugcrowd_and_customer, customer, bugcrowd

    • af_tenant - your AttackForge tenant e.g. acmecorp.attackforge.com

    • logging_level - logging verbosity level. Supports debug

Action 1 - Get AttackForge Project ID and Bugcrowd Submission ID

  • Method: GET

  • URL: https://{{af_tenant}}/api/ss/vulnerability/{id}

  • Headers:

    • Key = Content-Type; Type = Value; Value = application/json

    • Key = X-SSAPI-KEY; Type = Secret; Value = af_apikey

  • Request Script:

  • Response Script:

Action 2 - Format Remediation Note

  • Script:

Action 3 - Create Bugcrowd Submission Comment

  • Method: POST

  • URL: https://api.bugcrowd.com/comments

  • Headers:

    • Key = Authorization; Type = Secret; Value = bugcrowd_authorization_token

    • Key = Accept; Type = Value; Value = application/vnd.bugcrowd+json

    • Key = Content-Type; Type = Value; Value = application/json

  • Request Script:

  • Response Script:

Create Bugcrowd Comment on Updated Remediation Note

The purpose of this example is to create a comment in Bugcrowd when a remediation note is updated.

This example Flow can be downloaded from our Flows GitHub Repository and imported into your AttackForge.

Initial Set Up

  • Event:

    • vulnerability-remediation-note-updated

  • Secrets:

    • bugcrowd_authorization_token - your Bugcrowd API token

    • bugcrowd_visibility - must be one of the following: everyone, bugcrowd_and_researcher, bugcrowd_and_customer, customer, bugcrowd

    • af_tenant - your AttackForge tenant e.g. acmecorp.attackforge.com

    • logging_level - logging verbosity level. Supports debug

Action 1 - Get AttackForge Project ID and Bugcrowd Submission ID

  • Method: GET

  • URL: https://{{af_tenant}}/api/ss/vulnerability/{id}

  • Headers:

    • Key = Content-Type; Type = Value; Value = application/json

    • Key = X-SSAPI-KEY; Type = Secret; Value = af_apikey

  • Request Script:

  • Response Script:

Action 2 - Format Remediation Note

  • Script:

Action 3 - Create Bugcrowd Submission Comment

  • Method: POST

  • URL: https://api.bugcrowd.com/comments

  • Headers:

    • Key = Authorization; Type = Secret; Value = bugcrowd_authorization_token

    • Key = Accept; Type = Value; Value = application/vnd.bugcrowd+json

    • Key = Content-Type; Type = Value; Value = application/json

  • Request Script:

  • Response Script:

Create/Update Remediation Notes on Created/Updated Bugcrowd Comments

The purpose of this example is to schedule a flow to run each day to create or update remediation notes based on comments activity in Bugcrowd.

This example Flow can be downloaded from our Flows GitHub Repository and imported into your AttackForge.

Initial Set Up

  • Schedule

    • Cron String: */30 * * * *

    • Frequency: Run every 30 minutes

  • Secrets:

Action 1 - Get Bugcrowd Vulnerabilities

  • Method: GET

  • URL: https://{{af_tenant}}/api/ss/vulnerabilities?q={custom_fields:{$elemMatch:{name:{$eq:"source"},value:{$eq:"Bugcrowd"}}}}

  • Headers:

    • Key = Content-Type; Type = Value; Value = application/json

    • Key = X-SSAPI-KEY; Type = Secret; Value = af_apikey

  • Request Script:

  • Response Script:

Action 2 - Format Remediation Notes

  • Script:

Action 3 - Get Comments from Submission

  • Method: GET

  • URL: https://api.bugcrowd.com/submissions?fields[comment]=body,created_at,author,file_attachments&include=comments,comments.author,comments.file_attachments&page[limit]=25&page[offset]=0

  • Headers:

    • Key = Authorization; Type = Secret; Value = bugcrowd_authorization_token

    • Key = Accept; Type = Value; Value = application/vnd.bugcrowd+json

    • Key = Content-Type; Type = Value; Value = application/json

  • Request Script:

  • Response Script:

Action 4 - Convert Markdown to Rich Text

  • Method: POST

  • URL: https://{{af_tenant}}/api/ss/utils/markdown-to-richtext

  • Headers:

    • Key = Content-Type; Type = Value; Value = application/json

    • Key = X-SSAPI-KEY; Type = Secret; Value = af_apikey

  • Request Script:

  • Response Script:

Action 5 - Create or Update Comments

  • Script:

Action 6 - Create Remediation Notes

  • Method: POST

  • URL: https://{{af_tenant}}/api/ss/vulnerability/{id}/remediationNote

  • Headers:

    • Key = Content-Type; Type = Value; Value = application/json

    • Key = X-SSAPI-KEY; Type = Secret; Value = af_apikey

  • Request Script:

  • Response Script:

Action 7 - Update Remediation Notes

  • Method: PUT

  • URL: https://{{af_tenant}}/api/ss/vulnerability/{vulnerabilityId}/remediationNote/{remediationNoteId}

  • Headers:

    • Key = Content-Type; Type = Value; Value = application/json

    • Key = X-SSAPI-KEY; Type = Secret; Value = af_apikey

  • Request Script:

  • Response Script:

Last updated