Potential fix for code scanning alert no. 176: Log entries created from user input#380
Draft
aurelianware wants to merge 1249 commits intomainfrom
Draft
Potential fix for code scanning alert no. 176: Log entries created from user input#380aurelianware wants to merge 1249 commits intomainfrom
aurelianware wants to merge 1249 commits intomainfrom
Conversation
Co-authored-by: aurelianware <194855645+aurelianware@users.noreply.github.com>
Co-authored-by: aurelianware <194855645+aurelianware@users.noreply.github.com>
Co-authored-by: aurelianware <194855645+aurelianware@users.noreply.github.com>
Co-authored-by: aurelianware <194855645+aurelianware@users.noreply.github.com>
…or-https Configure HTTPS ingress with automatic TLS for website and portal
…nd 275/278 integration ready
Potential fix for code scanning alert no. 151: Uncontrolled command line
Co-authored-by: aurelianware <194855645+aurelianware@users.noreply.github.com>
…ProcessStartInfo before foreach loop Co-authored-by: aurelianware <194855645+aurelianware@users.noreply.github.com>
Co-authored-by: aurelianware <194855645+aurelianware@users.noreply.github.com>
…om user input Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: aurelianware <markus@aurelianware.com>
Potential fix for code scanning alert no. 178: Log entries created from user input
…vice/multi-67fc40ef65
…eference-data-service/multi-67fc40ef65 Bump Microsoft.EntityFrameworkCore and Npgsql.EntityFrameworkCore.PostgreSQL
Address code review feedback: fix syntax error, add input validation, improve naming
Fix command injection vulnerability in SFTP tenant provisioning
…rtal/nuget-d7b17b6b38
…bbing-service/uuid-13.0.0
…vices/claims-scrubbing-service/uuid-13.0.0 Bump uuid from 11.1.0 to 13.0.0 in /services/claims-scrubbing-service
…ice/Swashbuckle.AspNetCore-10.1.2
…rtal/nuget-d7b17b6b38
…udHealthOffice.Portal/nuget-d7b17b6b38 Bump Azure.Identity and System.Formats.Asn1
…ice/Swashbuckle.AspNetCore-10.1.2
- Update namespace references in Argo workflows (cho-sftp, cho-workflows) - Enhance x12-276 claim status workflow with better error handling - Update SFTP server deployment configuration - Improve RBAC permissions for Argo workflows - Enhance claim status test script with better validation - Add PVC and secrets configurations
- Update site deployment to use cho-svcs namespace (not cloudhealthoffice) - Update site ingress to use cho-svcs namespace - Resolves duplicate ingress error in Digital Ocean deployment - Standardizes all resources to cho-* namespace convention
…ice/Swashbuckle.AspNetCore-10.1.2
…uthorization-service/Swashbuckle.AspNetCore-10.1.2 Bump Swashbuckle.AspNetCore from 6.5.0 to 10.1.2
…om user input Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: aurelianware <markus@aurelianware.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Potential fix for https://github.com/aurelianware/cloudhealthoffice/security/code-scanning/176
In general, to fix log forging issues, any user-controlled data included in log messages should be normalized or encoded so that it cannot inject new log entries or confuse log parsers. For text logs, this typically means stripping or replacing newline and other control characters; for HTML-rendered logs, HTML encoding is preferred. In this codebase, there is already a
SanitizeForLoghelper used in theUpdateInquiryAsyncmethod and inEligibilityServiceImpl, which likely performs the necessary normalization for log values. The best fix is to consistently use this helper whenever logging potentially user-controlled values such asinquiry.Id.Concretely, in
services/eligibility-service/Repositories/EligibilityRepositoryMongo.cs, in theCreateInquiryAsyncmethod, change the_logger.LogInformationcall on line 100 so that it passesSanitizeForLog(inquiry.Id)instead ofinquiry.Iddirectly. This alignsCreateInquiryAsyncwithUpdateInquiryAsync, which already uses the sanitization helper, and does not alter any business behavior or persistence; it only affects how the ID is represented in logs. No new imports or methods are required, assumingSanitizeForLogis already available in this class (as evidenced by its use on line 121).Suggested fixes powered by Copilot Autofix. Review carefully before merging.