Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fcli fod issue *: Add support for issue operations at application level #596

Open
rsenden opened this issue Sep 13, 2024 · 2 comments
Open
Labels
effort:medium Medium effort needed to implement/fix enhancement New feature or request prio:medium Medium priority

Comments

@rsenden
Copy link
Contributor

rsenden commented Sep 13, 2024

Enhancement Request

Current fcli fod issue * commands operate at release level, for example listing all issues for a release. Now that FoD supports API endpoints for managing issues at application level, we should allow fcli fod issue * commands to operate at application level as well. We'd need to decide whether these become new commands, or whether existing commands would accept either release or application.

@rsenden rsenden added enhancement New feature or request prio:medium Medium priority effort:medium Medium effort needed to implement/fix labels Sep 13, 2024
@kadraman
Copy link
Collaborator

The new application level command /api/v3/applications/{applicationId}/issue-count-by-severity operates at a different level than the existing fcli fod issue ls command as this uses /api/v3/releases/{releaseId}/vulnerabilities and supports filters, querying etc. I don't think we want to mix these up in a single command. It also returns more details that just "issue counts" Maybe we have fcli fod issue app-summary and fcli fod issue release-summary or maybe fcli fod issue counts [--rel|--app].

@rsenden
Copy link
Contributor Author

rsenden commented Sep 18, 2024

For SSC, we have two issue commands; list and count. It seems like the /api/v3/applications/{applicationId}/issue-count-by-severity endpoint would be more appropriate for a count command, whereas /api/v3/releases/{releaseId}/vulnerabilities is more appropriate for a list command.

It seems a bit weird though to have count operate at application level, and list at release level. Ideally, we'd want to have commands for both listing and counting vulnerabilities at both application and release level. However, I don't see (unless I'm overlooking) an application-level endpoint for listing vulnerabilities, or a release-level endpoint for counting vulnerabilities.

Ideally, if FoD did provide those endpoints, endpoint request parameters should be mostly the same for both application and release level (as everything operates on vulnerability data), so in that case we could implement a single count and a single list command that both support --app and --rel (exclusive options) to process data at either application or release level.

For the count command, ideally this would support flexible grouping & search criteria like the SSC equivalent, like returning issue counts by OWASP category, or even only critical issue counts by OWASP category.

We should probably raise the following FoD enhancement requests:

  • Add /api/v3/applications/{applicationId}/vulnerabilities endpoint, supporting same filtering etcetera parameters as /api/v3/releases/{releaseId}/vulnerabilities.
  • Add /api/v3/applications/{applicationId}/issue-count and /api/v3/releases/{releaseId}/issue-count endpoints that both support the same grouping and filtering criteria (more flexibility compared to current /api/v3/applications/{applicationId}/issue-count-by-severity endpoint).

Until then, we could potentially (partially) implement such functionality within fcli. For example, to list issues at application level, we could simply iterate over all application releases and filter out duplicate issue instance id's. To count issues at release level by severity, we could make a simple call to /api/v3/releases/{id}, which returns critical etcetera properties. For consistency with ssc issue count and to potentially support different grouping types later on, each issue count should be returned as a separate row, instead of having a single row with criticial, high, ... properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:medium Medium effort needed to implement/fix enhancement New feature or request prio:medium Medium priority
Projects
None yet
Development

No branches or pull requests

2 participants