Skip to content

ci: add snyk security check (monitor on main, manual test on branches) - #55

Merged
odubajDT merged 8 commits into
mainfrom
ICP-11520-snyk-main-only
Nov 19, 2026
Merged

odubajDT merged 8 commits into
mainfrom
ICP-11520-snyk-main-only

Conversation

@odubajDT

@odubajDT odubajDT commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Adds a Snyk security check, aligned with the other repos maintained by the same team (dynatrace-oss/dynatrace-metric-utils-go#18, Dynatrace/otel-target-allocator#127): Snyk tracks main only.

This replaces the manual Snyk GitHub import of this repo's gem dependencies with a CI-driven scan. The examples (example/*.yaml, example/Dockerfile) are not scanned for now, because it's unconfirmed whether our Snyk license covers IaC and Container uploads from CI. Their manually imported Snyk projects stay as they are.

Change

New .github/workflows/security.yml:

  • Push to main → snyk monitor, project dynatrace-oss/fluent-plugin-dynatrace. Gems don't commit a Gemfile.lock, so CI resolves one from the gem's runtime dependencies only (snyk-runtime/Gemfile with the gem as a path dependency); dev/test tooling is not scanned.
  • Manual workflow_dispatch on any other branch → snyk test --severity-threshold=low. Results are shown in the job log, nothing is uploaded, and the job fails on any finding.
  • A manual run on main behaves like a push (monitor).

Runs on Ruby 3.4, the Ruby bundled with fluent-package v6 LTS, so bundle lock resolves the dependency versions users get.

Uses secrets.SNYK_TOKEN (a dedicated Snyk service account for this repo).

Test run

odubajDT and others added 7 commits November 19, 2026 10:32
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@odubajDT
odubajDT force-pushed the ICP-11520-snyk-main-only branch from 0f2666e to 95daf78 Compare November 19, 2026 09:32
Comment thread .github/workflows/security.yml Resolved
Comment thread .github/workflows/security.yml Resolved
IaC and Container licensing for CLI uploads is unconfirmed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@odubajDT
odubajDT requested a review from mowies November 19, 2026 09:43
@odubajDT
odubajDT merged commit eafda98 into main Nov 19, 2026
9 checks passed
@odubajDT
odubajDT deleted the ICP-11520-snyk-main-only branch November 19, 2026 10:31
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.

2 participants