You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2021/11/03 16:38:39 UTC
[lucene-solr] branch branch_8_11 updated: LUCENE-10218,
SOLR-15764: Extend validateSourcePatterns task to scan for LTR/RTL
unicode to catch "Trojan Source" source code attacks
This is an automated email from the ASF dual-hosted git repository.
uschindler pushed a commit to branch branch_8_11
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8_11 by this push:
new 91e490b LUCENE-10218, SOLR-15764: Extend validateSourcePatterns task to scan for LTR/RTL unicode to catch "Trojan Source" source code attacks
91e490b is described below
commit 91e490b48f347678cada6ef2cf5f8f710091d9fe
Author: Uwe Schindler <us...@apache.org>
AuthorDate: Wed Nov 3 17:36:07 2021 +0100
LUCENE-10218, SOLR-15764: Extend validateSourcePatterns task to scan for LTR/RTL unicode to catch "Trojan Source" source code attacks
---
lucene/tools/src/groovy/check-source-patterns.groovy | 1 +
1 file changed, 1 insertion(+)
diff --git a/lucene/tools/src/groovy/check-source-patterns.groovy b/lucene/tools/src/groovy/check-source-patterns.groovy
index 7af2840..ee07707 100644
--- a/lucene/tools/src/groovy/check-source-patterns.groovy
+++ b/lucene/tools/src/groovy/check-source-patterns.groovy
@@ -37,6 +37,7 @@ def invalidPatterns = [
(~$/(?i)\bno(n|)commit\b/$) : 'nocommit',
(~$/\bTOOD:/$) : 'TOOD instead TODO',
(~$/\t/$) : 'tabs instead spaces',
+ (~$/[\u202A-\u202E\u2066-\u2069]/$) : 'misuse of RTL/LTR (https://trojansource.codes)',
(~$/\Q/**\E((?:\s)|(?:\*))*\Q{@inheritDoc}\E((?:\s)|(?:\*))*\Q*/\E/$) : '{@inheritDoc} on its own is unnecessary',
(~$/\$$(?:LastChanged)?Date\b/$) : 'svn keyword',
(~$/\$$(?:(?:LastChanged)?Revision|Rev)\b/$) : 'svn keyword',