-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
init #202
base: main
Are you sure you want to change the base?
init #202
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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