cmd/govulncheck: mask dirty dependency versions

Go tip has a new change that creates a valid dirty Go version
for dependencies that were before always (devel). We mask such versions
to devel for the tests to pass. We will remove this mask after the new
change to Go versioning is the only one supported on builders.

Change-Id: I0b8bc6238db47fbf808401047dfb6d5676d2f6c4
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/630735
Reviewed-by: Ian Cottrell <iancottrell@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/cmd/govulncheck/testdata/common/config.json b/cmd/govulncheck/testdata/common/config.json
index 1a0fae4..f8cc97f 100644
--- a/cmd/govulncheck/testdata/common/config.json
+++ b/cmd/govulncheck/testdata/common/config.json
@@ -29,11 +29,11 @@
       "replace": "modified 01 Jan 21 00:00 UTC)"
     },
     {
-      "pattern": "Go: (go1.[\\.\\d]*|devel).*",
+      "pattern": "Go: (go1.[\\.\\d]*|devel(.*)).*",
       "replace": "Go: go1.18"
     },
     {
-      "pattern": "\"go_version\": \"go(.*)\"",
+      "pattern": "\"go_version\": \"(go(.*)|devel(.*))\"",
       "replace": "\"go_version\": \"go1.18\""
     },
     {
@@ -43,6 +43,10 @@
     {
       "pattern": "path\": \"stdlib\",\n *\"version\": \"(.*)\"",
       "replace": "path\": \"stdlib\",\n        \"version\": \"v1.18.0\""
+    },
+    {
+      "pattern": "\"version\": \"(.*)dirty\"",
+      "replace": "\"version\": \"(devel)\""
     }
   ]
 }