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

@ -322,11 +322,14 @@ func (c *controller) upload(r *http.Request) (interface{}, error) {
return err
}
if err := updateIndices(
folder, filepath.Join(year, newCSAF),
ex.CurrentReleaseDate,
); err != nil {
return err
// Only write index.txt and changes.csv if configured.
if c.cfg.WriteIndices {
if err := updateIndices(
folder, filepath.Join(year, newCSAF),
ex.CurrentReleaseDate,
); err != nil {
return err
}
}
// Take over publisher