MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / fixedTimeForLog

Function fixedTimeForLog

server-source-code/internal/handler/patching.go:135–140  ·  view source on GitHub ↗

fixedTimeForLog returns the raw fixed_time_utc value (or " ") for a policy, suitable for inclusion in slog fields. slog escapes control characters in JSON/text output so log injection via this value is contained to the field itself.

(p *db.PatchPolicy)

Source from the content-addressed store, hash-verified

133// characters in JSON/text output so log injection via this value is contained
134// to the field itself.
135func fixedTimeForLog(p *db.PatchPolicy) string {
136 if p == nil || p.FixedTimeUtc == nil {
137 return "<nil>"
138 }
139 return *p.FixedTimeUtc
140}
141
142func isValidPackageName(s string) bool {
143 return len(s) > 0 && len(s) <= 256 && packageNameRegex.MatchString(s)

Callers 3

PreviewRunMethod · 0.85
ApproveRunMethod · 0.85
TriggerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected