-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add ability to run and import Debricked scans into SSC (closes #41
- Loading branch information
Showing
41 changed files
with
785 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,21 @@ inputs: | |
description: 'Run a SAST scan, takes either true or false (default)' | ||
default: 'false' | ||
required: false | ||
debricked-sca-scan: | ||
description: 'Run a Debricked Software Composition Analysis, takes either true or false (default)' | ||
default: 'false' | ||
required: false | ||
runs: | ||
using: composite | ||
steps: | ||
- uses: fortify/github-action/[email protected] | ||
if: inputs['sast-scan']=='true' && env.FOD_URL | ||
if: inputs['sast-scan']=='true' && env.FOD_URL | ||
- uses: fortify/github-action/[email protected] | ||
if: inputs['sast-scan']=='true' && env.SSC_URL | ||
if: inputs['sast-scan']=='true' && env.SSC_URL | ||
env: | ||
DO_DEBRICKED_SCAN: ${{ inputs['debricked-sca-scan'] }} | ||
- uses: fortify/github-action/[email protected] | ||
if: inputs['sast-scan']=='false' && inputs['debricked-sca-scan']=='true' && env.SSC_URL | ||
|
||
branding: | ||
icon: 'shield' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
This action performs a Debricked Software Composition Analysis (SCA) scan, consisting of the following steps: | ||
|
||
* Login to Fortify SSC | ||
* Run Debricked scan | ||
* Publish Debricked scan results to Fortify SSC | ||
* Optionally wait for SSC artifact processing to complete | ||
|
||
Note that this action is explicitly meant for Debricked/SSC integration. If you wish to run a Debricked scan without publishing the results to SSC, please see the [Debricked GitHub Integration documentation](https://portal.debricked.com/integrations-48/integration-with-github-214#github-actions) | ||
|
||
{{include:action-prerequisites.md}} | ||
|
||
Apart from the generic action prerequisites listed above, the following prerequisites apply to this specific action: | ||
|
||
* The appropriate application version must exist on SSC. Future versions of this action may add support for automating application version creation. | ||
* The [Fortify SSC Parser Plugin for Debricked results](https://github.com/fortify/fortify-ssc-parser-debricked-cyclonedx) must be installed on Fortify SSC, to allow for SSC to accept and process the Debricked scan results submitted by this action. | ||
|
||
### Action environment variable inputs | ||
|
||
{{include:env-ssc-debricked-scan.md}} | ||
|
||
{{include:env-setup.md}} | ||
|
||
### Sample usage | ||
|
||
The sample workflow below demonstrates how to configure the action for running a Debricked scan and publishing the results to Fortify SSC. | ||
|
||
```yaml | ||
steps: | ||
- name: Check out source code | ||
uses: actions/checkout@v4 | ||
- name: Run Debricked Scan | ||
uses: fortify/github-action/ssc-debricked-scan@{{var:action-major-version}} | ||
env: | ||
{{include:nocomments.env-ssc-debricked-scan-sample.md}} | ||
{{include:nocomments.env-setup-sample.md}} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{include:env-ssc-connection.md}} | ||
|
||
{{include:env-ssc-login.md}} | ||
|
||
**`DEBRICKED_TOKEN`** - REQUIRED | ||
See the [Generate access token](https://docs.debricked.com/product/administration/generate-access-token) section in the Debricked documentation for details on how to generate this token. | ||
|
||
{{include:env-ssc-appversion.md}} | ||
|
||
**`DO_WAIT`** - OPTIONAL | ||
By default, this action will complete immediately after Debricked scan results have been uploaded to SSC. To have the workflow wait until the Debricked results have been processed by SSC (potentially failing if the results cannot be successfully processed), set the `DO_WAIT` environment variable to `true`. | ||
|
||
For consistency with other actions, `DO_WAIT` is implied if `DO_EXPORT` is set to `true`, but since GitHub doesn't support importing Software Composition Analysis results, Debricked results will not be published to GitHub even if `DO_EXPORT` is set to `true`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
{{include:env-ssc-connection.md}} | ||
|
||
**`EXTRA_SSC_LOGIN_OPTS`** - OPTIONAL | ||
Extra SSC login options, for example for disabling SSL checks or changing connection time-outs; see [`fcli ssc session login` documentation]({{var:fcli-doc-base-url}}/manpage/fcli-ssc-session-login.html). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
{{include:nocomments.env-ssc-connection-sample.md}} | ||
SC_SAST_TOKEN: ${{secrets.CLIENT_AUTH_TOKEN}} | ||
# EXTRA_SC_SAST_LOGIN_OPTS: --socket-timeout=60s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
{{include:nocomments.env-ssc-connection-sample.md}} | ||
{{include:nocomments.env-ssc-login-sample.md}} | ||
{{include:nocomments.env-sc-sast-login-sample.md}} | ||
{{include:nocomments.env-ssc-appversion-sample.md}} | ||
{{include:nocomments.env-package-sample.md}} | ||
SC_SAST_SENSOR_VERSION: 23.2 | ||
# DO_DEBRICKED_SCAN: true # Or debricked-sca-scan input on top-level action | ||
# DEBRICKED_TOKEN: ${{secrets.DEBRICKED_TOKEN}} | ||
# DO_WAIT: true | ||
# DO_EXPORT: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{{include:nocomments.env-ssc-connection-sample.md}} | ||
{{include:nocomments.env-ssc-login-sample.md}} | ||
{{include:nocomments.env-ssc-appversion-sample.md}} | ||
DEBRICKED_TOKEN: ${{secrets.DEBRICKED_TOKEN}} | ||
# DO_WAIT: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# EXTRA_SSC_LOGIN_OPTS: --socket-timeout=60s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
doc-resources/templates/ssc-debricked-scan/README.template.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# fortify/github-action/ssc-debricked-scan@{{var:action-major-version}} | ||
|
||
{{include:p.marketing-intro.md}} | ||
|
||
{{include:action-ssc-debricked-scan.md}} | ||
|
||
{{include:h2.support.md}} | ||
|
||
--- | ||
|
||
*[This document was auto-generated; do not edit by hand](https://github.com/fortify/shared-doc-resources/blob/main/USAGE.md)* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,8 @@ runs: | |
- uses: fortify/github-action/internal/[email protected] | ||
if: ${{ !env._FOD_LOGGED_IN }} | ||
with: | ||
cwd: ${{ github.action_path }} | ||
script: ./fod-login.sh | ||
post: ./fod-logout.sh | ||
script: fod-login.sh | ||
post: fod-logout.sh | ||
|
||
branding: | ||
icon: 'shield' | ||
|
Oops, something went wrong.