{"id":20445799,"url":"https://github.com/rapid7/recog-java","last_synced_at":"2025-10-10T08:36:02.263Z","repository":{"id":33812263,"uuid":"145603489","full_name":"rapid7/recog-java","owner":"rapid7","description":"Recog java","archived":false,"fork":false,"pushed_at":"2025-03-04T10:09:14.000Z","size":205,"stargazers_count":9,"open_issues_count":1,"forks_count":9,"subscribers_count":62,"default_branch":"master","last_synced_at":"2025-09-03T12:52:05.998Z","etag":null,"topics":["fingerprinting","java","regex","xml"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rapid7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING","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}},"created_at":"2018-08-21T18:27:20.000Z","updated_at":"2025-03-04T10:09:17.000Z","dependencies_parsed_at":"2025-03-04T11:21:15.993Z","dependency_job_id":"7f78ec26-e71b-4be1-a900-10a422ad09e7","html_url":"https://github.com/rapid7/recog-java","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/rapid7/recog-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Frecog-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Frecog-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Frecog-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Frecog-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rapid7","download_url":"https://codeload.github.com/rapid7/recog-java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Frecog-java/sbom","scorecard":{"id":762071,"data":{"date":"2025-08-11","repo":{"name":"github.com/rapid7/recog-java","commit":"75b57f13bca3a9324697f954a62e986343ecf5cd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.7,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Code-Review","score":5,"reason":"Found 9/18 approved changesets -- score normalized to 5","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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/rapid7/recog-java/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/rapid7/recog-java/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/rapid7/recog-java/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:7: update your workflow using https://app.stepsecurity.io/secureworkflow/rapid7/recog-java/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/rapid7/recog-java/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/snapshot.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/rapid7/recog-java/snapshot.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/snapshot.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/rapid7/recog-java/snapshot.yml/master?enable=pin","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned"],"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":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/snapshot.yml:1","Info: no jobLevel write permissions found"],"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":"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":"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: BSD 3-Clause \"New\" or \"Revised\" 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":"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":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/snapshot.yml:6"],"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":"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T23:44:06.012Z","repository_id":33812263,"created_at":"2025-08-22T23:44:06.012Z","updated_at":"2025-08-22T23:44:06.012Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003277,"owners_count":26083555,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"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":["fingerprinting","java","regex","xml"],"created_at":"2024-11-15T10:14:17.707Z","updated_at":"2025-10-10T08:36:02.233Z","avatar_url":"https://github.com/rapid7.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Recog Java\n\n[![CI workflow](https://github.com/rapid7/recog-java/actions/workflows/ci.yml/badge.svg)](https://github.com/rapid7/recog-java/actions/workflows/ci.yml) [![Maven Central](https://img.shields.io/maven-central/v/com.rapid7.recog/recog-java.svg)](https://search.maven.org/artifact/com.rapid7.recog/recog-java) [![Javadocs](https://www.javadoc.io/badge/com.rapid7.recog/recog-java.svg)](https://www.javadoc.io/doc/com.rapid7.recog/recog-java)\n\nJava implementation of [Recog](https://github.com/rapid7/recog) that supports parsing and matching.\n\n#### Recog Content\n\nRecog content (the XML files containing matchers) is maintained at the upstream [recog](https://github.com/rapid7/recog) project. The recog-java tests are configured to download a versioned archive of that repository in order to use the content for testing. The content is otherwise not deployed or handled by the recog-java project, so any consumers of recog-java must provide the content they need.\n\n## Getting Started\n\nAdd the dependency to your pom file:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.rapid7.recog\u003c/groupId\u003e\n  \u003cartifactId\u003erecog-java\u003c/artifactId\u003e\n  \u003cversion\u003e0.7.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nImplement a simple Recog client:\n\n```java\npublic class RecogClient implements Recog {\n  private RecogMatchersProvider provider;\n\n  public RecogClient(File matchersDirectory) {\n    this.provider = new RecogMatchersProvider(BUILTIN, matchersDirectory);\n  }\n\n  @Override\n  public List\u003cRecogMatchResult\u003e fingerprint(String description) {\n    List\u003cRecogMatchResult\u003e matches = new ArrayList\u003c\u003e();\n    for (RecogMatchers matchers : provider.getMatchers(BUILTIN)) {\n      for (RecogMatch match : matchers.getMatches(description)) {\n        RecogMatcher matcher = match.getMatcher();\n        matches.add(new RecogMatchResult(matchers.getKey(), matchers.getType(), matchers.getProtocol(), matchers.getPreference(), match.getMatcher().getDescription(), matcher.getPattern(), matcher.getExamples(), match.getParameters()));\n      }\n    }\n    return matches;\n  }\n\n  @Override\n  public RecogVersion refreshContent() {\n    throw new UnsupportedOperationException(\"Not implemented.\");\n  }\n}\n\n```\n\nFingerprint some input:\n\n```java\nRecogClient recog = new RecogClient(new File(\"path/to/recog/xml/\"));\nList\u003cRecogMatchResult\u003e matchResults = recog.fingerprint(\"Apache HTTPD 6.5\");\n// draw the rest of the owl...\n```\n\n#### Configuring Pattern Matching\n\nBy default, recog-java uses Java's standard regular expression package, `java.util.regex`. To use a different implementation, users can implement their own `RecogPatternMatcher` instance:\n\n```java\nimport com.rapid7.recog.pattern.RecogPatternMatcher;\n\npublic class CustomPatternMatcher implements RecogPatternMatcher {\n  // custom implementation...\n}\n\nRecogPatternMatcher patternMatcher = new CustomPatternMatcher(\"^Apache HTTPD (?\u003cversion\u003e.*)$\");\nRecogMatcher matcher = new RecogMatcher(patternMatcher);\nMap\u003cString, String\u003e results = matcher.match(\"Apache HTTPD 6.5\");\n```\n\n## Differences from Ruby implementation\n\nThis library is not yet at a 1:1 parity with the original [rapid7/recog](https://github.com/rapid7/recog) Ruby implementation.\n\nMissing features:\n\n- Matching against multi-line input strings\n- Command line tools like `recog_match`\n\n## Development\n\nFork the repository and create a development branch in your fork. _Working from the master branch in your fork is not recommended._\n\n1. Open your favorite IDE or text editor\n2. Make some changes\n3. Add some tests if needed\n4. Run the tests\n5. Push your changes\n6. Open a pull request\n\nYou can use `mvn clean install` to clean compile, run checkstyle, and run all tests.\n\n#### Code Style\n\nrecog-java uses a variation of the Google Java code style, enforced with Checkstyle. Please make sure your changes adhere to this style before submitting a pull request.\n\n\n## Testing\n\nRun `mvn test` or `mvn clean install`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapid7%2Frecog-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapid7%2Frecog-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapid7%2Frecog-java/lists"}