Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
61e8281
first draft
May 12, 2022
554a03e
add API page
May 12, 2022
5564563
link to dep graph page
May 12, 2022
ce4e467
allow ref to repo
May 12, 2022
c239983
fix typo
May 12, 2022
3a79635
Merge branch 'main' into ske-dep-api
May 12, 2022
83c1d43
typo
May 19, 2022
f85983a
Merge branch 'main' into ske-dep-api
Jun 9, 2022
9295f8a
updates for example workflow
saritai Jun 14, 2022
6f06aaf
use reusables for github-owned actions
saritai Jun 14, 2022
e74a411
updated language based on feedback
saritai Jun 14, 2022
55cb5a1
tbd table for actions
saritai Jun 14, 2022
d12b5c1
update language for table
saritai Jun 14, 2022
872bd3c
update versioning to 3.7
saritai Jun 14, 2022
723444d
Apply suggestions from code review
saritai Jun 15, 2022
7612d9e
updates based on feedback!
saritai Jun 15, 2022
94206d8
fix apostrophe issue
saritai Jun 15, 2022
dcfd5a4
updates to API page
saritai Jun 15, 2022
e584ac5
add info on viewing submitted dependencies in dep graph
saritai Jun 15, 2022
57b1eb7
updating language around API submissions
saritai Jun 15, 2022
2655a97
quick updates
saritai Jun 15, 2022
626f5f7
remove version updates reference
saritai Jun 15, 2022
8eb506a
Update dependency-submission.md
saritai Jun 16, 2022
aeafa49
fixed link and intro in rest doc
saritai Jun 16, 2022
2cac989
Apply suggestions from code review
saritai Jun 16, 2022
7eedfe6
add correlator explanation
saritai Jun 16, 2022
0f4c534
add version updates
saritai Jun 16, 2022
36de6c9
add mention of Dependabot supported ecosystems
saritai Jun 16, 2022
32435e8
Update content/code-security/supply-chain-security/understanding-your…
saritai Jun 16, 2022
6742781
Update OpenAPI Descriptions
github-openapi-bot Jun 16, 2022
065eb19
Add decorated OpenAPI schema files
github-openapi-bot Jun 16, 2022
b672b23
Merge branch 'main' into ske-dep-api
saritai Jun 16, 2022
4604b86
Merge pull request #28585 from github/openapi-update-09b3d964114fa896…
saritai Jun 16, 2022
55d6ed9
adding ephemeral runner known issue (#28510)
Pantelis-Santorinios Jun 17, 2022
bbf856c
Merge branch 'main' into ske-dep-api
saritai Jun 17, 2022
b4be9fc
Merge pull request #27653 from github/ske-dep-api
saritai Jun 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
updates for example workflow
  • Loading branch information
saritai committed Jun 14, 2022
commit 9295f8acae30582d6160ed27ed7045d98c7ddb7a
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,51 @@ For more information about the Dependency submission API, see the [Dependency su

## Submitting dependencies at build-time

You can use the Dependency submission API in a {% data variables.product.prodname_actions %} workflow to submit dependencies for your project when your project is built. You workflow should:
You can use the Dependency submission API in a {% data variables.product.prodname_actions %} workflow to submit dependencies for your project when your project is built. Your workflow should:

- generate a list of dependencies for your project.
- translate the list of dependencies into the format accepted by the Dependency submission API. For more information about the format, see the body parameters for the "Create a repository snapshot" API operation in the [Dependency submission REST API documentation](/rest/dependency-graph/dependency-submission).
- submit the formatted list of dependencies to the Dependency submission API.

Actions that perform these steps for various ecosystems are available on {% data variables.product.prodname_marketplace %}. todo link to them once available, or tell users how to find them.
Actions that perform these steps for various ecosystems are available on {% data variables.product.prodname_marketplace %}.

For example, this workflow uses the [anchore/sbom-action](https://github.com/marketplace/actions/anchore-sbom-action) action to submit dependencies . Todo change this to match whatever the starter workflow will use, and give more guidance if needed.
TODO add list/table of supported actions

```yaml
{% data reusables.actions.actions-not-certified-by-github.amrom.workers.devment %}
For example, the following [Go Dependency Submission](https://github.com/dsp-testing/go-dependency-submission) workflow calculates the dependencies for a Go build-target (a Go file with a `main` function) and submits the list to the Dependency Submission API.

name: Submit dependencies
```yaml

name: Go Dependency Submission
on:
push:
branches:
- 'main'

branches:
- main
# Envionment variables to configure Go and Go modules. Customize as necessary
env:
GOPROXY: '' # A Go Proxy server to be used
GOPRIVATE: '' # A list of modules are considered private and not requested from GOPROXY
jobs:
submit-dependencies:
go-action-detection:
runs-on: ubuntu-latest
steps:
- uses: anchore/sbom-action@bb716408e75840bbb01e839347cd213767269d4a
with:
image: ghcr.io/example/image_name:tag
```
- name: 'Checkout Repository'
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ">=1.18.0"
- name: Run snapshot action
uses: @dsp-testing/go-snapshot-action
with:
# Required: Define the repo path to the go.mod file used by the
# build target
go-mod-path: go-example/go.mod
#
# Define the repo path of a build target (a file with a
# `main()` function) If not defined, this Action will collect all
# dependencies used by all build targets for the module, which may
# include Go dependencies used by tests and tooling.
go-build-target: go-example/cmd/octocat.go

Alternatively, you can write your own action to perform these steps. {% data variables.product.product_name %} maintains the [Dependency Submission Toolkit](https://github.com/github/dependency-submission-toolkit), a TypeScript library to help you write an action to perform these steps. For more information about writing an action, see "[Creating actions](/actions/creating-actions)". todo ensure that this repo will be public, or else delete this link. todo is "maintains" too strong a word?
```

todo link to starter workflows once available
Alternatively, you can write your own action to perform these steps. {% data variables.product.product_name %} maintains the [Dependency Submission Toolkit](https://github.com/github/dependency-submission-toolkit), a TypeScript library to help you build your own GitHub Action for submitting dependencies to the Dependency Submission API. For more information about writing an action, see "[Creating actions](/actions/creating-actions)".
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
The Dependency submission API lets you submit dependencies for a project to generate a dependency graph. This enables you to generate a dependency graph for projects
that resolve dependencies when the software is built or compiled. For more information about viewing the dependency graph, see "[Exploring the dependencies of a repository](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#viewing-the-dependency-graph)." Submitted dependencies will receive {% data variables.product.prodname_dependabot_alerts %} and {% data variables.product.prodname_dependabot_security_updates %} for any known vulnerabilities.
The Dependency submission API lets you submit dependencies for a project to generate a dependency graph. This enables you to generate a dependency graph for projects that resolve dependencies when the software is built or compiled. For more information about viewing the dependency graph, see "[Exploring the dependencies of a repository](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#viewing-the-dependency-graph)." Submitted dependencies will receive {% data variables.product.prodname_dependabot_alerts %} and {% data variables.product.prodname_dependabot_security_updates %} for any known vulnerabilities.

Projects that declare their dependencies in a file that is committed to the repository (for example, a `package-lock.json` file in a JavaScript project) do not need to use the Dependency submission API in order to generate a dependency graph. However, these projects can still use the Dependency submission API.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% note %}

**Note:** The Dependency submission API is currently in beta and subject to change
**Note:** The Dependency submission API is currently in public beta and subject to change.

{% endnote %}