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

Include the Socket API’s resolved action in each selected finding in standard JSON, so consumers can show the same recommended response. The field is null when unavailable.

Existing alert selection and CLI exit behavior stay unchanged.

Implementation and validation

Preserves legacy Issue serialization, equality, and links. Strict blocking still includes unchanged error and warning findings; standard output still uses the existing selected rows.

No test-run result is recorded in this description.

Links and PR checklist

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

Automated review notes

[!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

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