{"id":29662989,"url":"https://github.com/burberius/trojan-source-maven-plugin","last_synced_at":"2025-07-22T11:06:39.491Z","repository":{"id":57737873,"uuid":"428281292","full_name":"burberius/trojan-source-maven-plugin","owner":"burberius","description":"Trojan Source Maven Plugin","archived":false,"fork":false,"pushed_at":"2021-11-25T21:19:26.000Z","size":58,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-08-09T23:28:10.907Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/burberius.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}},"created_at":"2021-11-15T13:46:12.000Z","updated_at":"2023-08-09T23:28:10.908Z","dependencies_parsed_at":"2022-08-24T15:00:43.526Z","dependency_job_id":null,"html_url":"https://github.com/burberius/trojan-source-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/burberius/trojan-source-maven-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burberius%2Ftrojan-source-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burberius%2Ftrojan-source-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burberius%2Ftrojan-source-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burberius%2Ftrojan-source-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/burberius","download_url":"https://codeload.github.com/burberius/trojan-source-maven-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burberius%2Ftrojan-source-maven-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265583401,"owners_count":23792343,"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":[],"created_at":"2025-07-22T11:06:36.980Z","updated_at":"2025-07-22T11:06:39.484Z","avatar_url":"https://github.com/burberius.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Trojan Source Maven Plugin\nThis Maven plugin scans your source code for occurrences of trojan source as described\non the following page: https://trojansource.codes\n\nTrojan source attacks use unicode control characters to make evil source code look valid by\nreordering parts of it. For a deeper explanation have a look on the above-mentioned page\nor even read the paper of Nicholas Boucher and Ross Anderson, linked there.\n\nThe attack is also tracked by [CVE-2021-42574](https://nvd.nist.gov/vuln/detail/CVE-2021-42574).\n\n## Add plugin to your project\nTo activate the plugin and let it scan the source code before compiling it,\njust add the following section to your _pom.xml_ file:\n```\n\u003cbuild\u003e\n  \u003cplugins\u003e\n    \u003cplugin\u003e\n      \u003cgroupId\u003enet.troja\u003c/groupId\u003e\n      \u003cartifactId\u003etrojan-source-maven-plugin\u003c/artifactId\u003e\n      \u003cversion\u003e1.0\u003c/version\u003e\n      \u003cconfiguration\u003e\n        \u003cfileExtensions\u003e\n          \u003cparam\u003emustache\u003c/param\u003e\n        \u003c/fileExtensions\u003e\n        \u003cdirectories\u003e\n          \u003cparam\u003etemplates\u003c/param\u003e\n        \u003c/directories\u003e\n        \u003cscanTests\u003efalse\u003c/scanTests\u003e\n      \u003c/configuration\u003e\n      \u003cexecutions\u003e\n        \u003cexecution\u003e\n          \u003cgoals\u003e\n            \u003cgoal\u003escan\u003c/goal\u003e\n          \u003c/goals\u003e\n        \u003c/execution\u003e\n      \u003c/executions\u003e\n    \u003c/plugin\u003e\n  \u003c/plugins\u003e\n\u003c/build\u003e\n```\n\n## Configration\n### fileExtensions\nExtra file extensions can also be scanned, which is very useful for example the\ntemplates for code generation. For each entry add a _param_ tag.\n\n### directories\nOther directories than _src/main/java_ and _src/test/java_ can be included in\nthe scans with this configuration setting. For each entry add a _param_ tag.\n\n### scanTests\nBy defaults the _src/test/java_ directory is also scanned, this can be switched\noff by specifying _false_ in this tag.\n\n## References\n* Regular expression to scan for bidis was taken from https://github.com/nickboucher/bidi-viewer\n* Example bidi file was taken from https://github.com/nickboucher/trojan-source\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburberius%2Ftrojan-source-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fburberius%2Ftrojan-source-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburberius%2Ftrojan-source-maven-plugin/lists"}