Skip to content

Include API actions in JSON findings - #407

Open
John-David Dalton (jdalton) wants to merge 1 commit into
fix/python-alert-reference-linksfrom
fix/python-json-alert-actions
Open

John-David Dalton (jdalton) wants to merge 1 commit into
fix/python-alert-reference-linksfrom
fix/python-json-alert-actions

Conversation

@jdalton

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

Copy link
Copy Markdown
Contributor

LLM Description written by Codex:gpt-6-luna

Carry the Socket API's resolved action into each selected alert row in standard JSON. The new action field preserves the API value and is null when unavailable; legacy Issue serialization, equality, existing alert selection, links, and CLI process exit behavior remain unchanged.

Why?

JSON consumers need the action Socket resolved for a finding to present consistent remediation without changing existing CI behavior. Strict blocking continues to include unchanged error and warning findings, while standard output continues to use the existing selected rows.

Public Changelog

Standard Socket JSON now includes the API action on each selected finding.


Note

Low Risk
Additive JSON field and internal Issue metadata with explicit tests that selection, exit codes, and legacy serialization are unchanged.

Overview
Standard Socket JSON (--enable-json) now exposes the Socket API’s resolved policy action on each selected alert row as action (e.g. error, warn, monitor, ignore), or JSON null when the API omits it or the value isn’t a string.

The CLI reads action from API alert payloads into Issue.api_action during diff processing, then pairs selected issues with serialized rows in build_socket_json_report so action lines up with existing alert selection (including --strict-blocking unchanged findings). Issue.to_dict() and Diff serialization omit api_action, so legacy equality/serialization paths stay the same; action does not change exit codes or blocking flags. Docs in cli-reference.md describe the new field.

Reviewed by Cursor Bugbot for commit fe1b610. Configure here.

Expose the Socket API action on selected standard JSON findings while preserving legacy Issue serialization, equality, alert selection, and process exit behavior. Verify both real SDK transport paths with the local HTTP fixture.

Assisted-by: Codex:gpt-6-luna
@jdalton
John-David Dalton (jdalton) requested a review from a team as a code owner October 15, 2026 00: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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant