fix: added ability to disable the audit logger with value set to -1

Signed-off-by: John Redwood <john.r.k.redwood@gmail.com>
This commit is contained in:
John Redwood
2025-07-09 18:19:24 +10:00
parent 11dc90faa2
commit b29c4a8a07
@@ -193,6 +193,14 @@ export class TaskWorker {
protected truncateParameters(parameters: JsonObject) {
const auditMaxLength =
this.config?.getOptionalNumber('scaffolder.auditor.maxLength') ?? 256;
if (auditMaxLength === -1) {
this.logger?.debug(
`scaffolder.auditor.maxLength manually disabled via configuration, no task parameter length limit set.`,
);
return parameters;
}
const truncatedParameters: JsonObject = {};
for (const key in parameters) {