| Copyright 2023 The Go Authors. All rights reserved. |
| Use of this source code is governed by a BSD-style |
| license that can be found in the LICENSE file. |
| |
| Test: TestLintOffline/references_incorrect_stdlib |
| Description: Standard library reports must contain references matching a specific format. |
| |
| -- data/reports/GO-0000-0000.yaml -- |
| id: GO-0000-0000 |
| modules: |
| - module: std |
| vulnerable_at: 1.2.3 |
| packages: |
| - package: net/http |
| summary: A summary of the problem with net/http |
| description: description |
| references: |
| - advisory: http://www.example.com |
| - fix: https://go-review.googlesource.com/c/go/+/12345 |
| - fix: https://github.com/golang/go/commit/12345 |
| - report: https://github.com/golang/go/issues/12345 |
| - web: https://go.dev/ |
| |
| -- golden -- |
| references[0] "http://www.example.com": "http://www.example.com": advisory reference must not be set for first-party issues |
| references[1] "https://go-review.googlesource.com/c/go/+/12345": "https://go-review.googlesource.com/c/go/+/12345": fix reference must match "https://go.dev/cl/\\d+" or "https://go.googlesource.com/[^/]+/\\+/([^/]+)" |
| references[2] "https://github.com/golang/go/commit/12345": "https://github.com/golang/go/commit/12345": fix reference must match "https://go.dev/cl/\\d+" or "https://go.googlesource.com/[^/]+/\\+/([^/]+)" |
| references[2] "https://github.com/golang/go/commit/12345": should be "https://go.googlesource.com/+/12345" (can be auto-fixed) |
| references[3] "https://github.com/golang/go/issues/12345": "https://github.com/golang/go/issues/12345": report reference must match regex "https://go.dev/issue/\\d+" |
| references[3] "https://github.com/golang/go/issues/12345": should be "https://go.dev/issue/12345" (can be auto-fixed) |
| references[4] "https://go.dev/": "https://go.dev/": web reference must match regex "https://groups.google.com/g/golang-(announce|dev|nuts)/c/([^/]+)" |
| references: must contain an announcement link matching regex "https://groups.google.com/g/golang-(announce|dev|nuts)/c/([^/]+)" |