Skip to content

Potential fix for code scanning alert no. 11: Incomplete string escaping or encoding - #67

Merged
tallcode merged 1 commit into
mainfrom
alert-autofix-11
Jul 30, 2026
Merged

tallcode merged 1 commit into
mainfrom
alert-autofix-11

Conversation

@tallcode

Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/futuregene/future-os/security/code-scanning/11

General fix: when embedding arbitrary text into a template literal, escape backslashes first, then escape template-literal metacharacters (backticks and ${). Escaping backslashes first avoids creating/altering escape sequences that can interfere with later escaping.

Best single fix here: in tui/scripts/generate-proto.ts, update the proto construction (lines 18–20 region) to add .replace(/\\/g, "\\\\") before the existing replacements. Keep current behavior otherwise unchanged.

No new imports, methods, or external libraries are needed.

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

…ing or encoding

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@tallcode
tallcode marked this pull request as ready for review July 30, 2026 01:34
@tallcode
tallcode enabled auto-merge (squash) July 30, 2026 01:35
@tallcode
tallcode merged commit 5ced7bf into main Jul 30, 2026
19 checks passed
@tallcode
tallcode deleted the alert-autofix-11 branch July 30, 2026 01:35
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.

1 participant