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

Suppress lgtm alerts in localtest #4580

Merged
1 commit merged into from
Aug 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ public async Task<ActionResult> Post([FromBody] XacmlRequestApiModel model)
{
if (Request.ContentType.Contains("application/json"))
{
return await AuthorizeJsonRequest(model);
return await AuthorizeJsonRequest(model); // lgtm [cs/user-controlled-bypass]
}
else
else
{
return await AuthorizeXmlRequest(model);
return await AuthorizeXmlRequest(model); // lgtm [cs/user-controlled-bypass]
}
}
catch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public string GenerateToken(ClaimsPrincipal principal, int cookieValidityTime)
{
List<X509Certificate2> certificates = new List<X509Certificate2>
{
new X509Certificate2("jwtselfsignedcert.pfx", "qwer1234")
new X509Certificate2("jwtselfsignedcert.pfx", "qwer1234") // lgtm [cs/hardcoded-credentials]
};

TimeSpan tokenExpiry = new TimeSpan(0, cookieValidityTime, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public async Task<Organization> GetOrganization(string orgNr)
{
Organization org = null;
string path = this._localPlatformSettings.LocalTestingStaticTestDataPath + "Register/Org/" + orgNr + ".json";
if (File.Exists(path))
if (File.Exists(path)) // lgtm [cs/path-injection]
{
string content = File.ReadAllText(path);
string content = File.ReadAllText(path); // lgtm [cs/path-injection]
org = (Organization)JsonConvert.DeserializeObject(content, typeof(Organization));
}

Expand Down