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

Possible to use SSC without ScanCentral SAST? #25

Open
jizusun opened this issue Feb 2, 2024 · 3 comments
Open

Possible to use SSC without ScanCentral SAST? #25

jizusun opened this issue Feb 2, 2024 · 3 comments
Labels

Comments

@jizusun
Copy link

jizusun commented Feb 2, 2024

Hi comunity,

I'm trying to set up the GitHub action for our internal Fortify SSC.

When I'm using the following setup:


name: Fortify 
on:
  push:
    branches:
      - main 
  pull_request:
    branches: 
      - main 

env:
  FORTIFY_URL: https://fortify.mycorp.com/ssc

jobs:
  build:
    runs-on: [self-hosted, linux, x64, my-corp, ubuntu-latest]
    steps:    
      - name: Check out source code
        uses: actions/checkout@v4  
      - name: Run ScanCentral SAST Scan
        uses: fortify/github-action@v1
        # with:
        #   sast-scan: true
        env:
          SSC_URL: ${{ env.FORTIFY_URL }} 
          SSC_TOKEN: ${{secrets.SSC_TOKEN}}
          # SC_SAST_TOKEN: ${{secrets.SSC_TOKEN}}

I had an error during the execution

/opt/actions-runner/_work/_temp/fortify/fcli/2.1.0/bin/fcli sc-sast session login --ssc-url https://fortify.philips.com/ssc -t *** -c ***
java.lang.IllegalStateException: ScanCentral SAST must be enabled in SSC
	at com.fortify.cli.sc_sast._common.session.helper.SCSastSessionDescriptor.checkScSastIsEnabled(SCSastSessionDescriptor.java:186)
	at com.fortify.cli.sc_sast._common.session.helper.SCSastSessionDescriptor.getScSastUrl(SCSastSessionDescriptor.java:170)
	at com.fortify.cli.ssc.access_control.helper.SSCTokenHelper.run(SSCTokenHelper.java:94)
	at com.fortify.cli.sc_sast._common.session.helper.SCSastSessionDescriptor.getScSastUrl(SCSastSessionDescriptor.java:165)
	at 

Is it possible to use SSC without ScanCentral SAST?

@MikeTheSnowman
Copy link

Hello @jizusun .
Can you please describe what you wish to accomplish with Fortify SSC?

Please keep in mind that Fortify SSC is a server that is basically used as a centralized location to store your scan results, generate reports, and to facilitate collaborative auditing. SSC by itself does not do any scanning; all SAST scanning is handled by ScanCentral SAST.

@rsenden
Copy link
Contributor

rsenden commented May 30, 2024

Just to add to the above, the current GitHub Action only supports running scans on ScanCentral SAST. Potentially it could be interesting to add support for running Fortify SCA scans directly on a GitHub Runner, however this is not on our roadmap for the near future for various reasons as detailed below.

Potentially, we could support self-hosted runners that already have Fortify SCA (and license) installed. However, we'd need to implement some mechanism to locate this Fortify SCA installation. For example, do we depend on this installation being on the system PATH, or do we accept some configurable input that allows the workflow to explicitly specify Fortify SCA location?

Alternatively, we could support dynamically downloading and installing Fortify SCA during workflow execution, however:

  • There is no public download for Fortify SCA, so we can't easily download and install Fortify SCA during workflow execution. Customers would need to host Fortify SCA on some internal download server, and allow their GitHub Runners to access this download location, without exposing this download location to the full internet.
  • We'd need to implement some approach for handling the Fortify license, for example stored as a GitHub secret.
  • Fortify SCA installation bundle is relatively large and installation process takes relatively long, so this approach would significantly affect workflow execution time.

Apart from the above, some general considerations:

  • Version compatibility might be an issue; depending on Fortify SCA (installer) version, some command-line options and/or features may or may not be available.
  • Some Fortify SCA command-line tools and the installer are platform-dependent, so we'd potentially need multiple implementations for each supported platform.
  • The workflow would need to wait until the scan has completed; contrary to ScanCentral SAST, we wouldn't be able to just submit a scan request and then continue/terminate workflow execution.

@jizusun
Copy link
Author

jizusun commented Jun 4, 2024

Just to add to the above, the current GitHub Action only supports running scans on ScanCentral SAST. Potentially it could be interesting to add support for running Fortify SCA scans directly on a GitHub Runner, however this is not on our roadmap for the near future for various reasons as detailed below.

Potentially, we could support self-hosted runners that already have Fortify SCA (and license) installed. However, we'd need to implement some mechanism to locate this Fortify SCA installation. For example, do we depend on this installation being on the system PATH, or do we accept some configurable input that allows the workflow to explicitly specify Fortify SCA location?

Alternatively, we could support dynamically downloading and installing Fortify SCA during workflow execution, however:

  • There is no public download for Fortify SCA, so we can't easily download and install Fortify SCA during workflow execution. Customers would need to host Fortify SCA on some internal download server, and allow their GitHub Runners to access this download location, without exposing this download location to the full internet.
  • We'd need to implement some approach for handling the Fortify license, for example stored as a GitHub secret.
  • Fortify SCA installation bundle is relatively large and installation process takes relatively long, so this approach would significantly affect workflow execution time.

Apart from the above, some general considerations:

  • Version compatibility might be an issue; depending on Fortify SCA (installer) version, some command-line options and/or features may or may not be available.
  • Some Fortify SCA command-line tools and the installer are platform-dependent, so we'd potentially need multiple implementations for each supported platform.
  • The workflow would need to wait until the scan has completed; contrary to ScanCentral SAST, we wouldn't be able to just submit a scan request and then continue/terminate workflow execution.

Oh thank you! I get your point.

We have a GitHub actions internally inside Philips that does something like what you describe, which is downloading the Fortify and license from Artifactory to the runner and run.

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

3 participants