Skip to content

Commit 518f98e

Browse files
committed
Merge branch 'main' into feat/eleventy-migration
2 parents cf62e01 + e72b9e2 commit 518f98e

File tree

6 files changed

+68
-3
lines changed

6 files changed

+68
-3
lines changed

.github/workflows/scorecards-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
# Upload the results as artifacts (optional).
4343
- name: "Upload artifact"
44-
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6
44+
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8
4545
with:
4646
name: SARIF file
4747
path: results.sarif

firebase.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
{ "source": "/go/publishing-with-service-account", "destination": "/tools/pub/automated-publishing#publishing-from-google-cloud-build", "type": 301 },
183183
{ "source": "/go/sdk-constraint", "destination": "/tools/pub/pubspec#sdk-constraints", "type": 301 },
184184
{ "source": "/go/sdk-version-pinning", "destination": "https://github.com/dart-lang/sdk/wiki/Flutter-Pinned-Packages", "type": 301 },
185-
{ "source": "/go/pub-security-advisories", "destination": "https://github.com/dart-lang/site-www/issues/5458", "type": 301 },
185+
{ "source": "/go/pub-security-advisories", "destination": "/tools/pub/security-advisories", "type": 301 },
186186
{ "source": "/go/test-docs/:page*", "destination": "https://github.com/dart-lang/test/blob/master/pkgs/test/doc/:page*", "type": 301 },
187187
{ "source": "/go/unsound-null-safety", "destination": "/null-safety/unsound-null-safety", "type": 301 },
188188

src/_data/side-nav.yml

+2
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@
190190
permalink: /tools/pub/troubleshoot
191191
- title: Verified publishers
192192
permalink: /tools/pub/verified-publishers
193+
- title: Security advisories
194+
permalink: /tools/pub/security-advisories
193195
- title: Versioning
194196
permalink: /tools/pub/versioning
195197

src/content/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
type='video/webm;codecs="vp8, vorbis"' />
1717
<source src="assets/dash/video/hotreload.mp4"
1818
type='video/mp4;codecs="avc1.42E01E, mp4a.40.2"' />
19-
<img src=assets/dash/2x/paint-your-ui.png alt="Paint your UI" />
19+
<img src="assets/dash/2x/paint-your-ui.png" alt="Paint your UI" />
2020
</video>
2121
</section>
2222
</div>

src/content/tools/pub/pubspec.md

+4
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ A pubspec can have the following fields:
9494
: Optional. List of topics for the package.
9595
[_Learn more._](#topics)
9696

97+
`ignored_advisories`
98+
: Optional. List of ignored security advisories.
99+
[_Learn more._](/tools/pub/security-advisories)
100+
97101
Pub ignores all other fields.
98102

99103
:::flutter-note
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: Security advisories
3+
description: >-
4+
Use security advisories to inform and be informed
5+
about security vulnerabilities in Dart packages.
6+
---
7+
8+
Security advisories are a means to report information about security
9+
vulnerabilities. Pub uses the [GitHub Advisory Database][]
10+
for publishing security advisories for Dart and Flutter packages.
11+
12+
To create an advisory in your GitHub repository, use
13+
GitHub's security advisory reporting mechanism as
14+
explained in GitHub's docs on [Creating a repository security advisory][].
15+
First you create a draft security advisory, which will then be reviewed by
16+
GitHub and ingested into the central advisory database.
17+
18+
[GitHub Advisory Database]: https://github.com/advisories
19+
[Creating a repository security advisory]: https://docs.github.com/code-security/security-advisories/working-with-repository-security-advisories/creating-a-repository-security-advisory
20+
21+
## Security advisories in the pub client
22+
23+
The pub client surfaces security advisories at dependency resolution.
24+
For instance, when running `dart pub get` you will get the following output:
25+
26+
```terminal
27+
$ dart pub get
28+
Resolving dependencies...
29+
http 0.13.0 (affected by advisory: [^0], 1.2.0 available)
30+
Got dependencies!
31+
Dependencies are affected by security advisories:
32+
[^0]: https://github.com/advisories/GHSA-4rgh-jx4f-qfcq
33+
```
34+
35+
If resolution identifies an advisory, the Dart team recommends you
36+
visit the link and review the advisory.
37+
If you assess that the vulnerability affects your package, you
38+
should strongly consider upgrading to a non-affected version of the dependency.
39+
40+
41+
### Ignoring security advisories
42+
43+
If a security advisory is not relevant for your application,
44+
you can suppress the warning by adding the advisory identifier to
45+
the `ignored_advisories` list in the `pubspec.yaml` of your package.
46+
For example, the following ignores the advisory
47+
with the CVE identifier `GHSA-4rgh-jx4f-qfcq`:
48+
49+
```yaml
50+
name: myapp
51+
dependencies:
52+
foo: ^1.0.0
53+
ignored_advisories:
54+
- GHSA-4rgh-jx4f-qfcq
55+
```
56+
57+
The `ignored_advisories` list only affects the root package. Ignored
58+
advisories in your dependencies will have no effect on package resolution
59+
for your own packages.

0 commit comments

Comments
 (0)