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

Support for build failure criteria for FoD SAST and open source scans #34

Closed
fortifysoftware opened this issue Mar 12, 2024 · 3 comments
Labels

Comments

@fortifysoftware
Copy link

There currently doesn't seem to be a way to specify build failure criteria for FoD SAST and open source scans. (For instance, fail the build if any critical SAST or OSS issues are detected.) Are there any plans to add this feature any time soon?

Related to this, I've noticed that the endpoint GET /api/v3/releases/{releaseId}, for which fcli fod rel get {releaseId} relies, lacks open source issue counts. However, they can easily be deduced with some simple arithmetic. For example:

ossCritical = critical - staticCritical - dynamicCritical - mobileCritical

@rsenden
Copy link
Contributor

rsenden commented Mar 12, 2024

@fortifysoftware, there are several internal discussions (not necessarily related to fcli/GitHub Action) regarding the ability to break the build or avoid pull requests from being merged based on certain criteria. Even though this seems like a simple question, there are many aspects to be considered to properly implement something like this. I'll share some details on this by email.

As for the open source issue counts, we shouldn't be doing such calculations on the client side; maybe FoD introduces yet another scan type in the future, causing such calculations to show inaccurate numbers. Please submit an FoD enhancement request to get OSS issue counts added in REST responses.

@rsenden
Copy link
Contributor

rsenden commented May 30, 2024

@fortifysoftware We've recently introduced 'fcli actions' that allow for running customizable operations, one of the use cases is to provide a customizable check-policy action that allows for configuring certain pass/fail criteria, returning a non-zero exit code if the output of any of the checks is 'fail'. We plan on adding support for this in the GitHub Action, current idea is to provide something like a CHECK_POLICY_ACTION environment variable (which might point to a local file or URL); if defined, the GitHub Action would run fcli fod/ssc action run ${CHECK_POLICY_ACTION} once scan results have been published to FoD/SSC. If any of the checks fail, the non-zero exit code would fail the build (maybe we should have an additional input to specify whether the non-zero exit code would cause a failure or just a build warning).

@rsenden
Copy link
Contributor

rsenden commented Sep 25, 2024

Implemented in latest 1.3.0 release

@rsenden rsenden closed this as completed Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants