linux-security-analysis
/linux-security-analysis
Przeprowadza ocenę bezpieczeństwa serwera Linux tylko do odczytu, obejmującą jądro, tożsamości, sieć, usługi, dyski, kopie zapasowe i pakiety, z dowodami przy każdym ustaleniu.
- Autor
- peterbamuhigire ↗
- Repozytorium
- linux-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 24.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 3
- Skrypty
- 0
- Komentarze HTML
- 2
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 24.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- SKILL.md zawiera komentarze HTML (2). Nie widać ich w podglądzie Markdown, a model je czyta.
Co robi i kiedy
Przeprowadza ocenę bezpieczeństwa serwera Linux tylko do odczytu, obejmującą jądro, tożsamości, sieć, usługi, dyski, kopie zapasowe i pakiety, z dowodami przy każdym ustaleniu.
Oryginalny opis (EN)
Use when performing a read-only, evidence-backed Linux security assessment across kernel, identity, network, services, storage, backups, and packages; use linux-server-hardening to remediate.
Jak działa
- Distro support
- Use when
- Do not use when
- Required Inputs
- Capability Contract
- Degraded Mode
- Decision Rules
- Workflow
- Evidence Produced
- Quality standards
Podgląd SKILL.md
--- name: linux-security-analysis description: Use when performing a read-only, evidence-backed Linux security assessment across kernel, identity, network, services, storage, backups, and packages; use linux-server-hardening to remediate. license: MIT metadata: portable: true compatible_with: [claude-code, codex] author: Peter Bamuhigire author_url: techguypeter.com author_contact: "+256784464178" --- # Linux Security Analysis ## Distro support Two-family skill. The 10-layer audit applies to both families; some layers inspect different tools. The body uses Debian/Ubuntu; substitute per this matrix. | Audit layer | Debian/Ubuntu | RHEL family | |---|---|---| | Mandatory access control | AppArmor `aa-status` (profiles loaded/enforced) | SELinux `getenforce` must be **Enforcing**; `sestatus` | | Firewall | `ufw status` | `firewall-cmd --list-all` | | Installed packages | `dpkg -l`, `apt list --installed` | `rpm -qa`, `dnf list installed` | | Pending updates | `apt list --upgradable` | `dnf check-update` | | Auto updates | `unattended-upgrades` configured | `dnf-automatic.timer` active | | Sudo group membership | `sudo` group | `wheel` group | | Audit daemon | `auditd` | `auditd` (also surfaces SELinux AVC denials) | **RHEL-family addition:** a security audit must flag SELinux not Enforcing, stray `permissive` domains, and unreviewed AVC denials (`ausearch -m AVC`). See [`../../07-security-and-hardening/linux-server-hardening/references/selinux-reference.md`](../../07-security-and-hardening/linux-server-hardening/references/selinux-reference.md) and [`docs/multi-distro/plan.md`](../../docs/multi-distro/plan.md). <!-- dual-compat-start --> ## Use when - Performing a deep, read-only security audit of an Ubuntu/Debian server. - Building a prioritized findings list before hardening work. - Re-checking security posture after provisioning or major changes. ## Do not use when - The task requires making changes; use `linux-server-hardening`. - The task is limited to one narrower area such as secrets, firewalling, or access control. ## Required Inputs | Artefact | Source | Required? | If absent | |---|---|---|---| | Host, distro, role, and exposure | Inventory and system owner | yes | Audit visible state; qualify context-sensitive severity | | Approved scope and read-only access | Assessment owner | yes | Stop rather than exceed scope | | Accepted risks and prior findings | Risk register or prior report | no | Report current state without claiming regression | | Service/config evidence | Host and approved configuration sources | per control | Mark the check `not assessed` | ## Capability Contract Default to read-only mode with read/search access only. Inspect files, services, packages, sockets, and logs without installing, reloading, rewriting, quarantining, or hardening. Mutation requires explicit authority in a separate linux-server-hardening task. ## Degraded Mode When privileges, logs, tools, or probes are unavailable, finish the narrow observable checks and list every unassessed control. Do not score inaccessible evidence as compliant. ## Decision Rules | Context | Action | Failure avoided | |---|---|---| | Internet-exposed exploitable weakness | Rank CRITICAL/HIGH with evidence | Understating immediate risk | | Defence-in-depth gap without exposed path | Rank MEDIUM/LOW with rationale | Severity inflation | | Control cannot be inspected | Mark `not assessed` | False assurance | | Active compromise indicator | Preserve evidence and invoke incident process | Destructive audit activity | ## Workflow 1. Confirm scope, role, distro, exposure, time, and read-only boundary; stop if authority is unclear. 2. Collect command output across every applicable layer with family-specific tools. 3. Correlate config, listeners, identities, logs, backups, and packages; separate fact from inference. 4. Assign severity and confidence, recording every unassessed check. 5. Review findings for duplication and reproducibility; do not apply fixes. 6. Deliver the report and separate remediation handoff; recover from failed collection by retaining errors as evidence gaps and leaving system state unchanged. ## Evidence Produced | Artefact | Acceptance | |---|---| | Security assessment evidence | Includes timestamped commands/config references, package/service/socket state, severity rationale, coverage matrix, and redactions | ## Quality standards - Evidence must be concrete, reproducible, and severity-ranked. - Keep audit and remediation separate. - Cover every layer even if an early layer already exposes serious issues. ## Anti-patterns - Mixing fixes into the audit. Fix: create a separately authorised remediation task. - Reporting vague risk. Fix: cite command or configuration evidence. - Declaring a host secure after two layers. Fix: include the complete coverage matrix. - Treating a missing tool as a pass. Fix: mark the check not assessed. - Copying generic severity. Fix: tie it to exposure and impact. - Dumping secrets into evidence. Fix: redact values and cite protected paths. ## Outputs | Artefact | Consumer | Acceptance condition | |---|---|---| | Severity-ranked report | Risk owner | Each finding has evidence, impact, confidence, and remediation | | Evidence index | Reviewer | Commands and timestamps reproduce observations without secrets | | Coverage statement | System owner | Lists passed, failed, and not-assessed layers | ## Worked Example On a public RHEL web host, record `getenforce` returning `Permissive` alongside external exposure and relevant config. Rate the finding from role and exposure, but do not run `setenforce 1`; hand remediation to linux-server-hardening with compatibility checks. <!-- dual-compat-end --> ## References - [`references/audit-layers.md`](references/audit-layers.md) - [`../../07-security-and-hardening/linux-server-hardening/references/selinux-reference.md`](../../07-security-and-hardening/linux-server-hardening/references/selinux-reference.md) — SELinux audit checks (RHEL family) **This skill is self-contained.** The 10 audit layers below work on a stock Debian/Ubuntu or RHEL-family server using nothing but built-in tools (substitute family-specific tools per the Distro support matrix). The `sk-audit` script in the **Optional fast path** section is a convenience wrapper — never required. **Read-only.** This skill observes and reports. It never modifies anything. Use `linux-server-hardening` to fix what this skill finds. Work through all 10 layers in `references/audit-layers.md`. For each finding output: `[SEVERITY] Description` Levels: **CRITICAL** | **HIGH** | **MEDIUM** | **LOW** | **INFO** | **PASS** --- ## Quick Start ```bash # Optional: run the audit script first for a fast PASS/WARN/FAIL overview # (install once with: sudo install-skills-bin linux-security-analysis): sudo sk-audit # Then work through the 10 layers for the full deep analysis: less ~/.claude/skills/linux-security-analysis/references/audit-layers.md ``` ## The 10 Layers See `references/audit-layers.md` for the complete commands for each layer. | Layer | Focus | Critical findings | |-------|-------|-------------------| | 1 | System & kernel | ASLR off, pending CVEs | | 2 | Users & auth | Extra UID-0, empty passwords, SSH config | | 3 | Network exposure | Databases on 0.0.0.0 | | 4 | Firewall | UFW inactive, unexpected open ports | | 5 | Web server | TLS 1.0/1.1, PHP exposes version, expired certs | | 6 | Databases | MySQL/Redis/PG on 0.0.0.0, anon users | | 7 | File system | World-writable web files, cred files not 600 | | 8 | IDS & monitoring | fail2ban down, AIDE missing | | 9 | Backup integrity | No recent backup, rclone unreachable | | 10 | Packages | Security updates pending, unexpected services | ## Severity Guidelines | Rating | Meaning | Example | |--------|---------|---------| | CRITICAL | Exploitable right now | Database on 0.0.0.0, SSH with password auth | | HIGH | Serious risk | No firewall, expired SSL cert | | MEDIUM | Should fix soon | AIDE not installed, 20+ pending updates | | LOW | Best practice gap | X11 forwarding enabled | | INFO | Informational | Optional tools not installed | | PASS | Correctly configured | — | ## Report Format After all 10 layers, output: ``` ╔══════════════════════════════════════════════════════╗ ║ SECURITY ANALYSIS REPORT ║ ╠══════════════════════════════════════════════════════╣ ║ Host: <hostname> OS: <distro> Date: <YYYY-MM-DD> ║ ╚══════════════════════════════════════════════════════╝ [CRITICAL] ... [HIGH] ... [MEDIUM] ... [PASS] ... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ CRITICAL: X HIGH: X MEDIUM: X LOW: X PASS: X Security score: X% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Recommended: Run linux-server-hardening to fix CRITICAL and HIGH items first. ``` ## Optional fast path (when sk-* scripts are installed) Running `sudo install-skills-bin linux-security-analysis` installs: | Task | Fast-path script | |---|---| | Full 14-section audit (same as the existing `server-audit.sh`) | `sudo sk-audit` | These are optional wrappers. The 10-layer manual procedure above is the source of truth. ## Scripts This skill installs the following scripts to `/usr/local/bin/`. To install: ```bash sudo install-skills-bin linux-security-analysis ``` | Script | Source | Core? | Purpose | |---|---|---|---| | sk-audit | scripts/sk-audit.sh | yes | Read-only 14-section security audit producing PASS/WARN/FAIL report with score. |
Pliki w paczce (3)
- SKILL.md 10 KB
- references/audit-layers.md 28 KB
- references/threat-model.md 16 KB
Wersje
W bazie nie ma innych skilli o nazwie linux-security-analysis.
Migawka bazy z 13.11.2026 · wersja paczki b0dd991386d0 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100linux-server-hardening
Prowadzi autoryzowanego operatora przez usuwanie zweryfikowanych luk bezpieczeństwa na serwerze Linux: SSH, zapora, kontrola dostępu, usługi, uprawnienia i aktualizacje. - 100linux-server-hardening
Pomaga autoryzowanemu administratorowi usuwać zweryfikowane luki Linuksa w SSH, zaporze, MAC, usługach, uprawnieniach i aktualizacjach. - 100linux-hardening
Zabezpiecza serwery Linux według benchmarków CIS: konfiguracja SSH, zarządzanie użytkownikami, reguły zapory i funkcje bezpieczeństwa, pod produkcję lub wymogi zgodności. - 90host-hardening-review
Przegląda utwardzenie systemu serwera względem wytycznych CIS: konta, usługi, sieć, logowanie, uprawnienia plików i łatki. - 86linux-server-ops
Diagnozuje i obsługuje serwer Linux przez SSH, sprawdzając usługi, zasoby i logi. - 100vercel-security-audit
Przegląda tylko do odczytu konfigurację bezpieczeństwa zespołu Vercel i tworzy raport z dowodami bez zmian w ustawieniach.