Skip to content

feat(python-cli-parity): add SCM scan context and Azure CI - #1831

Open
John-David Dalton (jdalton) wants to merge 1 commit into
jdalton/surf-2211-port-core-scan-and-blocking-behaviorfrom
jdalton/surf-2213-port-pr-mr-workflows
Open

John-David Dalton (jdalton) wants to merge 1 commit into
jdalton/surf-2211-port-core-scan-and-blocking-behaviorfrom
jdalton/surf-2213-port-pr-mr-workflows

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

The Socket Python CLI links scan results to the pull request so reviewers can see what changed. This PR adds provider metadata to socket ci uploads and the PR URL to diff scans.

In Azure Pipelines, set SOCKET_CLI_API_TOKEN and configure a build validation policy for Azure Repos. If the target baseline is unavailable, the CLI uploads a full scan and reports an incomplete comparison. A blocking finding or scan error keeps its own exit code.

@cursor

cursor Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes CI exit behavior for Azure PRs without baselines and sends new API fields for full/diff scans; mistakes in URL construction are mitigated by strict URL validation in PR link building.

Overview
Extends socket ci so uploaded scans carry SCM integration metadata (integration_type, integration_org_slug) and PR comparisons can link to the change via external_href on diff-scan creation. PR detection now builds a validated PR URL for GitHub, GitLab, and Azure from CI environment variables.

Azure-specific behavior: when no reliable PR baseline scan exists, CI continues with a full scan (no PR diff/blocking until a baseline exists), logs a warning, and exits with infrastructure status 3. Docs and a new workflows/azure-pipelines.yml example describe Azure Repos branch policies and SOCKET_CLI_API_TOKEN setup.

Reviewed by Cursor Bugbot for commit e3320e9. Configure here.

@jdalton
John-David Dalton (jdalton) force-pushed the jdalton/surf-2213-port-pr-mr-workflows branch 2 times, most recently from e3c51dc to e3320e9 Compare December 4, 2026 05:56

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e3320e9. Configure here.

Comment thread src/commands/ci/handle-ci.mts Resolved
@jdalton
John-David Dalton (jdalton) force-pushed the jdalton/surf-2213-port-pr-mr-workflows branch from e3320e9 to b075b55 Compare December 4, 2026 06:06
@jdalton
John-David Dalton (jdalton) force-pushed the jdalton/surf-2213-port-pr-mr-workflows branch from b075b55 to b94be6f Compare December 4, 2026 14:38
@jdalton
John-David Dalton (jdalton) force-pushed the jdalton/surf-2213-port-pr-mr-workflows branch from b94be6f to e4c9ce4 Compare December 4, 2026 17:36
@jdalton
John-David Dalton (jdalton) force-pushed the jdalton/surf-2213-port-pr-mr-workflows branch 2 times, most recently from 1bfccae to dccf217 Compare December 4, 2026 17:59
@jdalton
John-David Dalton (jdalton) force-pushed the jdalton/surf-2213-port-pr-mr-workflows branch from dccf217 to fa9ef3f Compare December 4, 2026 18:03

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

Development

Successfully merging this pull request may close these issues.

1 participant