1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 05:40:11 +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 createSecurity(c)
return createSecurity(c, wellknown)
}
func createSecurity(c *config) error {
security := filepath.Join(c.Web, "security.txt")
func createSecurity(c *config, wellknown string) error {
security := filepath.Join(wellknown, "security.txt")
if _, err := os.Stat(security); err != nil {
if os.IsNotExist(err) {
f, err := os.Create(security)