Skip to content

Commit

Permalink
Lucene.Net.Util.OfflineSorter::DEFAULT_TEMP_DIR: Added suppression of…
Browse files Browse the repository at this point in the history
… SonarCloud S5443 because we are not writing predictable temp file names and allow using a different directory.
  • Loading branch information
NightOwl888 committed Oct 19, 2023
1 parent 96b6862 commit 8e69cba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Lucene.Net/Util/OfflineSorter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Runtime.CompilerServices;
Expand Down Expand Up @@ -219,6 +220,8 @@ public override string ToString()
/// <summary>
/// LUCENENET specific - cache the temp directory path so we can return it from a property.
/// </summary>
[SuppressMessage("CodeQuality", "IDE0079:Remove unnecessary suppression", Justification = "This is a SonarCloud issue")]
[SuppressMessage("Security Hotspot", "S5443:Using publicly writable directories is security-sensitive", Justification = "Temp file names are chosen at random so they cannot be guessed by malicous users")]
private static readonly string DEFAULT_TEMP_DIR = Path.GetTempPath();

/// <summary>
Expand Down

0 comments on commit 8e69cba

Please sign in to comment.