@@ -536,7 +536,7 @@ func (p *processor) rolieFeedEntries(feed string) ([]csaf.AdvisoryFile, error) {
536536 if len (errors ) > 0 {
537537 p .badProviderMetadata .error ("%s: Validating against JSON schema failed:" , feed )
538538 for _ , msg := range errors {
539- p .badProviderMetadata .error (strings .ReplaceAll (msg , `%` , `%%` ))
539+ p .badProviderMetadata .error ("%s" , strings .ReplaceAll (msg , `%` , `%%` ))
540540 }
541541 }
542542
@@ -736,15 +736,15 @@ func (p *processor) integrity(
736736
737737 switch date , fault := p .extractTime (doc , `initial_release_date` , u ); {
738738 case fault != "" :
739- p .badFolders .error (fault )
739+ p .badFolders .error ("%s" , fault )
740740 case folderYear == nil :
741741 p .badFolders .error ("No year folder found in %s" , u )
742742 case date .UTC ().Year () != * folderYear :
743743 p .badFolders .error ("%s should be in folder %d" , u , date .UTC ().Year ())
744744 }
745745 current , fault := p .extractTime (doc , `current_release_date` , u )
746746 if fault != "" {
747- p .badChanges .error (fault )
747+ p .badChanges .error ("%s" , fault )
748748 } else {
749749 p .timesAdv [f .URL ()] = current
750750 }
@@ -814,7 +814,7 @@ func (p *processor) integrity(
814814 msgType = InfoType
815815 }
816816 for _ , fetchError := range hashFetchErrors {
817- p .badIntegrities .add (msgType , fetchError )
817+ p .badIntegrities .add (msgType , "%s" , fetchError )
818818 }
819819
820820 // Check signature
@@ -1052,7 +1052,7 @@ func (p *processor) checkChanges(base string, mask whereType) error {
10521052 if p .cfg .Range != nil {
10531053 filtered = " (maybe filtered out by time interval)"
10541054 }
1055- p .badChanges .warn ("no entries in changes.csv found" + filtered )
1055+ p .badChanges .warn ("%s" , " no entries in changes.csv found"+ filtered )
10561056 }
10571057
10581058 if ! sort .SliceIsSorted (times , func (i , j int ) bool {
@@ -1300,8 +1300,8 @@ func (p *processor) checkProviderMetadata(domain string) bool {
13001300
13011301 for i := range lpmd .Messages {
13021302 p .badProviderMetadata .warn (
1303- "Unexpected situation while loading provider-metadata.json: " +
1304- lpmd .Messages [i ].Message )
1303+ "Unexpected situation while loading provider-metadata.json: %s" ,
1304+ lpmd .Messages [i ].Message )
13051305 }
13061306
13071307 if ! lpmd .Valid () {
@@ -1401,25 +1401,25 @@ func (p *processor) checkDNS(domain string) {
14011401 res , err := client .Get (path )
14021402 if err != nil {
14031403 p .badDNSPath .add (ErrorType ,
1404- fmt . Sprintf ( "Fetching %s failed: %v" , path , err ) )
1404+ "Fetching %s failed: %v" , path , err )
14051405 return
14061406 }
14071407 if res .StatusCode != http .StatusOK {
1408- p .badDNSPath .add (ErrorType , fmt . Sprintf ( "Fetching %s failed. Status code %d (%s)" ,
1409- path , res .StatusCode , res .Status ))
1408+ p .badDNSPath .add (ErrorType , "Fetching %s failed. Status code %d (%s)" ,
1409+ path , res .StatusCode , res .Status )
14101410 }
14111411 hash := sha256 .New ()
14121412 defer res .Body .Close ()
14131413 content , err := io .ReadAll (res .Body )
14141414 if err != nil {
14151415 p .badDNSPath .add (ErrorType ,
1416- fmt . Sprintf ( "Error while reading the response from %s" , path ) )
1416+ "Error while reading the response from %s" , path )
14171417 }
14181418 hash .Write (content )
14191419 if ! bytes .Equal (hash .Sum (nil ), p .pmd256 ) {
14201420 p .badDNSPath .add (ErrorType ,
1421- fmt . Sprintf ( "%s does not serve the same provider-metadata.json as previously found" ,
1422- path ) )
1421+ "%s does not serve the same provider-metadata.json as previously found" ,
1422+ path )
14231423 }
14241424}
14251425
@@ -1433,12 +1433,12 @@ func (p *processor) checkWellknown(domain string) {
14331433 res , err := client .Get (path )
14341434 if err != nil {
14351435 p .badWellknownMetadata .add (ErrorType ,
1436- fmt . Sprintf ( "Fetching %s failed: %v" , path , err ) )
1436+ "Fetching %s failed: %v" , path , err )
14371437 return
14381438 }
14391439 if res .StatusCode != http .StatusOK {
1440- p .badWellknownMetadata .add (ErrorType , fmt . Sprintf ( "Fetching %s failed. Status code %d (%s)" ,
1441- path , res .StatusCode , res .Status ))
1440+ p .badWellknownMetadata .add (ErrorType , "Fetching %s failed. Status code %d (%s)" ,
1441+ path , res .StatusCode , res .Status )
14421442 }
14431443}
14441444
@@ -1475,13 +1475,13 @@ func (p *processor) checkWellknownSecurityDNS(domain string) error {
14751475 // but found in the legacy location, and inform about finding it there (2).
14761476 switch warnings {
14771477 case 0 :
1478- p .badSecurity .add (InfoType , sDMessage )
1478+ p .badSecurity .add (InfoType , "%s" , sDMessage )
14791479 case 1 :
1480- p .badSecurity .add (ErrorType , sDMessage )
1481- p .badSecurity .add (ErrorType , sLMessage )
1480+ p .badSecurity .add (ErrorType , "%s" , sDMessage )
1481+ p .badSecurity .add (ErrorType , "%s" , sLMessage )
14821482 case 2 :
1483- p .badSecurity .add (WarnType , sDMessage )
1484- p .badSecurity .add (InfoType , sLMessage )
1483+ p .badSecurity .add (WarnType , "%s" , sDMessage )
1484+ p .badSecurity .add (InfoType , "%s" , sLMessage )
14851485 }
14861486
14871487 p .checkDNS (domain )
0 commit comments