{"id":50329082,"url":"https://github.com/threez/freebsd.cr","last_synced_at":"2026-05-29T08:30:49.407Z","repository":{"id":359630895,"uuid":"1244894901","full_name":"threez/freebsd.cr","owner":"threez","description":"Crystal bindings for FreeBSD security primitives.","archived":false,"fork":false,"pushed_at":"2026-05-22T19:59:10.000Z","size":97,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-22T21:32:31.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Crystal","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/threez.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2026-05-20T17:51:10.000Z","updated_at":"2026-05-22T19:59:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/threez/freebsd.cr","commit_stats":null,"previous_names":["threez/freebsd.cr"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/threez/freebsd.cr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Ffreebsd.cr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Ffreebsd.cr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Ffreebsd.cr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Ffreebsd.cr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/threez","download_url":"https://codeload.github.com/threez/freebsd.cr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Ffreebsd.cr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33644102,"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-29T02:00:06.066Z","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":[],"created_at":"2026-05-29T08:30:48.822Z","updated_at":"2026-05-29T08:30:49.401Z","avatar_url":"https://github.com/threez.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# freebsd\n\nCrystal bindings for FreeBSD.\n\n- **`freebsd/capsicum`** — [Capsicum] kernel capability mode (`cap_enter`,\n  fd rights, `pdfork` process descriptors). Use this alone when you only need\n  sandboxing without the libcasper service framework.\n\n- **`freebsd/casper`** — [libcasper] services built on top of\n  `freebsd/capsicum`: DNS, file, net, syslog, pwd/grp/sysctl, and a\n  pure-Crystal audit helper for capsicum-safe BSM writes. Lets a sandboxed\n  process delegate privileged work to a trusted helper. Includes transparent\n  integrations for Crystal's stdlib (`Socket::Addrinfo`, `File`, `Log`).\n\n- **`freebsd/nvlist`** — libnv encoder/decoder. Named-value lists used\n  internally by libcasper and the FreeBSD kernel for structured data exchange.\n\n- **`freebsd/privdrop`** — privilege-drop helpers (`setuid`, `setgid`,\n  `setgroups`, `initgroups`, `chroot`) with correct-ordering documentation and\n  environment scrubbing. Use before entering capability mode to relinquish\n  root cleanly.\n\n- **`freebsd/audit`** — [libbsm] / [OpenBSM] audit event writer. Lets Crystal\n  applications emit structured BSM audit records to FreeBSD's audit subsystem.\n  Event types are mapped directly from [OCSF] class UIDs (`bsm = ocsf_uid + 40000`),\n  with per-class activity enums and a `write_activity` API that resolves the\n  event class automatically from the activity value.\n\n[Capsicum]: https://www.cl.cam.ac.uk/research/security/capsicum/\n[libcasper]: https://man.freebsd.org/cgi/man.cgi?query=libcasper\n[libbsm]: https://man.freebsd.org/cgi/man.cgi?query=libbsm\n[OpenBSM]: https://github.com/openbsm/openbsm\n[OCSF]: https://schema.ocsf.io\n\n\u003e **Platform:** FreeBSD primary, DragonFlyBSD best-effort. On other platforms\n\u003e the shard compiles cleanly but any call raises `UnsupportedPlatformError`.\n\n## Installation\n\nAdd to `shard.yml`:\n\n```yaml\ndependencies:\n  freebsd:\n    github: threez/freebsd.cr\n```\n\nthen `shards install`.\n\n## Sub-libraries\n\nSee each sub-library's README for full API documentation and examples:\n\n- [`freebsd/capsicum`](src/freebsd/capsicum/README.md)\n- [`freebsd/casper`](src/freebsd/casper/README.md)\n- [`freebsd/nvlist`](src/freebsd/nvlist/README.md)\n- [`freebsd/privdrop`](src/freebsd/privdrop/README.md)\n- [`freebsd/audit`](src/freebsd/audit/README.md)\n\n## Development\n\n```sh\nshards install\ncrystal spec\n```\n\nOn non-FreeBSD hosts most specs are marked `pending`. To exercise the real\nbindings, run the suite on a FreeBSD 14/15 host or VM (FreeBSD 15 is used in\ndevelopment; FreeBSD 14 is also supported).\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/threez/freebsd.cr/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Open a Pull Request\n\n## Contributors\n\n- [Vincent Landgraf](https://github.com/threez) — creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreez%2Ffreebsd.cr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreez%2Ffreebsd.cr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreez%2Ffreebsd.cr/lists"}