Skip to content

Use server-provided scan report links - #399

Open
John-David Dalton (jdalton) wants to merge 2 commits into
fix/python-diff-identityfrom
fix/python-server-report-urls
Open

John-David Dalton (jdalton) wants to merge 2 commits into
fix/python-diff-identityfrom
fix/python-server-report-urls

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Python CLI output now uses Socket’s report links, so comparisons and scans point to the server’s intended pages, including alternate deployments.

The CLI preserves query parameters and fragments, matches nested scan IDs before attaching links, and omits unavailable Jira and Slack links.

Builds on #398. Validation: 36 focused tests and scoped Ruff pass. The streaming SDK does not return old/new scan URLs, so only known scan-creation links are retained.

Use server-provided report links and preserve their query parameters in Python CLI output.

The test checks that explicit files skip a second discovery walk. It
failed only because its stub full scan had no html_report_url, which
create_full_scan_with_report_url now reads.
@lelia

lelia commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

If the diff-scan response has no html_url, diff_url ends up null, both on the Diff and in the JSON diff_url field; main always fills that field with a URL it builds. PR comments fall back to the scan report link, so those are fine, but the log line prints Diff report URL: None.

Is html_url always present on GET /orgs/{org}/diff-scans/{id}? If not, consider falling back to the URL main builds, or at least skipping the log line when it's missing.

This branch has not been deployed

No deployments
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.

2 participants