diff options
| -rw-r--r-- | cmd/no-way-to-prevent-this/main.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/no-way-to-prevent-this/main.go b/cmd/no-way-to-prevent-this/main.go index 5ce135b..4cf85d1 100644 --- a/cmd/no-way-to-prevent-this/main.go +++ b/cmd/no-way-to-prevent-this/main.go @@ -11,6 +11,7 @@ import ( var ( date = flag.String("date", time.Now().Format(time.DateOnly), "Date of the CVE") + cPlusPlus = flag.Bool("c++", false, "If true, the project is written in C++") cve = flag.String("cve", "", "CVE number") cveLink = flag.String("cve-link", "", "CVE link") project = flag.String("project", "", "Project name") @@ -28,16 +29,15 @@ func main() { } defer fout.Close() - name := faker.Name() - - data := map[string]string{ + data := map[string]any{ "Date": *date, "CVE": *cve, "CVELink": *cveLink, "Project": *project, "ProjectLink": *projectLink, "Summary": *summary, - "Name": name, + "Name": faker.Name(), + "CPlusPlus": *cPlusPlus, } tmpl := template.Must(template.New("article").Parse(articleTemplate)) @@ -59,7 +59,7 @@ hero: In the hours following the release of [{{.CVE}}]({{.CVELink}}) for the project [{{.Project}}]({{.ProjectLink}}), site reliability workers and systems administrators scrambled to desperately rebuild and patch all their systems to fix {{.Summary}}. This is due to the affected components being -written in C, the only programming language where these vulnerabilities regularly happen. "This was a terrible tragedy, but sometimes +written in C{{if .CPlusPlus}}++{{end}}, the only programming language where these vulnerabilities regularly happen. "This was a terrible tragedy, but sometimes these things just happen and there's nothing anyone can do to stop them," said programmer {{.Name}}, echoing statements expressed by hundreds of thousands of programmers who use the only language where 90% of the world's memory safety vulnerabilities have occurred in the last 50 years, and whose projects are 20 times more likely to have security vulnerabilities. "It's a shame, but what can |
