fortify / fcli

fcli is a command-line utility for interacting with various Fortify products
https://fortify.github.io/fcli/
Other
27 stars 16 forks source link

`fcli * action`: Add `analyze` command for action security analysis #539

Open rsenden opened 1 month ago

rsenden commented 1 month ago

As actions can potentially perform dangerous operations like sending confidential data to a 3rd-party system, deleting data from Fortify systems, and potentially in the future run arbitrary commands, security for (custom) actions is an important topic, and the primary reason for implementing signing capabilities to establish a trust relationship.

It would be good to provide an ability to generate some kind of security report that assigns a risk level to each step defined in a given action YAML file. Potentially we could have some Fortify rules, but that might be difficult for FoD customers unless we add such rules to the standard Fortify rule packs rather than providing custom rules. Probably easier is to have a dedicated fcli * action analyze or similar command that looks at action contents and outputs a simple text-based security report or even just a list of instructions with associated risk level.

For example, such a command would:

Given the last point, potentially we could even implement a customizable action for performing security checks, i.e., fcli * action run action-security-report <action source>, with that action loading the YAML file of the action to be analyzed as JSON contents, and then for example use check instructions to perform security checks on the steps specified by that action.