{"id":32476917,"url":"https://github.com/codesorcery/juan","last_synced_at":"2026-07-08T17:31:00.607Z","repository":{"id":144518452,"uuid":"163103831","full_name":"codesorcery/juan","owner":"codesorcery","description":"Java Useragent ANalyzer","archived":false,"fork":false,"pushed_at":"2019-01-13T21:25:56.000Z","size":166,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-26T22:29:40.359Z","etag":null,"topics":["java","java-8","java-library","user-agent","user-agent-analysis","user-agent-analyzer","user-agent-parser"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/codesorcery.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-12-25T18:28:55.000Z","updated_at":"2025-10-26T17:52:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f6604f3-1313-4de8-a16d-ce31942eb296","html_url":"https://github.com/codesorcery/juan","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/codesorcery/juan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codesorcery%2Fjuan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codesorcery%2Fjuan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codesorcery%2Fjuan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codesorcery%2Fjuan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codesorcery","download_url":"https://codeload.github.com/codesorcery/juan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codesorcery%2Fjuan/sbom","scorecard":{"id":297749,"data":{"date":"2025-08-11","repo":{"name":"github.com/codesorcery/juan","commit":"d475144d7ae0598bb30d37d26b82edca348253de"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T19:57:19.257Z","repository_id":144518452,"created_at":"2025-08-17T19:57:19.258Z","updated_at":"2025-08-17T19:57:19.258Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35273524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["java","java-8","java-library","user-agent","user-agent-analysis","user-agent-analyzer","user-agent-parser"],"created_at":"2025-10-26T22:20:58.532Z","updated_at":"2026-07-08T17:31:00.602Z","avatar_url":"https://github.com/codesorcery.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java Useragent ANalyzer\n[![Build Status](https://travis-ci.org/codesorcery/juan.svg?branch=master)](https://travis-ci.org/codesorcery/juan)\n[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=com.github.codesorcery%3Ajuan\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=com.github.codesorcery%3Ajuan)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=com.github.codesorcery%3Ajuan\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=com.github.codesorcery%3Ajuan)\n[![License](https://img.shields.io/github/license/codesorcery/juan.svg)](https://choosealicense.com/licenses/mit/)\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.codesorcery/juan.svg)](https://search.maven.org/search?q=g:%22com.github.codesorcery%22%20AND%20a:%22juan%22)\n\nA fast, thread-safe and dependency-free user agent parser for Java 8+.\n\n## Usage\n\nSimply add the library to the dependency section of your pom.xml (if you're using Maven):\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.codesorcery\u003c/groupId\u003e\n  \u003cartifactId\u003ejuan\u003c/artifactId\u003e\n  \u003cversion\u003e0.2.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\nOr add it to your build.gradle (if you're using Gradle):\n````groovy\ndependencies {\n  compile('com.github.codesorcery:juan:0.2.0')\n}\n````\n\nThe library can then be used as follows:\n```java\nimport com.github.codesorcery.juan.UserAgentParser;\nimport com.github.codesorcery.juan.ParsedUserAgent;\n\nimport java.io.IOException;\nimport java.net.URL;\nimport java.nio.charset.Charset;\n\npublic class UserAgentParserExample {\n    private final UserAgentParser userAgentParser;\n    \n    public UserAgentParserExample() throws IOException {\n        // To detect the device name and vendor for Android devices, we use Google's device list:\n        URL deviceList =\n                new URL(\"http://storage.googleapis.com/play_public/supported_devices.csv\");\n        userAgentParser =\n                UserAgentParser.withPlayStoreDeviceList(deviceList, Charset.forName(\"UTF-16\"));\n        \n        // If you do not need Android device info, you can use the parser without the device list:\n        // userAgentParser = UserAgentParser.withoutPlayStoreDeviceList();\n    }\n    \n    public void parsingExample() {\n        String userAgentString =\n                \"Mozilla/5.0 (Linux; Android 7.0; SM-G892A Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/60.0.3112.107 Mobile Safari/537.36\";\n        ParsedUserAgent parsed =\n                userAgentParser.parse(userAgentString);\n        \n        parsed.agent().getVendor(); // =\u003e Google\n        parsed.agent().getName(); // =\u003e Chrome Mobile\n        parsed.agent().getVersion(); // =\u003e 60.0.3112.107\n        parsed.agent().getType(); // =\u003e Browser (mobile)\n        parsed.agent().isCrawler(); // =\u003e false\n        \n        parsed.os().getVendor(); // =\u003e Google\n        parsed.os().getName(); // =\u003e Android\n        parsed.os().getVersion(); // =\u003e 7.0\n        parsed.os().getType(); // =\u003e Mobile\n        \n        parsed.device().getVendor(); // =\u003e Samsung\n        parsed.device().getName(); // =\u003e Galaxy S8 Active\n    }\n    \n}\n```\n\n## Benchmark\n\nBenchmark performed on an Intel\u0026reg; Core\u0026trade; 2 Duo P8600 CPU @ 2.4GHz:\n\nBenchmark                                             | Mode  | Cnt  | Score | Error   | Units\n----------------------------------------------------- | ----- | ---- | ----- | ------- | ------\nUserAgentParserBenchmark.amazonKindleFireSilkBrowser  | avgt  |   5  | 4.039 | ± 0.083 |  us/op\nUserAgentParserBenchmark.curl                         | avgt  |   5  | 1.791 | ± 0.138 |  us/op\nUserAgentParserBenchmark.iPadMobileSafari             | avgt  |   5  | 4.895 | ± 0.045 |  us/op\nUserAgentParserBenchmark.iPhoneInstagram              | avgt  |   5  | 5.209 | ± 0.106 |  us/op\nUserAgentParserBenchmark.linuxFirefox                 | avgt  |   5  | 3.516 | ± 0.029 |  us/op\nUserAgentParserBenchmark.macOsSafari                  | avgt  |   5  | 3.026 | ± 0.030 |  us/op\nUserAgentParserBenchmark.samsungGalaxyS8ChromeMobile  | avgt  |   5  | 5.188 | ± 0.089 |  us/op\nUserAgentParserBenchmark.windows10Edge                | avgt  |   5  | 3.886 | ± 0.064 |  us/op\nUserAgentParserBenchmark.windowsPhone                 | avgt  |   5  | 8.444 | ± 0.079 |  us/op\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesorcery%2Fjuan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodesorcery%2Fjuan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesorcery%2Fjuan/lists"}