Problem
The HTTPS URL sanitizer regex does not model URL userinfo. A credentialed URL such as https://user:REDACTED@example.com/repo.git can be transformed while leaving the password/token suffix visible and later published in a safe output.
The sanitization code also emits complete rejected URLs through debug logging. This can disclose URL passwords, signed query parameters, SAS signatures, or bearer-like values when Actions debug logging is enabled.
Plan
- Parse explicit HTTPS URLs structurally with
URL or an equivalent robust parser.
- Remove username/password userinfo before domain filtering or output rendering.
- Preserve only safe structural metadata required for diagnostics.
- Remove full rejected-URL debug logging; log only sanitized host/category information.
- Add regression tests for credentialed git URLs, ports, IPv6, signed query strings, angle-bracket links, and malformed inputs.
Acceptance criteria
- Username and password/token components never survive sanitization.
- Full query strings and rejected URLs are never written to info/debug logs.
- Allowed-domain behavior remains compatible for URLs without credentials.
- Tests prove sentinel credentials are absent from both returned content and captured logs.
Relevant files
actions/setup/js/sanitize_content_core.cjs
actions/setup/js/sanitize_content_core_parser.test.cjs
actions/setup/js/sanitize_content.test.cjs
Problem
The HTTPS URL sanitizer regex does not model URL userinfo. A credentialed URL such as
https://user:REDACTED@example.com/repo.gitcan be transformed while leaving the password/token suffix visible and later published in a safe output.The sanitization code also emits complete rejected URLs through debug logging. This can disclose URL passwords, signed query parameters, SAS signatures, or bearer-like values when Actions debug logging is enabled.
Plan
URLor an equivalent robust parser.Acceptance criteria
Relevant files
actions/setup/js/sanitize_content_core.cjsactions/setup/js/sanitize_content_core_parser.test.cjsactions/setup/js/sanitize_content.test.cjs