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

Only create/update index.txt, changes.csv, security.txt when configured. (#210)

* Change default to not write index.txt, changes.csv and security.txt 
  (for provider and aggregator)
* Add config file options to reenable writing.
This commit is contained in:
Sascha L. Teichmann 2022-07-05 16:44:45 +02:00 committed by GitHub
parent 3a3ef7a961
commit 20f5937240
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 51 additions and 23 deletions

View file

@ -41,7 +41,13 @@ func ensureFolders(c *config) error {
}
}
return setupSecurity(c, wellknown)
// Only write/modify security.txt if configured.
if c.WriteSecurity {
if err := setupSecurity(c, wellknown); err != nil {
return err
}
}
return nil
}
// createWellknown creates ".well-known" directory if not exist and returns nil.