{"id":50252953,"url":"https://github.com/flossware/jsecurity","last_synced_at":"2026-05-27T03:03:21.652Z","repository":{"id":138802169,"uuid":"83208273","full_name":"FlossWare/jsecurity","owner":"FlossWare","description":"Multi-threaded Java utility for securely wiping free disk space with zero-fill operations.","archived":false,"fork":false,"pushed_at":"2026-05-26T20:51:31.000Z","size":76,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-26T22:23:32.320Z","etag":null,"topics":["framework","java"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FlossWare.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2017-02-26T12:55:05.000Z","updated_at":"2026-05-26T20:51:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"d0c57bb6-1e00-469b-8359-4d4bb4016673","html_url":"https://github.com/FlossWare/jsecurity","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/FlossWare/jsecurity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlossWare%2Fjsecurity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlossWare%2Fjsecurity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlossWare%2Fjsecurity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlossWare%2Fjsecurity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FlossWare","download_url":"https://codeload.github.com/FlossWare/jsecurity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlossWare%2Fjsecurity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33548246,"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-05-27T02:00:06.184Z","response_time":53,"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":["framework","java"],"created_at":"2026-05-27T03:03:19.474Z","updated_at":"2026-05-27T03:03:21.642Z","avatar_url":"https://github.com/FlossWare.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsecurity\n\nJava-based security utilities for secure disk operations.\n\n## ⚠️ WARNING - READ BEFORE USE ⚠️\n\n**This utility performs DESTRUCTIVE operations that CANNOT be reversed.**\n\n- Data overwritten by this tool is **PERMANENTLY LOST**\n- There is **NO UNDO** functionality\n- **Verify your target directories multiple times** before proceeding\n- Designed for secure disposal of storage devices, not regular file deletion\n- Always maintain backups of important data elsewhere\n\n**Recommended use cases:**\n- Wiping free space before selling/disposing of hardware\n- Securely erasing decommissioned drives\n- Preparing media for secure destruction\n\n**NOT recommended for:**\n- Regular file deletion (use `rm` or OS file manager instead)\n- Active filesystems with important data\n- System directories (tool blocks these, but be careful)\n\n## Description\n\njsecurity is a disk wiping utility that securely overwrites free disk space with zero-filled files. It uses multiple worker threads to efficiently fill the target directory until the disk is full, making previously deleted data unrecoverable.\n\n## Features\n\n- **Multi-threaded operation** - Configurable worker threads for optimal performance\n- **Configurable buffer sizes** - Adjust memory usage and write performance\n- **Safety guards** - Prevents wiping of critical system directories\n- **Confirmation prompts** - Requires explicit confirmation before destructive operations\n- **Progress reporting** - Real-time feedback on operation progress\n- **Flexible CLI** - Command-line options for automation and customization\n\n## Prerequisites\n\n- **Java 11 or higher** - Required to run the application\n- **Maven 3.6+** - Required to build from source\n- **Sufficient disk permissions** - Write access to target directories\n\n## Building\n\nBuild the project using Maven:\n\n```bash\nmvn clean package\n```\n\nThis creates `target/jsecurity-1.0.jar` with all dependencies.\n\n## Usage\n\n### Basic Usage\n\n```bash\njava -jar target/jsecurity-1.0.jar \u003cdirectory\u003e\n```\n\nThe tool will:\n1. Display a warning about the destructive operation\n2. Show the target directory and configuration\n3. Prompt for confirmation (type `yes` to proceed)\n4. Start worker threads to fill the disk\n5. Report completion when disk is full\n\n### Command-Line Options\n\n```\nOptions:\n  -t, --threads \u003ccount\u003e      Number of worker threads (default: 4)\n  -b, --buffer-size \u003cbytes\u003e  Buffer size in bytes (default: 10485760)\n  -y, --yes                  Skip confirmation prompt (for automation)\n  -h, --help                 Show help message\n```\n\n### Examples\n\n**Wipe a single directory with defaults:**\n```bash\njava -jar target/jsecurity-1.0.jar /tmp/secure-wipe\n```\n\n**Use 8 threads with 20MB buffer:**\n```bash\njava -jar target/jsecurity-1.0.jar -t 8 -b 20971520 /tmp/secure-wipe\n```\n\n**Wipe multiple directories:**\n```bash\njava -jar target/jsecurity-1.0.jar /tmp/wipe1 /tmp/wipe2 /tmp/wipe3\n```\n\n**Skip confirmation (for scripts):**\n```bash\njava -jar target/jsecurity-1.0.jar -y /tmp/secure-wipe\n```\n\n## Safety Features\n\n### Protected Directories\n\nThe tool automatically blocks operations on critical system directories:\n- `/`, `/bin`, `/boot`, `/dev`, `/etc`, `/lib`, `/lib64`\n- `/proc`, `/root`, `/sbin`, `/sys`, `/usr`, `/var`\n- `/home`, `/Users`\n- `C:\\`, `C:\\Windows`, `C:\\Program Files` (Windows)\n\nAttempting to wipe these directories will result in an error.\n\n### Confirmation Prompt\n\nUnless the `-y` flag is used, the tool displays:\n- Target directories (absolute paths)\n- Configuration (threads, buffer size)\n- Warning about data loss\n- Confirmation prompt requiring `yes` response\n\n## How It Works\n\n1. **Validation** - Checks target directories are safe and writable\n2. **Configuration** - Parses command-line options and builds configuration\n3. **Confirmation** - Prompts user to confirm (unless `-y` flag used)\n4. **Thread Spawning** - Creates N worker threads (default: 4)\n5. **File Creation** - Each thread creates temp files with pattern `wipe*.disk`\n6. **Writing** - Each thread writes zero-filled buffers until disk is full\n7. **Completion** - Reports when all threads have finished\n\nThe tool writes until it receives an `IOException` indicating the disk is full, then attempts a final write to fill any remaining space.\n\n## Performance Tuning\n\n### Thread Count (`-t`)\n\n- **More threads** = faster fill on multi-core systems\n- **Fewer threads** = lower CPU usage\n- **Recommended**: Start with 4, increase if CPU is underutilized\n- **Maximum**: Depends on system capabilities (8-16 is usually sufficient)\n\n### Buffer Size (`-b`)\n\n- **Larger buffers** = fewer system calls, potentially faster writes\n- **Smaller buffers** = lower memory usage, more frequent progress updates\n- **Default**: 10MB (10485760 bytes) is a good balance\n- **Recommended range**: 1MB - 100MB depending on available RAM\n\n## Testing\n\nRun the test suite:\n\n```bash\nmvn test\n```\n\nGenerate coverage report:\n\n```bash\nmvn jacoco:report\n```\n\nView coverage at `target/site/jacoco/index.html`\n\n## Documentation\n\nGenerate JavaDoc documentation:\n\n```bash\nmvn javadoc:javadoc\n```\n\nView documentation at `target/site/apidocs/index.html`\n\nFor detailed usage scenarios and troubleshooting, see [USAGE.md](USAGE.md).\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 or later.\n\nSee [LICENSE](LICENSE) for the full license text.\n\n## Continuous Integration / Deployment\n\nThis project uses GitHub Actions for automated builds and deployment:\n\n- **Automated Versioning** - Version automatically increments on push to main (X.Y format)\n- **Automated Building** - Compiles and packages on every push\n- **Automated Tagging** - Creates git tags for each release\n- **Automated Deployment** - Publishes to packagecloud.io (flossware/java/maven2)\n\nView build status: https://github.com/FlossWare/jsecurity/actions\n\n## Contributing\n\nContributions are welcome! Please:\n1. Fork the repository\n2. Create a feature branch\n3. Add tests for new functionality\n4. Ensure all tests pass (`mvn test`)\n5. Submit a pull request\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.\n\n## Security Considerations\n\n- **This tool does NOT implement secure multi-pass wiping** (e.g., DoD 5220.22-M)\n- It performs a **single-pass zero fill** of free space\n- For highly sensitive data, consider:\n  - Multiple passes with different patterns\n  - Hardware-level secure erase (ATA Secure Erase, NVMe Sanitize)\n  - Physical destruction of media\n\n## Support\n\nFor issues, questions, or contributions:\n- Open an issue on GitHub\n- Review existing issues for similar problems\n- Include system details (OS, Java version) in bug reports\n\n## Acknowledgments\n\nCopyright (C) 2017-2026 Scot P. Floess\n\nThis program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflossware%2Fjsecurity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflossware%2Fjsecurity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflossware%2Fjsecurity/lists"}