Hardening Baseline: Linux & Cloud Security

    1

    - **Baseline Design** creates comprehensive `baseline.md` documents specifying controls, platform mappings, and read-only verification checks.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Hardening Baseline: Linux & Cloud Security

    Example session with this skill installed

    Review the hardening of our production estate. The evidence the platform team collected is in this folder — tell me how locked down it is and what's wrong.

    • Read your context and instructions
    • Compiled the hardening baseline
    • Generated the data export

    A real, unedited Review-mode run of this skill on seeded test evidence: a fictional system built for the skill's eval, not a customer's.

    ledgerline production: hardening review

    Mode: Review,

    Estate review tier: two units (Azure prod subscription/RG with its two VMs, and the AWS off-site backup account). Rubric v1.0.

    Evidence: the read-only collection in this folder, dated

    2026-10-28 (README), reviewed 2026-11-03. No IaC was supplied.

    No scanner output (Lynis, OpenSCAP, Prowler, Defender for Cloud) was supplied, so none was used (R2). Nothing was run against any host or account.

    Platform:

    • web-01: Rocky Linux 9.4 (EL9), systemd, dnf, firewalld over nftables, SELinux enforcing.

    db-01: Debian 12 (bookworm), systemd (timesyncd), apt. The firewall front-end and AppArmor state were not collected.

    • Cloud: Azure rg-ledgerline-prod (westeurope), plus a separate AWS account that holds off-site dumps.
      Tier: everything is prod. The data class is confidential (customer invoices).

    The answer

    Score: 2.0 / 10 (Critical / unsafe). Uncapped mean: 3.5. Gate: FAIL on all six conditions.

    The estate has 3 Critical and 13 High findings. Anyone on the internet can reach three of these problems today:

    1. SSH on web-01 is open to the internet with password and root login allowed. The rule is allow-ssh-temp, which allows any source, any destination and any protocol on port 22. On top of that, the host firewall's default policy is ACCEPT and auditd is off.
    2. Customer invoice CSVs sit in a container that allows anonymous blob reads. The location is stledgerlineprod/exports, with publicAccess: blob.
    3. A production database password is in a world-readable file on db-01. It is stored in plain text in /etc/app/db.conf, which has mode 0644.

    Some things are done properly

    • db-01's SSH is tight.
    • Disks are encrypted.
    • SELinux is enforcing on web-01.
    • The AWS off-site copy is a real isolated, immutable backup.

    But

    nobody has ever restored either backup. The Azure vault is mutable, has soft delete turned off, and is administered by the same identities as the VMs it protects.

    ⚠️

    Read this before anyone starts hardening web-01. Three conditions together put web-01 in "possibly already compromised" territory:

    • SSH has been reachable from the internet with password and root login allowed, for an unknown period. The rule is named "temp".
    • auditd is off and logs stay on the host.
    • There is an unpackaged SUID-root binary: /usr/local/bin/backup-helper, dated 2026-01-14.

    None of this proves a compromise, and the binary may well be a legitimate in-house tool. But hardening an owned host locks the attacker in and destroys evidence (H28).

    First:

    1. Establish the binary's provenance: who built it, and a hash compared against the source.
    2. Review /var/log/secure (and its rotations) for successful password or root logins from outside addresses.

    If either check can't be explained, stop: snapshot the disk, do not run diagnostics on the live host, and treat it as an incident (incident-fix). Only harden once both checks come back clean.

    🔑

    Secret handling. The evidence copy evidence/db-01/etc/app/db.conf:7 contains the live password for DB role ledgerline_export. That secret now exists wherever this evidence folder has been shared. This review does not reproduce it.

    Rotate it; deleting the file is not enough.


    Scores

    UnitidentitynetworkdatahostcontinuitymonitoringgovernanceserviceUnit (capped)Uncapped
    A: Azure prod (rg-ledgerline-prod, web-01, db-01)3.32.02.05.04.31.73.81.72.03.0
    B: AWS off-site backup (ledgerline-offsite-backups)🔬n/a10.0n/a6.0🔬10.0n/a6.08.7
    Estate2.03.5

    Arithmetic.

    Unit A is weighted by in-scope objects: identity 5, network 5, data 5, host 2, continuity 4, monitoring 3, governance 8, service 2 (34 in total).

    • The sum of score × objects is (3.3·5 + 2.0·5 + 2.0·5 + 5.0·2 + 4.3·4 + 1.7·3 + 3.8·8 + 1.7·2) = 102.6. Dividing by 34 gives

    3.0 uncapped.

    • Three open Criticals cap it at 2.0.

    Unit B is (10 + 6.0 + 10) / 3, which gives 8.7 uncapped. The open High HD-CON-01 (never restored) caps it at

    6.0.

    • Estate: (3.0·34 + 8.7·3) / 37 = 3.5 uncapped. The Criticals cap it at 2.0.

    Severity tally: Critical 3 · High 13 · Medium 11 · Low 1.

    Coverage:

    • Both hosts were deep-read, but the evidence is uneven. db-01 has no firewall, sudoers, SUID, sysctl, auditd or log-forwarding output.
    • Azure has no Entra ID/MFA, Activity Log, VNet/peering or Defender exports.
    • AWS has only the bucket, with no IAM or bucket policy.

    There are 29 🔬 flags against 37 objects. Those flags are listed below, unscored.


    Asset register

    AssetKindTierThreat tierData classOwner (README / tag)Service rolesEvidenced by
    web-01Rocky 9.4 VM, public IPprodT1 (internet-facing). T2 is advisable for confidential dataconfidentialplatform team / tag missingweb (nginx → app on 127.0.0.1:8080), SSHevidence/web-01/*, vm-list.json
    db-01Debian 12 VM, privateprodT1 (T2 advisable)confidential (invoices)platform team / taggeddatabase (PostgreSQL 15), SSHevidence/db-01/*, vm-list.json
    PostgreSQL ledgerlinedatabase on db-01prodn/aconfidentialplatform teamn/apg_hba.conf, postgresql.conf.excerpt
    stledgerlineprodAzure StorageV2 (exports, app-logs)prodT1 (public endpoint)confidentialfinance-apps / tag missingn/astorage-*.json
    rsv-ledgerline-prodRecovery Services vaultprodn/aholds confidential copiesplatform team / tag missingn/abackup-vault.json
    nsg-ledgerline-web, nsg-ledgerline-db, pip-web-01networkprodn/an/aweb NSG and PIP untagged, db NSG taggedn/ansg-list.json, public-ip-list.json
    ledgerline-offsite-backupsS3 bucket in a separate AWS accountprodn/aconfidentialplatform team / taggedn/aoffsite-backup-bucket.json

    Exposure map

    #WhatReachable fromControls in the pathVerdict
    E1web-01 SSH :22 (v4 0.0.0.0, v6 [::])Internet (any) via pip-web-01 203.0.113.47NSG allow-ssh-temp (src *, dst *, proto *). Host nft policy accept. sshd password + root on🔴 Critical
    E2web-01 HTTP/HTTPS :80/:443 (nginx)InternetNSG allow-https → 10.20.1.4 only. No WAF in the RG🟡 intended public role. TLS config 🔬
    E3web-01 app :8080loopback onlyn/a🟢
    E4db-01 PostgreSQL :5432 (listens *, v4 and v6)10.20.1.0/24 (NSG), plus any VNet/peered source via Azure's default AllowVnetInBound ⚠️pg_hba host all all 0.0.0.0/0 md5. ssl = off🔴 High
    E5db-01 SSH :22 (listens 10.20.2.4 only)10.20.1.0/24, i.e. from web-01keys only, no root, AllowGroups platform🟡 the hop is the internet-exposed host
    E6stledgerlineprod blob endpointInternet. exports container anonymous blob readallowBlobPublicAccess: true, publicNetworkAccess: Enabled, defaultAction: Allow, shared key on🔴 Critical
    E7ledgerline-offsite-backupsAWS API onlyBlock Public Access (all 4), IsPublic: false🟢

    Privilege map

    PrincipalKindWherePrivilegeNotes
    mrojashumanAzure RGOwner (standing, direct assignment)MFA 🔬
    mrojashumanweb-01ALL=(ALL) NOPASSWD: ALLindividual rule, no re-auth
    tkhanhumanAzure RGContributor (direct assignment)MFA 🔬
    %wheelgroupweb-01ALL=(ALL) ALL (password required)members 🔬
    platformgroupdb-01the only group allowed to SSHsudoers on db-01 🔬
    rootbuilt-inweb-01SSH login permitted, password auth ondb-01: root SSH off
    deployCI service accountweb-01NOPASSWD: /usr/bin/systemctl restart ledgerline🟢 command-scoped. Shell/password sealing 🔬
    sp-ledgerline-deployCI service principalAzure RGContributor on the whole prod RGsecret vs federated credential and expiry 🔬
    ledgerline_appDB rolePostgreSQLledgerline DB from 10.20.1.0/24, scram🟢 scoped line
    ledgerline_exportDB rolePostgreSQLpassword in world-readable filesee HD-DAT-02
    any DB role incl. postgresDBPostgreSQLpassword login from 0.0.0.0/0 (pg_hba line 6)whether postgres has a password set 🔬
    AWS bucket writers?AWS🔬 (no IAM or bucket policy supplied)Object Lock COMPLIANCE limits damage

    What is working well (keep it)

    db-01 SSH (sshd -T): listens only on 10.20.2.4, passwordauthentication no, permitrootlogin no, maxauthtries 3, allowgroups platform. This is the model web-01 should follow.

    • db-01 has no public IP. Its NSG rules are source-scoped to 10.20.1.0/24, single-port, named and described.

    allow-https is scoped to 10.20.1.4 on 80/443 and has a description. The app listens only on loopback behind nginx.

    Encryption at rest: encryptionAtHost: true on both VMs. The storage account enforces HTTPS only and has a minimum TLS version of 1.2.

    • SELinux enforcing on web-01, both at runtime and in the config file.

    web-01 kernel basics: ASLR=2, protected_symlinks/protected_hardlinks=1, suid_dumpable=0, syncookies on, rp_filter=1, ip_forward=0. Apart from backup-helper, every SUID binary is package-owned.

    sudo hygiene for the CI user: deploy can restart one unit and nothing else. The sudoers drop-ins are 0440 root:root.

    PostgreSQL: password_encryption = scram-sha-256, peer auth for local sockets, and a narrow line for the app role.

    • Time sync on both hosts: chrony on web-01 with 3 sources (reach 377), and timesyncd on db-01.
    • Backups exist: both VMs are on DailyPolicy-30d and the last job completed.
    • The AWS off-site copy is the strongest control in the estate. It is in a separate account, uses Object Lock

    COMPLIANCE for 35 days, has all four public-access blocks, uses SSE-KMS and is fully tagged. Weekly dumps are arriving on schedule (2026-10-19, 2026-10-26).


    Findings (worst first)

    Critical

    IDObjectAnti-patternConf.TheorySeverityEvidence
    HD-NET-01web-01 SSHAdmin interface exposed to the internet with password and root login✅No direct administrative exposure (H9); strong authentication (H5); attributable identity (H4)Criticalnsg-list.json: nsg-ledgerline-web rule allow-ssh-temp, priority 110, sourceAddressPrefix: "*", destinationAddressPrefix: "*", protocol: "*", port 22, no description. public-ip-list.json: pip-web-01 203.0.113.47 on nic-web-01. ss-tulpn.txt:4,8: sshd on 0.0.0.0:22 and [::]:22. sshd-T.txt: passwordauthentication yes (l.14), permitrootlogin yes (l.16), maxauthtries 6, allowgroups/allowusers empty, x11forwarding yes, logingracetime 120, clientaliveinterval 0
    HD-DAT-01stledgerlineprod / exportsPublic data store holding confidential data✅Data private by default (H13)Criticalstorage-container-list.json:3: exports has publicAccess: "blob", and contains invoices-2026-10-25..27.csv with predictable names. storage-account-list.json: allowBlobPublicAccess: true, publicNetworkAccess: Enabled, networkRuleSet.defaultAction: Allow. Whether anonymous reads have happened is 🔬 (storage logs not supplied)
    HD-DAT-02db-01 /etc/app/db.confProduction DB password in plain text, readable by every local user✅Secrets in a managed store (H12); file permissions (H10); credentials expire (H6)Criticalevidence/db-01/etc/app/db.conf:7: password for ledgerline_export (value withheld). Line 3: -rw-r--r-- root root. The secret is also now in this evidence folder

    High

    IDObjectAnti-patternConf.TheorySeverityEvidence
    HD-SVC-01db-01 PostgreSQLDatabase listening on all interfaces, any role may use password login from any address✅Default deny for functions (H27); least privilege (H3); default deny (H8)High. It is not Critical only because the NSG keeps it off the internetpostgresql.conf.excerpt:2: listen_addresses = '*'. ss-tulpn.txt:4-5: 0.0.0.0:5432 and [::]:5432. pg_hba.conf:6: host all all 0.0.0.0/0 md5, which covers every DB and every role including postgres and makes the scoped line 5 meaningless
    HD-DAT-03db-01 PostgreSQLNo TLS on the database: invoice data and passwords cross the subnet in clear✅Encrypt in transit (H11); require TLS (H26)Highpostgresql.conf.excerpt:4: ssl = off
    HD-NET-02db-01 admin pathThe admin hop is the internet-exposed web server. An exposed tier can start admin sessions inward✅H9; segregation (H1); directions and functions (H27)Highnsg-ledgerline-db rule allow-ssh-from-web from 10.20.1.0/24, description "Admin hop from web-01". The hop is the host in HD-NET-01
    HD-NET-03web-01No effective host firewall on a host with a public IP✅Defence in depth (H2); default deny (H8)Highnft-ruleset.txt:4: filter_INPUT … policy accept. Any port that starts listening becomes reachable. The NSG is the only layer, and its SSH rule is *
    HD-IDN-01mrojasStanding broad privilege: Owner on the prod RG plus passwordless root on web-01✅Least privilege (H3); credentials expire (H6)Highbackup-vault.json:22 role assignment Owner. sudoers.d/10-platform:1 mrojas ALL=(ALL) NOPASSWD: ALL. With no locks and vault soft delete off, this one identity can destroy VMs and their backups (see HD-CON-02/03)
    HD-IDN-02sp-ledgerline-deployCI identity with Contributor on the whole prod RG✅H3Highbackup-vault.json:24. The deploy SP can delete VMs, the storage account and vault items. Credential type and expiry 🔬
    HD-HST-01web-01Pending security updates on an internet-facing host, including a Critical OpenSSH advisory. The host is behind the supported minor release✅Patch and track vulnerabilities (H18)High. It becomes Critical if RLSA-2026:6021 is known-exploited (🔬)dnf-updateinfo-security.txt: RLSA-2026:6021 Critical openssh/openssh-server, RLSA-2026:5870 Important kernel, RLSA-2026:5512 Important nginx. Newest installed kernel is 2026-03-11 (~7.5 months). OS 9.4 while the fixes are el9_6 builds, and Rocky ships fixes only on the current 9.x minor
    HD-HST-02db-01Pending security updates; automatic updates disabled✅H18Highapt-upgradable.txt: openssh-server deb12u3→u7, postgresql-15 15.10→15.14, linux-image 6.1.119→6.1.153. unattended-upgrades disabled
    HD-HST-03web-01 /usr/local/bin/backup-helperUnexpected SUID-root binary that no package owns✅File permissions and privilege boundaries (H10); baseline diff (H29); preserve a suspect host (H28)Highfind-suid.txt:11,23,26: -rwsr-xr-x root root 18432 Jan 14 2026, "not owned by any package". Verify provenance before anything else (see the warning at the top)
    HD-CON-01rsv-ledgerline-prod; ledgerline-offsite-backupsBackups never restored✅ (README confirms none)Backups exist only when restores have worked (H15)Highbackup-vault.json:18-19: az backup job list --operation Restore → []. README: "No restore test has been documented for either backup copy." RPO/RTO not stated
    HD-CON-02rsv-ledgerline-prodMutable backups in the same place as the source✅Isolated and immutable copies (H16)HighimmutabilitySettings.state: Disabled, softDeleteState: Disabled (0 days). The vault sits in the same RG, with the same Owner/Contributors and the same CI SP as the VMs it protects. For web-01 this is the only copy
    HD-CON-03rg-ledgerline-prod (VMs, storage, vault)No deletion protection on prod✅Destruction needs a second step (H17)Highlock-list.json: []. Together with HD-CON-02, one az group delete by mrojas or the CI SP removes the VMs and the Azure backups. Only the weekly AWS dump survives
    HD-MON-01web-01OS audit off on a prod internet-facing host✅Audit trails that survive the incident (H19)Highauditctl-s.txt: enabled 0. auditd is inactive

    Medium

    IDObjectAnti-patternConf.TheorySeverityEvidence
    HD-MON-02web-01Host logs kept only on the host✅H19Mediumrsyslog.conf: only local file actions, with no omfwd/remote target. On a host that may be compromised, the attacker can edit /var/log/secure
    HD-MON-03web-01, db-01Patch compliance untracked and unreported⚠️ (proxy: both hosts are months behind, auto-update is off, no scanner output exists)H18; monitored operations (H20)Mediumdnf-updateinfo-security.txt, apt-upgradable.txt
    HD-SVC-02db-01 PostgreSQLDB connections not audited✅H19Mediumpostgresql.conf.excerpt:6: log_connections = off
    HD-SVC-03web-01 portalInternet-facing HTTP with no WAF in the path✅Defence in depth (H2)MediumThe RG resource list has no gateway or WAF. allow-https admits the Internet service tag straight to the VM
    HD-HST-04web-01Kernel hardening incomplete✅Secure, verified configuration (H14)Mediumsysctl.txt: kernel.kptr_restrict = 0, kernel.dmesg_restrict = 0, net.ipv4.conf.all.accept_redirects = 1
    HD-NET-04nsg-ledgerline-dbNo explicit deny inside the VNet, and no egress control on the data tier⚠️ (Azure default rules and VNet/peering are not in the export)Default deny (H8); directions (H27)MediumThe db NSG has only two allows. Azure's built-in AllowVnetInBound (65000) and AllowInternetOutBound (65001) therefore admit any VNet/peered source to every port on db-01, and allow db-01 to reach the internet
    HD-DAT-04stledgerlineprodShared-key access on, public network on, platform-managed keys for confidential data✅ / ⚠️ (whether apps use the account key)H12; H13MediumallowSharedKeyAccess: true, publicNetworkAccess: Enabled, encryption.keySource: Microsoft.Storage
    HD-CON-04stledgerlineprodProd data store missing from backup scope⚠️ (blob soft-delete/versioning/vaulted backup not exported, and the exports can be regenerated from the DB)H15MediumVault items are only web-01 and db-01. There is no backup manifest. Separately, the off-site DB copy is weekly, so off-site RPO is about 7 days
    HD-IDN-03Azure RGRoles granted to individuals, not groups✅H3; attributable identities (H4)MediumOwner and Contributor are assigned directly to mrojas@… and tkhan@…
    HD-GOV-015 of 7 resourcesMissing mandatory tags (owner, data class)✅Everything owned and classified (H21)Mediumresource-tags.json: owner: null on web-01, nsg-ledgerline-web, pip-web-01, stledgerlineprod, rsv-ledgerline-prod. The README names finance-apps as storage owner, but the tag is missing. data-class is missing on the NSGs, PIP and vault
    HD-GOV-02allow-ssh-tempUncontrolled "temporary" change with no description, expiry or ticket⚠️Controlled change with evidence (H22)Mediumnsg-list.json:17-21

    Low

    IDObjectAnti-patternConf.TheorySeverityEvidence
    HD-HST-05db-01OS release past regular security support, now on Debian LTS (a smaller package set, ending mid-2028)⚠️H18Low (watch)os-release.txt: Debian 12. Debian 13 has been stable since 2025-08

    Systemic issues

    One person and one robot can erase production. The privilege map, the missing locks, the mutable vault and the soft delete set to 0 days all point the same way. mrojas (Owner, plus passwordless root) or sp-ledgerline-deploy (Contributor) can delete the VMs and their Azure backups in one action, with no second step (H3, H16, H17). The AWS dump is the only thing outside that blast radius, and it is weekly and has never been restored.
    2.

    The trust chain runs through the most exposed host. Internet → web-01 (password/root SSH, firewall policy ACCEPT, unpatched Critical sshd) → db-01 SSH and Postgres from 10.20.1.0/24 (all all md5, no TLS) → confidential invoices. Each layer trusts the one before it instead of checking independently (H2, H9, H27).
    3.

    Temporary became permanent, and nothing noticed. The allow-ssh-temp rule, months of unapplied security updates on both hosts, auditd off and local-only logs share a cause. Nothing watches for drift or reports compliance (H20, H22, H29).
    4.

    Private by default isn't the default. The storage account allows public blobs and any network, and Postgres listens on * with a catch-all pg_hba line. Each relies on one outer control, or on none (H8, H13).
    5. Backup is assumed, not proven. Jobs complete, but no restore has ever run (H15).

    Estate synthesis (R5)

    • Heatmap (worst open severity per unit × domain):

      Unitidentitynetworkdatahostcontinuitymonitoringgovernanceservice
      A: Azure prodHighCriticalCriticalHighHighHighHigh (locks)High
      B: AWS off-site🔬n/anonen/aHigh🔬nonen/a
    • Shared failure modes:

      • One RG holds compute, data and the backup vault under one set of admins.
      • One Owner identity spans the Azure control plane and root on web-01.
      • web-01 doubles as the web tier and the admin bastion.

    Trust graph: Internet → web-01 → db-01 (SSH and 5432) → AWS bucket (db-01 or a job pushes weekly dumps; the writer credentials and their location are 🔬). A remediation plan has to sequence web-01 containment before anything that depends on SSH via web-01, because that hop is currently the only admin path to db-01. Removing it without another path would lock operators out.

    Themes: least privilege (H3), defence in depth (H2), backups proven by restore (H15/H16), observability (H19/H20).


    Per-domain checklists (Unit A)

    p is satisfied / in scope. 🔬 criteria are excluded from the base and listed below. Points: 🟢 = 2, 🟡 = 1, 🔴 = 0.

    identity (5 objects: mrojas, tkhan, deploy, sp-ledgerline-deploy, root)

    #CriterionSat./scopepResult
    1Human accounts nominative2/21.00🟢
    3Narrowest scope, no standing Owner1/3 (tkhan ok. mrojas Owner, SP Contributor RG-wide)0.33🔴
    4Granted to groups, not individuals0/20.00🔴
    6Built-in accounts disabled or locked1/2 (root SSH on web-01)0.50🟡
    8No NOPASSWD: ALL for humans2/30.67🟡
    11sudo command-scoped and logged1/30.33🔴

    Base = 4/12 × 10 =

    3.3. Cap High = 6.0.

    Score 3.3. (Criteria 2, 5, 7, 10 and 12 are 🔬; 9 has no stated convention.)

    network (5 exposure points: E1, E2, E4, E5, E6)

    #CriterionSat./scopepResult
    1Default-deny behind each exposure1/50.20🔴
    2Rules name src/dst/port/proto3/40.75🟡
    3Rules named and described3/40.75🟡
    4Admin interfaces private only1/20.50🟡
    5No public IP without a public role2/21.00🟢
    7Data services private1/2 (Postgres private via NSG; storage public)0.50🟡
    8Data-tier egress controlled0/1 ⚠️n/a🟡 (⚠️ cannot grade 🔴)
    9SSH meets NET-131/20.50🟡
    10Active host firewall0/1 (db-01 🔬)0.00🔴
    11Exposed tier cannot initiate admin inward0/10.00🔴

    Base = 8/20 × 10 = 4.0. Cap Critical (HD-NET-01) = 2.0. Score 2.0.

    data (5: web-01 disk, db-01 disk, PostgreSQL, stledgerlineprod, db.conf secret)

    #CriterionSat./scopepResult
    1Encrypted at rest4/41.00🟢
    2Confidential stores with CMK0/10.00🔴
    3Endpoints TLS 1.2+1/2 (storage ok, Postgres none, nginx 🔬)0.50🟡
    4Secrets only in a store0/10.00🔴
    5Public access blocked0/10.00🔴
    6No account keys in apps0/1 ⚠️n/a🟡
    7DB nominative, restricted, audited0/10.00🔴
    9TLS required on DB0/10.00🔴

    Base = 4/16 × 10 = 2.5. Cap Critical = 2.0. Score 2.0.

    host (2: web-01, db-01)

    #CriterionSat./scopepResult
    1Supported release1/2 (web-01 on a superseded minor)0.50🟡
    2Within patch window, enrolled0/20.00🔴
    4Services limited to role2/2 ⚠️1.00🟢
    6SUID limited to shipped set0/1 (db-01 🔬)0.00🔴
    7MAC enforcing1/1 (db-01 🔬)1.00🟢
    8Kernel hardening0/1 (db-01 🔬)0.00🔴
    10Time synchronised2/21.00🟢

    Base = 7/14 × 10 = 5.0. Cap High = 6.0. Score 5.0.

    continuity (4: web-01, db-01, stledgerlineprod, vault)

    #CriterionSat./scopepResult
    1Stateful assets with backup2/3 ⚠️0.67🟡
    2Jobs succeeding (alerting 🔬)2/21.00🟢
    3Restore tested within retention0/20.00🔴
    5Immutable copy for prod1/2 (db-01 via AWS)0.50🟡
    6Copy isolated from source creds1/2 (db-01 via AWS)0.50🟡
    8Deletion-protected0/40.00🔴
    9Scope manifest matches register0/1 ⚠️n/a🟡

    Base = 6/14 × 10 = 4.3. Cap High = 6.0. Score 4.3.

    monitoring (3: web-01, db-01, Azure subscription)

    #CriterionSat./scopepResult
    2Logs forwarded off-host0/1 (db-01 🔬)0.00🔴
    3OS audit on prod hosts0/1 (db-01 🔬)0.00🔴
    7Patch compliance reported0/2 ⚠️n/a🟡

    Base = 1/6 × 10 = 1.7. Cap High = 6.0. Score 1.7. This rests on thin coverage: 8 of 11 criteria are 🔬.

    governance (8: the RG and its 7 resources)

    #CriterionSat./scopepResult
    2Resources in a product container7/71.00🟢
    4Mandatory tags present2/70.29🔴
    5Prod container and critical resources locked0/50.00🔴
    6Changes traceable to a ticket0/1 ⚠️n/a🟡

    Base = 3/8 × 10 = 3.75, rounded to 3.8. Cap High (no locks) = 6.0. Score 3.8.

    service (2: PostgreSQL on db-01, nginx on web-01)

    #CriterionSat./scopepResult
    1Daemons confined with an in-service ACL1/20.50🟡
    6DB: private listener, scoped creds, TLS required0/10.00🔴
    7Web: read-only docroot, WAF enforcing0/1 (WAF absent; docroot 🔬)0.00🔴

    Base = 1/6 × 10 = 1.7. Cap High = 6.0. Score 1.7.

    Unit B (AWS off-site), 1 bucket:

    • data: at rest 🟢, public blocked 🟢. Base 10. CMK vs AWS-managed key is 🔬.
    • continuity: restore tested 🔴, immutable 🟢, isolated 🟢. 4/6 → 6.7, capped by High at 6.0.
    • governance: tags 🟢, deletion-protected (Object Lock) 🟢. 10.0.

    Gate

    ConditionResultWhy
    Capped score ≥ 9.0❌ FAIL2.0 (estate), 2.0 (Unit A), 6.0 (Unit B)
    No open Critical or High❌ FAIL3 Critical, 13 High
    No admin interface reachable from the internet❌ FAILE1: web-01 SSH from * with password and root login
    Every privileged human is nominative and MFA-protected; no standing owner/root in daily use❌ FAILMFA 🔬 (not evidenced). mrojas holds a standing Owner role plus NOPASSWD: ALL. Root SSH login is enabled on web-01
    Every prod stateful asset has an isolated backup that has been restored in a test❌ FAILNo restore ever (vault Restore jobs = []; README). web-01's only copy is in a mutable vault in the same RG. Storage account coverage ⚠️
    🔬 flags ≤ 10% of objects❌ FAIL29 flags against 37 objects (78%)

    Hardened enough? No.


    Needs-data flags (🔬, not scored)

    1. MFA / Conditional Access for mrojas and tkhan (Entra ID)
    2. sp-ledgerline-deploy credential type (secret, certificate or federated) and expiry
    3. deploy OS account sealing (shell, password, SSH keys)
    4. Dormant accounts and %wheel membership on web-01
    5. PAM stack on both hosts
    6. db-01 sudoers
    7. db-01 host firewall
    8. db-01 AppArmor status
    9. db-01 SUID/SGID inventory
    10. db-01 kernel sysctls
    11. db-01 auditd and log forwarding
    12. Root password state on web-01
    13. Provenance of /usr/local/bin/backup-helper
    14. Successful SSH logins on web-01 from external sources (/var/log/secure)
    15. Known-exploited status of RLSA-2026:6021 and the other pending advisories
    16. VNet/subnet layout, peering, effective NSG rules including defaults
    17. NSG flow logs
    18. Azure Activity Log retention and diagnostic settings
    19. Alert routing for backup failures and host health
    20. SIEM coverage and on-call
    21. Vulnerability scanning cadence
    22. Incident and host-evidence runbook
    23. File-integrity baseline (AIDE or equivalent)
    24. nginx TLS protocols, certificate, renewal and HTTP→HTTPS redirect
    25. Blob soft delete, versioning or backup on stledgerlineprod, and its access logs (anonymous reads of exports)
    26. RPO/RTO targets
    27. AWS bucket policy, IAM writers and where db-01's AWS credentials live
    28. Whether the S3 SSE-KMS key is customer-managed
    29. Package-source signing (gpgcheck, apt trusted=), Azure serial console/boot access, configuration management

    Handoff

    I reviewed ledgerline production: Azure rg-ledgerline-prod (web-01, db-01, stledgerlineprod, rsv-ledgerline-prod) and AWS ledgerline-offsite-backups, using evidence as of 2026-10-28.

    • Score: 2.0 (Critical / unsafe); 3.5 uncapped.
    • Gate: fail on all six conditions.
    • Findings: 3 Critical, 13 High.

    Next:

    1. Contain now:
      • Close the public SSH rule.
      • Turn off anonymous access on exports.
      • Rotate the ledgerline_export password and move it out of the 0644 file.
      • Do this only after the backup-helper and /var/log/secure checks above. If either check is unexplained, hand off to

    incident-fix instead of hardening.

    2. Design: a baseline for identity, network, continuity and monitoring.
    3.

    Propose: the rollout. It must open a second admin path to db-01 before web-01's SSH is restricted, so nobody is locked out.

    Also:

    • Any IaC behind these resources goes to terraform.
    • Collect the 🔬 items listed above to firm up the score.

    27.csv

    CSV · data export

    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

    Your platform is only as secure as its weakest configuration. This skill reviews and designs security hardening baselines for Linux hosts and cloud environments to eliminate attack vectors before they are exploited.

    What it does

    • Evidence Review audits existing configurations, IaC, and command outputs against a structured security rubric.
    • Baseline Design creates comprehensive baseline.md documents specifying controls, platform mappings, and read-only verification checks.
    • Rollout Sequencing generates staged implementation plans that prevent operator lockout and include mandatory rollback steps.
    • Security Scoring calculates a 0-10 grade per domain based on severity, confidence, and environment tier.
    • Asset Mapping builds exposure and privilege maps to visualize reachable services and administrative paths.

    How it works

    1. Select Mode: Choose between Review (audit), Design (specification), or Propose (implementation planning).
    2. Define Scope: Identify the platform (Debian, RHEL, AWS, Azure, etc.) and environment tier (Prod, Non-prod, Sandbox).
    3. Analyze Evidence: Provide config files, CLI exports, or scanner reports for the skill to evaluate against 30 core hardening principles.
    4. Generate Deliverable: Receive a findings report, a platform-specific baseline, or a sequenced rollout proposal.

    Frameworks & tools

    Works with Linux distributions (Debian/Ubuntu, RHEL, SUSE, Alpine, Arch), init systems (systemd, OpenRC), and major cloud providers (AWS, Azure, GCP, OCI). It ingests data from tools like Lynis, OpenSCAP, Prowler, ScoutSuite, and Trivy.

    Why this beats prompting it yourself

    Generic prompts often suggest destructive changes or ignore the "no-lockout" rule for remote systems. This skill enforces a systematic eight-domain rubric and requires a read-only verification check for every single control it proposes.

    Use cases

    • Auditing a golden image before it becomes the fleet standard.
    • Designing a multi-cloud landing zone baseline for a regulated environment.
    • Creating a non-disruptive plan to enable MFA and tighten SSH across legacy servers.
    • Performing a pre-production readiness check on a new Kubernetes node pool.

    Known limitations

    Does not perform active network scanning or password cracking. Requires the user to provide evidence via read-only commands or file exports. Does not directly execute changes on hosts.

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

    Does not execute changes or run active probes. User must provide evidence/configs. Distro and cloud neutral, requires platform context to be provided or inferred from evidence.

    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 14 days ago

    Permissions

    Read Files
    Write Files
    Listed14 days ago

    What's inside

    Frequently Asked Questions

    This skill goes beyond simple security checklists by generating staged rollout sequences that include mandatory rollback steps and read-only verification checks, ensuring your hardening measures don't cause service outages or operator lockouts.

    The hardening skill supports all major Linux distributions (including Debian, RHEL, and Alpine) and the primary cloud providers (AWS, Azure, GCP, and OCI), making it ideal for heterogeneous or multi-cloud environments.

    No, for security and safety, this skill operates in a 'read-only' advisory capacity; it analyzes your provided evidence (like config files or CLI exports) and provides the implementation plan for you to execute via your preferred CI/CD or configuration management tools.

    The skill is designed to ingest data from industry-standard security tools such as Lynis, OpenSCAP, Prowler, and ScoutSuite to provide a more comprehensive audit based on 30 core hardening principles.

    You receive the full skill logic including the eight-domain security rubric, templates for `baseline.md` documentation, and the decision-making framework for Review, Design, and Propose modes.

    New in Security