Skip to content

Potential fix for code scanning alert no. 176: Log entries created from user input#380

Draft
aurelianware wants to merge 1249 commits intomainfrom
alert-autofix-176
Draft

Potential fix for code scanning alert no. 176: Log entries created from user input#380
aurelianware wants to merge 1249 commits intomainfrom
alert-autofix-176

Conversation

@aurelianware
Copy link
Owner

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 SanitizeForLog helper used in the UpdateInquiryAsync method and in EligibilityServiceImpl, 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 as inquiry.Id.

Concretely, in services/eligibility-service/Repositories/EligibilityRepositoryMongo.cs, in the CreateInquiryAsync method, change the _logger.LogInformation call on line 100 so that it passes SanitizeForLog(inquiry.Id) instead of inquiry.Id directly. This aligns CreateInquiryAsync with UpdateInquiryAsync, 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, assuming SanitizeForLog is already available in this class (as evidenced by its use on line 121).

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

aurelianware and others added 30 commits February 5, 2026 17:18
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
aurelianware and others added 27 commits February 13, 2026 00:27
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
…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
…vices/claims-scrubbing-service/uuid-13.0.0

Bump uuid from 11.1.0 to 13.0.0 in /services/claims-scrubbing-service
…udHealthOffice.Portal/nuget-d7b17b6b38

Bump Azure.Identity and System.Formats.Asn1
- 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
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants