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

Parse Scan Ids even if URI-encoded #105

Merged
merged 8 commits into from
May 30, 2024
Merged

Parse Scan Ids even if URI-encoded #105

merged 8 commits into from
May 30, 2024

Conversation

pbrisbin
Copy link
Member

@pbrisbin pbrisbin commented May 30, 2024

We parse the Scan Id out of the CLI output, which includes the URL. The CLI apparently changed to emit URI-encoded URLs instead of un-encoded. Something we were recently working around ourselves. This change updates the regex we use to look for well-formed GUIDs specifically, rather than any hyphenated hex value within a URL parameter (which is what just changed). This fixes the bug and makes things both simpler and more robust along the way.

Since the CLI output now includes an encoded URL, I removed our recent workaround of encoding and logging a URL ourselves.

I also made it so the Job doesn't fail entirely if we're unable to parse a Scan Id, also in the interest of keeping things robust. If our parser fails, we will now only be unable to build a summary (which users may not be doing anyway) and will set an empty scan-id output.

@pbrisbin pbrisbin changed the title pb/scan id Parse Scan Ids even if URI-encoded May 30, 2024
@pbrisbin pbrisbin linked an issue May 30, 2024 that may be closed by this pull request
@pbrisbin pbrisbin marked this pull request as ready for review May 30, 2024 18:40
@pbrisbin pbrisbin requested review from a team, derek-ye and joris974 and removed request for a team and derek-ye May 30, 2024 18:40
@pbrisbin pbrisbin merged commit 7771aba into main May 30, 2024
4 checks passed
@pbrisbin pbrisbin deleted the pb/scan-id branch May 30, 2024 19:22
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.

Failure to parse scan ID from report breaks step entirely
2 participants