Repository navigation
Conversation
…er's Java dependencies GitHub's dependency graph can't read sbt builds, so the server's Java dependencies (HikariCP, Micrometer, and the rest of build.sbt) never reach Dependabot. Every alert so far has been for the UI's npm packages; a published advisory for a server-side library raises nothing here. Adds .github/workflows/dependency-graph.yml, which submits the sbt dependency graph through GitHub's dependency submission API on every push to main and on manual dispatch. Every third-party action is pinned by commit hash, matching the existing workflows, and the job keeps to the minimum contents: write permission the submission API needs. Closes unitycatalog#2255 Signed-off-by: Harsh <[email protected]>
|
Quick update on the "verifying on my fork" note above: I'm not going to be able to do that live fork dispatch after all, so skipping it. As the issue says, there's no sbt-level test for this — the real proof is that CI runs this workflow for real on |
|
/review |
yili-db
left a comment
There was a problem hiding this comment.
[AI Assisted] Pins, permissions, triggers, and plugin coverage check out. The repo has no dependabot.yml, so nothing duplicates. Verdict: comment. Follow-ups: the resolver mirror (inline), on-resolve-failure, and test-scope intent. The checkout hardening is minor.
PR description (not anchorable): say alerts rather than automatic PRs, and mark the test and docs checklist items N/A, since neither applies to this change.
| contents: write | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 |
There was a problem hiding this comment.
[AI Assisted] Consider persist-credentials: false on this checkout. The submission step does not use git authentication, so this setting only limits what the checkout leaves in the repository config. The action also sets GITHUB_TOKEN for the sbt process, so project and plugin code still runs with the job's access. Treat this as hardening rather than a full fix.
| uses: sbt/setup-sbt@67d461eba2c4753196c230e02da850757ba4775e # v1.5.14 | ||
|
|
||
| - name: Submit dependency graph | ||
| uses: scalacenter/sbt-dependency-submission@d84eef4c09e633bcf5f113bcad7fd5e9af1baee9 # v3.2.3 |
There was a problem hiding this comment.
[AI Assisted] The action runs the sbt on PATH rather than build/sbt, so the repository's mirror configuration (build/sbt-config/repositories, the GCS Maven Central mirror used to avoid HTTP 429 on CI runners) is not applied to this job. Could you confirm that the first run on push to main resolves dependencies reliably?
| uses: sbt/setup-sbt@67d461eba2c4753196c230e02da850757ba4775e # v1.5.14 | ||
|
|
||
| - name: Submit dependency graph | ||
| uses: scalacenter/sbt-dependency-submission@d84eef4c09e633bcf5f113bcad7fd5e9af1baee9 # v3.2.3 |
There was a problem hiding this comment.
[AI Assisted] With the default on-resolve-failure: error, one module that fails to resolve fails the whole job and no graph is submitted. Is that intended, or should it be warning?
| uses: sbt/setup-sbt@67d461eba2c4753196c230e02da850757ba4775e # v1.5.14 | ||
|
|
||
| - name: Submit dependency graph | ||
| uses: scalacenter/sbt-dependency-submission@d84eef4c09e633bcf5f113bcad7fd5e9af1baee9 # v3.2.3 |
There was a problem hiding this comment.
[AI Assisted] Test-scope dependencies are submitted because configs-ignore is not set. Is that intended? If so, a line in the PR description would help reviewers.
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| submit: |
There was a problem hiding this comment.
[AI Assisted] Consider a concurrency group with cancel-in-progress: true, cache: 'sbt' on setup-java, and a timeout-minutes on the job.
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| submit: |
There was a problem hiding this comment.
[AI Assisted] Forks that sync main will run this job. A fork without Dependency Graph enabled gets a 404 from the submission API, per the action README. Consider if: github.repository == 'unitycatalog/unitycatalog'. I could not verify the fork Actions default for push triggers.
PR Checklist
docsis updatedDescription of changes
GitHub's dependency graph can't read sbt builds, so the server's Java dependencies (HikariCP, Micrometer, and the rest of
build.sbt) never reach Dependabot. Every Dependabot PR so far has been for the UI's npm packages; a published advisory for a server-side library raises no alert in this repository.Adds
.github/workflows/dependency-graph.yml, which submits the sbt dependency graph through GitHub's dependency submission API (scalacenter/sbt-dependency-submission) on every push tomainand on manualworkflow_dispatch.actions/checkoutandactions/setup-javareuse the exact pins from thejava-fmtjob inlint-check.yml;sbt/setup-sbtandsbt-dependency-submissionare pinned by commit hash with a version comment, same as the rest of the repo's workflows. Permissions are scoped tocontents: write, the minimum the submission API needs.Closes #2255
There is no sbt-level test for this, per the issue. I'm verifying it on my fork now that it exists (enabling Dependency graph in the fork's settings and dispatching the workflow), and will link the passing run here as soon as it finishes.