From 0e7696c64db78f698c40686d4869e2a8d0ab2696 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 4 Nov 2021 13:13:29 +0000 Subject: ci: disallow directional formatting As described in https://trojansource.codes/trojan-source.pdf, it is possible to abuse directional formatting (a feature of Unicode) to deceive human readers into interpreting code differently from compilers. For example, an "if ()" expression could be enclosed in a comment, but rendered as if it was outside of that comment. In effect, this could fool a reviewer into misinterpreting the code flow as benign when it is not. It is highly unlikely that Git's source code wants to contain such directional formatting in the first place, so let's just disallow it. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github') diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b053b01c66..6b35909e6c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -287,6 +287,7 @@ jobs: - uses: actions/checkout@v2 - run: ci/install-dependencies.sh - run: ci/run-static-analysis.sh + - run: ci/check-directional-formatting.bash sparse: needs: ci-config if: needs.ci-config.outputs.enabled == 'yes' -- cgit v1.2.3