{"id":51406295,"url":"https://github.com/skorotkiewicz/block-f","last_synced_at":"2026-07-04T11:02:55.413Z","repository":{"id":353670318,"uuid":"1220431556","full_name":"skorotkiewicz/block-f","owner":"skorotkiewicz","description":"Prevent accidental edits.","archived":false,"fork":false,"pushed_at":"2026-04-24T22:42:40.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-25T00:34:09.301Z","etag":null,"topics":["block","filesystem","protection","rust","security","unix"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skorotkiewicz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2026-04-24T22:30:01.000Z","updated_at":"2026-04-24T22:49:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/skorotkiewicz/block-f","commit_stats":null,"previous_names":["skorotkiewicz/block-f"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/skorotkiewicz/block-f","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skorotkiewicz%2Fblock-f","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skorotkiewicz%2Fblock-f/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skorotkiewicz%2Fblock-f/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skorotkiewicz%2Fblock-f/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skorotkiewicz","download_url":"https://codeload.github.com/skorotkiewicz/block-f/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skorotkiewicz%2Fblock-f/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35118979,"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-04T02:00:05.987Z","response_time":113,"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":["block","filesystem","protection","rust","security","unix"],"created_at":"2026-07-04T11:02:54.981Z","updated_at":"2026-07-04T11:02:55.408Z","avatar_url":"https://github.com/skorotkiewicz.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# block-f\n\nPrevent accidental edits. Works **with or without root**:\n\n- **As root**: Uses kernel-level immutable bit (`chattr +i`) — unbypassable protection\n- **As regular user**: Uses read-only permissions — blocks most edits, race-condition vulnerable\n\n\u003e [!CAUTION]\n\u003e **Never block system paths** like `/`, `/usr`, `/bin`, `/etc`.\n\u003e\n\u003e Blocking `/` as root would make your entire system unchangeable. Always test with a specific project directory first.\n\n## Usage\n\n```bash\n# Run as user (read-only mode) - basic protection\n./block-f\n\n# Run as root (immutable mode) - strongest protection\nsudo ./block-f\n\n# Use custom config\n./block-f -c protect.toml\n```\n\n\u003e [!NOTE]\n\u003e Press `Ctrl+C` to stop. All files restored automatically.\n\n## Configuration\n\nCreate `config.toml`:\n\n```toml\n[blocked]\nfiles = [\n    \"src/main.rs\",\n    \"README.md\",\n    \"secrets/\",\n]\n```\n\n## Protection Modes\n\n### Root Mode (Immutable Bit)\nUses `chattr +i` — kernel-level protection that blocks:\n- All writes (even by root)\n- File deletion and renaming\n- Permission changes\n- Symlink/hardlink attacks\n- Atomic replacement attacks\n\n**Recovery**: Only root can remove the immutable bit.\n\n### User Mode (Read-Only)\nUses `chmod 444/555` — user-level protection that:\n- Sets files read-only\n- Allows reading and directory traversal\n- **Vulnerable** to: race conditions, temp+move, symlink swaps\n\n**Recovery**: Original permissions restored on exit.\n\n## Build\n\n```bash\ncargo build --release\n```\n\nBinary at `target/release/block-f`.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskorotkiewicz%2Fblock-f","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskorotkiewicz%2Fblock-f","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskorotkiewicz%2Fblock-f/lists"}