Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Systemd Service Security Audit

    by CashonlyTian

    1

    Manual systemd hardening is tedious and error-prone.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Systemd Service Security Audit

    Systemd Service Security Audit

    Example session with this skill installed

    Run a security audit on the units in the 'deploy/services' folder for project 'api-gateway'. Use the default accent color.

    • Read your context and instructions
    • Compiled the systemd service security
    • Generated the document

    I have completed the security audit for the api-gateway project. The scanner analyzed the service units and drop-in configurations found in the specified directory.

    Summary:

    • Score: 42/100
    • Grade: D
    • Risk Level: HIGH
    • Findings: 24 total (4 critical, 8 high, 12 medium)

    Audit Results

    CategoryScoreStatus
    User/Group0/10CRITICAL (Running as root)
    Privileges2/10HIGH (NoNewPrivileges missing)
    Filesystem5/15MEDIUM (ProtectSystem not strict)
    Kernel10/10PASS
    Namespaces0/10HIGH (PrivateDevices=no)
    Network10/10PASS
    Exec/Binary5/10MEDIUM (Uses shell wrapper)
    Secrets5/5PASS (Secrets masked)
    Restart5/10LOW (No Watchdog)
    Hardening Profile0/10FAIL (<7 core directives)

    Top 3 Prioritized Fixes

    1. Define a dedicated User: Add User=api-service to the [Service] section to drop root privileges.

    Enable Process Sandboxing: Add NoNewPrivileges=true and ProtectSystem=strict to prevent the service from escalating or modifying the OS.
    3. Isolate Devices: Set PrivateDevices=true to ensure the service cannot access raw system devices.

    Files Generated:

    • Score Card: scan-2024-05-20.png
    • Detailed Report: scan-report.md

    Next steps

    1. Open scan-report.md to see the specific file lines triggering the critical findings.
    2. Apply the top 3 fixes to your .service files.
    3. Run the audit again to verify the score improvement.

    scan-2024-05-20.png

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Manual systemd hardening is tedious and error-prone. This skill audits unit files before you enable them, ensuring your background services aren't just root shells with a timer.

    What it does

    • Security Scoring calculates a 0-100 score, grade, and risk level based on 10 specific hardening categories.
    • Sandboxing Analysis checks for filesystem lockdowns, kernel shielding, and namespace isolation.
    • Privilege Audit verifies the service drops root privileges and restricts capabilities.
    • Network Fencing reviews socket modes and address family restrictions to prevent unauthorized exposure.
    • Automated Reporting generates a prioritized fix list and a shareable PNG score-card.

    How it works

    1. Fetch Units using scripts/units_fetch.py to copy service, socket, and timer files from system directories to a local folder.
    2. Execute Scan by running scripts/run.py on the target directory to analyze directives and drop-in overrides.
    3. Review Findings via the generated Markdown report which masks any literal secrets found in Environment= strings.
    4. Iterate by applying suggested fixes to the unit files and re-scanning until the risk level is acceptable.

    Frameworks & tools

    This tool interfaces with systemd unit files (*.service, *.socket, *.timer) and requires Python 3 for the analysis scripts.

    Why this beats prompting it yourself

    Generic prompts often miss the nuances of systemd's last-value-wins override logic and recursive drop-in directories. This skill uses a structured scanner to verify 10 distinct hardening categories, providing a repeatable, objective score instead of subjective advice.

    Use cases

    • Audit services generated by coding agents before running systemctl enable.
    • Perform a security baseline of inherited servers or legacy repositories.
    • Generate visual security score-cards for client reports or compliance audits.
    • Identify services running with unnecessary root privileges or open network sockets.

    Known limitations

    The scanner only reads static unit files and cannot verify if the running kernel actually supports or enforces the directives. It does not resolve systemd specifiers like %i or %n.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Static analysis only. Does not verify live kernel enforcement or resolve systemd specifiers. Scans local files; ignores units not in the provided path.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 4 days ago

    Software
    Python 3Pillow

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed4 days ago

    What's inside

    Frequently Asked Questions

    This skill provides an objective security score (0-100) and a prioritized fix list for systemd unit files, catching complex override logic and sandboxing gaps that generic AI prompts often miss.

    The skill includes a dedicated fetching script to collect units from system directories and a core analysis engine that scans services, sockets, and timers for privilege escalation and network risks.

    It requires a Linux environment with systemd unit files and Python 3 to execute the analysis scripts; it is compatible with any AI agent capable of executing local Python scripts.

    Yes, the analysis engine identifies security risks within both the primary unit files and any drop-in overrides found in .d directories, ensuring a comprehensive view of the service's final configuration.

    The scanner is designed for static analysis of configuration files and cannot verify if the underlying Linux kernel has specific security modules, like SELinux or AppArmor, enabled to enforce the directives.

    The tool includes a built-in masking feature that automatically redacts sensitive data found in Environment= strings within your Markdown reports to prevent credential leakage.

    New in LLM Ops