tests/screentest: test case for go.dev/issues/56357

For golang/go#56357

Change-Id: Ia080e5c4e60aad2462fac1ba0f2ff5f6deb9485a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/444675
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
diff --git a/tests/screentest/seed.txt b/tests/screentest/seed.txt
index bc73966..f2f3765 100644
--- a/tests/screentest/seed.txt
+++ b/tests/screentest/seed.txt
@@ -24,6 +24,7 @@
 golang.org/x/tools@v0.1.2
 k8s.io/client-go@v0.21.3
 k8s.io/client-go@v1.5.2
+golang.org/x/crypto@v0.1.0
 golang.org/x/tools/gopls@v0.6.11
 github.com/jackc/pgx@v3.6.2+incompatible
 rsc.io/quote@v0.9.9-pre1
diff --git a/tests/screentest/testcases.ci.txt b/tests/screentest/testcases.ci.txt
index 36ab039..7948de4 100644
--- a/tests/screentest/testcases.ci.txt
+++ b/tests/screentest/testcases.ci.txt
@@ -29,6 +29,11 @@
 capture viewport
 capture viewport 540x1080
 
+test vuln nonstdlib module
+pathname /golang.org/x/crypto?tab=versions
+capture viewport
+capture viewport 540x1080
+
 test vuln search
 pathname /search?q=github.com%2Fbeego&m=vuln
 capture viewport
diff --git a/tests/screentest/testdata/ci/vuln-nonstdlib-module-540x1080.a.png b/tests/screentest/testdata/ci/vuln-nonstdlib-module-540x1080.a.png
new file mode 100644
index 0000000..6992ede
--- /dev/null
+++ b/tests/screentest/testdata/ci/vuln-nonstdlib-module-540x1080.a.png
Binary files differ
diff --git a/tests/screentest/testdata/ci/vuln-nonstdlib-module.a.png b/tests/screentest/testdata/ci/vuln-nonstdlib-module.a.png
new file mode 100644
index 0000000..9608f2d
--- /dev/null
+++ b/tests/screentest/testdata/ci/vuln-nonstdlib-module.a.png
Binary files differ
diff --git a/tests/screentest/testdata/vulndb/golang.org/x/crypto.json b/tests/screentest/testdata/vulndb/golang.org/x/crypto.json
new file mode 100644
index 0000000..a6b503b
--- /dev/null
+++ b/tests/screentest/testdata/vulndb/golang.org/x/crypto.json
@@ -0,0 +1,100 @@
+[
+  {
+    "id": "GO-2022-0229",
+    "published": "2022-07-06T18:23:48Z",
+    "modified": "2022-09-20T15:16:04Z",
+    "aliases": [
+      "CVE-2020-7919",
+      "GHSA-cjjc-xp8v-855w"
+    ],
+    "details": "On 32-bit architectures, a malformed input to crypto/x509 or\nthe ASN.1 parsing functions of golang.org/x/crypto/cryptobyte\ncan lead to a panic.\n\nThe malformed certificate can be delivered via a crypto/tls\nconnection to a client, or to a server that accepts client\ncertificates. net/http clients can be made to crash by an HTTPS\nserver, while net/http servers that accept client certificates\nwill recover the panic and are unaffected.\n",
+    "affected": [
+      {
+        "package": {
+          "name": "stdlib",
+          "ecosystem": "Go"
+        },
+        "ranges": [
+          {
+            "type": "SEMVER",
+            "events": [
+              {
+                "introduced": "0"
+              },
+              {
+                "fixed": "1.12.16"
+              },
+              {
+                "introduced": "1.13.0"
+              },
+              {
+                "fixed": "1.13.7"
+              }
+            ]
+          }
+        ],
+        "database_specific": {
+          "url": "https://pkg.go.dev/vuln/GO-2022-0229"
+        },
+        "ecosystem_specific": {
+          "imports": [
+            {
+              "path": "crypto/x509"
+            }
+          ]
+        }
+      },
+      {
+        "package": {
+          "name": "golang.org/x/crypto",
+          "ecosystem": "Go"
+        },
+        "ranges": [
+          {
+            "type": "SEMVER",
+            "events": [
+              {
+                "introduced": "0"
+              },
+              {
+                "fixed": "0.0.0-20200124225646-8b5121be2f68"
+              }
+            ]
+          }
+        ],
+        "database_specific": {
+          "url": "https://pkg.go.dev/vuln/GO-2022-0229"
+        },
+        "ecosystem_specific": {
+          "imports": [
+            {
+              "path": "golang.org/x/crypto/cryptobyte"
+            }
+          ]
+        }
+      }
+    ],
+    "references": [
+      {
+        "type": "FIX",
+        "url": "https://go.dev/cl/216680"
+      },
+      {
+        "type": "FIX",
+        "url": "https://go.googlesource.com/go/+/b13ce14c4a6aa59b7b041ad2b6eed2d23e15b574"
+      },
+      {
+        "type": "FIX",
+        "url": "https://go.dev/cl/216677"
+      },
+      {
+        "type": "REPORT",
+        "url": "https://go.dev/issue/36837"
+      },
+      {
+        "type": "WEB",
+        "url": "https://groups.google.com/g/golang-announce/c/Hsw4mHYc470"
+      }
+    ]
+  }
+]
diff --git a/tests/screentest/testdata/vulndb/index.json b/tests/screentest/testdata/vulndb/index.json
index 3fe0721..7385e7e 100644
--- a/tests/screentest/testdata/vulndb/index.json
+++ b/tests/screentest/testdata/vulndb/index.json
@@ -1,6 +1,7 @@
 {
     "github.com/BeeGo/beego": "2022-08-23T19:54:38Z",
     "github.com/tidwall/gjson": "2022-08-23T19:54:38Z",
+    "golang.org/x/crypto":"2022-09-21T19:50:49Z",
     "stdlib": "2022-08-23T19:54:38Z",
-    "toolchain": "2022-08-23T19:54:38Z"
+    "toolchain": "2022-08-23T19:54:38Z",
 }