-
Notifications
You must be signed in to change notification settings - Fork 115
[DO NOT MERGE] - Added config to scan sub directories for Gemfile.lock #3466
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: nikhil2611 <[email protected]>
Signed-off-by: nikhil2611 <[email protected]>
…HEF-28158-NOTICE-generation
Signed-off-by: nikhil2611 <[email protected]>
👷 Deploy Preview for chef-workstation processing.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR modifies the CI/CD workflow configuration to enable scanning of subdirectories for Gemfile.lock files during BlackDuck SCA scans. The changes temporarily redirect the workflow to a development branch for testing the new subdirectory scanning capability.
Key changes:
- Adds configuration to scan specific subdirectories (
.,omnibus,components/gems) for Gemfile.lock files - Temporarily modifies branch triggers and workflow reference to use a development branch
| on: | ||
| pull_request: | ||
| branches: [ main, develop, release/** ] | ||
| branches: [ nikhil/CHEF-28158-NOTICE-generation, develop, release/** ] |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The branch name 'nikhil/CHEF-28158-NOTICE-generation' doesn't match the PR's purpose of scanning subdirectories for Gemfile.lock files. The Jira ID references 'NOTICE-generation', but this PR is about configuring BlackDuck to scan subdirectories. Consider using a branch name that reflects the actual changes, such as 'nikhil/CHEF-XXXXX-blackduck-subdirectory-scan'.
| call-ci-main-pr-check-pipeline: | ||
| uses: chef/common-github-actions/.github/workflows/ci-main-pull-request.yml@main | ||
| uses: chef/common-github-actions/.github/workflows/ci-main-pull-request.yml@nikhil/detect-lockfile-in-subfolders-chef-workstation |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding a personal development branch reference in the workflow creates a temporary dependency that must be reverted before merging. This should be changed back to '@main' before the PR is merged to avoid breaking the workflow for other developers. Since this is marked '[DO NOT MERGE]', ensure this is addressed when creating the final version.
| uses: chef/common-github-actions/.github/workflows/ci-main-pull-request.yml@nikhil/detect-lockfile-in-subfolders-chef-workstation | |
| uses: chef/common-github-actions/.github/workflows/ci-main-pull-request.yml@main |
| perform-blackduck-sca-scan: true # combined with generate sbom & generate github-sbom, also needs version above | ||
| blackduck-project-group-name: 'Chef-Agents' # typically one of (Chef), Chef-Agents, Chef-Automate, Chef-Chef360, Chef-Habitat, Chef-Infrastructure-Server, Chef-Shared-Services, Chef-Non-Product' | ||
| blackduck-project-name: ${{ github.event.repository.name }} # BlackDuck project name, typically the repository name | ||
| blackduck-detect-source-paths: '.;omnibus;components/gems' # Semicolon-separated paths to scan for Gemfile.lock files in subdirectories |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The comment could be more specific about what happens with these paths. Consider clarifying whether these paths are scanned recursively for Gemfile.lock files or if they represent specific locations where Gemfile.lock is expected to exist. For example: 'Semicolon-separated root paths where BlackDuck will recursively scan for Gemfile.lock files'.
| blackduck-detect-source-paths: '.;omnibus;components/gems' # Semicolon-separated paths to scan for Gemfile.lock files in subdirectories | |
| blackduck-detect-source-paths: '.;omnibus;components/gems' # Semicolon-separated root paths where BlackDuck will recursively scan for Gemfile.lock files |
Signed-off-by: nikhil2611 <[email protected]>
- Added blackduck-detect-source-paths parameter to target components/gems - This focuses Black Duck SCA scan on the primary Ruby dependencies - Excludes omnibus/Gemfile.lock from scanning Signed-off-by: nikhil2611 <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.
| on: | ||
| pull_request: | ||
| branches: [ main, develop, release/** ] | ||
| branches: [ nikhil/CHEF-28158-NOTICE-generation, develop, release/** ] |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Branch reference 'nikhil/CHEF-28158-NOTICE-generation' appears to be a personal development branch. This should be reverted to 'main' before merging to ensure the workflow triggers on the correct branches.
| branches: [ nikhil/CHEF-28158-NOTICE-generation, develop, release/** ] | ||
| push: | ||
| branches: [ main, develop, release/** ] | ||
| branches: [ nikhil/CHEF-28158-NOTICE-generation, develop, release/** ] |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Branch reference 'nikhil/CHEF-28158-NOTICE-generation' appears to be a personal development branch. This should be reverted to 'main' before merging to ensure the workflow triggers on the correct branches.
| call-ci-main-pr-check-pipeline: | ||
| uses: chef/common-github-actions/.github/workflows/ci-main-pull-request.yml@main | ||
| uses: chef/common-github-actions/.github/workflows/ci-main-pull-request.yml@nikhil/detect-lockfile-in-subfolders-chef-workstation |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow reference uses a personal feature branch 'nikhil/detect-lockfile-in-subfolders-chef-workstation'. This should be changed to a stable reference (e.g., '@main' or a version tag) before merging.
| uses: chef/common-github-actions/.github/workflows/ci-main-pull-request.yml@nikhil/detect-lockfile-in-subfolders-chef-workstation | |
| uses: chef/common-github-actions/.github/workflows/ci-main-pull-request.yml@main |
| blackduck-project-name: ${{ github.event.repository.name }} # BlackDuck project name, typically the repository name | ||
| generate-blackduck-sbom: false # obsolete, use perform-blackduck-sca-scan instead | ||
| blackduck-detect-source-paths: 'components/gems' # Scan only the components/gems directory for Gemfile.lock | ||
| generate-blackduck-sbom: true # obsolete, use perform-blackduck-sca-scan instead |
Copilot
AI
Dec 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment indicates this parameter is obsolete and 'perform-blackduck-sca-scan' should be used instead. Setting this to 'true' while it's marked obsolete creates confusion. Either remove this parameter or clarify why it's being enabled despite being obsolete.
| generate-blackduck-sbom: true # obsolete, use perform-blackduck-sca-scan instead |



Description
Added config to scan sub directories for Gemfile.lock
Related Issue
Types of changes
Checklist:
Gemfile.lockhas changed, I have used--conservativeto do it and included the full output in the Description above.