Skip to content

Commit

Permalink
Suppress lgtm alerts in localtest (#4580)
Browse files Browse the repository at this point in the history
Co-authored-by: HansO <[email protected]>
  • Loading branch information
HansO and HansO authored Aug 5, 2020
1 parent 7a7de25 commit d00de22
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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

0 comments on commit d00de22

Please sign in to comment.