Skip to content

chore: add third party notice generation and kondukto integration#1356

Draft
gagik wants to merge 17 commits into
mainfrom
gagik/konduko
Draft

chore: add third party notice generation and kondukto integration#1356
gagik wants to merge 17 commits into
mainfrom
gagik/konduko

Conversation

@gagik

@gagik gagik commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Mirrors how mongosh does kondukto uploads.

gagik added 11 commits July 9, 2026 16:06
Pin mutable action tags (setup-bot-token, checkout, upload-artifact) flagged
by Semgrep, add missing native/optional dependency entries to licenses.json
so third-party notices generation succeeds, and skip the commit/push step on
pull_request runs since those check out a detached, unpushable ref.
Comment thread .github/workflows/dependency-health.yml Outdated
Comment on lines +107 to +117
docker run --rm -v "$PWD":/pwd \
artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2.0 \
update --purls /pwd/.sbom/purls.txt --sbom-out /pwd/.sbom/sbom-lite.json

docker run --rm -e KONDUKTO_TOKEN="$KONDUKTO_TOKEN" -v "$PWD":/pwd \
artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2.0 \
augment \
--repo ${{ github.repository }} \
--branch "$KONDUKTO_BRANCH" \
--sbom-in /pwd/.sbom/sbom-lite.json \
--sbom-out /pwd/.sbom/sbom.json

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
docker run --rm -v "$PWD":/pwd \
artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2.0 \
update --purls /pwd/.sbom/purls.txt --sbom-out /pwd/.sbom/sbom-lite.json
docker run --rm -e KONDUKTO_TOKEN="$KONDUKTO_TOKEN" -v "$PWD":/pwd \
artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2.0 \
augment \
--repo ${{ github.repository }} \
--branch "$KONDUKTO_BRANCH" \
--sbom-in /pwd/.sbom/sbom-lite.json \
--sbom-out /pwd/.sbom/sbom.json
docker run --rm -e KONDUKTO_TOKEN="$KONDUKTO_TOKEN" -v "$PWD":/pwd \
artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:2.0 \
augment \
--repo ${{ github.repository }} \
--branch "$KONDUKTO_BRANCH" \
--sbom-in /pwd/.sbom/sbom-prod.cyclonedx.json \
--sbom-out /pwd/.sbom/sbom.json

SilkBomb’s preferred input is a CycloneDX SBOM, not a PURL list. This removes the update --purls step and passes the prod CycloneDX SBOM produced by pnpm sbom (.sbom/sbom-prod.cyclonedx.json) directly to silkbomb augment. That matches SilkBomb’s intended usage and drops the intermediate sbom-lite.json artifact. Also removes purls.txt from the uploaded artifact since it’s no longer generated or consumed.

Comment thread scripts/sbomReport/purls.ts Outdated
Comment thread scripts/sbomReport/index.ts Outdated
Comment on lines +2 to +8
import { generatePurls } from "./purls.js";

for (const conversion of CONVERSIONS) {
convertSbomToDependencyList(conversion);
}

generatePurls();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
import { generatePurls } from "./purls.js";
for (const conversion of CONVERSIONS) {
convertSbomToDependencyList(conversion);
}
generatePurls();
for (const conversion of CONVERSIONS) {
convertSbomToDependencyList(conversion);
}

Removes the generatePurls() call now that purls.ts is deleted. The script still generates the CycloneDX SBOMs and enriched dependency lists used by third-party notices and vulnerability reporting; only the PURL extraction step is removed.

@gagik
gagik changed the base branch from gagik/snyk to main July 17, 2026 08:44
Remove snyk-specific changes so the PR can target main independently:

- Delete `.snyk` policy file.
- Remove `snyk` devDependency and `snyk-test` / `generate-vulnerability-report` scripts.
- Remove `snyk` allowBuilds and minimumReleaseAgeExclude entries from pnpm-workspace.yaml.
- Remove the Snyk scan, vulnerability report generation, and vulnerability report upload steps from the Dependency Health workflow.
- Regenerate pnpm-lock.yaml to drop the direct `snyk` dependency and its transitive deps.
- Apply the earlier suggestion to feed the prod CycloneDX SBOM directly to SilkBomb and remove the intermediate purls/purls.txt/sbom-lite pipeline.
@gagik gagik changed the title chore: add kondukto integration chore: add third party notice generation and kondukto integration Jul 17, 2026
`create-dependency-sbom-lists` was invoking `node` on a TypeScript file,
so Node could not resolve the `.js` imports to `.ts` files in CI. Switch to
`tsx` so the dependency SBOMs and lists are generated, which then lets
`update-third-party-notices` find `.sbom/dependencies-prod.json`.

Also regenerates THIRD_PARTY_NOTICES.md after the dependency changes.

- name: Commit and push updated third-party notices
# Pull request runs check out a detached, unmergeable ref, so there is no
# branch to push updates to; only commit and push on schedule/dispatch runs.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

TODO: remove before merging... this is just to test the scanning flows

gagik added 3 commits July 17, 2026 10:54
`node-addon-api@8.8.0` is no longer present in the Linux CI prod
dependency list, so `mongodb-sbom-tools generate-3rd-party-notices`
rejected the stale `ignoredPackages` entry. Remove it and regenerate
THIRD_PARTY_NOTICES.md.
@gagik

gagik commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

@jasonhills-mongodb thanks for the review! I applied the suggestions and merged #1340 into this with snyk features removed.

Is the approach to artifactory authentication correct? These env variables aren't set yet so I'm wondering if there's a better way. If not, where could we get the credentials?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants