Conversation
There was a problem hiding this comment.
CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
|
CodeQL found vulnerabilities from the code. Check the PR or the workflow summary for the details: https://github.com/FrendsPlatform/Frends.SFTP/actions/runs/8595850623?pr=202 |
|
CodeQL found vulnerabilities from the code. Check the PR or the workflow summary for the details: https://github.com/FrendsPlatform/Frends.SFTP/actions/runs/8596673398?pr=202 |
|
CodeQL found vulnerabilities from the code. Check the PR or the workflow summary for the details: https://github.com/FrendsPlatform/Frends.SFTP/actions/runs/8596784957?pr=202 |
| catch (Exception ex) | ||
| { | ||
| throw new ArgumentException($"Failure in Keyboard-Interactive authentication: {ex.Message}"); | ||
| } |
Check notice
Code scanning / CodeQL
Generic catch clause
| catch | ||
| { return false; } |
Check notice
Code scanning / CodeQL
Generic catch clause
| Convert.FromBase64String(input); | ||
| return true; | ||
| } | ||
| catch { return false; } |
Check notice
Code scanning / CodeQL
Generic catch clause
| foreach (var f in client.ListDirectory(".")) | ||
| { | ||
| if (f.Name != "." && f.Name != "..") | ||
| { | ||
| client.DeleteFile(f.Name); | ||
| } | ||
| } |
Check notice
Code scanning / CodeQL
Missed opportunity to use Where
| foreach (var file in files) | ||
| { | ||
| if (file.Name != "." && file.Name != "..") | ||
| { | ||
| if (file.IsDirectory) | ||
| { | ||
| sftp.ChangeDirectory(file.FullName); | ||
| foreach (var f in sftp.ListDirectory(".")) | ||
| { | ||
| if (f.Name != "." && f.Name != "..") | ||
| { | ||
| sftp.DeleteFile(f.Name); | ||
| } | ||
| } | ||
|
|
||
| sftp.ChangeDirectory("/upload"); | ||
| sftp.DeleteDirectory(file.FullName); | ||
| } | ||
| else | ||
| { | ||
| sftp.DeleteFile(file.FullName); | ||
| } | ||
| } | ||
| } |
Check notice
Code scanning / CodeQL
Missed opportunity to use Where
| client.ConnectionInfo.HostKeyAlgorithms.Add("ecdsa-sha2-nistp256", (data) => { return new KeyHostAlgorithm("ecdsa-sha2-nistp256", new EcdsaKey(), data); }); | ||
| break; | ||
| case HostKeyAlgorithms.Nistp384: | ||
| client.ConnectionInfo.HostKeyAlgorithms.Add("ecdsa-sha2-nistp384", (data) => { return new KeyHostAlgorithm("ecdsa-sha2-nistp384", new EcdsaKey(), data); }); |
Check warning
Code scanning / CodeQL
Missing Dispose call on local IDisposable
| client.ConnectionInfo.HostKeyAlgorithms.Add("ecdsa-sha2-nistp384", (data) => { return new KeyHostAlgorithm("ecdsa-sha2-nistp384", new EcdsaKey(), data); }); | ||
| break; | ||
| case HostKeyAlgorithms.Nistp521: | ||
| client.ConnectionInfo.HostKeyAlgorithms.Add("ecdsa-sha2-nistp521", (data) => { return new KeyHostAlgorithm("ecdsa-sha2-nistp521", new EcdsaKey(), data); }); |
Check warning
Code scanning / CodeQL
Missing Dispose call on local IDisposable
| using (var client = new SftpClient(_dockerAddress, 2222, _dockerUsername, _dockerPassword)) | ||
| { | ||
| client.ConnectionInfo.HostKeyAlgorithms.Clear(); | ||
| client.ConnectionInfo.HostKeyAlgorithms.Add("ssh-rsa", (data) => { return new KeyHostAlgorithm("ssh-rsa", new RsaKey(), data); }); |
Check warning
Code scanning / CodeQL
Missing Dispose call on local IDisposable
| { | ||
| var connection = Helpers.GetSftpConnection(); | ||
| connection.Authentication = AuthenticationType.UsernamePasswordPrivateKeyString; | ||
| connection.PrivateKeyPassphrase = "passphrase"; |
Check failure
Code scanning / CodeQL
Hard-coded credentials
| { | ||
| var connection = Helpers.GetSftpConnection(); | ||
| connection.Authentication = AuthenticationType.UsernamePasswordPrivateKeyString; | ||
| connection.PrivateKeyPassphrase = "passphrase"; |
Check failure
Code scanning / CodeQL
Hard-coded credentials
|
CodeQL found vulnerabilities from the code. Check the PR or the workflow summary for the details: https://github.com/FrendsPlatform/Frends.SFTP/actions/runs/8597510452?pr=202 |
|
CodeQL found vulnerabilities from the code. Check the PR or the workflow summary for the details: https://github.com/FrendsPlatform/Frends.SFTP/actions/runs/8597697966?pr=202 |
|
CodeQL found vulnerabilities from the code. Check the PR or the workflow summary for the details: https://github.com/FrendsPlatform/Frends.SFTP/actions/runs/8597756504?pr=202 |
#199