-
Notifications
You must be signed in to change notification settings - Fork 19
feat(stesol-580): add blackduck workflow #131
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
Draft
NeethuESim
wants to merge
45
commits into
secure-build
Choose a base branch
from
stesol-580-blackduck-sbom
base: secure-build
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+113
−0
Draft
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
868eba5
feat: add blackduck gh workflow
NeethuESim 4ccaac2
fix: blackduck url & token vars
NeethuESim 4827072
Apply remaining changes
Copilot 810d604
fix: detect accuracy value
NeethuESim b9b3617
fix: token permission
NeethuESim bd113d7
fix: pin hash
NeethuESim 16ab726
fix: sarif upload via codeql-action
NeethuESim c884641
fix: uncomment gh token line for pr comments
NeethuESim 1ef3cf6
fix: addres PR comments
NeethuESim 3604972
test: with existing UI version
NeethuESim d3e6199
test: Blackduck UI report upload
NeethuESim 962822b
Black Duck: Black Duck SCA Policy Badges: Update README.md [skip ci]
github-actions[bot] 6b4c6e4
test: change upload report mechanism
NeethuESim d393cb1
Merge branch 'stesol-580-blackduck-sbom' of https://github.com/arm/mc…
NeethuESim b167ca1
Black Duck: Black Duck SCA Policy Badges: Update README.md [skip ci]
github-actions[bot] 118e40c
test:report upload
NeethuESim e95818c
Black Duck: Black Duck SCA Policy Badges: Update README.md [skip ci]
github-actions[bot] e064a7a
test:minimal scan
NeethuESim 581de3e
Merge branch 'stesol-580-blackduck-sbom' of https://github.com/arm/mc…
NeethuESim 6cccc6a
Black Duck: Black Duck SCA Policy Badges: Update README.md [skip ci]
github-actions[bot] bbb3f15
test: change versions
NeethuESim 4b9f288
Merge branch 'stesol-580-blackduck-sbom' of https://github.com/arm/mc…
NeethuESim a45cf6b
Black Duck: Black Duck SCA Policy Badges: Update README.md [skip ci]
github-actions[bot] 7f2048c
test: change version
NeethuESim d68ffa7
Merge branch 'stesol-580-blackduck-sbom' of https://github.com/arm/mc…
NeethuESim 6cbfeef
Black Duck: Black Duck SCA Policy Badges: Update README.md [skip ci]
github-actions[bot] 25e9bc1
test: add diagnostic
NeethuESim acc0f80
Merge branch 'stesol-580-blackduck-sbom' of https://github.com/arm/mc…
NeethuESim da49c2c
Black Duck: Black Duck SCA Policy Badges: Update README.md [skip ci]
github-actions[bot] 7a9427b
test: comment out params requiring authorization
NeethuESim 8a6d041
test: pass project name version via args
NeethuESim c0eace6
test: change project name
NeethuESim 051ca83
test: revert back reporting changes
NeethuESim ec10260
Black Duck: Black Duck SCA Policy Badges: Update README.md [skip ci]
github-actions[bot] b5c0f16
test: revert report upload changes
NeethuESim 0edbac6
Merge branch 'stesol-580-blackduck-sbom' of https://github.com/arm/mc…
NeethuESim f59bac2
Black Duck: Black Duck SCA Policy Badges: Update README.md [skip ci]
github-actions[bot] 4254c44
fix: change path
NeethuESim a1fe1f8
Merge branch 'stesol-580-blackduck-sbom' of https://github.com/arm/mc…
NeethuESim d26c2ca
Black Duck: Black Duck SCA Policy Badges: Update README.md [skip ci]
github-actions[bot] 027a838
test: add sarif path
NeethuESim 8bdc39e
Merge branch 'stesol-580-blackduck-sbom' of https://github.com/arm/mc…
NeethuESim 1c23642
Black Duck: Black Duck SCA Policy Badges: Update README.md [skip ci]
github-actions[bot] f467aea
fix: revert testing changes
NeethuESim 3d160a1
Merge branch 'stesol-580-blackduck-sbom' of https://github.com/arm/mc…
NeethuESim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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,110 @@ | ||
| # This workflow uses actions that are not certified by GitHub. | ||
| # They are provided by a third-party and are governed by | ||
| # separate terms of service, privacy policy, and support | ||
| # documentation. | ||
|
|
||
| # Black Duck Security Action allows you to integrate Static Analysis Security Testing (SAST) and Software Composition Analysis (SCA) into your CI/CD pipelines. | ||
| # For more information about configuring your workflow, | ||
| # read our documentation at https://github.com/blackduck-inc/black-duck-security-scan | ||
|
|
||
| name: CI Black Duck security scan | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main", "secure-build" ] | ||
| pull_request: | ||
| # The branches below must be a subset of the branches above | ||
| branches: [ "main", "secure-build" ] | ||
| schedule: | ||
| - cron: '34 5 * * 6' | ||
|
|
||
| # Declare default permissions as read only. | ||
| permissions: read-all | ||
|
|
||
| concurrency: | ||
| group: blackduck-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
|
NeethuESim marked this conversation as resolved.
|
||
| build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| pull-requests: write | ||
| security-events: write | ||
|
github-advanced-security[bot] marked this conversation as resolved.
Fixed
github-advanced-security[bot] marked this conversation as resolved.
Fixed
github-advanced-security[bot] marked this conversation as resolved.
Fixed
|
||
| actions: read | ||
| env: | ||
| DETECT_PROJECT_NAME: Arm:MCP | ||
|
|
||
| steps: | ||
| - name: Checkout source | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | ||
|
|
||
| - name: Set repository reference | ||
| run: | | ||
| ver_to_reference="${{ github.ref_name }}" | ||
|
|
||
| # Replace / with - to avoid issues with Black Duck project version names | ||
| # ver_to_reference="${ver_to_reference//\//-}" | ||
| ver_to_reference="1.0" | ||
| echo "DETECT_PROJECT_VERSION_NAME=$ver_to_reference" >> $GITHUB_ENV | ||
|
|
||
| # notice - highlighted in the gh actions UI | ||
| echo "::notice title=Black Duck target::${{ env.DETECT_PROJECT_NAME }} / $ver_to_reference" | ||
|
|
||
| - name: Black Duck SCA scan | ||
| id: black-duck-full-scan | ||
| if: ${{ github.event_name != 'pull_request' }} | ||
| uses: blackduck-inc/black-duck-security-scan@152247222aa9cd38124acd5c0cf60f4db71adc3f # v2.11.0 | ||
| with: | ||
| ### ---------- BLACKDUCK SCA SCANNING: REQUIRED FIELDS ---------- | ||
| blackducksca_url: ${{ vars.BLACKDUCKSCA_URL }} | ||
| blackducksca_token: ${{ secrets.BLACKDUCKSCA_TOKEN }} | ||
| blackducksca_scan_full: true | ||
|
|
||
| ### SCANNING: Optional fields | ||
| # blackducksca_scan_failure_severities: 'BLOCKER,CRITICAL' | ||
| detect_args: "--detect.accuracy.required=NONE" | ||
|
|
||
| ### FIX PULL REQUEST CREATION | ||
| blackducksca_fixpr_enabled: true | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| ### SARIF report generation for upload to GitHub Advanced Security | ||
| blackducksca_reports_sarif_create: true | ||
| blackducksca_reports_sarif_file_path: blackduck-results.sarif | ||
| ### Set upload to false & then later upload via github/codeql-action/upload-sarif@v4.37.4 to avoid token-permissions issue flagged by scorecard | ||
| blackducksca_upload_sarif_report: false | ||
|
|
||
| ### Mark build status if policy violating issues are found | ||
| mark_build_status: 'success' | ||
|
|
||
| ### To enable Black Duck SCA policy badges | ||
| blackducksca_policy_badges_create: true | ||
| blackducksca_policy_badges_maxCount: 5 | ||
|
|
||
| ### To upload Bridge diagnostic files | ||
| include_diagnostics: true | ||
|
|
||
| - name: Upload Black Duck SARIF | ||
| if: ${{ github.event_name != 'pull_request' }} | ||
| uses: github/codeql-action/upload-sarif@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4 | ||
| with: | ||
| sarif_file: blackduck-results.sarif | ||
|
|
||
| - name: Black Duck SCA PR Scan | ||
| id: black-duck-pr-scan | ||
| if: ${{ github.event_name == 'pull_request' }} | ||
| uses: blackduck-inc/black-duck-security-scan@152247222aa9cd38124acd5c0cf60f4db71adc3f # v2.11.0 | ||
| with: | ||
| blackducksca_url: ${{ vars.BLACKDUCKSCA_URL }} | ||
| blackducksca_token: ${{ secrets.BLACKDUCKSCA_TOKEN }} | ||
| blackducksca_scan_full: false | ||
| detect_args: "--detect.accuracy.required=NONE" | ||
|
|
||
| ### PULL REQUEST COMMENTS | ||
| blackducksca_prcomment_enabled: true | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| ### Mark build status if policy violating issues are found | ||
| mark_build_status: 'success' | ||
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.