Skip to content

[K9VULN-15920] Warn when env tag is passed to sbom upload#2344

Merged
divyav-datadog merged 2 commits into
masterfrom
divya.vithiyatharan/fix-env-tag-ci
Jun 8, 2026
Merged

[K9VULN-15920] Warn when env tag is passed to sbom upload#2344
divyav-datadog merged 2 commits into
masterfrom
divya.vithiyatharan/fix-env-tag-ci

Conversation

@divyav-datadog

Copy link
Copy Markdown
Contributor

What and why?

The --env flag is ignored server-side for non-SCI SBOM uploads (env is always normalized to "ci"). This adds a client-side warning so users know the flag has no effect rather than silently ignoring it.

How?

  • packages/plugin-sbom/src/renderer.ts — added renderEnvFlagDeprecationWarning() that prints a yellow warning to stderr
  • packages/plugin-sbom/src/commands/upload.ts — calls the warning when --env is set to anything other than the default "ci"

The --env flag is ignored server-side for non-SCI uploads (env is always
normalized to "ci"). This adds a client-side warning so users know the
flag has no effect.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@divyav-datadog divyav-datadog self-assigned this Jun 8, 2026
@divyav-datadog
divyav-datadog requested a review from dastrong June 8, 2026 17:50
@datadog-prod-us1-4

datadog-prod-us1-4 Bot commented Jun 8, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 08452b1 | Docs | Datadog PR Page | Give us feedback!

@divyav-datadog divyav-datadog added the static-analysis Related to [sarif, sbom] label Jun 8, 2026
Comment thread packages/plugin-sbom/src/commands/upload.ts Outdated
Comment thread packages/plugin-sbom/src/commands/upload.ts Outdated
@divyav-datadog
divyav-datadog requested a review from dastrong June 8, 2026 19:10
@divyav-datadog
divyav-datadog marked this pull request as ready for review June 8, 2026 19:39
@divyav-datadog
divyav-datadog requested review from a team as code owners June 8, 2026 19:39
@divyav-datadog
divyav-datadog merged commit 2fec210 into master Jun 8, 2026
32 checks passed
@divyav-datadog
divyav-datadog deleted the divya.vithiyatharan/fix-env-tag-ci branch June 8, 2026 19:40
@GabrielAnca GabrielAnca mentioned this pull request Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

static-analysis Related to [sarif, sbom]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants