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 34b37ea
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/dependency-submission.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish dependencies to dependency graph

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

jobs:
dependency-submission:
permissions:
contents: write # Required for submitting dependencies
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'

0 comments on commit 34b37ea

Please sign in to comment.