Skip to content

Commit 5342cbb

Browse files
authored
Merge pull request github#18694 from github/repo-sync
repo sync
2 parents 0f736f4 + b4be9fc commit 5342cbb

File tree

19 files changed

+1769
-1
lines changed

19 files changed

+1769
-1
lines changed

content/code-security/guides.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ includeGuides:
8484
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/viewing-and-updating-vulnerable-dependencies-in-your-repository
8585
- /code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review
8686
- /code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph
87+
- /code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api
8788
- /code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository
8889
---
8990

content/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ Enterprise owners can configure the dependency graph at an enterprise level. For
4242
{% ifversion fpt or ghec %}
4343
Dependencies are grouped by ecosystem. You can expand a dependency to view its dependencies. Dependencies on private repositories, private packages, or unrecognized files are shown in plain text. If the package manager for the dependency is in a public repository, {% data variables.product.product_name %} will display a link to that repository.
4444

45+
{% ifversion dependency-submission-api %}
46+
Dependencies submitted to a project using the Dependency submission API (beta), although also grouped by ecosystem, are shown separately from dependencies identified through manifest or lock files in the repository. These submitted dependencies appear in the dependency graph as "Snapshot dependencies" because they are submitted as a snapshot, or set, of dependencies. For more information on using the dependency submission API, see "[Using the Dependency submission API](/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api)."
47+
{% endif %}
48+
4549
If vulnerabilities have been detected in the repository, these are shown at the top of the view for users with access to {% data variables.product.prodname_dependabot_alerts %}.
4650

4751
![Dependencies graph](/assets/images/help/graphs/dependencies_graph.png)

content/code-security/supply-chain-security/understanding-your-software-supply-chain/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ children:
1414
- /about-supply-chain-security
1515
- /about-the-dependency-graph
1616
- /configuring-the-dependency-graph
17+
- /using-the-dependency-submission-api
1718
- /about-dependency-review
1819
- /configuring-dependency-review
1920
- /exploring-the-dependencies-of-a-repository
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
title: Using the Dependency submission API
3+
intro: 'You can use the Dependency submission API to submit dependencies for projects, such as the dependencies resolved when a project is built or compiled.'
4+
shortTitle: Dependency submission API
5+
topics:
6+
- API
7+
- Dependency graph
8+
- Dependencies
9+
- REST
10+
versions:
11+
feature: dependency-submission-api
12+
---
13+
14+
{% data reusables.dependency-submission.dependency-submission-api-beta %}
15+
16+
## About the Dependency submission API
17+
18+
{% data reusables.dependency-submission.about-dependency-submission %}
19+
20+
Dependencies are submitted to the dependency submission API in the form of a snapshot. A snapshot is a set of dependencies associated with a commit SHA and other metadata, that reflects the current state of your repository for a commit. For more information about the Dependency submission API, see the [Dependency submission REST API documentation](/rest/dependency-graph/dependency-submission).
21+
22+
## Submitting dependencies at build-time
23+
24+
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.
25+
26+
### Using pre-made actions
27+
28+
The simplest way to use the Dependency submission API is by adding a pre-made action to your repository that will gather and convert the list of dependencies to the required snapshot format and submit the list to the API. Actions that complete these steps for various ecosystems are available on {% data variables.product.prodname_marketplace %} and more actions will be created during the course of the beta and beyond. You can find links to the currently available actions in the table below:
29+
30+
Ecosystem | Action |
31+
--- | --- |
32+
Go | [Go Dependency Submission](https://github.com/actions/go-dependency-submission)
33+
34+
For example, the following [Go Dependency Submission](https://github.com/actions/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.
35+
36+
```yaml
37+
38+
name: Go Dependency Submission
39+
on:
40+
push:
41+
branches:
42+
- main
43+
44+
# The API requires write permission on the repository to submit dependencies
45+
permissions:
46+
contents: write
47+
48+
# Envionment variables to configure Go and Go modules. Customize as necessary
49+
env:
50+
GOPROXY: '' # A Go Proxy server to be used
51+
GOPRIVATE: '' # A list of modules are considered private and not requested from GOPROXY
52+
jobs:
53+
go-action-detection:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: 'Checkout Repository'
57+
uses: {% data reusables.actions.action-checkout %}
58+
59+
- uses: {% data reusables.actions.action-setup-go %}
60+
with:
61+
go-version: ">=1.18.0"
62+
63+
- name: Run snapshot action
64+
uses: @actions/go-dependency-submission@v1
65+
with:
66+
# Required: Define the repo path to the go.mod file used by the
67+
# build target
68+
go-mod-path: go-example/go.mod
69+
#
70+
# Optional. Define the repo path of a build target,
71+
# a file with a `main()` function.
72+
# If undefined, this action will collect all dependencies
73+
# used by all build targets for the module. This may
74+
# include Go dependencies used by tests and tooling.
75+
go-build-target: go-example/cmd/octocat.go
76+
77+
```
78+
### Creating your own action
79+
80+
Alternatively, you can write your own action to submit dependencies for your project at build-time. Your workflow should:
81+
82+
1. Generate a list of dependencies for your project.
83+
2. Translate the list of dependencies into the snapshot 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).
84+
3. Submit the formatted list of dependencies to the Dependency submission API.
85+
86+
{% 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)".
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Dependency submission
3+
intro: 'The Dependency submission API allows you to submit dependencies for projects, such as the dependencies resolved when a project is built or compiled.'
4+
versions:
5+
feature: dependency-submission-api
6+
miniTocMaxHeadingLevel: 3
7+
---
8+
9+
## About the Dependency submission API
10+
11+
{% data reusables.dependency-submission.dependency-submission-api-beta %}
12+
13+
{% data reusables.dependency-submission.about-dependency-submission %}
14+
15+
Dependencies are submitted to the dependency submission API in the form of a snapshot. A snapshot is a set of dependencies associated with a commit SHA and other metadata, that reflects the current state of your repository for a commit. You can choose to use pre-made actions or create your own actions to submit your dependencies to the dependency submission API in the required format each time your project is built. For more information about using the Dependency submission API, see "[Using the Dependency submission API](/code-security/supply-chain-security/understanding-your-software-supply-chain/using-the-dependency-submission-api)."
16+
17+
You can submit multiple sets of dependencies to the Dependency submission API to be included in your dependency graph. The API uses the `job.correlator` property and the `detector.name` category of the snapshot to ensure the latest submissions for each workflow get shown. The `correlator` property itself is the primary field you will use to keep independent submissions distinct. An example `correlator` could be a simple combination of two variables available in actions runs: `<GITHUB_WORKFLOW> <GITHUB_JOB>`.

content/rest/dependency-graph/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ topics:
1111
miniTocMaxHeadingLevel: 3
1212
children:
1313
- /dependency-review
14+
- /dependency-submission
1415
redirect_from:
1516
- /rest/reference/dependency-graph
1617
---
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Issue 6397
2+
versions:
3+
fpt: '*'
4+
ghec: '*'
5+
ghes: '>3.6'
6+
ghae: 'issue-6397'

data/release-notes/enterprise-server/3-4/0.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ sections:
244244
- The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues.
245245
- Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail.
246246
- Actions services needs to be restarted after restoring appliance from backup taken on a different host.
247+
- |
248+
After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17]
247249
- |
248250
When using SAML encrypted assertions with {% data variables.product.prodname_ghe_server %} 3.4.0 and 3.4.1, a new XML attribute `WantAssertionsEncrypted` in the `SPSSODescriptor` contains an invalid attribute for SAML metadata. IdPs that consume this SAML metadata endpoint may encounter errors when validating the SAML metadata XML schema. A fix will be available in the next patch release. [Updated: 2022-04-11]
249251

data/release-notes/enterprise-server/3-4/1.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ sections:
4646
- When "Users can search GitHub.com" is enabled with {% data variables.product.prodname_github_connect %}, issues in private and internal repositories are not included in {% data variables.product.prodname_dotcom_the_website %} search results.
4747
- The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues.
4848
- Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail.
49+
- |
50+
After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17]
4951
- |
5052
When using SAML encrypted assertions with {% data variables.product.prodname_ghe_server %} 3.4.0 and 3.4.1, a new XML attribute `WantAssertionsEncrypted` in the `SPSSODescriptor` contains an invalid attribute for SAML metadata. IdPs that consume this SAML metadata endpoint may encounter errors when validating the SAML metadata XML schema. A fix will be available in the next patch release. [Updated: 2022-04-11]
5153

data/release-notes/enterprise-server/3-4/2.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ sections:
2727
- When "Users can search GitHub.com" is enabled with {% data variables.product.prodname_github_connect %}, issues in private and internal repositories are not included in {% data variables.product.prodname_dotcom_the_website %} search results.
2828
- The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues.
2929
- Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail.
30+
- |
31+
After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17]
3032
3133
deprecations:
3234
- heading: Deprecation of GitHub Enterprise Server 3.0

0 commit comments

Comments
 (0)