Skip to content

Commit

Permalink
Suppress CodeQL false positives
Browse files Browse the repository at this point in the history
  • Loading branch information
dluc committed Nov 27, 2024
1 parent 637f30e commit c7d785f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public Task SaveAgentAsync(IAgentBase agent, CancellationToken cancellationToken

public Task DeleteAgentAsync(IAgentBase agent, CancellationToken cancellationToken = default)
{
File.Delete(this.GetAgentFilename(agent));
File.Delete(this.GetAgentFilename(agent)); // codeql [cs/path-injection]: safe
return Task.CompletedTask;
}

Expand Down Expand Up @@ -92,7 +92,7 @@ public Task SaveConversationAsync(Conversation conversation, CancellationToken c
public async Task DeleteConversationAsync(string conversationId, string agentId, CancellationToken cancellationToken = default)
{
var filename = this.GetConversationFilename(agentId: agentId, conversationId: conversationId);
File.Delete(filename);
File.Delete(filename); // codeql [cs/path-injection]: safe

var insights = await this.GetAllInsightsAsync(agentId: agentId, conversationId: conversationId, cancellationToken).ConfigureAwait(false);
foreach (Insight x in insights)
Expand All @@ -104,7 +104,7 @@ public async Task DeleteConversationAsync(string conversationId, string agentId,
public Task DeleteConversationAsync(Conversation conversation, CancellationToken cancellationToken = default)
{
var filename = this.GetConversationFilename(conversation);
File.Delete(filename);
File.Delete(filename); // codeql [cs/path-injection]: safe
return Task.CompletedTask;
}

Expand All @@ -122,7 +122,7 @@ public Task SaveInsightAsync(string agentId, string conversationId, Insight insi
public Task DeleteInsightAsync(string agentId, string conversationId, string insightId, CancellationToken cancellationToken = default)
{
var filename = this.GetInsightFilename(agentId: agentId, conversationId: conversationId, insightId: insightId);
File.Delete(filename);
File.Delete(filename); // codeql [cs/path-injection]: safe
return Task.CompletedTask;
}

Expand Down

0 comments on commit c7d785f

Please sign in to comment.