Created
December 8, 2021 18:22
-
-
Save rmirabelli/d0dbf509878c72fca7994dd886a7696b to your computer and use it in GitHub Desktop.
Exclude unicode in a SwiftLint rule
This file contains 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
# Warns for presence of unicode characters, due to possible RTL security | |
# issues, as a quick-and-dirty protection against https://trojansource.codes | |
# Exceptions are from usage in a test control group. | |
# This has been tested against a reasonable set of verifyable exploits. | |
# | |
# Yes, this is a huge hammer instead of a scalpel. | |
# | |
# Yes, this means no more emoji for variable names. You shouldn't have | |
# been doing that anyhow. | |
Unicode_considered_harmful: | |
name: "Unicode may mask security risks" | |
regex: "[^[:ascii:]|(©'−•®é–'"")]" | |
message: "RTL languages and Homoglyphs may cause security issues. Please use ASCII when possible. See https://trojansource.codes for an introduction to the issue." | |
severity: warning |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment