{"id":37023092,"url":"https://github.com/nightfallai/nightfall-java-sdk","last_synced_at":"2026-01-14T02:46:00.662Z","repository":{"id":37981473,"uuid":"418686172","full_name":"nightfallai/nightfall-java-sdk","owner":"nightfallai","description":"Java Data Loss Prevention (DLP) SDK - Nightfall Developer Platform","archived":false,"fork":false,"pushed_at":"2023-03-27T07:01:07.000Z","size":128,"stargazers_count":11,"open_issues_count":5,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-02T04:53:46.874Z","etag":null,"topics":["api","data-loss-prevention","data-privacy","data-protection","data-security","dlp","java","nightfall","secrets-detection"],"latest_commit_sha":null,"homepage":"https://docs.nightfall.ai","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/nightfallai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2021-10-18T22:19:04.000Z","updated_at":"2025-08-25T17:01:22.000Z","dependencies_parsed_at":"2023-02-17T02:45:41.087Z","dependency_job_id":null,"html_url":"https://github.com/nightfallai/nightfall-java-sdk","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/nightfallai/nightfall-java-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightfallai%2Fnightfall-java-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightfallai%2Fnightfall-java-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightfallai%2Fnightfall-java-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightfallai%2Fnightfall-java-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nightfallai","download_url":"https://codeload.github.com/nightfallai/nightfall-java-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nightfallai%2Fnightfall-java-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["api","data-loss-prevention","data-privacy","data-protection","data-security","dlp","java","nightfall","secrets-detection"],"created_at":"2026-01-14T02:46:00.072Z","updated_at":"2026-01-14T02:46:00.647Z","avatar_url":"https://github.com/nightfallai.png","language":"Java","readme":"# Nightfall Java SDK\n\n**Embed Nightfall scanning and detection functionality into Java applications**\n\n\u003c!-- TODO add badges [![Build Status](https://travis-ci.org/joemccann/dillinger.svg?branch=master)](https://travis-ci.org/joemccann/dillinger)\n--\u003e\n\n##  Features\n\nThis SDK provides Java bindings for the Nightfall API. It allows you to add functionality to your applications to\nscan plain text and files in order to detect different categories of information. You can leverage any of\nthe detectors in Nightfall's pre-built library, or you may programmatically define your own custom detectors. \n\nAdditionally, this library provides convenience features such as encapsulating the steps to chunk and upload files.\n\nTo obtain an API Key, login to the [Nightfall dashboard](https://app.nightfall.ai/) and click the section\ntitled \"Manage API Keys\".\n\nSee our [developer documentation](https://docs.nightfall.ai/docs/entities-and-terms-to-know) for more details about\nintegrating with the Nightfall API.\n\n## Dependencies\n\nThe Nightfall Java SDK requires Java 8 or later.\n\nFor a full list of external dependencies please consult `pom.xml`.\n\n## Installation\n\n### Maven\nAdd the following to your project's `pom.xml`:\n\n``` xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eai.nightfall\u003c/groupId\u003e\n    \u003cartifactId\u003escan-api\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\nAdd the following to your project's `dependencies`:\n\n```\nimplementation group: 'ai.nightfall', name: 'scan-api', version: '1.0.0'\n```\n\n### Building Locally\n\nAlternatively, if you would like to build the project yourself:\n1. Clone this git repository\n2. Run `mvn package` from the top-level directory.\n3. The `build` directory should contain two artifacts: `api-$VERSION.jar` and `api-$VERSION-shaded.jar`. The former\ncontains *only* the compiled source files of this project, whereas the latter includes the compiled dependencies. \n4. Take whichever jar you prefer from the `build/` directory and add it to your project's classpath.\n\n## Usage\n\n### Scanning Plain Text\n\nNightfall provides pre-built detector types, covering data types ranging from PII to PHI to credentials. The following\nsnippet shows an example of how to scan using pre-built detectors.\n\n####  Sample Code\n\nTo run the [the TextScannerExample class](src/main/java/ai/nightfall/examples/TextScannerExample.java),\n\nfirst compile:\n```bash\nmake jar\n```\n\nand then set your API key as an environment variable and run the sample program (changing version number in the jar if necessary):\n\n```bash\nexport NIGHTFALL_API_KEY=\"NF-XXXXXX\" # replace with your API key\njava -cp build/scan-api-1.2.3-beta-1.jar ai.nightfall.examples.FileScannerExample /path/to/file\n```\n\n\n\n### Scanning Files\n\nScanning common file types like PDF's or office documents typically requires cumbersome text\nextraction methods like OCR.\n\nRather than implementing this functionality yourself, the Nightfall API allows you to upload the\noriginal files, and then we'll handle the heavy lifting.\n\nThe file upload process is implemented as a series of requests to upload the file in chunks. The library\nprovides a single method that wraps the steps required to upload your file. Please refer to the\n[API Reference](https://docs.nightfall.ai/reference) for more details.\n\nThe file is uploaded synchronously, but as files can be arbitrarily large, the scan itself is conducted asynchronously.\nThe results from the scan are delivered by webhook; for more information about setting up a webhook server, refer to\n[the webhook server docs](https://docs.nightfall.ai/docs/creating-a-webhook-server).\n\n#### Sample Code\n\nTo run the [the FileScannerExample class](src/main/java/ai/nightfall/examples/FileScannerExample.java), first start a [webhook server](https://docs.nightfall.ai/docs/creating-a-webhook-server) to which results will be delivered. [ngrok](https://ngrok.com/) is a good way to expose a locally running webhook service on a publically-reachable URL:\n```bash\n# ngrok creates a public webhook URL that tunnels to your local machine. Change the port if you're not listening on port 8075.\nngrok http 8075\n# copy the HTTPS URL ngrok displays, for example https://myurl.ngrok.io\n# supposing you're running a Python webhook server\npython webhook.py\n```\n\nCompile the SDK and example code:\n```bash\nmake jar\n```\n\nthen set your API key as an environment variable and run the sample program (changing version number in the jar if necessary):\n\n```bash\nexport NIGHTFALL_API_KEY=\"NF-XXXXXX\" # replace with your API key\nNGROK_URL=\"myurl\" # replace with the URL from running ngrok above\njava -cp build/scan-api-1.2.3-beta-1.jar ai.nightfall.examples.FileScannerExample \"$NGROK_URL\" /path/to/file\n```\n\n\n## Contributing\n\nContributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature\nor change. Please adhere to the linting criteria defined in `checkstyle.xml`, and be sure to add unit\ntests for any new functionality you add.\n\nRefer to `CONTRIBUTING.md` for the full details.\n\n## License\n\nThis code is licensed under the terms of the MIT License. See [here](https://opensource.org/licenses/MIT)\nfor more information.\n\nJava is licensed by Oracle. See [here](https://www.oracle.com/java/technologies/javase/jdk-faqs.html)\nfor more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightfallai%2Fnightfall-java-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnightfallai%2Fnightfall-java-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnightfallai%2Fnightfall-java-sdk/lists"}