-
Notifications
You must be signed in to change notification settings - Fork 5
Fix blackduck sca scan getting skipped #21
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
Changes from 9 commits
87f7462
6a089ff
2c287a2
99d9a96
d72d128
eb4b9bc
3b59424
68026c2
4ee8d09
f9b16b7
ca2e00f
8f14667
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,6 +77,11 @@ on: | |
| required: false | ||
| type: string | ||
| default: 'ruby' | ||
| ruby-app-directory: | ||
| description: 'Subdirectory containing Ruby Gemfile (e.g., "src/supermarket" for repos with non-root Gemfile location). Leave empty if Gemfile is in root.' | ||
| required: false | ||
| type: string | ||
| default: '' | ||
|
|
||
| env: | ||
| # Set the default SBOM filename prefix | ||
|
|
@@ -203,11 +208,19 @@ jobs: | |
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up Ruby and run bundle install | ||
| if: ${{ inputs.language == 'ruby' }} # only run for Ruby projects where we need to generate Gemfile.lock at runtime, inputs.run-bundle-install == true | ||
| if: inputs.language == 'ruby' | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: '3.4' | ||
| bundler-cache: true | ||
| ruby-version: '3.4.2' | ||
| bundler-cache: false | ||
| working-directory: ${{ inputs.ruby-app-directory != '' && inputs.ruby-app-directory || '.' }} | ||
|
|
||
| - name: Set up Erlang/OTP and rebar3 | ||
| if: inputs.language == 'erlang' | ||
| uses: erlef/setup-beam@v1 | ||
| with: | ||
| otp-version: '25.3.2.16' | ||
| rebar3-version: '3.22.0' | ||
|
|
||
| - name: Configure git for private Go modules | ||
| if : ${{ inputs.go-private-modules != '' }} | ||
|
|
@@ -218,6 +231,7 @@ jobs: | |
| - name: generate Gemfile.lock if needed for Ruby projects | ||
| if: ${{ inputs.run-bundle-install == true && inputs.language == 'ruby' }} | ||
| continue-on-error: true | ||
| working-directory: ${{ inputs.ruby-app-directory != '' && inputs.ruby-app-directory || '.' }} | ||
| run: | | ||
| if [ ! -f Gemfile.lock ]; then | ||
| bundle install | ||
|
|
@@ -228,7 +242,7 @@ jobs: | |
| uses: actions/upload-artifact@v4 | ||
| continue-on-error: true | ||
| with: | ||
| path: Gemfile.lock | ||
| path: ${{ inputs.ruby-app-directory != '' && format('{0}/Gemfile.lock', inputs.ruby-app-directory) || 'Gemfile.lock' }} | ||
| name: ${{ github.event.repository.name }}-Gemfile-lock.txt | ||
|
|
||
| - name: BlackDuck SCA scan | ||
|
|
@@ -242,7 +256,8 @@ jobs: | |
| with: | ||
| blackducksca_url: ${{ secrets.BLACKDUCK_SBOM_URL }} # BLACKDUCK_URL, should be https://progresssoftware.app.blackduck.com/ | ||
| blackducksca_token: ${{ secrets.BLACKDUCK_SCA_TOKEN }} # was BLACKDUCK_API_KEY | ||
| detect_args: ${{ inputs.blackduck-force-low-accuracy-mode == true && '--detect.excluded.detector.types=PIP --detect.accuracy.required=NONE' || '--detect.excluded.detector.types=PIP' }} | ||
| blackducksca_scan_full: true # Force INTELLIGENT scan mode for all branches (uploads results to server) | ||
| detect_args: ${{ inputs.ruby-app-directory != '' && format('{0} --detect.source.path={1}', inputs.blackduck-force-low-accuracy-mode == true && '--detect.excluded.detector.types=PIP --detect.accuracy.required=NONE' || '--detect.excluded.detector.types=PIP', inputs.ruby-app-directory) || (inputs.blackduck-force-low-accuracy-mode == true && '--detect.excluded.detector.types=PIP --detect.accuracy.required=NONE' || '--detect.excluded.detector.types=PIP') }} | ||
|
||
| # blackducksca_scan_failure_severities: 'BLOCKER,CRITICAL' | ||
| # ignore python per https://documentation.blackduck.com/bundle/detect/page/packagemgrs/python.html | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.