Skip to content

MLE-22024: Add BlackDuck scan for latest images #359

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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

rwinieski
Copy link
Collaborator

Description

Checklist:

  • Owner:
  • JIRA_ID as part of branch/PR name

  • Rebase the branch with upstream

  • Squashed all commits into a single commit

  • Added Tests

  • Reviewer:
  • Reviewed Tests

  • Added to Release Wiki/Jira

@rwinieski rwinieski requested review from Copilot and vitalykorolev and removed request for Copilot June 18, 2025 08:00
Copy link

@Copilot Copilot AI left a 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 adds a dedicated BlackDuck security scan for Docker images built on the master branch by defining a new scan function and integrating it into the pipeline.

  • Introduces masterBranchBlackDuckScan() function to run, archive, and notify on detailed BlackDuck scans
  • Updates the existing develop-stage BlackDuck scan to skip master builds
  • Adds a new Master-BlackDuck-Scan stage that invokes the comprehensive scan on master

Jenkinsfile Outdated
*/
void masterBranchBlackDuckScan() {
// Create directory for scan results
sh "mkdir -p blackduck-scan-results"
Copy link
Preview

Copilot AI Jun 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider cleaning or removing any existing blackduck-scan-results directory before creating it (e.g., rm -rf blackduck-scan-results && mkdir -p blackduck-scan-results) to avoid stale artifacts from previous runs.

Suggested change
sh "mkdir -p blackduck-scan-results"
sh "rm -rf blackduck-scan-results && mkdir -p blackduck-scan-results"

Copilot uses AI. Check for mistakes.

Jenkinsfile Outdated
Comment on lines 428 to 435
export BLACKDUCK_URL='https://progresssoftware.app.blackduck.com'
export BLACKDUCK_API_TOKEN='${BLACKDUCK_TOKEN}'

# Run detect script for Docker image scan
curl -s -L https://detect.synopsys.com/detect8.sh | bash -s -- \
--blackduck.trust.cert=true \
--detect.tools=DOCKER \
--detect.project.name='MarkLogic-Docker-Images' \
Copy link
Preview

Copilot AI Jun 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The BlackDuck URL (and similarly the project name later) is hardcoded in multiple places; extract these values into variables or parameters at the top of the script to reduce duplication and simplify future updates.

Suggested change
export BLACKDUCK_URL='https://progresssoftware.app.blackduck.com'
export BLACKDUCK_API_TOKEN='${BLACKDUCK_TOKEN}'
# Run detect script for Docker image scan
curl -s -L https://detect.synopsys.com/detect8.sh | bash -s -- \
--blackduck.trust.cert=true \
--detect.tools=DOCKER \
--detect.project.name='MarkLogic-Docker-Images' \
export BLACKDUCK_URL='${blackDuckURL}'
export BLACKDUCK_API_TOKEN='${BLACKDUCK_TOKEN}'
# Run detect script for Docker image scan
curl -s -L https://detect.synopsys.com/detect8.sh | bash -s -- \
--blackduck.trust.cert=true \
--detect.tools=DOCKER \
--detect.project.name='${blackDuckProjectName}' \

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant