{"id":33814101,"url":"https://github.com/hellqvio86/rust_syslog_sniffer","last_synced_at":"2026-05-31T07:00:25.934Z","repository":{"id":325815696,"uuid":"559279531","full_name":"hellqvio86/rust_syslog_sniffer","owner":"hellqvio86","description":"Syslog sniffer written in Rust","archived":false,"fork":false,"pushed_at":"2026-05-31T05:00:56.000Z","size":226,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-31T06:19:32.701Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/hellqvio86.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","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":"2022-10-29T16:08:25.000Z","updated_at":"2026-05-31T04:58:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hellqvio86/rust_syslog_sniffer","commit_stats":null,"previous_names":["hellqvio86/rust_syslog_sniffer"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/hellqvio86/rust_syslog_sniffer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellqvio86%2Frust_syslog_sniffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellqvio86%2Frust_syslog_sniffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellqvio86%2Frust_syslog_sniffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellqvio86%2Frust_syslog_sniffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellqvio86","download_url":"https://codeload.github.com/hellqvio86/rust_syslog_sniffer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellqvio86%2Frust_syslog_sniffer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33722156,"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-31T02:00:06.040Z","response_time":95,"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":"2025-12-06T19:00:20.410Z","updated_at":"2026-05-31T07:00:25.810Z","avatar_url":"https://github.com/hellqvio86.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Syslog Sniffer\n\n[![CI](https://github.com/hellqvio86/rust_syslog_sniffer/actions/workflows/ci.yml/badge.svg)](https://github.com/hellqvio86/rust_syslog_sniffer/actions/workflows/ci.yml)\n![Coverage](coverage.svg)\n![GitHub Release](https://img.shields.io/github/v/release/hellqvio86/rust_syslog_sniffer)\n![Docker Pulls](https://img.shields.io/docker/pulls/hellqvio/syslog_sniffer)\n![GitHub Downloads](https://img.shields.io/github/downloads/hellqvio86/rust_syslog_sniffer/total)\n![amd64](https://img.shields.io/badge/arch-amd64-blue)\n![arm64](https://img.shields.io/badge/arch-arm64-blue)\n![armv7](https://img.shields.io/badge/arch-armv7-blue) \n\nA syslog packet sniffer written in Rust.\n\n## Building and Running\n\n### Local Build\n\n```bash\n# Build the project\nmake build\n\n# Run tests\nmake test\n\n# Run the application\nmake run\n```\n\n### Supported Architectures\n\n- **linux/amd64**: Standard 64-bit Intel/AMD systems\n- **linux/arm64**: Raspberry Pi 3, 4, 5, and other ARM64 devices\n- **linux/arm/v7**: 32-bit Raspberry Pi and other ARMv7 devices\n\n### Docker Build\n\nThe project uses Debian Trixie-based Docker images for runtime compatibility and wider ecosystem support.\n\n**Two Dockerfiles:**\n- `Dockerfile` - Builds from source (for local development and testing)\n- `Dockerfile.release` - Uses pre-built binaries (for published multi-arch images)\n\n#### Build Docker Image\n\n```bash\nmake docker-build\n```\n\nOr manually:\n\n```bash\ndocker build -t syslog_sniffer:latest .\n```\n\n#### Run Docker Container\n\n```bash\n# Run with default options\nmake docker-run\n\n# Run with custom arguments\nmake docker-run ARGS=\"--interface eth0 --port 514\"\n\n# Run with custom interface (manual docker command)\ndocker run --rm --cap-add=NET_RAW --cap-add=NET_ADMIN \\\n  --network host \\\n  syslog_sniffer:latest --interface eth0\n\n# Run interactively\nmake docker-run-interactive\n```\n\n#### Published Docker Images\n\nThe image is published on Docker Hub at: [docker.io/hellqvio/syslog_sniffer](https://hub.docker.com/r/hellqvio/syslog_sniffer)\n\nMulti-architecture support:\n- `linux/amd64` - Standard 64-bit Intel/AMD systems\n- `linux/arm64` - Raspberry Pi 3, 4, 5, and other ARM64 devices\n- `linux/arm/v7` - 32-bit Raspberry Pi and other ARMv7 devices\n\n```bash\n# Pull and run the latest release\ndocker run --rm --user root --cap-add=NET_RAW --cap-add=NET_ADMIN --network host \\\n  docker.io/hellqvio/syslog_sniffer:latest --interface eth0\n\n# With custom arguments\ndocker run --rm --user root --cap-add=NET_RAW --cap-add=NET_ADMIN --network host \\\n  docker.io/hellqvio/syslog_sniffer:latest --interface eth0 --port 1514\n```\n\n**Note:** The container requires `NET_RAW` and `NET_ADMIN` capabilities for packet capture. Using `--network host` allows the container to access the host's network interfaces. We also use `--user root` to ensure the process has permission to use these capabilities.\n\n##### Troubleshooting\nStart bash in the container to debug:\n\n```bash\n# Debug with default capabilities\nmake docker-run-interactive\n\n# Debug with privileged mode (if you get \"Operation not permitted\")\nmake docker-run-interactive PRIVILEGED=1\n```\n\n\u003e [!NOTE]\n\u003e **Why \"Operation not permitted\"?**\n\u003e Even with `NET_RAW` and `NET_ADMIN` capabilities, host security modules (SELinux on Fedora/RHEL, AppArmor on Debian/Ubuntu) may block the container from opening raw sockets or accessing physical network interfaces.\n\u003e\n\u003e **Common Fix: Ensure you are running as root (`--user root`) inside the container.**\n\u003e\n\u003e If the error persists, you have two options:\n\u003e\n\u003e 1. **Run with privileged mode (Recommended)**:\n\u003e    - Make: `make docker-run PRIVILEGED=1`\n\u003e    - Manual: `docker run --user root --privileged ...`\n\u003e\n\u003e 2. **Disable specific security profiles (Advanced)**:\n\u003e    **Fedora/RHEL (SELinux):**\n\u003e    - Make: `make docker-run DOCKER_OPTS=\"--security-opt label=disable\"`\n\u003e    - Manual: `docker run --user root --security-opt label=disable ...`\n\u003e\n\u003e    **Debian/Ubuntu (AppArmor):**\n\u003e    - Make: `make docker-run DOCKER_OPTS=\"--security-opt apparmor=unconfined\"`\n\u003e    - Manual: `docker run --user root --security-opt apparmor=unconfined ...`\n\n#### Push to Registry\n\n```bash\n# Tag and push to your registry\nmake docker-push REGISTRY=docker.io/yourusername\n\n# Or manually\ndocker tag syslog_sniffer:latest docker.io/yourusername/syslog_sniffer:latest\ndocker push docker.io/yourusername/syslog_sniffer:latest\n```\n\n### Docker Image Details\n\n- **Base Image:** Debian Trixie Slim (glibc compatibility, optimized size)\n- **Build Image:** ~30MB (from source)\n- **Release Image:** ~15MB (pre-built binaries)\n\n### Available Make Targets\n\nRun `make help` to see all available targets:\n\n```\nmake build              # Build the Rust project\nmake test               # Run tests\nmake docker-build       # Build Docker image\nmake docker-run         # Run Docker container\nmake docker-push        # Push to registry (requires REGISTRY variable)\nmake docker-clean       # Remove Docker images\n\nmake clean              # Clean build artifacts\nmake coverage           # Generate coverage report\nmake sbom               # Generate CycloneDX SBOM\n```\n\n## Usage\n\n```bash\nsyslog_sniffer [OPTIONS]\n\nOptions:\n  --interface \u003cINTERFACE\u003e  Network interface to sniff (e.g., eth0)\n  --port \u003cPORT\u003e           Syslog port to monitor (default: 514)\n  --help                  Print help information\n```\n\n## Development\n\n```bash\n# Format code\nmake format\n\n# Run linter\nmake clippy\n\n# Check code\nmake check\n\n# Generate coverage\nmake coverage\n# Detailed HTML report will be available at tarpaulin-report.html\n```\n\n### Supply Chain Security (SBOM)\n\nThis project integrates SBOM (Software Bill of Materials) generation and embedding to ensure supply chain security:\n- **Embedded SBOM**: Production binaries are built using `cargo-auditable`, which embeds the dependency list directly into the executable.\n- **CycloneDX SBOM**: Standardized SBOM files in JSON format are generated during the CI process and available as release artifacts.\n- **Local Generation**: Use `make sbom` to generate a local CycloneDX SBOM.\n\nTo inspect the embedded SBOM in a binary, you can use `cargo auditable extract \u003cpath-to-binary\u003e`.\n\n## CI/CD\n\nThis project uses GitHub Actions for continuous integration. The workflow runs on every push and pull request to `main` or `master` branches.\n\nIt performs the following checks:\n- **Formatting:** Checks code formatting with `cargo fmt`.\n- **Linting:** Runs `cargo clippy` to catch common mistakes.\n- **Tests:** Runs unit tests with `cargo test`.\n- **E2E Tests:** Runs the Docker-based end-to-end test script `tests/e2e_docker.sh`.\n\n## License\n\n[MIT](LICENSE.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellqvio86%2Frust_syslog_sniffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellqvio86%2Frust_syslog_sniffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellqvio86%2Frust_syslog_sniffer/lists"}