Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FX-4815] Document new available DAST endpoints #263

Merged
merged 20 commits into from
Oct 8, 2024

Conversation

davidgm0
Copy link
Contributor

@davidgm0 davidgm0 commented Oct 1, 2024

There are a few adjustment pending before the API exactly matches what is described. These will be merged before this PR gets merged.

Copy link

netlify bot commented Oct 1, 2024

Deploy Preview for cobalt-public-api ready!

Name Link
🔨 Latest commit 8523fb2
🔍 Latest deploy log https://app.netlify.com/sites/cobalt-public-api/deploys/6704e07ff7b0af0008b3ad5d
😎 Deploy Preview https://deploy-preview-263--cobalt-public-api.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@davidgm0 davidgm0 marked this pull request as ready for review October 1, 2024 16:42
@davidgm0 davidgm0 requested a review from a team as a code owner October 1, 2024 16:42
## Update Finding State

```sh
curl -X PATCH "https://api.us.cobalt.io/dast/findings/YOUR-DAST-FINDING-IDENTIFIER" \
Copy link

@wolfgangbecker wolfgangbecker Oct 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this endpoint exist already?

Copy link
Contributor Author

@davidgm0 davidgm0 Oct 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a pending update to change that.

(Note that this repo is public)

wolfgangbecker
wolfgangbecker previously approved these changes Oct 1, 2024
Copy link

@wolfgangbecker wolfgangbecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already approving, but I noticed this comment might have gone unnoticed.

@davidgm0
Copy link
Contributor Author

davidgm0 commented Oct 2, 2024

Already approving, but I noticed this comment might have gone unnoticed.

I had already applied the suggestion 👍

TaylorBriggs
TaylorBriggs previously approved these changes Oct 2, 2024
Copy link

@TaylorBriggs TaylorBriggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@davidgm0 davidgm0 force-pushed the chore/FX-4815/update-dast-docs branch 3 times, most recently from 1ab7ce4 to 33b932b Compare October 4, 2024 09:28
mohitkyadav
mohitkyadav previously approved these changes Oct 4, 2024
@davidgm0 davidgm0 marked this pull request as draft October 4, 2024 10:01
@davidgm0 davidgm0 force-pushed the chore/FX-4815/update-dast-docs branch from 33b932b to da46dd4 Compare October 4, 2024 10:04
@davidgm0 davidgm0 marked this pull request as ready for review October 4, 2024 11:05
| `proof_of_concept` | Evidence of the vulnerability finding. |
| `suggested_fix` | Description of how to fix the vulnerability. |
| `http_exchanges` | Pairs of `request` and `response` of the vulnerability finding. |
See [Finding response fields](#finding-response-fields)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these docs are manually curated, I think it makes more sense to link to avoid duplication and that some parts get outdated

wolfgangbecker
wolfgangbecker previously approved these changes Oct 4, 2024

```sh
curl -X POST "https://api.us.cobalt.io/dast/targets/YOUR-DAST-TARGET-IDENTIFIER/scheduled_scans" \
-H "Accept: application/vnd.cobalt.v2+json" \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs content-type header
Screenshot 2024-10-07 at 4 57 23 PM


| Field | Description |
|---------|-------------------------------------------------------------------------------------------|
| `state` | The desired next state of the finding. Should be one of [`notfixed`, `invalid`, `accepted`] |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found during acceptance testing that not all of the states listed here work. I tried to use accepted.
I found the correct values here: https://github.com/cobalthq/cobalt-api/blob/main/src/main/kotlin/io/cobalt/api/dast/finding/v2/dto/DastFindingTransitionWrapper.kt

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good catch. These were not "our" states, I have corrected that.

Co-authored-by: Grayson Kuhns <[email protected]>
@@ -135,9 +128,70 @@ This endpoint retrieves a specific DAST finding that belongs to the organization
| `title` | Name of the vulnerability |
| `last_found_at` | Date and time of when the vulnerability was last found, in ISO 8601 UTC format. |
| `severity` | Severity of the vulnerability finding: `10` is low. `20` is medium. `30` is high. |
| `state` | State of the vulnerability finding: [`notfixed`, `invalid`, `accepted`, `fixed`] |
| `state` | State of the vulnerability finding: [`invalid`, `need_fix`, `wont_fix`, `valid_fix`, `check_fix`] |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were not correct. "our" states are correctly listed now.

Copy link
Collaborator

@grayson-cobalt grayson-cobalt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@davidgm0 davidgm0 merged commit 7d33d93 into main Oct 8, 2024
15 checks passed
@davidgm0 davidgm0 deleted the chore/FX-4815/update-dast-docs branch October 8, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants