Skip to content

Commit

Permalink
Submit transitive dependencies to dependency graph
Browse files Browse the repository at this point in the history
Dependency graph currently only contains the dependencies declared in `go.mod`. By using the dependency submission API we can get notified about vulnerabilities in transitive dependencies. I.e., vulnerabilities for all dependencies listed in `go list -m all`.
  • Loading branch information
okpedersen committed Jan 7, 2025
1 parent d0545c8 commit 315159c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/dependency-submission.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish dependencies to dependency graph

on:
pull_request:
push:
branches:
- 'main'

jobs:
dependency-submission:
permissions:
contents: write # Required for submitting dependencies
pull-requests: write # Required for dependency review comments
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Golang environment
uses: actions/setup-go@v5
with:
go-version: '1.23.1'

# This will also publish transitive dependencies not in go.mod
- name: Run snapshot action
uses: actions/go-dependency-submission@v2

# Comment on PRs
- name: Perform dependency review
uses: actions/dependency-review-action@v4
if: github.event_name == 'pull_request'
with:
comment-summary-in-pr: on-failure

0 comments on commit 315159c

Please sign in to comment.