summaryrefslogtreecommitdiff
path: root/.github/workflows/main.yml
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2021-11-04 13:13:29 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-11-04 10:13:10 -0700
commit0e7696c64db78f698c40686d4869e2a8d0ab2696 (patch)
treef663bae2986e13618a6491e11fbeb38fcdd6e522 /.github/workflows/main.yml
parentGit 2.33.1 (diff)
downloadtgif-0e7696c64db78f698c40686d4869e2a8d0ab2696.tar.xz
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 <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '.github/workflows/main.yml')
-rw-r--r--.github/workflows/main.yml1
1 files changed, 1 insertions, 0 deletions
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'