{"id":50294393,"url":"https://github.com/tdiprima/linux-baseline","last_synced_at":"2026-05-28T08:01:17.520Z","repository":{"id":347345891,"uuid":"1191921608","full_name":"tdiprima/linux-baseline","owner":"tdiprima","description":"Bash tool that snapshots Linux security posture — users, SSH config, open ports, cron jobs, SUID files — into HTML, TXT, and evidence archive.","archived":false,"fork":false,"pushed_at":"2026-03-27T14:25:22.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T00:29:39.928Z","etag":null,"topics":["bash","blue-team","incident-response","linux-security","security-audit","sysadmin"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/tdiprima.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-03-25T18:04:02.000Z","updated_at":"2026-03-27T14:25:26.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tdiprima/linux-baseline","commit_stats":null,"previous_names":["tdiprima/linux-baseline"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/tdiprima/linux-baseline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdiprima%2Flinux-baseline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdiprima%2Flinux-baseline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdiprima%2Flinux-baseline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdiprima%2Flinux-baseline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tdiprima","download_url":"https://codeload.github.com/tdiprima/linux-baseline/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdiprima%2Flinux-baseline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33599465,"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-28T02:00:06.440Z","response_time":99,"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":["bash","blue-team","incident-response","linux-security","security-audit","sysadmin"],"created_at":"2026-05-28T08:01:16.575Z","updated_at":"2026-05-28T08:01:17.512Z","avatar_url":"https://github.com/tdiprima.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linux Baseline 🐧 \n\nA single Bash script that captures a complete security baseline snapshot of any Linux system — no dependencies, no setup, just run it.\n\n## What Goes Unnoticed Until It's Too Late\n\nWhen something goes wrong on a Linux server, the first question is always: *what changed?* But without a baseline, you're comparing against nothing. Rogue users, unexpected open ports, modified SSH configs, suspicious SUID binaries, unauthorized cron jobs — these are easy to miss without a point-in-time record of the system's state.\n\n## Freeze the System State in One Command\n\n`snapshot.sh` captures everything security-relevant about a Linux host and writes it to a timestamped directory. You get a styled HTML report you can open in a browser, a plain-text version for scripting and archiving, and a `.tar.gz` evidence pack with copies of the actual config files. Run it before and after any major change — or just before handing a system off — and you'll always have something to diff against.\n\n**What it captures:**\n\n- Users, UIDs, and group memberships\n- SSH daemon configuration and per-user authorized keys\n- Open ports and listening services (`ss` / `netstat`)\n- All cron jobs — user crontabs and `/etc/cron.*`\n- Sudo privileges (`/etc/sudoers` and `sudoers.d/`)\n- Active outbound connections\n- World-writable files and directories\n- SUID/SGID binaries and `777`-mode files\n- Login history (`last`, `w`, `who`)\n- Running processes\n- Mounted filesystems and kernel modules\n\n## Example Output\n\n```\nlinux-baseline-20260325-143012/\n├── baseline-report.html     # Styled, sectioned, browser-ready\n├── baseline-report.txt      # Plain text with === section headers\n└── evidence.tar.gz          # Raw copies of configs, keys, logs\n```\n\nSymlinks are also created in the current directory for quick access:\n\n```\n./baseline-report.html\n./baseline-report.txt\n./evidence.tar.gz\n```\n\n## Usage\n\n**Run as root** for full access. The script will warn (but continue) if you're not.\n\n```bash\nsudo bash snapshot.sh\n```\n\nOr pull and run directly:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/tdiprima/linux-baseline/main/snapshot.sh | sudo bash\n```\n\nOpen the report:\n\n```bash\nopen baseline-report.html      # macOS\nxdg-open baseline-report.html  # Linux - if a desktop environment is installed.\n```\n\n**Requirements:** Standard Linux utilities only — `ss` or `netstat`, `ps`, `find`, `last`, `lsmod`. Nothing to install.\n\n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdiprima%2Flinux-baseline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftdiprima%2Flinux-baseline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdiprima%2Flinux-baseline/lists"}