Hardening Baseline: Linux & Cloud Security
- **Baseline Design** creates comprehensive `baseline.md` documents specifying controls, platform mappings, and read-only verification checks.
$5
Works with the AI Agents you already use
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:
- 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. - Customer invoice CSVs sit in a container that allows anonymous blob reads. The location is
stledgerlineprod/exports, withpublicAccess: blob. - 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:
- Establish the binary's provenance: who built it, and a hash compared against the source.
- 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
| Unit | identity | network | data | host | continuity | monitoring | governance | service | Unit (capped) | Uncapped |
|---|---|---|---|---|---|---|---|---|---|---|
A: Azure prod (rg-ledgerline-prod, web-01, db-01) | 3.3 | 2.0 | 2.0 | 5.0 | 4.3 | 1.7 | 3.8 | 1.7 | 2.0 | 3.0 |
B: AWS off-site backup (ledgerline-offsite-backups) | 🔬 | n/a | 10.0 | n/a | 6.0 | 🔬 | 10.0 | n/a | 6.0 | 8.7 |
| Estate | 2.0 | 3.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
| Asset | Kind | Tier | Threat tier | Data class | Owner (README / tag) | Service roles | Evidenced by |
|---|---|---|---|---|---|---|---|
| web-01 | Rocky 9.4 VM, public IP | prod | T1 (internet-facing). T2 is advisable for confidential data | confidential | platform team / tag missing | web (nginx → app on 127.0.0.1:8080), SSH | evidence/web-01/*, vm-list.json |
| db-01 | Debian 12 VM, private | prod | T1 (T2 advisable) | confidential (invoices) | platform team / tagged | database (PostgreSQL 15), SSH | evidence/db-01/*, vm-list.json |
PostgreSQL ledgerline | database on db-01 | prod | n/a | confidential | platform team | n/a | pg_hba.conf, postgresql.conf.excerpt |
| stledgerlineprod | Azure StorageV2 (exports, app-logs) | prod | T1 (public endpoint) | confidential | finance-apps / tag missing | n/a | storage-*.json |
| rsv-ledgerline-prod | Recovery Services vault | prod | n/a | holds confidential copies | platform team / tag missing | n/a | backup-vault.json |
| nsg-ledgerline-web, nsg-ledgerline-db, pip-web-01 | network | prod | n/a | n/a | web NSG and PIP untagged, db NSG tagged | n/a | nsg-list.json, public-ip-list.json |
| ledgerline-offsite-backups | S3 bucket in a separate AWS account | prod | n/a | confidential | platform team / tagged | n/a | offsite-backup-bucket.json |
Exposure map
| # | What | Reachable from | Controls in the path | Verdict |
|---|---|---|---|---|
| E1 | web-01 SSH :22 (v4 0.0.0.0, v6 [::]) | Internet (any) via pip-web-01 203.0.113.47 | NSG allow-ssh-temp (src *, dst *, proto *). Host nft policy accept. sshd password + root on | 🔴 Critical |
| E2 | web-01 HTTP/HTTPS :80/:443 (nginx) | Internet | NSG allow-https → 10.20.1.4 only. No WAF in the RG | 🟡 intended public role. TLS config 🔬 |
| E3 | web-01 app :8080 | loopback only | n/a | 🟢 |
| E4 | db-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 |
| E5 | db-01 SSH :22 (listens 10.20.2.4 only) | 10.20.1.0/24, i.e. from web-01 | keys only, no root, AllowGroups platform | 🟡 the hop is the internet-exposed host |
| E6 | stledgerlineprod blob endpoint | Internet. exports container anonymous blob read | allowBlobPublicAccess: true, publicNetworkAccess: Enabled, defaultAction: Allow, shared key on | 🔴 Critical |
| E7 | ledgerline-offsite-backups | AWS API only | Block Public Access (all 4), IsPublic: false | 🟢 |
Privilege map
| Principal | Kind | Where | Privilege | Notes |
|---|---|---|---|---|
| mrojas | human | Azure RG | Owner (standing, direct assignment) | MFA 🔬 |
| mrojas | human | web-01 | ALL=(ALL) NOPASSWD: ALL | individual rule, no re-auth |
| tkhan | human | Azure RG | Contributor (direct assignment) | MFA 🔬 |
| %wheel | group | web-01 | ALL=(ALL) ALL (password required) | members 🔬 |
| platform | group | db-01 | the only group allowed to SSH | sudoers on db-01 🔬 |
| root | built-in | web-01 | SSH login permitted, password auth on | db-01: root SSH off |
| deploy | CI service account | web-01 | NOPASSWD: /usr/bin/systemctl restart ledgerline | 🟢 command-scoped. Shell/password sealing 🔬 |
| sp-ledgerline-deploy | CI service principal | Azure RG | Contributor on the whole prod RG | secret vs federated credential and expiry 🔬 |
| ledgerline_app | DB role | PostgreSQL | ledgerline DB from 10.20.1.0/24, scram | 🟢 scoped line |
| ledgerline_export | DB role | PostgreSQL | password in world-readable file | see HD-DAT-02 |
any DB role incl. postgres | DB | PostgreSQL | password 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-30dand 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
| ID | Object | Anti-pattern | Conf. | Theory | Severity | Evidence |
|---|---|---|---|---|---|---|
| HD-NET-01 | web-01 SSH | Admin interface exposed to the internet with password and root login | ✅ | No direct administrative exposure (H9); strong authentication (H5); attributable identity (H4) | Critical | nsg-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-01 | stledgerlineprod / exports | Public data store holding confidential data | ✅ | Data private by default (H13) | Critical | storage-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-02 | db-01 /etc/app/db.conf | Production DB password in plain text, readable by every local user | ✅ | Secrets in a managed store (H12); file permissions (H10); credentials expire (H6) | Critical | evidence/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
| ID | Object | Anti-pattern | Conf. | Theory | Severity | Evidence |
|---|---|---|---|---|---|---|
| HD-SVC-01 | db-01 PostgreSQL | Database 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 internet | postgresql.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-03 | db-01 PostgreSQL | No TLS on the database: invoice data and passwords cross the subnet in clear | ✅ | Encrypt in transit (H11); require TLS (H26) | High | postgresql.conf.excerpt:4: ssl = off |
| HD-NET-02 | db-01 admin path | The admin hop is the internet-exposed web server. An exposed tier can start admin sessions inward | ✅ | H9; segregation (H1); directions and functions (H27) | High | nsg-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-03 | web-01 | No effective host firewall on a host with a public IP | ✅ | Defence in depth (H2); default deny (H8) | High | nft-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-01 | mrojas | Standing broad privilege: Owner on the prod RG plus passwordless root on web-01 | ✅ | Least privilege (H3); credentials expire (H6) | High | backup-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-02 | sp-ledgerline-deploy | CI identity with Contributor on the whole prod RG | ✅ | H3 | High | backup-vault.json:24. The deploy SP can delete VMs, the storage account and vault items. Credential type and expiry 🔬 |
| HD-HST-01 | web-01 | Pending 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-02 | db-01 | Pending security updates; automatic updates disabled | ✅ | H18 | High | apt-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-03 | web-01 /usr/local/bin/backup-helper | Unexpected SUID-root binary that no package owns | ✅ | File permissions and privilege boundaries (H10); baseline diff (H29); preserve a suspect host (H28) | High | find-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-01 | rsv-ledgerline-prod; ledgerline-offsite-backups | Backups never restored | ✅ (README confirms none) | Backups exist only when restores have worked (H15) | High | backup-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-02 | rsv-ledgerline-prod | Mutable backups in the same place as the source | ✅ | Isolated and immutable copies (H16) | High | immutabilitySettings.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-03 | rg-ledgerline-prod (VMs, storage, vault) | No deletion protection on prod | ✅ | Destruction needs a second step (H17) | High | lock-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-01 | web-01 | OS audit off on a prod internet-facing host | ✅ | Audit trails that survive the incident (H19) | High | auditctl-s.txt: enabled 0. auditd is inactive |
Medium
| ID | Object | Anti-pattern | Conf. | Theory | Severity | Evidence |
|---|---|---|---|---|---|---|
| HD-MON-02 | web-01 | Host logs kept only on the host | ✅ | H19 | Medium | rsyslog.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-03 | web-01, db-01 | Patch compliance untracked and unreported | ⚠️ (proxy: both hosts are months behind, auto-update is off, no scanner output exists) | H18; monitored operations (H20) | Medium | dnf-updateinfo-security.txt, apt-upgradable.txt |
| HD-SVC-02 | db-01 PostgreSQL | DB connections not audited | ✅ | H19 | Medium | postgresql.conf.excerpt:6: log_connections = off |
| HD-SVC-03 | web-01 portal | Internet-facing HTTP with no WAF in the path | ✅ | Defence in depth (H2) | Medium | The RG resource list has no gateway or WAF. allow-https admits the Internet service tag straight to the VM |
| HD-HST-04 | web-01 | Kernel hardening incomplete | ✅ | Secure, verified configuration (H14) | Medium | sysctl.txt: kernel.kptr_restrict = 0, kernel.dmesg_restrict = 0, net.ipv4.conf.all.accept_redirects = 1 |
| HD-NET-04 | nsg-ledgerline-db | No 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) | Medium | The 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-04 | stledgerlineprod | Shared-key access on, public network on, platform-managed keys for confidential data | ✅ / ⚠️ (whether apps use the account key) | H12; H13 | Medium | allowSharedKeyAccess: true, publicNetworkAccess: Enabled, encryption.keySource: Microsoft.Storage |
| HD-CON-04 | stledgerlineprod | Prod data store missing from backup scope | ⚠️ (blob soft-delete/versioning/vaulted backup not exported, and the exports can be regenerated from the DB) | H15 | Medium | Vault 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-03 | Azure RG | Roles granted to individuals, not groups | ✅ | H3; attributable identities (H4) | Medium | Owner and Contributor are assigned directly to mrojas@… and tkhan@… |
| HD-GOV-01 | 5 of 7 resources | Missing mandatory tags (owner, data class) | ✅ | Everything owned and classified (H21) | Medium | resource-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-02 | allow-ssh-temp | Uncontrolled "temporary" change with no description, expiry or ticket | ⚠️ | Controlled change with evidence (H22) | Medium | nsg-list.json:17-21 |
Low
| ID | Object | Anti-pattern | Conf. | Theory | Severity | Evidence |
|---|---|---|---|---|---|---|
| HD-HST-05 | db-01 | OS release past regular security support, now on Debian LTS (a smaller package set, ending mid-2028) | ⚠️ | H18 | Low (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):
Unit identity network data host continuity monitoring governance service A: Azure prod High Critical Critical High High High High (locks) High B: AWS off-site 🔬 n/a none n/a High 🔬 none n/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)
| # | Criterion | Sat./scope | p | Result |
|---|---|---|---|---|
| 1 | Human accounts nominative | 2/2 | 1.00 | 🟢 |
| 3 | Narrowest scope, no standing Owner | 1/3 (tkhan ok. mrojas Owner, SP Contributor RG-wide) | 0.33 | 🔴 |
| 4 | Granted to groups, not individuals | 0/2 | 0.00 | 🔴 |
| 6 | Built-in accounts disabled or locked | 1/2 (root SSH on web-01) | 0.50 | 🟡 |
| 8 | No NOPASSWD: ALL for humans | 2/3 | 0.67 | 🟡 |
| 11 | sudo command-scoped and logged | 1/3 | 0.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)
| # | Criterion | Sat./scope | p | Result |
|---|---|---|---|---|
| 1 | Default-deny behind each exposure | 1/5 | 0.20 | 🔴 |
| 2 | Rules name src/dst/port/proto | 3/4 | 0.75 | 🟡 |
| 3 | Rules named and described | 3/4 | 0.75 | 🟡 |
| 4 | Admin interfaces private only | 1/2 | 0.50 | 🟡 |
| 5 | No public IP without a public role | 2/2 | 1.00 | 🟢 |
| 7 | Data services private | 1/2 (Postgres private via NSG; storage public) | 0.50 | 🟡 |
| 8 | Data-tier egress controlled | 0/1 ⚠️ | n/a | 🟡 (⚠️ cannot grade 🔴) |
| 9 | SSH meets NET-13 | 1/2 | 0.50 | 🟡 |
| 10 | Active host firewall | 0/1 (db-01 🔬) | 0.00 | 🔴 |
| 11 | Exposed tier cannot initiate admin inward | 0/1 | 0.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)
| # | Criterion | Sat./scope | p | Result |
|---|---|---|---|---|
| 1 | Encrypted at rest | 4/4 | 1.00 | 🟢 |
| 2 | Confidential stores with CMK | 0/1 | 0.00 | 🔴 |
| 3 | Endpoints TLS 1.2+ | 1/2 (storage ok, Postgres none, nginx 🔬) | 0.50 | 🟡 |
| 4 | Secrets only in a store | 0/1 | 0.00 | 🔴 |
| 5 | Public access blocked | 0/1 | 0.00 | 🔴 |
| 6 | No account keys in apps | 0/1 ⚠️ | n/a | 🟡 |
| 7 | DB nominative, restricted, audited | 0/1 | 0.00 | 🔴 |
| 9 | TLS required on DB | 0/1 | 0.00 | 🔴 |
Base = 4/16 × 10 = 2.5. Cap Critical = 2.0. Score 2.0.
host (2: web-01, db-01)
| # | Criterion | Sat./scope | p | Result |
|---|---|---|---|---|
| 1 | Supported release | 1/2 (web-01 on a superseded minor) | 0.50 | 🟡 |
| 2 | Within patch window, enrolled | 0/2 | 0.00 | 🔴 |
| 4 | Services limited to role | 2/2 ⚠️ | 1.00 | 🟢 |
| 6 | SUID limited to shipped set | 0/1 (db-01 🔬) | 0.00 | 🔴 |
| 7 | MAC enforcing | 1/1 (db-01 🔬) | 1.00 | 🟢 |
| 8 | Kernel hardening | 0/1 (db-01 🔬) | 0.00 | 🔴 |
| 10 | Time synchronised | 2/2 | 1.00 | 🟢 |
Base = 7/14 × 10 = 5.0. Cap High = 6.0. Score 5.0.
continuity (4: web-01, db-01, stledgerlineprod, vault)
| # | Criterion | Sat./scope | p | Result |
|---|---|---|---|---|
| 1 | Stateful assets with backup | 2/3 ⚠️ | 0.67 | 🟡 |
| 2 | Jobs succeeding (alerting 🔬) | 2/2 | 1.00 | 🟢 |
| 3 | Restore tested within retention | 0/2 | 0.00 | 🔴 |
| 5 | Immutable copy for prod | 1/2 (db-01 via AWS) | 0.50 | 🟡 |
| 6 | Copy isolated from source creds | 1/2 (db-01 via AWS) | 0.50 | 🟡 |
| 8 | Deletion-protected | 0/4 | 0.00 | 🔴 |
| 9 | Scope manifest matches register | 0/1 ⚠️ | n/a | 🟡 |
Base = 6/14 × 10 = 4.3. Cap High = 6.0. Score 4.3.
monitoring (3: web-01, db-01, Azure subscription)
| # | Criterion | Sat./scope | p | Result |
|---|---|---|---|---|
| 2 | Logs forwarded off-host | 0/1 (db-01 🔬) | 0.00 | 🔴 |
| 3 | OS audit on prod hosts | 0/1 (db-01 🔬) | 0.00 | 🔴 |
| 7 | Patch compliance reported | 0/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)
| # | Criterion | Sat./scope | p | Result |
|---|---|---|---|---|
| 2 | Resources in a product container | 7/7 | 1.00 | 🟢 |
| 4 | Mandatory tags present | 2/7 | 0.29 | 🔴 |
| 5 | Prod container and critical resources locked | 0/5 | 0.00 | 🔴 |
| 6 | Changes traceable to a ticket | 0/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)
| # | Criterion | Sat./scope | p | Result |
|---|---|---|---|---|
| 1 | Daemons confined with an in-service ACL | 1/2 | 0.50 | 🟡 |
| 6 | DB: private listener, scoped creds, TLS required | 0/1 | 0.00 | 🔴 |
| 7 | Web: read-only docroot, WAF enforcing | 0/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
| Condition | Result | Why |
|---|---|---|
| Capped score ≥ 9.0 | ❌ FAIL | 2.0 (estate), 2.0 (Unit A), 6.0 (Unit B) |
| No open Critical or High | ❌ FAIL | 3 Critical, 13 High |
| No admin interface reachable from the internet | ❌ FAIL | E1: web-01 SSH from * with password and root login |
| Every privileged human is nominative and MFA-protected; no standing owner/root in daily use | ❌ FAIL | MFA 🔬 (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 | ❌ FAIL | No 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 | ❌ FAIL | 29 flags against 37 objects (78%) |
Hardened enough? No.
Needs-data flags (🔬, not scored)
- MFA / Conditional Access for mrojas and tkhan (Entra ID)
sp-ledgerline-deploycredential type (secret, certificate or federated) and expirydeployOS account sealing (shell, password, SSH keys)- Dormant accounts and
%wheelmembership on web-01 - PAM stack on both hosts
- db-01 sudoers
- db-01 host firewall
- db-01 AppArmor status
- db-01 SUID/SGID inventory
- db-01 kernel sysctls
- db-01 auditd and log forwarding
- Root password state on web-01
- Provenance of
/usr/local/bin/backup-helper - Successful SSH logins on web-01 from external sources (
/var/log/secure) - Known-exploited status of RLSA-2026:6021 and the other pending advisories
- VNet/subnet layout, peering, effective NSG rules including defaults
- NSG flow logs
- Azure Activity Log retention and diagnostic settings
- Alert routing for backup failures and host health
- SIEM coverage and on-call
- Vulnerability scanning cadence
- Incident and host-evidence runbook
- File-integrity baseline (AIDE or equivalent)
- nginx TLS protocols, certificate, renewal and HTTP→HTTPS redirect
- Blob soft delete, versioning or backup on stledgerlineprod, and its access logs (anonymous reads of
exports) - RPO/RTO targets
- AWS bucket policy, IAM writers and where db-01's AWS credentials live
- Whether the S3 SSE-KMS key is customer-managed
- Package-source signing (
gpgcheck, apttrusted=), 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 AWSledgerline-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:
- Contain now:
- Close the public SSH rule.
- Turn off anonymous access on
exports.- Rotate the
ledgerline_exportpassword and move it out of the 0644 file.- Do this only after the
backup-helperand/var/log/securechecks 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
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.mddocuments 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
- Select Mode: Choose between Review (audit), Design (specification), or Propose (implementation planning).
- Define Scope: Identify the platform (Debian, RHEL, AWS, Azure, etc.) and environment tier (Prod, Non-prod, Sandbox).
- Analyze Evidence: Provide config files, CLI exports, or scanner reports for the skill to evaluate against 30 core hardening principles.
- 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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