Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2021-11-04 16:13:29 +0300
committerJunio C Hamano <gitster@pobox.com>2021-11-04 20:13:10 +0300
commit0e7696c64db78f698c40686d4869e2a8d0ab2696 (patch)
treef663bae2986e13618a6491e11fbeb38fcdd6e522 /.github
parentaf6d1d602a8f64164b266364339c4e936d5bbc33 (diff)
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')
-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'