Fix the five library adoption review findings
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package reporting
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"gitea.maximumdirect.net/eric/audita/internal/core/redaction"
|
||||
"gitea.maximumdirect.net/eric/audita/internal/framework/proposals"
|
||||
stagewarnings "gitea.maximumdirect.net/eric/audita/internal/framework/warnings"
|
||||
)
|
||||
@@ -124,8 +124,8 @@ type ChunkingSummary struct {
|
||||
MinSectionTokens int `json:"min_section_tokens"`
|
||||
}
|
||||
|
||||
func WriteProcessReport(path string, report ProcessReport) error {
|
||||
payload, err := json.MarshalIndent(report, "", " ")
|
||||
func WriteProcessReport(path string, report ProcessReport, secrets ...string) error {
|
||||
payload, err := redaction.New(secrets).JSON(report)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to marshal process report JSON: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user