2026-08-23 12:02:23 +02:00
|
|
|
# Rendered from the executable spec/server-baseline.yaml profile selected by
|
|
|
|
|
# inventory/servers.yaml. Package, service, SSH, user, security, and firewall
|
|
|
|
|
# controls below consume baseline_* variables resolved by inventory_from_yaml.py.
|
feat: implement WP-0002 — Goss test suite, verify playbook, and ADR-002
- goss/baseline.yaml: assertions for all spec/server-baseline.yaml items
(packages, services, SSH config, UFW rules, admin user, fail2ban, HISTCONTROL)
- goss/vars/baseline-vars.yaml: parameterised ports and paths
- ansible/roles/goss/: installs Goss binary (v0.4.9), deploys tests,
runs assertions in TAP format, fetches report to reports/
- ansible/playbooks/verify.yaml: playbook wrapping the goss role
- Makefile: add 'make verify' target; update 'make status' with hint
- docs/adr/ADR-002: formal repo boundary — railiance-hosts vs railiance-bootstrap
- workplans/RAIL-HO-WP-0002: registered workstream 8fed53c2, T03–T06 done
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:38:48 +01:00
|
|
|
|
|
|
|
|
package:
|
2026-08-23 12:02:23 +02:00
|
|
|
{% for package_name in baseline_required_packages %}
|
|
|
|
|
{{ package_name }}:
|
feat: implement WP-0002 — Goss test suite, verify playbook, and ADR-002
- goss/baseline.yaml: assertions for all spec/server-baseline.yaml items
(packages, services, SSH config, UFW rules, admin user, fail2ban, HISTCONTROL)
- goss/vars/baseline-vars.yaml: parameterised ports and paths
- ansible/roles/goss/: installs Goss binary (v0.4.9), deploys tests,
runs assertions in TAP format, fetches report to reports/
- ansible/playbooks/verify.yaml: playbook wrapping the goss role
- Makefile: add 'make verify' target; update 'make status' with hint
- docs/adr/ADR-002: formal repo boundary — railiance-hosts vs railiance-bootstrap
- workplans/RAIL-HO-WP-0002: registered workstream 8fed53c2, T03–T06 done
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:38:48 +01:00
|
|
|
installed: true
|
2026-08-23 12:02:23 +02:00
|
|
|
{% endfor %}
|
feat: implement WP-0002 — Goss test suite, verify playbook, and ADR-002
- goss/baseline.yaml: assertions for all spec/server-baseline.yaml items
(packages, services, SSH config, UFW rules, admin user, fail2ban, HISTCONTROL)
- goss/vars/baseline-vars.yaml: parameterised ports and paths
- ansible/roles/goss/: installs Goss binary (v0.4.9), deploys tests,
runs assertions in TAP format, fetches report to reports/
- ansible/playbooks/verify.yaml: playbook wrapping the goss role
- Makefile: add 'make verify' target; update 'make status' with hint
- docs/adr/ADR-002: formal repo boundary — railiance-hosts vs railiance-bootstrap
- workplans/RAIL-HO-WP-0002: registered workstream 8fed53c2, T03–T06 done
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:38:48 +01:00
|
|
|
|
|
|
|
|
service:
|
2026-08-23 12:02:23 +02:00
|
|
|
{% for service_name in baseline_required_services %}
|
|
|
|
|
{{ service_name }}:
|
feat: implement WP-0002 — Goss test suite, verify playbook, and ADR-002
- goss/baseline.yaml: assertions for all spec/server-baseline.yaml items
(packages, services, SSH config, UFW rules, admin user, fail2ban, HISTCONTROL)
- goss/vars/baseline-vars.yaml: parameterised ports and paths
- ansible/roles/goss/: installs Goss binary (v0.4.9), deploys tests,
runs assertions in TAP format, fetches report to reports/
- ansible/playbooks/verify.yaml: playbook wrapping the goss role
- Makefile: add 'make verify' target; update 'make status' with hint
- docs/adr/ADR-002: formal repo boundary — railiance-hosts vs railiance-bootstrap
- workplans/RAIL-HO-WP-0002: registered workstream 8fed53c2, T03–T06 done
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:38:48 +01:00
|
|
|
enabled: true
|
|
|
|
|
running: true
|
2026-08-23 12:02:23 +02:00
|
|
|
{% endfor %}
|
feat: implement WP-0002 — Goss test suite, verify playbook, and ADR-002
- goss/baseline.yaml: assertions for all spec/server-baseline.yaml items
(packages, services, SSH config, UFW rules, admin user, fail2ban, HISTCONTROL)
- goss/vars/baseline-vars.yaml: parameterised ports and paths
- ansible/roles/goss/: installs Goss binary (v0.4.9), deploys tests,
runs assertions in TAP format, fetches report to reports/
- ansible/playbooks/verify.yaml: playbook wrapping the goss role
- Makefile: add 'make verify' target; update 'make status' with hint
- docs/adr/ADR-002: formal repo boundary — railiance-hosts vs railiance-bootstrap
- workplans/RAIL-HO-WP-0002: registered workstream 8fed53c2, T03–T06 done
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:38:48 +01:00
|
|
|
|
|
|
|
|
file:
|
2026-03-09 15:50:06 +00:00
|
|
|
/etc/ssh/sshd_config.d/10-hardening.conf:
|
feat: implement WP-0002 — Goss test suite, verify playbook, and ADR-002
- goss/baseline.yaml: assertions for all spec/server-baseline.yaml items
(packages, services, SSH config, UFW rules, admin user, fail2ban, HISTCONTROL)
- goss/vars/baseline-vars.yaml: parameterised ports and paths
- ansible/roles/goss/: installs Goss binary (v0.4.9), deploys tests,
runs assertions in TAP format, fetches report to reports/
- ansible/playbooks/verify.yaml: playbook wrapping the goss role
- Makefile: add 'make verify' target; update 'make status' with hint
- docs/adr/ADR-002: formal repo boundary — railiance-hosts vs railiance-bootstrap
- workplans/RAIL-HO-WP-0002: registered workstream 8fed53c2, T03–T06 done
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:38:48 +01:00
|
|
|
exists: true
|
2026-03-09 15:50:06 +00:00
|
|
|
contents:
|
2026-08-23 12:02:23 +02:00
|
|
|
{% for directive in baseline_ssh_directives | dict2items %}
|
|
|
|
|
- "{{ directive.key }} {{ directive.value }}"
|
|
|
|
|
{% endfor %}
|
feat: implement WP-0002 — Goss test suite, verify playbook, and ADR-002
- goss/baseline.yaml: assertions for all spec/server-baseline.yaml items
(packages, services, SSH config, UFW rules, admin user, fail2ban, HISTCONTROL)
- goss/vars/baseline-vars.yaml: parameterised ports and paths
- ansible/roles/goss/: installs Goss binary (v0.4.9), deploys tests,
runs assertions in TAP format, fetches report to reports/
- ansible/playbooks/verify.yaml: playbook wrapping the goss role
- Makefile: add 'make verify' target; update 'make status' with hint
- docs/adr/ADR-002: formal repo boundary — railiance-hosts vs railiance-bootstrap
- workplans/RAIL-HO-WP-0002: registered workstream 8fed53c2, T03–T06 done
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:38:48 +01:00
|
|
|
|
|
|
|
|
user:
|
2026-08-23 12:02:23 +02:00
|
|
|
{{ baseline_user.name }}:
|
feat: implement WP-0002 — Goss test suite, verify playbook, and ADR-002
- goss/baseline.yaml: assertions for all spec/server-baseline.yaml items
(packages, services, SSH config, UFW rules, admin user, fail2ban, HISTCONTROL)
- goss/vars/baseline-vars.yaml: parameterised ports and paths
- ansible/roles/goss/: installs Goss binary (v0.4.9), deploys tests,
runs assertions in TAP format, fetches report to reports/
- ansible/playbooks/verify.yaml: playbook wrapping the goss role
- Makefile: add 'make verify' target; update 'make status' with hint
- docs/adr/ADR-002: formal repo boundary — railiance-hosts vs railiance-bootstrap
- workplans/RAIL-HO-WP-0002: registered workstream 8fed53c2, T03–T06 done
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:38:48 +01:00
|
|
|
exists: true
|
2026-08-23 12:02:23 +02:00
|
|
|
shell: {{ baseline_user.shell }}
|
feat: implement WP-0002 — Goss test suite, verify playbook, and ADR-002
- goss/baseline.yaml: assertions for all spec/server-baseline.yaml items
(packages, services, SSH config, UFW rules, admin user, fail2ban, HISTCONTROL)
- goss/vars/baseline-vars.yaml: parameterised ports and paths
- ansible/roles/goss/: installs Goss binary (v0.4.9), deploys tests,
runs assertions in TAP format, fetches report to reports/
- ansible/playbooks/verify.yaml: playbook wrapping the goss role
- Makefile: add 'make verify' target; update 'make status' with hint
- docs/adr/ADR-002: formal repo boundary — railiance-hosts vs railiance-bootstrap
- workplans/RAIL-HO-WP-0002: registered workstream 8fed53c2, T03–T06 done
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:38:48 +01:00
|
|
|
|
|
|
|
|
command:
|
2026-08-23 12:02:23 +02:00
|
|
|
"{{ baseline_firewall.verification.command }}":
|
feat: implement WP-0002 — Goss test suite, verify playbook, and ADR-002
- goss/baseline.yaml: assertions for all spec/server-baseline.yaml items
(packages, services, SSH config, UFW rules, admin user, fail2ban, HISTCONTROL)
- goss/vars/baseline-vars.yaml: parameterised ports and paths
- ansible/roles/goss/: installs Goss binary (v0.4.9), deploys tests,
runs assertions in TAP format, fetches report to reports/
- ansible/playbooks/verify.yaml: playbook wrapping the goss role
- Makefile: add 'make verify' target; update 'make status' with hint
- docs/adr/ADR-002: formal repo boundary — railiance-hosts vs railiance-bootstrap
- workplans/RAIL-HO-WP-0002: registered workstream 8fed53c2, T03–T06 done
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:38:48 +01:00
|
|
|
exit-status: 0
|
|
|
|
|
stdout:
|
2026-08-23 12:02:23 +02:00
|
|
|
{% for pattern in baseline_firewall.verification.stdout %}
|
|
|
|
|
- '/{{ pattern }}/'
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
|
|
{% if baseline_firewall.mode == 'ufw' %}
|
2026-08-12 03:28:35 +02:00
|
|
|
{% for src in k3s_api_allowed_sources | default([]) %}
|
|
|
|
|
- '/6443\/tcp\s+ALLOW\s+{{ src.address | regex_escape }}/'
|
|
|
|
|
{% endfor %}
|
2026-08-15 15:41:59 +02:00
|
|
|
{% for src in flannel_vxlan_allowed_sources | default([]) %}
|
|
|
|
|
- '/8472\/udp\s+ALLOW\s+{{ src.address | regex_escape }}/'
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% for rule in ufw_extra_allowed | default([]) %}
|
|
|
|
|
- '/{{ rule.port }}\/{{ rule.proto | default("tcp") }}\s+ALLOW/'
|
|
|
|
|
{% endfor %}
|
2026-08-22 12:34:25 +02:00
|
|
|
{% for port in public_web_ports | default([]) %}
|
|
|
|
|
- '/{{ port }}\/tcp\s+ALLOW\s+Anywhere/'
|
|
|
|
|
{% endfor %}
|
2026-08-12 03:28:35 +02:00
|
|
|
|
|
|
|
|
"ufw status | grep -Ec '6443/tcp[[:space:]]+ALLOW[[:space:]]+Anywhere' || true":
|
|
|
|
|
exit-status: 0
|
|
|
|
|
stdout:
|
|
|
|
|
- "0"
|
2026-08-15 15:41:59 +02:00
|
|
|
"ufw status | grep -E '6443/tcp[[:space:]]+ALLOW' | grep -vc 'Anywhere' || true":
|
|
|
|
|
exit-status: 0
|
|
|
|
|
stdout:
|
|
|
|
|
- "{{ k3s_api_allowed_sources | default([]) | length }}"
|
|
|
|
|
"ufw status | grep -Ec '8472/udp[[:space:]]+ALLOW[[:space:]]+Anywhere' || true":
|
|
|
|
|
exit-status: 0
|
|
|
|
|
stdout:
|
|
|
|
|
- "0"
|
|
|
|
|
"ufw status | grep -E '8472/udp[[:space:]]+ALLOW' | grep -vc 'Anywhere' || true":
|
|
|
|
|
exit-status: 0
|
|
|
|
|
stdout:
|
|
|
|
|
- "{{ flannel_vxlan_allowed_sources | default([]) | length }}"
|
2026-08-12 03:28:35 +02:00
|
|
|
|
|
|
|
|
{% for src in k3s_api_revoked_sources | default([]) %}
|
|
|
|
|
"ufw status | grep -Ec '6443/tcp[[:space:]]+ALLOW[[:space:]]+{{ src.address }}' || true":
|
|
|
|
|
exit-status: 0
|
|
|
|
|
stdout:
|
|
|
|
|
- "0"
|
|
|
|
|
{% endfor %}
|
2026-08-23 12:02:23 +02:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
"grep NOPASSWD /etc/sudoers.d/{{ baseline_user.name }}":
|
feat: implement WP-0002 — Goss test suite, verify playbook, and ADR-002
- goss/baseline.yaml: assertions for all spec/server-baseline.yaml items
(packages, services, SSH config, UFW rules, admin user, fail2ban, HISTCONTROL)
- goss/vars/baseline-vars.yaml: parameterised ports and paths
- ansible/roles/goss/: installs Goss binary (v0.4.9), deploys tests,
runs assertions in TAP format, fetches report to reports/
- ansible/playbooks/verify.yaml: playbook wrapping the goss role
- Makefile: add 'make verify' target; update 'make status' with hint
- docs/adr/ADR-002: formal repo boundary — railiance-hosts vs railiance-bootstrap
- workplans/RAIL-HO-WP-0002: registered workstream 8fed53c2, T03–T06 done
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:38:48 +01:00
|
|
|
exit-status: 0
|
|
|
|
|
stdout:
|
|
|
|
|
- "NOPASSWD"
|
|
|
|
|
"grep -r HISTCONTROL /etc/profile.d/":
|
|
|
|
|
exit-status: 0
|
|
|
|
|
stdout:
|
2026-08-23 12:02:23 +02:00
|
|
|
- "{{ baseline_security.histcontrol }}"
|
|
|
|
|
{% for jail in baseline_security.fail2ban_jails %}
|
|
|
|
|
"fail2ban-client status {{ jail }}":
|
feat: implement WP-0002 — Goss test suite, verify playbook, and ADR-002
- goss/baseline.yaml: assertions for all spec/server-baseline.yaml items
(packages, services, SSH config, UFW rules, admin user, fail2ban, HISTCONTROL)
- goss/vars/baseline-vars.yaml: parameterised ports and paths
- ansible/roles/goss/: installs Goss binary (v0.4.9), deploys tests,
runs assertions in TAP format, fetches report to reports/
- ansible/playbooks/verify.yaml: playbook wrapping the goss role
- Makefile: add 'make verify' target; update 'make status' with hint
- docs/adr/ADR-002: formal repo boundary — railiance-hosts vs railiance-bootstrap
- workplans/RAIL-HO-WP-0002: registered workstream 8fed53c2, T03–T06 done
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:38:48 +01:00
|
|
|
exit-status: 0
|
|
|
|
|
stdout:
|
2026-08-23 12:02:23 +02:00
|
|
|
- "Status for the jail: {{ jail }}"
|
|
|
|
|
{% endfor %}
|
2026-03-09 15:50:06 +00:00
|
|
|
"test -x /usr/local/bin/age":
|
|
|
|
|
exit-status: 0
|
|
|
|
|
"test -x /usr/local/bin/sops":
|
|
|
|
|
exit-status: 0
|