1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Create security.txt in .wellknown folder.

This commit is contained in:
Sascha L. Teichmann 2021-12-01 01:05:24 +01:00
parent a54b4199a2
commit 37d6692fa8

View file

@ -27,11 +27,11 @@ func ensureFolders(c *config) error {
return err return err
} }
return createSecurity(c) return createSecurity(c, wellknown)
} }
func createSecurity(c *config) error { func createSecurity(c *config, wellknown string) error {
security := filepath.Join(c.Web, "security.txt") security := filepath.Join(wellknown, "security.txt")
if _, err := os.Stat(security); err != nil { if _, err := os.Stat(security); err != nil {
if os.IsNotExist(err) { if os.IsNotExist(err) {
f, err := os.Create(security) f, err := os.Create(security)