{"id":16788630,"url":"https://github.com/breml/bidichk","last_synced_at":"2025-05-16T12:03:21.820Z","repository":{"id":42478222,"uuid":"423615193","full_name":"breml/bidichk","owner":"breml","description":"Go linter which checks for dangerous unicode character sequences","archived":false,"fork":false,"pushed_at":"2025-05-06T08:59:38.000Z","size":92,"stargazers_count":38,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T09:50:20.922Z","etag":null,"topics":["go","linter","security","unicode-characters"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/breml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-01T21:01:38.000Z","updated_at":"2025-05-06T08:59:34.000Z","dependencies_parsed_at":"2023-11-20T21:30:32.768Z","dependency_job_id":"4997e62f-b838-4a54-abab-00ac497507ca","html_url":"https://github.com/breml/bidichk","commit_stats":{"total_commits":43,"total_committers":4,"mean_commits":10.75,"dds":0.5348837209302326,"last_synced_commit":"81b1d27556cd7b2c808530ae3319b81b8afd7225"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breml%2Fbidichk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breml%2Fbidichk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breml%2Fbidichk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breml%2Fbidichk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/breml","download_url":"https://codeload.github.com/breml/bidichk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254527084,"owners_count":22085918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","linter","security","unicode-characters"],"created_at":"2024-10-13T08:18:33.934Z","updated_at":"2025-05-16T12:03:21.800Z","avatar_url":"https://github.com/breml.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bidichk - checks for dangerous unicode character sequences\n\n[![Test Status](https://github.com/breml/bidichk/workflows/Go%20Matrix/badge.svg)](https://github.com/breml/bidichk/actions?query=workflow%3AGo%20Matrix) [![Go Report Card](https://goreportcard.com/badge/github.com/breml/bidichk)](https://goreportcard.com/report/github.com/breml/bidichk) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nbidichk finds dangerous unicode character sequences in Go source files.\n\n## Considered dangerous unicode characters\n\nThe following unicode characters are considered dangerous:\n\n* U+202A: LEFT-TO-RIGHT-EMBEDDING\n* U+202B: RIGHT-TO-LEFT-EMBEDDING\n* U+202C: POP-DIRECTIONAL-FORMATTING\n* U+202D: LEFT-TO-RIGHT-OVERRIDE\n* U+202E: RIGHT-TO-LEFT-OVERRIDE\n* U+2066: LEFT-TO-RIGHT-ISOLATE\n* U+2067: RIGHT-TO-LEFT-ISOLATE\n* U+2068: FIRST-STRONG-ISOLATE\n* U+2069: POP-DIRECTIONAL-ISOLATE\n\n## Installation\n\nDownload `bidichk` from the [releases](https://github.com/breml/bidichk/releases) or get the latest version from source with:\n\n```shell\ngo install github.com/breml/bidichk/cmd/bidichk@latest\n```\n\n## Usage\n\n### golangci-lint\n\n[golangci-lint](https://golangci-lint.run) supports bidichk, so you can enable this linter and use it.\n\n### Shell\n\nCheck everything:\n\n```shell\nbidichk ./...\n```\n\n### Enable only required unicode runes\n\nIf you run bidichk via golangci-lint look at [.golangci.example.yml](https://golangci-lint.run/usage/configuration/#config-file) for an example of the configuration.\n\nOtherwise you can run bidichk with `--disallowed-runes` flag to specify the runes you consider harmful.\n\nE.g. the following command considers only the `LEFT-TO-RIGHT-OVERRIDE` unicode rune as dangerous:\n\n```shell\nbidichk --disallowed-runes LEFT-TO-RIGHT-OVERRIDE ./...\n```\n\nFor the full list of supported unicode runes [see above](#considered-dangerous-unicode-characters) or use\n\n```shell\nbidichk --help\n```\n\n## Inspiration\n\n* ['Trojan Source' Bug Threatens the Security of All Code](https://krebsonsecurity.com/2021/11/trojan-source-bug-threatens-the-security-of-all-code/)\n* [Trojan Source - Proofs-of-Concept](https://github.com/nickboucher/trojan-source)\n* [Go proposal: disallow LTR/RTL characters in string literals?](https://github.com/golang/go/issues/20209)\n* [cockroachdb/cockroach - PR: lint: add linter for unicode directional formatting characters](https://github.com/cockroachdb/cockroach/pull/72287)\n* [Russ Cox - On “Trojan Source” Attacks](https://research.swtch.com/trojan)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreml%2Fbidichk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbreml%2Fbidichk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreml%2Fbidichk/lists"}