Skip to content
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

Code Security Report: 8 high severity findings, 32 total findings #10

Open
1 task
mend-for-github-com bot opened this issue Jul 14, 2023 · 0 comments
Open
1 task
Labels
Mend: code security findings Code security findings detected by Mend

Comments

@mend-for-github-com
Copy link

Code Security Report

Scan Metadata

Latest Scan: 2023-07-14 09:00pm
Total Findings: 32 | New Findings: 0 | Resolved Findings: 0
Tested Project Files: 145
Detected Programming Languages: 5 (Java, Python, TypeScript, C#, R)

  • Check this box to manually trigger a scan

Most Relevant Findings

The below list presents the 10 most relevant findings that need your attention. To view information on the remaining findings, navigate to the Mend SAST Application.

SeverityVulnerability TypeCWEFileData FlowsDate
HighPath/Directory Traversal

CWE-22

Runner.cs:179

12023-07-14 09:01pm
More info

}
// parse the linked service json source for later use
string linkedServiceName = dummyTable.Properties.LinkedServiceName;
var servicePath = Path.Combine(adfFilesPath, linkedServiceName + ".json");
string serviceJson = File.ReadAllText(servicePath);

1 Data Flow/s detected
View Data Flow 1

var dummyTable = JsonConvert.DeserializeObject<Models.Table>(dataJson);

string linkedServiceName = dummyTable.Properties.LinkedServiceName;

var servicePath = Path.Combine(adfFilesPath, linkedServiceName + ".json");

string serviceJson = File.ReadAllText(servicePath);

HighDeserialization of Untrusted Data

CWE-502

Listall.cs:27

12023-07-14 09:01pm
More info

Console.WriteLine("Start to execute custom activity V2");
// Parse activity and reference objects info from input files
dynamic activity = JsonConvert.DeserializeObject(File.ReadAllText("activity.json"));
dynamic linkedServices = JsonConvert.DeserializeObject(File.ReadAllText("linkedServices.json"));

1 Data Flow/s detected
View Data Flow 1

dynamic linkedServices = JsonConvert.DeserializeObject(File.ReadAllText("linkedServices.json"));

HighDeserialization of Untrusted Data

CWE-502

Listall.cs:26

12023-07-14 09:01pm
More info

{
Console.WriteLine("Start to execute custom activity V2");
// Parse activity and reference objects info from input files
dynamic activity = JsonConvert.DeserializeObject(File.ReadAllText("activity.json"));

1 Data Flow/s detected
View Data Flow 1

dynamic activity = JsonConvert.DeserializeObject(File.ReadAllText("activity.json"));

HighDeserialization of Untrusted Data

CWE-502

Runner.cs:26

12023-07-14 09:01pm
More info

// Get Key Vault settings if secure publish is being used on the local machine
AdfFileHelper adfFileHelper = null;
string settingsFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "SecurePublishSettings.json");
if (File.Exists(settingsFile))
{
AppSettings settings = JsonConvert.DeserializeObject<AppSettings>(File.ReadAllText(settingsFile));

1 Data Flow/s detected
View Data Flow 1

AppSettings settings = JsonConvert.DeserializeObject<AppSettings>(File.ReadAllText(settingsFile));

HighDeserialization of Untrusted Data

CWE-502

SettingsPageGrid.cs:84

12023-07-14 09:01pm
More info

{
AppSettings settings = null;
try
{
settings = JsonConvert.DeserializeObject<AppSettings>(File.ReadAllText(settingsFile));

1 Data Flow/s detected
View Data Flow 1

settings = JsonConvert.DeserializeObject<AppSettings>(File.ReadAllText(settingsFile));

HighDeserialization of Untrusted Data

CWE-502

MainWindow.xaml.cs:65

12023-07-14 09:01pm
More info

"SecurePublishSettings.json");
if (File.Exists(settingsFile))
{
try
{
settings = JsonConvert.DeserializeObject<AppSettings>(File.ReadAllText(settingsFile));

1 Data Flow/s detected
View Data Flow 1

settings = JsonConvert.DeserializeObject<AppSettings>(File.ReadAllText(settingsFile));

HighDeserialization of Untrusted Data

CWE-502

DecompressFile.cs:22

12023-07-14 09:01pm
More info

[FunctionName("DecompressFile")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
dynamic data = JsonConvert.DeserializeObject(await new StreamReader(req.Body).ReadToEndAsync());

1 Data Flow/s detected
View Data Flow 1

dynamic data = JsonConvert.DeserializeObject(await new StreamReader(req.Body).ReadToEndAsync());

HighCross-Site Scripting

CWE-79

JobOnHdiLauncher.java:347

22023-07-14 09:01pm
More info

try
{
streamReader = new BufferedReader(new InputStreamReader(inStream));
while ((line = streamReader.readLine()) != null)
{
printStream.println(line);

2 Data Flow/s detected
View Data Flow 1

View Data Flow 2

MediumError Messages Information Exposure

CWE-209

JobOnHdiLauncher.java:184

12023-07-14 09:01pm
More info

}
}
catch (ParseException ex)
{
System.err.println("Error while parsing arguments ...");
ex.printStackTrace();

1 Data Flow/s detected
View Data Flow 1

MediumError Messages Information Exposure

CWE-209

JobOnHdiLauncher.java:56

12023-07-14 09:01pm
More info

int exitStatus = jobOnHdiLauncher.submitJob();
System.exit(exitStatus);
}
catch (Exception ex)
{
ex.printStackTrace();

1 Data Flow/s detected
View Data Flow 1

Findings Overview

Severity Vulnerability Type CWE Language Count
High Path/Directory Traversal CWE-22 C# 1
High Cross-Site Scripting CWE-79 Java 1
High Deserialization of Untrusted Data CWE-502 C# 6
Medium Error Messages Information Exposure CWE-209 Java 2
Medium Console Output CWE-209 Java 2
Medium Error Messages Information Exposure CWE-209 C# 18
Medium Console Output CWE-209 C# 2
@mend-for-github-com mend-for-github-com bot added the Mend: code security findings Code security findings detected by Mend label Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mend: code security findings Code security findings detected by Mend
Projects
None yet
Development

No branches or pull requests

0 participants