Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

642
Visualizações
Coverity issues for Filesystem path, filename, or URI manipulation in C#, .NET Core

We had a Coverity scan performed in our code and found the issue related to "Filesystem path, filename, or URI manipulation" which is a high impact security issue.

This is the code we had at first:

var xxxFilesPath = configuration["FileSection:Path"]; 
qualifiedFileName = xxxFilesPath + input.FileName;

As per our research and understanding we have changed the code as below to resolve the issue:

DirectoryInfo xxxFilesPath = new DirectoryInfo(configuration["FileSection:Path"]);
FileInfo[] files = xxxFilesPath.GetFiles(input.FileName); 
input.FileName = files.FirstOrDefault().FullName;

But after running the scan, it is still showing the same errors (not resolved).

Technology details:

  1. .NET Core 3.1
  2. C#

I'm not sure if I'm working on correct area, in that case reason of the issue will be very helpful.

Could anyone let me know, what should be the correct step and why so.

Thanks in advance...

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda