Skip to content

Add get command for fcli ssc issue and fcli fod issue #974

@jmadhur87

Description

@jmadhur87

Enhancement Request

Currently, fcli ssc issue list and fcli fod issue list support listing issues, but there is no dedicated get command to fetch a single issue by ID. A get command would allow users and action workflows to efficiently retrieve a specific issue without listing all issues and filtering client-side. Add a get command to both fcli ssc issue and fcli fod issue that retrieves a single issue by its identifier, with optional --embed support to include additional data in the response.

Proposed Commands

SSC

  • fcli ssc issue get <issue-id> --av <appversion> [--embed details|comments|auditHistory]
    • <issue-id>: The numeric id field from the SSC issue response
    • --embed: Optional; values from existing SSCIssueBulkEmbedMixin (details, comments, auditHistory)
    • REST endpoint: GET /api/v1/projectVersions/{id}/issues/{issueId} or resolve via list + filter

FoD

  • fcli fod issue get <vuln-id> --rel <release> [--embed details|recommendations|traces|...]
    • <vuln-id>: The vulnId field from the FoD vulnerability response
    • --embed: Optional; values from existing FoDIssueEmbedMixin (details, recommendations, traces, history, requestResponse, headers, parameters, allData, summary)
    • REST endpoint: GET /api/v3/releases/{releaseId}/vulnerabilities/{vulnId}

Implementation Notes

  • Follow the existing FoDAppGetCommand / SSCAppVersionGetCommand patterns
  • Use FoDIssueEmbedMixin (FoD) and SSCIssueBulkEmbedMixin (SSC) for --embed option
  • Extend AbstractFoDJsonNodeOutputCommand (FoD) and AbstractSSCOutputCommand (SSC)
  • Register commands in the respective parent IssueCommands container class
  • Add usage header/description to FoDMessages.properties and SSCMessages.properties
  • For SSC: requires --appversion / --av to resolve the projectVersionId
  • For FoD: requires --release / --rel to resolve the releaseId

Acceptance Criteria

  • fcli ssc issue get <id> --av <appversion> returns the single issue JSON
  • fcli fod issue get <vuln-id> --rel <release> returns the single vulnerability JSON
  • --embed adds the corresponding embedded data to the response for both commands
  • Without --embed, default behavior returns the base issue record only
  • Table output columns defined in messages properties files

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions