def redact_secrets(value):
    if isinstance(value, dict):
        new_dict = {}
        for k, v in value.items():
            if any(keyword in k.lower() for keyword in ['password', 'token', 'secret']):
                new_dict[k] = '[REDACTED]'
            else:
                new_dict[k] = redact_secrets(v)
        return new_dict
    elif isinstance(value, list):
        return [redact_secrets(item) for item in value]
    else:
        return value