Fix the five library adoption review findings

This commit is contained in:
2026-09-24 15:32:13 +00:00
parent c42bc01052
commit 665ee85215
19 changed files with 942 additions and 208 deletions

View File

@@ -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)
}