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
Next Next commit
first draft
  • Loading branch information
skedwards88 committed May 12, 2022
commit 61e8281c3a19b92f39b19cb7ebcca75fae628b98
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ children:
- /about-supply-chain-security
- /about-the-dependency-graph
- /configuring-the-dependency-graph
- /using-the-depencency-submission-api
- /about-dependency-review
- /configuring-dependency-review
- /exploring-the-dependencies-of-a-repository
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
title: Using the Dependency submission API
intro: 'You can use the Dependency submission API to submit dependencies for projects that resolve dependencies when the project is built or compiled.'
shortTitle: Dependency submission API
versions:
feature: dependency-submission-api
---

{% note %}

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

{% endnote %}

## About the Dependency submission API

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. 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.

For more information about the Dependency submission API, see the [Dependency graph REST API documentation](/rest/dependency-graph).

## 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:

- 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 graph REST API documentation](/rest/dependency-graph/dependency-graph#create-repository-snapshot).
- 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.

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.

```yaml
{% data reusables.actions.actions-not-certified-by-github.amrom.workers.devment %}

name: Submit dependencies

on:
push:
branches:
- 'main'

jobs:
submit-dependencies:
runs-on: ubuntu-latest
steps:
- uses: anchore/sbom-action@bb716408e75840bbb01e839347cd213767269d4a
with:
image: ghcr.io/example/image_name:tag
```

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 link to starter workflows once available
6 changes: 6 additions & 0 deletions data/features/dependency-submission-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Issue 6397
versions:
fpt: '*'
ghec: '*'
# ghes: '>=3.6' GHES version still TBD
ghae: 'issue-6397'