Skip to content

ci: add IBM Mend SCA and SAST scans - #2665

Open
erichare wants to merge 4 commits into
mainfrom
ci/ibm-mend
Open

erichare wants to merge 4 commits into
mainfrom
ci/ibm-mend

Conversation

@erichare

@erichare erichare commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does:

Adds an IBM Mend workflow with two jobs, built on the shared Mend workflows that riptano/cloud-billing calls. The SCA job runs mend dep on our dependencies and fails on Critical or High findings, except CVEs listed in .github/mend-allowlist.txt. The SAST job runs mend sast on our own code and fails on a finding of any severity, the same gate cloud-billing has. The steps are copied instead of called, because a public repo can't use reusable workflows from an internal repo like riptano/shared-github-actions. This repo being public also means anyone signed in to GitHub can read its run logs, so scan output stays on the runner. The logs show only finding counts, no report is uploaded, and the findings live on the Mend platform. Pushes to main and release tags update the SCA project there, and every SAST run does. Fork and Dependabot PRs skip both jobs, since neither gets Actions secrets.

Which issue(s) this PR fixes:

Fixes #2668

Companion to #2663, which adds the IBM SonarQube scan.

Verification

actionlint is clean, with shellcheck on the run steps. Against a stub Mend CLI, 26 local checks passed. They cover when SCA updates the platform, that CLI output never reaches the log, that a CLI failure shows its error line but no finding rows, and both gates on sample outputs. ./mvnw compile passed. Neither scan has run against IBM Mend yet. The Mend variables and secret on the stargate org are shared only with private and internal repos, so both Mend jobs fail on this PR until data-api is added to their repository access.

actionlint .github/workflows/ibm-mend.yaml

A first real run still needs to confirm the summary line the SCA gate reads. Every SAST run uploads to one Mend project, so a PR scan replaces the main baseline there, as it does on cloud-billing.

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

Runs the Mend CLI dependency scan ("mend dep"), the path the DataStax Mend
onboarding runbook requires for repos outside IBM's GitHub Enterprise space.
Pushes to main and PRs against main report only; release tags also update the
Mend platform. Critical or High findings turn the job red without blocking
merges. Fork PRs are skipped because they get no secrets.

Needs MEND_USER_KEY, MEND_EMAIL and MEND_PRODUCTNAME before it can run.
@github-actions

Copy link
Copy Markdown
Contributor

➡️ Unit Test Coverage Delta vs Main Branch

Metric Value
Main Branch 55.07%
This PR 55.07%
Delta ⚪ 0.00%
ℹ️ Coverage unchanged

@github-actions

Copy link
Copy Markdown
Contributor

Unit Test Coverage Report

Overall Project 55.07% 🍏

There is no coverage information present for the Files changed

@github-actions

Copy link
Copy Markdown
Contributor

➡️ Integration Test Coverage Delta vs Main Branch (hcd-it)

Metric Value
Main Branch 74.35%
This PR 74.35%
Delta ⚪ 0.00%
ℹ️ Coverage unchanged

@github-actions

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (hcd-it)

Overall Project 74.35% 🍏

There is no coverage information present for the Files changed

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

➡️ Integration Test Coverage Delta vs Main Branch (dse69-it)

Metric Value
Main Branch 73.04%
This PR 73.04%
Delta ⚪ 0.00%
ℹ️ Coverage unchanged

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (dse69-it)

Overall Project 73.04% 🍏

There is no coverage information present for the Files changed

Follows the riptano/shared-github-actions Mend workflows that
riptano/cloud-billing uses. The steps are copied rather than called,
because a public repository cannot use reusable workflows from an
internal one.

SAST ("mend sast") fails on a finding of any severity. SCA still fails on
Critical or High, now as a real failure instead of continue-on-error, and
skips CVEs listed in .github/mend-allowlist.txt. Settings move to the
cloud-billing names: ASTRA_DB_MEND_EMAIL and ASTRA_DB_MEND_PRODUCTNAME
variables, optional ASTRA_DB_MEND_PROJECTNAME ("Astra DB") and
ASTRA_DB_MEND_URL variables, and the ASTRA_DB_MEND_USER_KEY secret.
Dependabot PRs are skipped along with fork PRs, since neither gets
Actions secrets.
@erichare erichare changed the title ci: add IBM Mend SCA scan ci: add IBM Mend SCA and SAST scans Oct 28, 2026
@erichare
erichare marked this pull request as ready for review October 28, 2026 15:17
@erichare
erichare requested a review from a team as a code owner October 28, 2026 15:17
data-api is public, so anyone signed in to GitHub can read its run logs
and download its artifacts. Both scans now write the CLI output to a
runner temp file, the logs show only finding counts, and no report is
uploaded. If the CLI fails, only lines that look like connection or
credential errors are printed, never a findings table row.

SCA now also updates the Mend platform on pushes to main, not only on
release tags, so main's findings have somewhere to live.

This branch has not been deployed

No deployments
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.

Add IBM Mend SCA and SAST scanning to CI

1 participant