Skip to content

ROCm security: scanning workflows, Dependabot and SECURITY.md - #95

Merged
gulsumgudukbay merged 2 commits into
rocm-mainfrom
rocm-security-baseline
Oct 17, 2026
Merged

gulsumgudukbay merged 2 commits into
rocm-mainfrom
rocm-security-baseline

Conversation

@gulsumgudukbay

@gulsumgudukbay gulsumgudukbay commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Adds the ROCm GitHub org security baseline to this fork, as requested by the ROCm Security Baseline rollout. The org-wide "chore: add security scanning workflows" PR was opened on ROCm/jax, rocm-jax, TransformerEngine and jaxpp but never on this repo, so this adds the same files directly.

All files are copied verbatim from ROCm/rocm-repo-template at 80b94559e:

  • .github/workflows/pr-security-scan.yml: scans each PR (changed files only) and reports to the job summary.
  • .github/workflows/weekly-security-scan.yml: full scan every Saturday at 10:00 UTC, uploads SARIF to the Security tab.
  • Both call the pinned ROCm/rocm-security-gh security-baseline.yml (v1.0.6): CodeQL, Bandit, Gitleaks, Trivy and zizmor, configured under .github/scan_tools_configs/.
  • .github/dependabot.yml: daily, grouped version updates for GitHub Actions.
  • SECURITY.md: the only foundational file this repo was missing. README.md, LICENSE, CONTRIBUTING.md, .gitignore and .github/CODEOWNERS already exist and are left identical to upstream, so they don't conflict on sync.

This is downstream-only and never goes upstream. Upstream has none of these paths, so it won't conflict when rocm-main is synced. It becomes a fourth ROCm commit replayed on each sync.

Please merge with "Rebase and merge" (or "Squash and merge"), not a merge commit, so rocm-main stays linear.

Notes for reviewers:

  • Dependabot will propose action bumps across all workflows, including upstream's. Only take the ones that touch ROCm workflows; upstream-owned workflows should stay identical to upstream.
  • Existing findings are almost all in upstream code. All 70 open Dependabot alerts are in upstream-owned requirements files (src/maxtext/inference/mlperf/requirements.txt and the TPU post-train requirements), which no ROCm job installs. The 6 secret-scanning alerts are AMD codename keyword matches inside upstream tokenizer vocab files and the C4 test dataset, so they are false positives.

Second commit (a6a2d47da) fixes every finding in ROCm-owned code. zizmor 1.30.0 and Trivy 0.70.0 (the versions the baseline uses) went from 24 findings to 0 and from 2 to 0:

  • Workflow inputs, step outputs and github.token reach run: scripts through env: instead of ${{ }}, in the ROCm branch of run_tests_against_package.yml and in build_rocm_image.yml.
  • actions/checkout is pinned to the v5.1.0 SHA upstream already uses. The TE wheel build no longer persists checkout credentials.
  • The ROCm Dockerfile gets HEALTHCHECK NONE and an explicit USER root, with an inline trivy:ignore:DS-0002 stating why it stays root. Upstream Dockerfiles still report the finding.

The remaining Bandit, Trivy and Gitleaks failures are all in upstream-owned code and are left for upstream. Bandit and Trivy scan the whole tree on every PR. Gitleaks attributes three upstream files to this PR's commit only because of the shallow checkout.

Tests

  • zizmor and Trivy run locally, before and after the fix commit, with the baseline's scanner versions.

  • pre-commit run --files <the 8 files>: codespell, yamllint and actionlint pass.

  • All workflow YAML and the gitleaks TOML parse.

  • The PR scan itself runs on this PR.

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

Adds the ROCm GitHub org security baseline, copied verbatim from ROCm/rocm-repo-template
(80b94559e): pr-security-scan.yml and weekly-security-scan.yml call the pinned
ROCm/rocm-security-gh security-baseline.yml (v1.0.6) for CodeQL, Bandit, Gitleaks, Trivy
and zizmor, with their configs under .github/scan_tools_configs. Also adds Dependabot
version updates for GitHub Actions and the AMD SECURITY.md.

Org policy, never goes upstream, so it stays a separate commit across syncs. Upstream has
none of these paths, so it should never conflict.
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Caution

3 potential secret finding(s) were committed in this pull request. Treat each credential as compromised and revoke or rotate it now, even if a later commit removed it. Deleting the line or force-pushing does not undo the leak: the commits stay reachable from this pull request and from every clone or fork, and automated scanners harvest secrets pushed to public repositories within minutes.

If a finding is a test fixture or a false positive, allowlist it in the configuration of the scanner that reported it.

Security scan found 3 critical or high finding(s) on lines changed by this pull request (coverage incomplete)
Scanner Severity Rule Location Finding
Gitleaks HIGH generic-api-key .gemini/commands/maxtext-review.toml:139 Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
Gitleaks HIGH generic-api-key codecov.yml:28 Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
Gitleaks HIGH generic-api-key tests/assets/logits_generation/generate_dpo_golden_data_and_compare_pytorch_logits.py:49 Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

Coverage was incomplete:

  • Security scan / Security scanners concluded with failure.

View the security scan run for complete reports.

“New” means the finding is located in a changed file on an added or modified line; it is not a base-versus-head findings delta.

Clears every finding the security baseline reports on ROCm-owned code (zizmor 1.30.0 and
trivy 0.70.0, checked locally before and after):

- template-injection: workflow inputs, step outputs and github.token reach run: scripts
  through env: instead of ${{ }} (run_tests_against_package.yml ROCm branch,
  build_rocm_image.yml).
- unpinned-uses: actions/checkout pinned to the v5.1.0 SHA upstream already uses, in
  build_rocm_image.yml and the weekly TE wheel build.
- artipacked: the TE wheel build no longer persists checkout credentials; it only uses
  GITHUB_TOKEN through env.
- trivy DS-0026: HEALTHCHECK NONE, the image runs no long-lived service.
- trivy DS-0002: the image stays root like its ROCm base image; USER root is explicit and
  the finding is suppressed inline, so upstream Dockerfiles keep reporting it.

Findings in upstream-owned code are left for upstream.
@gulsumgudukbay
gulsumgudukbay merged commit ffd464a into rocm-main Oct 17, 2026
29 of 35 checks passed
@gulsumgudukbay
gulsumgudukbay deleted the rocm-security-baseline branch October 17, 2026 04:06
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