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

Get Establishment by Trust Repository method #410

Merged
merged 10 commits into from
Nov 9, 2023

Conversation

dneed-nimble
Copy link
Contributor

No description provided.

return NotFound();
}

_logger.LogInformation($"Returning Establishments for Trust with specific UKPRN : {commaSeparatedRequestTrust}");

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks Low

Change this code to not log user-controlled data. See more on SonarCloud
public async Task<ActionResult<List<EstablishmentDto>>> GetByTrust([FromQuery] string trustUkprn, CancellationToken cancellationToken)
{
var commaSeparatedRequestTrust = string.Join(",", trustUkprn);
_logger.LogInformation($"Attemping to get establishments by Trust UKPRN : {commaSeparatedRequestTrust}");

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks Low

Change this code to not log user-controlled data. See more on SonarCloud

if (establishments == null)
{
_logger.LogInformation($"No establishment was found with the requested Trust UKPRN : {commaSeparatedRequestTrust}");

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks Low

Change this code to not log user-controlled data. See more on SonarCloud
return NotFound();
}

_logger.LogInformation($"Returning trust found by Companies House Number {companiesHouseNumber}");

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks Low

Change this code to not log user-controlled data. See more on SonarCloud
[SwaggerResponse(404, "Trust with specified Companies House Number not found.")]
public async Task<ActionResult<TrustDto>> GetTrustByCompaniesHouseNumber(string companiesHouseNumber, CancellationToken cancellationToken)
{
_logger.LogInformation($"Attempting to get trust by Companies House Number {companiesHouseNumber}");

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks Low

Change this code to not log user-controlled data. See more on SonarCloud

if (trust == null)
{
_logger.LogInformation($"No trust found for Companies House Number {companiesHouseNumber}");

Check notice

Code scanning / SonarCloud

Logging should not be vulnerable to injection attacks Low

Change this code to not log user-controlled data. See more on SonarCloud
@dneed-nimble dneed-nimble marked this pull request as ready for review November 9, 2023 10:22
Copy link

sonarqubecloud bot commented Nov 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability B 6 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 13 Code Smells

2.1% 2.1% Coverage
0.0% 0.0% Duplication

@dneed-nimble dneed-nimble merged commit 61c6674 into main Nov 9, 2023
3 checks passed
@dneed-nimble dneed-nimble deleted the feature/get-establishment-by-trust branch November 9, 2023 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants