Skip to content

Potential fix for code scanning alert no. 28: Incomplete multi-character sanitization#8

Open
manucian-official wants to merge 2 commits into
mainfrom
alert-autofix-28
Open

Potential fix for code scanning alert no. 28: Incomplete multi-character sanitization#8
manucian-official wants to merge 2 commits into
mainfrom
alert-autofix-28

Conversation

@manucian-official

@manucian-official manucian-official commented May 17, 2026

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/ManucianTeam/Adaptive-Shield-Firewall-ASF-/security/code-scanning/28

Best fix (without changing overall intent): make sanitization iterative to a fixed point so newly exposed on... substrings are removed in subsequent passes. Keep the same sanitization rules and order, but apply them repeatedly until no changes occur.

In apps/gateway/src/interceptors/sanitize.interceptor.ts, update sanitizeString to:

  • stop chaining directly off value;
  • use a do { ... } while (sanitized !== previous); loop;
  • perform the same replacements inside the loop;
  • return the converged sanitized string.

No new imports or dependencies are required.

…ter sanitization

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: l2k <khoigaming2102pro@gmail.com>
@manucian-official manucian-official self-assigned this May 17, 2026
@manucian-official manucian-official added the bug Something isn't working label May 17, 2026
This was linked to issues May 17, 2026
@manucian-official
manucian-official marked this pull request as ready for review May 17, 2026 13:27
@manucian-official
manucian-official requested a review from a team as a code owner May 17, 2026 13:27
Signed-off-by: l2k <khoigaming2102pro@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FULL OF BUG Adaptive Threat Intelligence & Risk Correlation Engine

1 participant